aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2005-11-09 23:36:55 +0000
committerTravis Howell2005-11-09 23:36:55 +0000
commit0cfc4456dec1a0f4eb8b50a661232912c36b4c9d (patch)
treec403ef1a7a0d7db8ce1b7e4e05ff954cc13ca91d
parent22dc08ed5fd771578ddfe5fd083509ea93e0e2ee (diff)
downloadscummvm-rg350-0cfc4456dec1a0f4eb8b50a661232912c36b4c9d.tar.gz
scummvm-rg350-0cfc4456dec1a0f4eb8b50a661232912c36b4c9d.tar.bz2
scummvm-rg350-0cfc4456dec1a0f4eb8b50a661232912c36b4c9d.zip
Palette delay at the end of Simon1 was never triggered.
svn-id: r19541
-rw-r--r--simon/simon.cpp30
-rw-r--r--simon/simon.h2
-rw-r--r--simon/vga.cpp2
3 files changed, 16 insertions, 18 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 3a61c894d5..0a958cfb2c 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -509,7 +509,7 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
_vgaRes328Loaded = 0;
_hitarea_unk_3 = 0;
_mortalFlag = 0;
- _videoVar8 = 0;
+ _updateScreen = 0;
_usePaletteDelay = 0;
_syncFlag2 = 0;
_inCallBack = 0;
@@ -2551,11 +2551,9 @@ void SimonEngine::set_video_mode_internal(uint mode, uint vga_res_id) {
b += sizeof(ImageHeader_Simon);
}
- if (!(_game & GF_SIMON2)) {
- if (num == 16300) {
- dx_clear_attached_from_top(134);
- _usePaletteDelay = true;
- }
+ if ((_game & GF_SIMON1) && vga_res_id == 16300) {
+ dx_clear_attached_from_top(134);
+ _usePaletteDelay = true;
} else {
_scrollX = 0;
_scrollXMax = 0;
@@ -2845,7 +2843,7 @@ void SimonEngine::timer_vga_sprites() {
if (_drawImagesDebug)
memset(_sdl_buf_attached, 0, _screenWidth * _screenHeight);
- _videoVar8++;
+ _updateScreen++;
_vcPtr = vc_ptr_org;
}
@@ -2917,7 +2915,7 @@ void SimonEngine::timer_vga_sprites_2() {
vsp++;
}
- _videoVar8++;
+ _updateScreen++;
_vcPtr = vc_ptr_org;
}
@@ -2959,10 +2957,10 @@ void SimonEngine::timer_proc1() {
_copyPartialMode = 0;
}
- if (_videoVar8) {
+ if (_updateScreen) {
handle_mouse_moved();
dx_update_screen_and_palette();
- _videoVar8 = false;
+ _updateScreen = false;
}
_lockWord &= ~2;
@@ -3551,7 +3549,7 @@ void SimonEngine::talk_with_speech(uint speech_id, uint vgaSpriteId) {
void SimonEngine::talk_with_text(uint vgaSpriteId, uint color, const char *string, int16 x, int16 y, int16 width) {
char convertedString[320];
char *convertedString2 = convertedString;
- int16 height, delay;
+ int16 height, talkDelay;
int stringLength = strlen(string);
int padding, lettersPerRow, lettersPerRowJustified;
const int textHeight = 10;
@@ -3560,17 +3558,17 @@ void SimonEngine::talk_with_text(uint vgaSpriteId, uint color, const char *strin
lettersPerRow = width / 6;
lettersPerRowJustified = stringLength / (stringLength / lettersPerRow + 1) + 1;
- delay = (stringLength + 3) / 3;
+ talkDelay = (stringLength + 3) / 3;
if ((_game & GF_SIMON1) && (_game & GF_TALKIE)) {
if (_variableArray[141] == 0)
_variableArray[141] = 9;
- _variableArray[85] = _variableArray[141] * delay;
+ _variableArray[85] = _variableArray[141] * talkDelay;
} else {
if (_variableArray[86] == 0)
- delay /= 2;
+ talkDelay /= 2;
if (_variableArray[86] == 2)
- delay *= 2;
- _variableArray[85] = delay * 5;
+ talkDelay *= 2;
+ _variableArray[85] = talkDelay * 5;
}
assert(stringLength > 0);
diff --git a/simon/simon.h b/simon/simon.h
index a4eb115f38..bdabf21790 100644
--- a/simon/simon.h
+++ b/simon/simon.h
@@ -190,7 +190,7 @@ protected:
bool _vgaRes328Loaded;
bool _hitarea_unk_3;
bool _mortalFlag;
- byte _videoVar8;
+ byte _updateScreen;
bool _usePaletteDelay;
bool _syncFlag2;
bool _inCallBack;
diff --git a/simon/vga.cpp b/simon/vga.cpp
index 047da43ed2..cd28b9c137 100644
--- a/simon/vga.cpp
+++ b/simon/vga.cpp
@@ -1394,7 +1394,7 @@ void SimonEngine::vc35_clearWindow() {
}
void SimonEngine::vc36_setWindowImage() {
- _videoVar8 = false;
+ _updateScreen = false;
uint vga_res = vc_read_next_word();
uint windowNum = vc_read_next_word();