aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorTravis Howell2002-11-29 11:42:00 +0000
committerTravis Howell2002-11-29 11:42:00 +0000
commit189a686916720056c680e6c5a9b8d314c2e71fc1 (patch)
tree001f27ae7b0040f957384274fced4573c3284fba /simon
parent6d3decb5970bf98fa25b934738538a465d57a9b8 (diff)
downloadscummvm-rg350-189a686916720056c680e6c5a9b8d314c2e71fc1.tar.gz
scummvm-rg350-189a686916720056c680e6c5a9b8d314c2e71fc1.tar.bz2
scummvm-rg350-189a686916720056c680e6c5a9b8d314c2e71fc1.zip
phase two
svn-id: r5742
Diffstat (limited to 'simon')
-rw-r--r--simon/debug.h4
-rw-r--r--simon/items.cpp4
-rw-r--r--simon/simon.cpp15
-rw-r--r--simon/simon.h18
-rw-r--r--simon/vga.cpp40
5 files changed, 37 insertions, 44 deletions
diff --git a/simon/debug.h b/simon/debug.h
index 3dc119d231..147f344918 100644
--- a/simon/debug.h
+++ b/simon/debug.h
@@ -1012,7 +1012,7 @@ const char *const simon1_video_opcode_name_table[] = {
/* 40 */
"vd|ADD_VAR",
"vd|SUB_VAR",
- "vd|SLEEP_UNTIL_SET",
+ "vd|DELAY_IF_NOT_EQ",
"d|SKIP_IF_BIT_CLEAR",
/* 44 */
"d|SKIP_IF_BIT_SET",
@@ -1096,7 +1096,7 @@ const char *const simon2_video_opcode_name_table[] = {
/* 40 */
"vd|ADD_VAR",
"vd|SUB_VAR",
- "vd|SLEEP_UNTIL_SET",
+ "vd|DELAY_IF_NOT_EQ",
"d|SKIP_IF_BIT_CLEAR",
/* 44 */
"d|SKIP_IF_BIT_SET",
diff --git a/simon/items.cpp b/simon/items.cpp
index 149f10fd1c..1a0c191fba 100644
--- a/simon/items.cpp
+++ b/simon/items.cpp
@@ -935,7 +935,7 @@ int SimonState::runScript()
}
break;
- case 162:{
+ case 162:{ /* print string */
o_print_str();
}
break;
@@ -1649,7 +1649,7 @@ void SimonState::o_unk_120(uint a)
uint16 id = TO_BE_16(a);
_lock_word |= 0x4000;
_vc_ptr = (byte *)&id;
- vc_15_start_funkystruct_by_id();
+ vc_15_wakeup_id();
_lock_word &= ~0x4000;
}
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 3ca3dc7455..c83fe70f89 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -2513,16 +2513,11 @@ void SimonState::o_wait_for_vga(uint a)
delay(10);
- if (_game & GAME_SIMON2)
- if (_timer_1 > 1000) {
- warning("wait timed out");
- break;
- } else {
- if (_timer_1 > 500) {
- warning("wait timed out");
- break;
- }
- }
+// if (_timer_1 >= 500) {
+// warning("wait timed out");
+// break;
+// }
+
}
// warning("waiting on %d done", a);
_system->show_mouse(true);
diff --git a/simon/simon.h b/simon/simon.h
index 9ff0665795..4ad6fabb32 100644
--- a/simon/simon.h
+++ b/simon/simon.h
@@ -583,17 +583,17 @@ public:
void vc_3_new_thread();
void vc_4_dummy_op();
void vc_5_skip_if_neq();
- void vc_6_maybe_skip_3_inv();
- void vc_7_maybe_skip_3();
- void vc_8_maybe_skip_2();
- void vc_9_maybe_skip();
+ void vc_6_skip_ifn_sib_with_a();
+ void vc_7_skip_if_sib_with_a();
+ void vc_8_skip_if_parent_is();
+ void vc_9_skip_if_unk3_is();
void vc_10_draw();
void vc_11_clear_pathfind_array();
- void vc_12_sleep_variable();
+ void vc_12_delay();
void vc_13_offset_x();
void vc_14_offset_y();
- void vc_15_start_funkystruct_by_id();
- void vc_16_setup_funkystruct();
+ void vc_15_wakeup_id();
+ void vc_16_sleep_on_id();
void vc_17_set_pathfind_item();
void vc_18_jump_rel();
void vc_19_chain_to_script();
@@ -602,7 +602,7 @@ public:
void vc_22_set_pal();
void vc_23_set_pri();
void vc_24_set_image_xy();
- void vc_25_del_sprite_and_get_out();
+ void vc_25_halt_thread();
void vc_26_set_window();
void vc_27_reset();
void vc_27_reset_simon1();
@@ -615,7 +615,7 @@ public:
void vc_33_force_unlock();
void vc_34_force_lock();
void vc_35();
- void vc_36();
+ void vc_36_saveload_thing();
void vc_37_sprite_unk3_add();
void vc_38_skip_if_var_zero();
void vc_39_set_var();
diff --git a/simon/vga.cpp b/simon/vga.cpp
index 35ad0b344b..dbf43c1df3 100644
--- a/simon/vga.cpp
+++ b/simon/vga.cpp
@@ -36,17 +36,17 @@ static const VgaOpcodeProc vga_opcode_table[] = {
&SimonState::vc_3_new_thread,
&SimonState::vc_4_dummy_op,
&SimonState::vc_5_skip_if_neq,
- &SimonState::vc_6_maybe_skip_3_inv,
- &SimonState::vc_7_maybe_skip_3,
- &SimonState::vc_8_maybe_skip_2,
- &SimonState::vc_9_maybe_skip,
+ &SimonState::vc_6_skip_ifn_sib_with_a,
+ &SimonState::vc_7_skip_if_sib_with_a,
+ &SimonState::vc_8_skip_if_parent_is,
+ &SimonState::vc_9_skip_if_unk3_is,
&SimonState::vc_10_draw,
&SimonState::vc_11_clear_pathfind_array,
- &SimonState::vc_12_sleep_variable,
+ &SimonState::vc_12_delay,
&SimonState::vc_13_offset_x,
&SimonState::vc_14_offset_y,
- &SimonState::vc_15_start_funkystruct_by_id,
- &SimonState::vc_16_setup_funkystruct,
+ &SimonState::vc_15_wakeup_id,
+ &SimonState::vc_16_sleep_on_id,
&SimonState::vc_17_set_pathfind_item,
&SimonState::vc_18_jump_rel,
&SimonState::vc_19_chain_to_script,
@@ -55,7 +55,7 @@ static const VgaOpcodeProc vga_opcode_table[] = {
&SimonState::vc_22_set_pal,
&SimonState::vc_23_set_pri,
&SimonState::vc_24_set_image_xy,
- &SimonState::vc_25_del_sprite_and_get_out,
+ &SimonState::vc_25_halt_thread,
&SimonState::vc_26_set_window,
&SimonState::vc_27_reset,
&SimonState::vc_28_dummy_op,
@@ -66,7 +66,7 @@ static const VgaOpcodeProc vga_opcode_table[] = {
&SimonState::vc_33_force_unlock,
&SimonState::vc_34_force_lock,
&SimonState::vc_35,
- &SimonState::vc_36,
+ &SimonState::vc_36_saveload_thing,
&SimonState::vc_37_sprite_unk3_add,
&SimonState::vc_38_skip_if_var_zero,
&SimonState::vc_39_set_var,
@@ -376,19 +376,19 @@ void SimonState::vc_5_skip_if_neq()
vc_skip_next_instruction();
}
-void SimonState::vc_6_maybe_skip_3_inv()
+void SimonState::vc_6_skip_ifn_sib_with_a() // vc_6_maybe_skip_3_inv
{
if (!vc_maybe_skip_proc_3(vc_read_next_word()))
vc_skip_next_instruction();
}
-void SimonState::vc_7_maybe_skip_3()
+void SimonState::vc_7_skip_if_sib_with_a() // vc_7_maybe_skip_3
{
if (vc_maybe_skip_proc_3(vc_read_next_word()))
vc_skip_next_instruction();
}
-void SimonState::vc_8_maybe_skip_2()
+void SimonState::vc_8_skip_if_parent_is() // vc_8_maybe_skip_2
{
uint a = vc_read_next_word();
uint b = vc_read_next_word();
@@ -396,7 +396,7 @@ void SimonState::vc_8_maybe_skip_2()
vc_skip_next_instruction();
}
-void SimonState::vc_9_maybe_skip()
+void SimonState::vc_9_skip_if_unk3_is() // vc_9_maybe_skip
{
uint a = vc_read_next_word();
uint b = vc_read_next_word();
@@ -997,7 +997,7 @@ void SimonState::vc_11_clear_pathfind_array()
memset(&_pathfind_array, 0, sizeof(_pathfind_array));
}
-void SimonState::vc_12_sleep_variable()
+void SimonState::vc_12_delay() //vc_12_sleep_variable
{
uint num;
@@ -1027,8 +1027,7 @@ void SimonState::vc_14_offset_y()
_vga_sprite_changed++;
}
-/* wakeup_id */
-void SimonState::vc_15_start_funkystruct_by_id()
+void SimonState::vc_15_wakeup_id() //vc_15_start_funkystruct_by_id
{
VgaSleepStruct *vfs = _vga_sleep_structs, *vfs_tmp;
uint16 id = vc_read_next_word();
@@ -1051,8 +1050,7 @@ void SimonState::vc_15_start_funkystruct_by_id()
}
-/* sleep_on_id */
-void SimonState::vc_16_setup_funkystruct()
+void SimonState::vc_16_sleep_on_id() //vc_16_setup_funkystruct
{
VgaSleepStruct *vfs = _vga_sleep_structs;
while (vfs->ident)
@@ -1220,7 +1218,7 @@ void SimonState::vc_24_set_image_xy()
_vga_sprite_changed++;
}
-void SimonState::vc_25_del_sprite_and_get_out()
+void SimonState::vc_25_halt_thread() //vc_25_del_sprite_and_get_out
{
VgaSprite *vsp = find_cur_sprite();
while (vsp->id != 0) {
@@ -1392,7 +1390,7 @@ void SimonState::vc_35()
_vga_sprite_changed++;
}
-void SimonState::vc_36()
+void SimonState::vc_36_saveload_thing()
{
uint vga_res = vc_read_next_word();
uint mode = vc_read_next_word();
@@ -1731,7 +1729,7 @@ void SimonState::vc_kill_thread(uint file, uint sprite)
vsp = find_cur_sprite();
if (vsp->id) {
- vc_25_del_sprite_and_get_out();
+ vc_25_halt_thread();
vte = _vga_timer_list;
while (vte->delay != 0) {