aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2006-04-18 00:15:25 +0000
committerTravis Howell2006-04-18 00:15:25 +0000
commitb4c8b498debb05967547ce82ffc3680cca3fda57 (patch)
treee916018fb07875a5233fa18c240864702bfe0939
parent614fc253a9b3264c8f4d71b9c9227fb32c2f2ac9 (diff)
downloadscummvm-rg350-b4c8b498debb05967547ce82ffc3680cca3fda57.tar.gz
scummvm-rg350-b4c8b498debb05967547ce82ffc3680cca3fda57.tar.bz2
scummvm-rg350-b4c8b498debb05967547ce82ffc3680cca3fda57.zip
Scrolling comparisons should always be signed, fixes scrolling issue in maze of FF
svn-id: r21995
-rw-r--r--engines/simon/simon.cpp1
-rw-r--r--engines/simon/simon.h4
-rw-r--r--engines/simon/vga.cpp8
3 files changed, 7 insertions, 6 deletions
diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp
index e9c8c194e2..d5aa21fc22 100644
--- a/engines/simon/simon.cpp
+++ b/engines/simon/simon.cpp
@@ -2330,6 +2330,7 @@ void SimonEngine::set_video_mode_internal(uint mode, uint vga_res_id) {
_scrollCount = 0;
_scrollFlag = 0;
_scrollHeight = 134;
+ _variableArrayPtr = _variableArray;
if (_variableArray[34] >= 0) {
if (getGameType() == GType_FF)
_variableArray[250] = 0;
diff --git a/engines/simon/simon.h b/engines/simon/simon.h
index efd0294f62..a93cd4aeb8 100644
--- a/engines/simon/simon.h
+++ b/engines/simon/simon.h
@@ -1014,8 +1014,8 @@ protected:
void vcSkipNextInstruction();
int getScale(int y, int x);
- void checkScrollX(int x, int xpos);
- void checkScrollY(int y, int ypos);
+ void checkScrollX(int16 x, int16 xpos);
+ void checkScrollY(int16 y, int16 ypos);
void centreScroll();
bool itemIsSiblingOf(uint16 val);
diff --git a/engines/simon/vga.cpp b/engines/simon/vga.cpp
index 7253f84b48..621181ae87 100644
--- a/engines/simon/vga.cpp
+++ b/engines/simon/vga.cpp
@@ -2482,7 +2482,7 @@ void SimonEngine::vc84_stopSoundLoop() {
}
// Scrolling functions for Feeble Files
-void SimonEngine::checkScrollX(int x, int xpos) {
+void SimonEngine::checkScrollX(int16 x, int16 xpos) {
if (_scrollXMax == 0 || getBitFlag(80) || getBitFlag(82) || x == 0)
return;
@@ -2513,7 +2513,7 @@ void SimonEngine::checkScrollX(int x, int xpos) {
return;
}
- if ((uint16)(xpos - _scrollX) < 161) {
+ if (xpos - _scrollX < 161) {
_scrollCount = -320;
if (_scrollX < 320)
_scrollCount = -_scrollX;
@@ -2521,7 +2521,7 @@ void SimonEngine::checkScrollX(int x, int xpos) {
}
}
-void SimonEngine::checkScrollY(int y, int ypos) {
+void SimonEngine::checkScrollY(int16 y, int16 ypos) {
if (_scrollYMax == 0 || getBitFlag(80))
return;
@@ -2550,7 +2550,7 @@ void SimonEngine::checkScrollY(int y, int ypos) {
return;
}
- if ((uint16)(ypos - _scrollY) < 100) {
+ if (ypos - _scrollY < 100) {
_scrollCount = -240;
if (_scrollY < 240)
_scrollCount = -_scrollY;