[Scummvm-cvs-logs] SF.net SVN: scummvm: [21668] scummvm/trunk/engines/simon
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Fri Apr 7 05:58:03 CEST 2006
Revision: 21668
Author: kirben
Date: 2006-04-07 05:57:40 -0700 (Fri, 07 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21668&view=rev
Log Message:
-----------
Add scrolling code for oracle in FF
Modified Paths:
--------------
scummvm/trunk/engines/simon/cursor.cpp
scummvm/trunk/engines/simon/oracle.cpp
Modified: scummvm/trunk/engines/simon/cursor.cpp
===================================================================
--- scummvm/trunk/engines/simon/cursor.cpp 2006-04-07 11:47:58 UTC (rev 21667)
+++ scummvm/trunk/engines/simon/cursor.cpp 2006-04-07 12:57:40 UTC (rev 21668)
@@ -224,7 +224,7 @@
};
void SimonEngine::drawMousePointer() {
- //debug(0, "Mouse %d Anim %d Max %d", _mouseCursor, _mouseAnim, _mouseAnimMax);
+ debug(0, "Mouse %d Anim %d Max %d", _mouseCursor, _mouseAnim, _mouseAnimMax);
if (getGameType() == GType_SIMON2)
_system->setMouseCursor(_simon2_cursors[_mouseCursor], 16, 16, 7, 7);
Modified: scummvm/trunk/engines/simon/oracle.cpp
===================================================================
--- scummvm/trunk/engines/simon/oracle.cpp 2006-04-07 11:47:58 UTC (rev 21667)
+++ scummvm/trunk/engines/simon/oracle.cpp 2006-04-07 12:57:40 UTC (rev 21668)
@@ -223,11 +223,60 @@
}
void SimonEngine::scrollOracleUp() {
- // TODO
+ byte *src, *dst;
+ uint16 w, h;
+
+ dst = getFrontBuf() + 103 * _screenWidth + 136;
+ src = getFrontBuf() + 106 * _screenWidth + 136;
+
+ for (h = 0; h < 21; h++) {
+ for (w = 0; w < 360; w++) {
+ if (dst[w] == 0 || dst[w] == 113 || dst[w] == 116 || dst[w] == 252)
+ dst[w] = src[w];
+ }
+ dst += _screenWidth;
+ src += _screenWidth;
+ }
+
+ for (h = 0; h < 80; h++) {
+ memcpy(dst, src, 360);
+ dst += _screenWidth;
+ src += _screenWidth;
+ }
+
+ for (h = 0; h < 3; h++) {
+ memset(dst, 0, 360);
+ dst += _screenWidth;
+ src += _screenWidth;
+ }
}
void SimonEngine::scrollOracleDown() {
- // TODO
+ byte *src, *dst;
+ uint16 w, h;
+
+ src = getFrontBuf() + 203 * _screenWidth + 136;
+ dst = getFrontBuf() + 206 * _screenWidth + 136;
+
+ for (h = 0; h < 77; h++) {
+ memcpy(dst, src, 360);
+ dst -= _screenWidth;
+ src -= _screenWidth;
+ }
+
+ for (h = 0; h < 24; h++) {
+ for (w = 0; w < 360; w++) {
+ if (src[w] == 0)
+ dst[w] = src[w];
+
+ if (src[w] == 113 || src[w] == 116 || src[w] == 252) {
+ dst[w] = src[w];
+ src[w] = 0;
+ }
+ }
+ dst -= _screenWidth;
+ src -= _screenWidth;
+ }
}
void SimonEngine::bltOracleText() {
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