diff options
author | Max Horn | 2003-04-30 12:43:56 +0000 |
---|---|---|
committer | Max Horn | 2003-04-30 12:43:56 +0000 |
commit | 81c3ade33193a226cc835d2e1dc905732923bff0 (patch) | |
tree | a60f57b6086a2c27f65b9651e30c2602fa0355c3 /common/util.cpp | |
parent | 42f156ddada4c6f51e1612e9b0f18ec7c9dd9cee (diff) | |
download | scummvm-rg350-81c3ade33193a226cc835d2e1dc905732923bff0.tar.gz scummvm-rg350-81c3ade33193a226cc835d2e1dc905732923bff0.tar.bz2 scummvm-rg350-81c3ade33193a226cc835d2e1dc905732923bff0.zip |
more PalmOS changes
svn-id: r7220
Diffstat (limited to 'common/util.cpp')
-rw-r--r-- | common/util.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/common/util.cpp b/common/util.cpp index 69e019171c..5a60127988 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -24,8 +24,9 @@ // // 8-bit alpha blending routines // +#ifndef __PALM_OS__ static int BlendCache[256][256]; - +#endif // // Find the entry in the given palette which matches the color defined by // the tripel (r,b,g) most closely. @@ -54,6 +55,7 @@ int RGBMatch(byte *palette, int r, int g, int b) { // Blend two 8 bit colors into a third, all colors being defined by palette indices. // int Blend(int src, int dst, byte *palette) { +#ifndef __PALM_OS__ int r, g, b; int alpha = 128; // Level of transparency [0-256] byte *srcpal = palette + (dst * 3); @@ -75,17 +77,22 @@ int Blend(int src, int dst, byte *palette) { b /= 256; return (BlendCache[dst][src] = RGBMatch(palette, r , g , b )); +#else + return 0; +#endif } // // Reset the blending cache // void ClearBlendCache(byte *palette, int weight) { +#ifndef __PALM_OS__ for (int i = 0; i < 256; i++) for (int j = 0 ; j < 256 ; j++) // BlendCache[i][j] = i; // No alphablending // BlendCache[i][j] = j; // 100% translucent BlendCache[i][j] = -1; // Enable alphablending +#endif } // |