diff options
author | Joseph Jezak <josejx@gentoo.org> | 2004-12-16 14:26:49 +0000 |
---|---|---|
committer | Joseph Jezak <josejx@gentoo.org> | 2004-12-16 14:26:49 +0000 |
commit | bbb43d9da9c794366784ce0f19c72720c6f24de4 (patch) | |
tree | 962c903e6f43e0c9151b85d84e4b14e8ff10f8f7 /games-puzzle/easysok/files | |
parent | New version (Manifest recommit) (diff) | |
download | gentoo-2-bbb43d9da9c794366784ce0f19c72720c6f24de4.tar.gz gentoo-2-bbb43d9da9c794366784ce0f19c72720c6f24de4.tar.bz2 gentoo-2-bbb43d9da9c794366784ce0f19c72720c6f24de4.zip |
Added image blending patch for ppc, possibly other big-endian arches. Fixes bug #72721.
Diffstat (limited to 'games-puzzle/easysok/files')
-rw-r--r-- | games-puzzle/easysok/files/image_effect-ppc.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/games-puzzle/easysok/files/image_effect-ppc.patch b/games-puzzle/easysok/files/image_effect-ppc.patch new file mode 100644 index 000000000000..744d33ece96e --- /dev/null +++ b/games-puzzle/easysok/files/image_effect-ppc.patch @@ -0,0 +1,35 @@ +--- src/image_effect.cpp 2004-12-12 23:33:38.452490448 +1100 ++++ easysok-0.3.4-clean/src/image_effect.cpp 2003-12-31 04:42:50.000000000 +1100 +@@ -91,20 +91,20 @@ + for (int y = 0; y < height; ++y) + { + uchar * upper_line = upper.scanLine(y + upper_y_offset) + ((width + upper_x_offset) << 2) - 1; +- uchar * lower_line = lower.scanLine(y + y_offset) + ((width + x_offset) << 2) - 1; ++ uchar * lower_line = lower.scanLine(y + y_offset) + ((width + x_offset) << 2) - 1; + + int x = width - 1; + + do + { +- while ( !(alpha = *upper_line) && (x > 0) ) ++ while ( !(alpha = *(upper_line - 3)) && (x > 0) ) + { + upper_line -= 4; + lower_line -= 4; + --x; + } + +- *lower_line = 255 - (((255 - *upper_line) * (255 - *lower_line) + 255) >> 8); ++ *lower_line += ( ((*upper_line - *lower_line) * alpha) >> 8); + --upper_line; + --lower_line; + *lower_line += ( ((*upper_line - *lower_line) * alpha) >> 8); +@@ -113,7 +113,7 @@ + *lower_line += ( ((*upper_line - *lower_line) * alpha) >> 8); + --upper_line; + --lower_line; +- *lower_line += ( ((*upper_line - *lower_line) * alpha) >> 8); ++ *lower_line = 255 - (((255 - *upper_line) * (255 - *lower_line) + 255) >> 8); + --upper_line; + --lower_line; + --x; |