[Scummvm-git-logs] scummvm master -> 96b5fc817cff0b237e179ec3017aa6fd06a284e2
dreammaster
dreammaster at scummvm.org
Mon Sep 19 03:13:40 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
96b5fc817c XEEN: Fix merging graphic pages to screen
Commit: 96b5fc817cff0b237e179ec3017aa6fd06a284e2
https://github.com/scummvm/scummvm/commit/96b5fc817cff0b237e179ec3017aa6fd06a284e2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-09-18T21:12:46-04:00
Commit Message:
XEEN: Fix merging graphic pages to screen
Changed paths:
engines/xeen/events.cpp
engines/xeen/screen.cpp
engines/xeen/worldofxeen/darkside_cutscenes.cpp
diff --git a/engines/xeen/events.cpp b/engines/xeen/events.cpp
index e50d689..f891649 100644
--- a/engines/xeen/events.cpp
+++ b/engines/xeen/events.cpp
@@ -150,7 +150,7 @@ bool EventsManager::wait(uint numFrames, bool interruptable) {
return true;
}
- return false;
+ return _vm->shouldQuit();
}
void EventsManager::ipause(uint amount) {
diff --git a/engines/xeen/screen.cpp b/engines/xeen/screen.cpp
index 59978cf..bcd298d 100644
--- a/engines/xeen/screen.cpp
+++ b/engines/xeen/screen.cpp
@@ -369,14 +369,17 @@ void Screen::horizMerge(int xp) {
for (int y = 0; y < SCREEN_HEIGHT; ++y) {
byte *destP = (byte *)getBasePtr(0, y);
- const byte *srcP = (const byte *)_pages[0].getBasePtr(0, y);
+ const byte *srcP = (const byte *)_pages[0].getBasePtr(xp, y);
Common::copy(srcP, srcP + SCREEN_WIDTH - xp, destP);
if (xp != 0) {
+ destP = (byte *)getBasePtr(SCREEN_WIDTH - xp, y);
srcP = (const byte *)_pages[1].getBasePtr(0, y);
- Common::copy(srcP + SCREEN_WIDTH - xp, srcP + SCREEN_WIDTH, destP + SCREEN_WIDTH - xp);
+ Common::copy(srcP, srcP + xp, destP);
}
}
+
+ markAllDirty();
}
void Screen::vertMerge(int yp) {
@@ -389,11 +392,13 @@ void Screen::vertMerge(int yp) {
Common::copy(srcP, srcP + SCREEN_WIDTH, destP);
}
- for (int y = SCREEN_HEIGHT - yp; y < SCREEN_HEIGHT; ++y) {
+ for (int y = 0; y < (SCREEN_HEIGHT - yp); ++y) {
const byte *srcP = (const byte *)_pages[1].getBasePtr(0, y);
- byte *destP = (byte *)getBasePtr(0, y);
+ byte *destP = (byte *)getBasePtr(0, SCREEN_HEIGHT - yp + y);
Common::copy(srcP, srcP + SCREEN_WIDTH, destP);
}
+
+ markAllDirty();
}
void Screen::draw(void *data) {
diff --git a/engines/xeen/worldofxeen/darkside_cutscenes.cpp b/engines/xeen/worldofxeen/darkside_cutscenes.cpp
index f845a62..99f6346 100644
--- a/engines/xeen/worldofxeen/darkside_cutscenes.cpp
+++ b/engines/xeen/worldofxeen/darkside_cutscenes.cpp
@@ -351,7 +351,8 @@ bool DarkSideCutscenes::showDarkSideEnding() {
if (!(xp % 22))
sound.playSound(whoosh);
- events.wait(1);
+ if (events.wait(1))
+ return false;
if (++ctr % 2)
frameNum = (frameNum + 1) % 10;
@@ -361,11 +362,10 @@ bool DarkSideCutscenes::showDarkSideEnding() {
else if (xp > 150)
++yp;
}
-
- // Play landing thud
if (events.wait(10))
return false;
+ // Play landing thud
sound.playSound("thud.voc");
while (!_vm->shouldQuit() && !events.isKeyMousePressed()
&& sound.isPlaying()) {
More information about the Scummvm-git-logs
mailing list