aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorJamieson Christian2003-07-14 12:00:20 +0000
committerJamieson Christian2003-07-14 12:00:20 +0000
commitdc3e4ce46baa4a14d1fcbf9555cd82d00ccbba7e (patch)
treebf42e4cb47bc7c8b060303638ca284c8a0fb2cc7 /simon
parente7913ad49aeae6772bb2c867440bde623fe42943 (diff)
downloadscummvm-rg350-dc3e4ce46baa4a14d1fcbf9555cd82d00ccbba7e.tar.gz
scummvm-rg350-dc3e4ce46baa4a14d1fcbf9555cd82d00ccbba7e.tar.bz2
scummvm-rg350-dc3e4ce46baa4a14d1fcbf9555cd82d00ccbba7e.zip
Fixed error that resulted in bad script tracking
when creating sprites during a savegame load after having been at certain locations. (If that sounds convoluted, it's because I don't know why I fixed what I did, only that the code we had was not quite constructed properly from assembler references.) svn-id: r9013
Diffstat (limited to 'simon')
-rw-r--r--simon/vga.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/simon/vga.cpp b/simon/vga.cpp
index 0e0f44f7e0..4c58c164e9 100644
--- a/simon/vga.cpp
+++ b/simon/vga.cpp
@@ -270,6 +270,7 @@ void SimonEngine::vc_3_new_sprite() {
VgaSprite *vsp;
VgaPointersEntry *vpe;
byte *p, *pp;
+ byte *old_file_1;
a = vc_read_next_word(); /* 0 */
@@ -303,6 +304,7 @@ void SimonEngine::vc_3_new_sprite() {
vsp->id = b;
vsp->unk7 = res = f;
+ old_file_1 = _cur_vga_file_1;
for (;;) {
vpe = &_vga_buffer_pointers[res];
_cur_vga_file_1 = vpe->vgaFile1;
@@ -310,7 +312,7 @@ void SimonEngine::vc_3_new_sprite() {
if (vpe->vgaFile1 != NULL)
break;
if (res != _vga_cur_file_2)
- _video_var_7 = res;
+ _video_var_7 = _vga_cur_file_2;
ensureVgaResLoaded(res);
_video_var_7 = 0xFFFF;
@@ -346,6 +348,7 @@ void SimonEngine::vc_3_new_sprite() {
//dump_vga_script(_cur_vga_file_1 + READ_BE_UINT16(&((VgaFile1Struct0x6*)p)->script_offs), res, b);
add_vga_timer(gss->VGA_DELAY_BASE, _cur_vga_file_1 + READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->script_offs), b, res);
+ _cur_vga_file_1 = old_file_1;
}
void SimonEngine::vc_4_dummy_op() {