[Scummvm-cvs-logs] SF.net SVN: scummvm:[49713] scummvm/trunk/engines/drascula
sev at users.sourceforge.net
sev at users.sourceforge.net
Tue Jun 15 12:21:42 CEST 2010
Revision: 49713
http://scummvm.svn.sourceforge.net/scummvm/?rev=49713&view=rev
Author: sev
Date: 2010-06-15 10:21:42 +0000 (Tue, 15 Jun 2010)
Log Message:
-----------
Drascula: Fixed bug #2826608.
Bug #2826608: "DRASCULA: Cursor GFX error" fixed by introducing
separate buffer for cursors. This also fixes the root cause of
the problem.
Modified Paths:
--------------
scummvm/trunk/engines/drascula/drascula.cpp
scummvm/trunk/engines/drascula/drascula.h
scummvm/trunk/engines/drascula/graphics.cpp
scummvm/trunk/engines/drascula/interface.cpp
Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp 2010-06-15 10:21:18 UTC (rev 49712)
+++ scummvm/trunk/engines/drascula/drascula.cpp 2010-06-15 10:21:42 UTC (rev 49713)
@@ -244,6 +244,8 @@
if (currentChapter != 3)
loadPic(96, frontSurface, COMPLETE_PAL);
+ loadPic(99, cursorSurface);
+
if (currentChapter == 1) {
} else if (currentChapter == 2) {
loadPic("pts.alg", drawSurface2);
Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h 2010-06-15 10:21:18 UTC (rev 49712)
+++ scummvm/trunk/engines/drascula/drascula.h 2010-06-15 10:21:42 UTC (rev 49713)
@@ -391,6 +391,7 @@
// Graphics buffers/pointers
byte *bgSurface;
byte *backSurface;
+ byte *cursorSurface;
byte *drawSurface3;
byte *drawSurface2;
byte *tableSurface;
Modified: scummvm/trunk/engines/drascula/graphics.cpp
===================================================================
--- scummvm/trunk/engines/drascula/graphics.cpp 2010-06-15 10:21:18 UTC (rev 49712)
+++ scummvm/trunk/engines/drascula/graphics.cpp 2010-06-15 10:21:42 UTC (rev 49713)
@@ -54,6 +54,7 @@
assert(crosshairCursor);
mouseCursor = (byte *)malloc(OBJWIDTH * OBJHEIGHT);
assert(mouseCursor);
+ cursorSurface = (byte *)malloc(64000);
}
void DrasculaEngine::freeMemory() {
@@ -67,6 +68,7 @@
free(frontSurface);
free(crosshairCursor);
free(mouseCursor);
+ free(cursorSurface);
}
void DrasculaEngine::moveCursor() {
Modified: scummvm/trunk/engines/drascula/interface.cpp
===================================================================
--- scummvm/trunk/engines/drascula/interface.cpp 2010-06-15 10:21:18 UTC (rev 49712)
+++ scummvm/trunk/engines/drascula/interface.cpp 2010-06-15 10:21:42 UTC (rev 49713)
@@ -78,7 +78,7 @@
}
for (int i = 0; i < OBJHEIGHT; i++)
- memcpy(mouseCursor + i * OBJWIDTH, backSurface + OBJWIDTH * verb + (c + i) * 320, OBJWIDTH);
+ memcpy(mouseCursor + i * OBJWIDTH, cursorSurface + OBJWIDTH * verb + (c + i) * 320, OBJWIDTH);
setCursor(kCursorCurrentItem);
if (verb > 0) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list