aboutsummaryrefslogtreecommitdiff
path: root/simon/vga.cpp
diff options
context:
space:
mode:
authorTravis Howell2004-01-30 03:26:47 +0000
committerTravis Howell2004-01-30 03:26:47 +0000
commit519437aab119d1a93ee372d002fc51e9af6ecb24 (patch)
treea4b07911b7e7d1d130ff63a1810a5d14a47d5181 /simon/vga.cpp
parentd1ac15e23c333c9c3297c9f1bee5b398f66b3284 (diff)
downloadscummvm-rg350-519437aab119d1a93ee372d002fc51e9af6ecb24.tar.gz
scummvm-rg350-519437aab119d1a93ee372d002fc51e9af6ecb24.tar.bz2
scummvm-rg350-519437aab119d1a93ee372d002fc51e9af6ecb24.zip
Add better work around for inventory arrows issue in some Simon1 versions.
Remove seom debugging output. svn-id: r12673
Diffstat (limited to 'simon/vga.cpp')
-rw-r--r--simon/vga.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/simon/vga.cpp b/simon/vga.cpp
index c1b7888187..2cde65f487 100644
--- a/simon/vga.cpp
+++ b/simon/vga.cpp
@@ -1009,6 +1009,7 @@ void SimonEngine::vc_11_clear_pathfind_array() {
}
void SimonEngine::vc_12_delay() {
+ VgaSprite *vsp = find_cur_sprite();
uint num;
if (!(_game & GF_SIMON2)) {
@@ -1017,10 +1018,14 @@ void SimonEngine::vc_12_delay() {
num = vc_read_next_byte() * _vga_base_delay;
}
- if (_continous_vgascript)
- fprintf(_dump_file, "; sleep_ex = %d\n", num + VGA_DELAY_BASE);
+ // Work around to allow inventory arrows to be
+ // shown in some versions of Simon the Sorcerer 1
+ if (!(_game & GF_SIMON2) && !(_game & GF_WIN) && vsp->id == 0x80)
+ num = 0;
+ else
+ num += VGA_DELAY_BASE;
- add_vga_timer(num + VGA_DELAY_BASE, _vc_ptr, _vga_cur_sprite_id, _vga_cur_file_id);
+ add_vga_timer(num, _vc_ptr, _vga_cur_sprite_id, _vga_cur_file_id);
_vc_ptr = (byte *)&vc_get_out_of_code;
}
@@ -1202,13 +1207,6 @@ void SimonEngine::vc_24_set_sprite_xy() {
void SimonEngine::vc_25_halt_sprite() {
VgaSprite *vsp = find_cur_sprite();
- // Work around to allow inventory arrows to be
- // showned in some versions of Simon the Sorcerer 1
- if (vsp->id == 0x80 && _keep_arrows) {
- _keep_arrows = 0;
- return;
- }
-
while (vsp->id != 0) {
memcpy(vsp, vsp + 1, sizeof(VgaSprite));
vsp++;
@@ -1597,9 +1595,6 @@ void SimonEngine::vc_56_delay() {
if (_game & GF_SIMON2) {
uint num = vc_read_var_or_word() * _vga_base_delay;
- if (_continous_vgascript)
- fprintf(_dump_file, "; sleep_ex = %d\n", num + VGA_DELAY_BASE);
-
add_vga_timer(num + VGA_DELAY_BASE, _vc_ptr, _vga_cur_sprite_id, _vga_cur_file_id);
_vc_ptr = (byte *)&vc_get_out_of_code;
}