diff options
author | Eugene Sandulenko | 2004-08-10 23:04:52 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-08-10 23:04:52 +0000 |
commit | b13fc9f366d45736c3edd04399d2590aa2fb0cf5 (patch) | |
tree | 3e565d7af4fea4032fc69cf9291f5e7afb218a1f /saga/transitions.cpp | |
parent | 9956666a7a3740d2732bb1bb76089eb66051073f (diff) | |
download | scummvm-rg350-b13fc9f366d45736c3edd04399d2590aa2fb0cf5.tar.gz scummvm-rg350-b13fc9f366d45736c3edd04399d2590aa2fb0cf5.tar.bz2 scummvm-rg350-b13fc9f366d45736c3edd04399d2590aa2fb0cf5.zip |
Improved intro. Now it correctly shows game title.
svn-id: r14544
Diffstat (limited to 'saga/transitions.cpp')
-rw-r--r-- | saga/transitions.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/saga/transitions.cpp b/saga/transitions.cpp index 93daa18282..c366e1289d 100644 --- a/saga/transitions.cpp +++ b/saga/transitions.cpp @@ -26,13 +26,20 @@ namespace Saga { +/*! @brief dissolve one image with another + + @param flag if set to 1, do zero masking +*/ int TRANSITION_Dissolve(byte *dst_img, int dst_w, int dst_h, int dst_p, const byte *src_img, - int src_p, int flags, double percent) { + int src_w, int src_h, int src_p, int flags, int x, int y, + double percent) { #define XOR_MASK 0xB400; int pixelcount = dst_w * dst_h; int seqlimit = (int)(65535 * percent); int seq = 1; - int i; + int i, x1, y1; + Common::Rect clip(x, y, x+src_w, y+src_h); + byte color; for (i = 0; i < seqlimit; i++) { if (seq & 1) { @@ -48,7 +55,14 @@ int TRANSITION_Dissolve(byte *dst_img, int dst_w, int dst_h, int dst_p, const by if (seq >= pixelcount) { continue; } else { - dst_img[seq] = src_img[seq]; + x1 = seq % dst_w; + y1 = seq / dst_w; + + if (clip.contains(x1, y1)) { + color = src_img[(x1-x)+src_w*(y1-y)]; + if (flags == 0 || color) + dst_img[seq] = color; + } } } |