[Scummvm-cvs-logs] scummvm master -> ef3b591b289136194cec9f8a209ff2645c98b576
athrxx
athrxx at scummvm.org
Thu Dec 29 19:14:30 CET 2011
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d0be9c0a58 KYRA: (EOB) - fix some valgrind warnings
b4baac065d KYRA: (EOB) - fix EOB 1 intro sound bug
ef3b591b28 KYRA: (EOB) - fix warning about overloaded virtual function being only partially overridden
Commit: d0be9c0a583860058a5f7212d62a8c9a086329d5
https://github.com/scummvm/scummvm/commit/d0be9c0a583860058a5f7212d62a8c9a086329d5
Author: athrxx (athrxx at scummvm.org)
Date: 2011-12-29T10:12:34-08:00
Commit Message:
KYRA: (EOB) - fix some valgrind warnings
(overlapping source/dest)
Changed paths:
engines/kyra/screen.cpp
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index b6383c8..19314a5 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -828,6 +828,9 @@ void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPag
const uint8 *src = getPagePtr(srcPage) + y1 * SCREEN_W + x1;
uint8 *dst = getPagePtr(dstPage) + y2 * SCREEN_W + x2;
+ if (src == dst)
+ return;
+
if (dstPage == 0 || dstPage == 1)
addDirtyRect(x2, y2, w, h);
@@ -835,7 +838,7 @@ void Screen::copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPag
if (flags & CR_NO_P_CHECK) {
while (h--) {
- memcpy(dst, src, w);
+ memmove(dst, src, w);
src += SCREEN_W;
dst += SCREEN_W;
}
Commit: b4baac065df70999ed08017c89166f0fbe6164ea
https://github.com/scummvm/scummvm/commit/b4baac065df70999ed08017c89166f0fbe6164ea
Author: athrxx (athrxx at scummvm.org)
Date: 2011-12-29T10:12:35-08:00
Commit Message:
KYRA: (EOB) - fix EOB 1 intro sound bug
Changed paths:
engines/kyra/sequences_eob.cpp
diff --git a/engines/kyra/sequences_eob.cpp b/engines/kyra/sequences_eob.cpp
index 4b094f4..dc479a8 100644
--- a/engines/kyra/sequences_eob.cpp
+++ b/engines/kyra/sequences_eob.cpp
@@ -498,12 +498,12 @@ void EoBEngine::seq_king() {
_screen->copyRegion(0, dy[i] - 2, (advEncX[i] + 8) << 3, dy[i] - 2, advEncW[i] << 3, 182 - dy[i], 4, 0, Screen::CR_NO_P_CHECK);
}
- if (_rnd.getRandomNumber(255) & 3)
- _sound->playTrack(7);
-
runloop = true;
}
+ if (!(_rnd.getRandomNumber(255) & 3))
+ _sound->playTrack(7);
+
_screen->updateScreen();
delayUntil(end);
}
Commit: ef3b591b289136194cec9f8a209ff2645c98b576
https://github.com/scummvm/scummvm/commit/ef3b591b289136194cec9f8a209ff2645c98b576
Author: athrxx (athrxx at scummvm.org)
Date: 2011-12-29T10:12:36-08:00
Commit Message:
KYRA: (EOB) - fix warning about overloaded virtual function being only partially overridden
Changed paths:
engines/kyra/darkmoon.h
engines/kyra/eob.h
engines/kyra/eobcommon.h
diff --git a/engines/kyra/darkmoon.h b/engines/kyra/darkmoon.h
index 8abbc2b..78413d2 100644
--- a/engines/kyra/darkmoon.h
+++ b/engines/kyra/darkmoon.h
@@ -111,6 +111,7 @@ private:
bool killMonsterExtra(EoBMonsterInPlay *m);
// Level
+ void loadDoorShapes(int doorType1, int shapeId1, int doorType2, int shapeId2) {}
const uint8 *loadDoorShapes(const char *filename, int doorIndex, const uint8 *shapeDefs);
void drawDoorIntern(int type, int, int x, int y, int w, int wall, int mDim, int16, int16);
diff --git a/engines/kyra/eob.h b/engines/kyra/eob.h
index 6123c26..ce71c76 100644
--- a/engines/kyra/eob.h
+++ b/engines/kyra/eob.h
@@ -112,6 +112,7 @@ private:
void updateScriptTimersExtra();
// Level
+ const uint8 *loadDoorShapes(const char *filename, int doorIndex, const uint8 *shapeDefs) { return 0; }
void loadDoorShapes(int doorType1, int shapeId1, int doorType2, int shapeId2);
void drawDoorIntern(int type, int index, int x, int y, int w, int wall, int mDim, int16 y1, int16 y2);
diff --git a/engines/kyra/eobcommon.h b/engines/kyra/eobcommon.h
index 9284a18..f02b76d 100644
--- a/engines/kyra/eobcommon.h
+++ b/engines/kyra/eobcommon.h
@@ -582,8 +582,8 @@ protected:
void releaseDecorations();
void releaseDoorShapes();
void toggleWallState(int wall, int flags);
- virtual void loadDoorShapes(int doorType1, int shapeId1, int doorType2, int shapeId2) {}
- virtual const uint8 *loadDoorShapes(const char *filename, int doorIndex, const uint8*shapeDefs) { return (const uint8*)filename; }
+ virtual void loadDoorShapes(int doorType1, int shapeId1, int doorType2, int shapeId2) = 0;
+ virtual const uint8 *loadDoorShapes(const char *filename, int doorIndex, const uint8 *shapeDefs) = 0;
void drawScene(int refresh);
void drawSceneShapes(int start = 0);
More information about the Scummvm-git-logs
mailing list