aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2006-04-17 19:52:31 +0000
committerJohannes Schickel2006-04-17 19:52:31 +0000
commit0eee3fe5919df695af2b3a8b2f9845cf7b1a771c (patch)
tree2e3125603f8fd0429e69df98bdd81caa2fa15c65
parent2fb0ce8c5781560bb87ab85324c67f78a00f127e (diff)
downloadscummvm-rg350-0eee3fe5919df695af2b3a8b2f9845cf7b1a771c.tar.gz
scummvm-rg350-0eee3fe5919df695af2b3a8b2f9845cf7b1a771c.tar.bz2
scummvm-rg350-0eee3fe5919df695af2b3a8b2f9845cf7b1a771c.zip
- Implements copyRegion without transparency checking
- Uses copyRegion without transparency checking to fix credits drawing bugs svn-id: r21989
-rw-r--r--engines/kyra/screen.cpp4
-rw-r--r--engines/kyra/screen.h3
-rw-r--r--engines/kyra/sequences_v1.cpp4
3 files changed, 6 insertions, 5 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 31abb70746..29aa322a34 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -312,7 +312,7 @@ void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPag
if (flags & CR_X_FLIPPED) {
while (h--) {
for (int i = 0; i < w; ++i) {
- if (src[i]) {
+ if (src[i] || (flags & CR_NO_P_CHECK)) {
dst[w-i] = src[i];
}
}
@@ -322,7 +322,7 @@ void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPag
} else {
while (h--) {
for (int i = 0; i < w; ++i) {
- if (src[i]) {
+ if (src[i] || (flags & CR_NO_P_CHECK)) {
dst[i] = src[i];
}
}
diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h
index b3fed26413..c5ab29f682 100644
--- a/engines/kyra/screen.h
+++ b/engines/kyra/screen.h
@@ -66,7 +66,8 @@ public:
enum CopyRegionFlags {
CR_X_FLIPPED = 0x01,
- CR_CLIPPED = 0x02
+ CR_CLIPPED = 0x02,
+ CR_NO_P_CHECK = 0x04
};
enum DrawShapeFlags {
diff --git a/engines/kyra/sequences_v1.cpp b/engines/kyra/sequences_v1.cpp
index 55574a80ff..0f1c36ceed 100644
--- a/engines/kyra/sequences_v1.cpp
+++ b/engines/kyra/sequences_v1.cpp
@@ -1093,7 +1093,7 @@ void KyraEngine::seq_playCredits() {
while (!finished) {
uint32 startLoop = _system->getMillis();
if (bottom > 175) {
- _screen->copyRegion(8, 32, 8, 32, 312, 128, 4, 2);
+ _screen->copyRegion(8, 32, 8, 32, 312, 128, 4, 2, Screen::CR_NO_P_CHECK);
bottom = 0;
for (int i = 0; i < numStrings; i++) {
@@ -1106,7 +1106,7 @@ void KyraEngine::seq_playCredits() {
if (strings[i].y > bottom)
bottom = strings[i].y;
}
- _screen->copyRegion(8, 32, 8, 32, 312, 128, 2, 0);
+ _screen->copyRegion(8, 32, 8, 32, 312, 128, 2, 0, Screen::CR_NO_P_CHECK);
_screen->updateScreen();
}