aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorTravis Howell2003-12-20 04:20:22 +0000
committerTravis Howell2003-12-20 04:20:22 +0000
commit158755382bc734337b80da1958c0be68e9336446 (patch)
treeeeffe4ea9ebf3e7170f6080493868836eb6db749 /simon
parent9e1dda1f682c5e3b3f3c34fccce5caf7095ecbbe (diff)
downloadscummvm-rg350-158755382bc734337b80da1958c0be68e9336446.tar.gz
scummvm-rg350-158755382bc734337b80da1958c0be68e9336446.tar.bz2
scummvm-rg350-158755382bc734337b80da1958c0be68e9336446.zip
Fix iventory arrowsin some versions of Simon1.
svn-id: r11765
Diffstat (limited to 'simon')
-rw-r--r--simon/simon.cpp10
-rw-r--r--simon/simon.h1
-rw-r--r--simon/vga.cpp14
3 files changed, 16 insertions, 9 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 00879c87ef..e84432b2be 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -350,6 +350,7 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
_vga_var5 = 0;
_vga_var7 = 0;
_vga_var8 = 0;
+ _keep_arrows = 0;
_script_cond_a = 0;
_script_cond_b = 0;
@@ -1734,6 +1735,8 @@ void SimonEngine::setup_hit_areas(FillOrCopyStruct *fcs, uint fcs_index) {
ha->unk3 = 1;
// Simon1 specific
+ warning("Updating inventory area");
+ _keep_arrows = 1;
o_kill_sprite_simon1(0x80);
start_vga_code(0, 1, 0x80, 0, 0, 0xE);
} else {
@@ -3361,12 +3364,7 @@ void SimonEngine::fcs_unk1(uint fcs_index) {
// ok
void SimonEngine::fcs_unk_5(FillOrCopyStruct *fcs, uint fcs_index) {
- if (_game == GAME_SIMON1WIN) {
- o_kill_sprite_simon1(0x80);
- } else {
- o_kill_sprite_simon1(0x81);
- start_vga_code(0, 1, 0x81, 0, 0, 0xE);
- }
+ o_kill_sprite_simon1(0x80);
}
void SimonEngine::delete_hitarea_by_index(uint index) {
diff --git a/simon/simon.h b/simon/simon.h
index aaa402687a..d0e07c08c3 100644
--- a/simon/simon.h
+++ b/simon/simon.h
@@ -261,6 +261,7 @@ protected:
bool _exit_cutscene;
bool _skip_speech;
byte _video_var_9;
+ bool _keep_arrows;
uint _sound_file_id;
int16 _last_music_played;
diff --git a/simon/vga.cpp b/simon/vga.cpp
index d86970d16c..3428e22ddc 100644
--- a/simon/vga.cpp
+++ b/simon/vga.cpp
@@ -1193,6 +1193,14 @@ 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 (!(_game GF_SIMON2) && !(_game & GF_WIN) &&
+ vsp->id == 0x80 && _keep_arrows) {
+ _keep_arrows = 0;
+ return;
+ }
+
while (vsp->id != 0) {
memcpy(vsp, vsp + 1, sizeof(VgaSprite));
vsp++;
@@ -1220,7 +1228,7 @@ void SimonEngine::vc_27_reset_simon1() {
vsp = _vga_sprites;
while (vsp->id) {
- if ((_game == GAME_SIMON1WIN) && (vsp->id == 0x80)) {
+ if (vsp->id == 0x80) {
memcpy(&bak, vsp, sizeof(VgaSprite));
}
vsp->id = 0;
@@ -1244,7 +1252,7 @@ void SimonEngine::vc_27_reset_simon1() {
memcpy(vte2, vte2 + 1, sizeof(VgaTimerEntry));
vte2++;
}
- } else if (_game == GAME_SIMON1WIN) {
+ } else {
vte++;
}
}
@@ -1722,7 +1730,7 @@ void SimonEngine::vc_62_palette_thing() {
delay(5);
}
- if (_game == GAME_SIMON1WIN) {
+ if (!(_game & GF_SIMON2)) {
uint16 params[5]; /* parameters to vc_10_draw */
VgaSprite *vsp;
VgaPointersEntry *vpe;