aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2006-04-07 12:57:40 +0000
committerTravis Howell2006-04-07 12:57:40 +0000
commitf51575563e22966f98c1f07d7bcba7ebab51e4d2 (patch)
tree4ef66b1d69a66c8ae868ef2fe04f95ef584e0973 /engines
parent67fda4ece59b3b869520390314f92f17fdfe22f8 (diff)
downloadscummvm-rg350-f51575563e22966f98c1f07d7bcba7ebab51e4d2.tar.gz
scummvm-rg350-f51575563e22966f98c1f07d7bcba7ebab51e4d2.tar.bz2
scummvm-rg350-f51575563e22966f98c1f07d7bcba7ebab51e4d2.zip
Add scrolling code for oracle in FF
svn-id: r21668
Diffstat (limited to 'engines')
-rw-r--r--engines/simon/cursor.cpp2
-rw-r--r--engines/simon/oracle.cpp53
2 files changed, 52 insertions, 3 deletions
diff --git a/engines/simon/cursor.cpp b/engines/simon/cursor.cpp
index 3b7725c7d7..2d54f3080b 100644
--- a/engines/simon/cursor.cpp
+++ b/engines/simon/cursor.cpp
@@ -224,7 +224,7 @@ static const byte _simon2_cursors[10][256] = {
};
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);
diff --git a/engines/simon/oracle.cpp b/engines/simon/oracle.cpp
index f1998d8946..f5e0df9c80 100644
--- a/engines/simon/oracle.cpp
+++ b/engines/simon/oracle.cpp
@@ -223,11 +223,60 @@ void SimonEngine::listSaveGames(int n) {
}
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() {