diff options
author | Travis Howell | 2005-11-10 00:53:00 +0000 |
---|---|---|
committer | Travis Howell | 2005-11-10 00:53:00 +0000 |
commit | 3a670640f1069ba5158a82bac57b0582042db3cc (patch) | |
tree | ee06bfc2c2ede00962d4c53e9ff4afda6f59914c | |
parent | 0cfc4456dec1a0f4eb8b50a661232912c36b4c9d (diff) | |
download | scummvm-rg350-3a670640f1069ba5158a82bac57b0582042db3cc.tar.gz scummvm-rg350-3a670640f1069ba5158a82bac57b0582042db3cc.tar.bz2 scummvm-rg350-3a670640f1069ba5158a82bac57b0582042db3cc.zip |
Update debug tables.
svn-id: r19542
-rw-r--r-- | simon/debug.cpp | 4 | ||||
-rw-r--r-- | simon/debug.h | 337 | ||||
-rw-r--r-- | simon/items.cpp | 22 | ||||
-rw-r--r-- | simon/simon.cpp | 6 | ||||
-rw-r--r-- | simon/simon.h | 10 | ||||
-rw-r--r-- | simon/vga.cpp | 12 |
6 files changed, 323 insertions, 68 deletions
diff --git a/simon/debug.cpp b/simon/debug.cpp index 40c105151e..8692c22189 100644 --- a/simon/debug.cpp +++ b/simon/debug.cpp @@ -37,7 +37,9 @@ const byte *SimonEngine::dumpOpcode(const byte *p) { opcode = *p++; if (opcode == 255) return NULL; - if (_game & GF_SIMON2 && _game & GF_TALKIE) { + if (_game == GAME_FEEBLEFILES) { + st = s = feeblefiles_opcode_name_table[opcode]; + } else if (_game & GF_SIMON2 && _game & GF_TALKIE) { st = s = simon2talkie_opcode_name_table[opcode]; } else if (_game & GF_TALKIE) { st = s = simon1talkie_opcode_name_table[opcode]; diff --git a/simon/debug.h b/simon/debug.h index c8f798741d..41372b7cb6 100644 --- a/simon/debug.h +++ b/simon/debug.h @@ -52,11 +52,11 @@ static const char *const simon1dos_opcode_name_table[256] = { "VVJ|IS_GEF", NULL, NULL, - "WJ|UNK_23", + "WJ|CHANCE", /* 24 */ NULL, - "IJ|HAS_CHILD_1", - "IJ|HAS_CHILD_2", + "IJ|IS_ROOM", + "IJ|IS_OBJECT", "IWJ|ITEM_UNK3_IS", /* 28 */ "IBJ|CHILD_HAS_FLAG", @@ -134,8 +134,8 @@ static const char *const simon1dos_opcode_name_table[256] = { NULL, "W|UNK_87", /* 88 */ - "|OR_SCRIPT_WORD_10", - "|AND_SCRIPT_WORD_10", + "|STOP_ANIMATION", + "|RESTART_ANIMATION", "IB|SET_M_TO_PARENT", "IB|SET_M_TO_SIBLING", /* 92 */ @@ -187,7 +187,7 @@ static const char *const simon1dos_opcode_name_table[256] = { "W|GET_DUMMY_WORD", "W|GET_WORD_COND_TRUE", "Bww|UNK_130", - NULL, /* opcode 131 doesn't exist */ + NULL, /* 132 */ "|SAVE_GAME", "|LOAD_GAME", @@ -251,11 +251,11 @@ static const char *const simon1dos_opcode_name_table[256] = { /* 180 */ "|FORCE_UNLOCK", "|FORCE_LOCK", - "|READ_VGARES_328", - "|READ_VGARES_23", + "|LOAD_BEARD", + "|UNLOAD_BEARD", /* 184 */ "W|CLEAR_VGAPOINTER_ENTRY", - "W|MIDI_SFX_FILE_NUM", + "W|LOAD_SOUND_FILES", "|VGA_POINTER_OP_3", "|FADE_TO_BLACK", }; @@ -290,11 +290,11 @@ static const char *const simon1talkie_opcode_name_table[256] = { "VVJ|IS_GEF", NULL, NULL, - "WJ|UNK_23", + "WJ|CHANCE", /* 24 */ NULL, - "IJ|HAS_CHILD_1", - "IJ|HAS_CHILD_2", + "IJ|IS_ROOM", + "IJ|IS_OBJECT", "IWJ|ITEM_UNK3_IS", /* 28 */ "IBJ|CHILD_HAS_FLAG", @@ -372,8 +372,8 @@ static const char *const simon1talkie_opcode_name_table[256] = { NULL, "W|UNK_87", /* 88 */ - "|OR_SCRIPT_WORD_10", - "|AND_SCRIPT_WORD_10", + "|STOP_ANIMATION", + "|RESTART_ANIMATION", "IB|SET_M_TO_PARENT", "IB|SET_M_TO_SIBLING", /* 92 */ @@ -425,7 +425,7 @@ static const char *const simon1talkie_opcode_name_table[256] = { "W|GET_DUMMY_WORD", "W|GET_WORD_COND_TRUE", "Bww|UNK_130", - NULL, /* opcode 131 doesn't exist */ + NULL, /* 132 */ "|SAVE_GAME", "|LOAD_GAME", @@ -489,11 +489,11 @@ static const char *const simon1talkie_opcode_name_table[256] = { /* 180 */ "|FORCE_UNLOCK", "|FORCE_LOCK", - "|READ_VGARES_328", - "|READ_VGARES_23", + "|LOAD_BEARD", + "|UNLOAD_BEARD", /* 184 */ "W|CLEAR_VGAPOINTER_ENTRY", - "W|DUMMY_185", + "W|LOAD_SOUND_FILES", "|VGA_POINTER_OP_3", "|FADE_TO_BLACK", }; @@ -528,11 +528,11 @@ static const char *const simon2dos_opcode_name_table[256] = { "VVJ|IS_GEF", NULL, NULL, - "WJ|UNK_23", + "WJ|CHANCE", /* 24 */ NULL, - "IJ|HAS_CHILD_1", - "IJ|HAS_CHILD_2", + "IJ|IS_ROOM", + "IJ|IS_OBJECT", "IWJ|ITEM_UNK3_IS", /* 28 */ "IBJ|CHILD_HAS_FLAG", @@ -610,8 +610,8 @@ static const char *const simon2dos_opcode_name_table[256] = { NULL, "W|UNK_87", /* 88 */ - "|OR_SCRIPT_WORD_10", - "|AND_SCRIPT_WORD_10", + "|STOP_ANIMATION", + "|RESTART_ANIMATION", "IB|SET_M_TO_PARENT", "IB|SET_M_TO_SIBLING", /* 92 */ @@ -663,7 +663,7 @@ static const char *const simon2dos_opcode_name_table[256] = { "W|GET_DUMMY_WORD", "W|GET_WORD_COND_TRUE", "Bww|UNK_130", - NULL, /* opcode 131 doesn't exist */ + NULL, /* 132 */ "|SAVE_GAME", "|LOAD_GAME", @@ -727,17 +727,17 @@ static const char *const simon2dos_opcode_name_table[256] = { /* 180 */ "|FORCE_UNLOCK", "|FORCE_LOCK", - "|READ_VGARES_328", - "|READ_VGARES_23", + NULL, + NULL, /* 184 */ "W|CLEAR_VGAPOINTER_ENTRY", - "W|DUMMY_185", + NULL, "|VGA_POINTER_OP_3", - "|FADE_TO_BLACK", + NULL, /* 188 */ "BSJ|STRING2_IS", - "|UNK_189", - "B|UNK_190", + "|CLEAR_MARKS", + "B|WAIT_FOR_MARK", }; static const char *const simon2talkie_opcode_name_table[256] = { @@ -770,11 +770,11 @@ static const char *const simon2talkie_opcode_name_table[256] = { "VVJ|IS_GEF", NULL, NULL, - "WJ|UNK_23", + "WJ|CHANCE", /* 24 */ NULL, - "IJ|HAS_CHILD_1", - "IJ|HAS_CHILD_2", + "IJ|IS_ROOM", + "IJ|IS_OBJECT", "IWJ|ITEM_UNK3_IS", /* 28 */ "IBJ|CHILD_HAS_FLAG", @@ -852,8 +852,8 @@ static const char *const simon2talkie_opcode_name_table[256] = { NULL, "W|UNK_87", /* 88 */ - "|OR_SCRIPT_WORD_10", - "|AND_SCRIPT_WORD_10", + "|STOP_ANIMATION", + "|RESTART_ANIMATION", "IB|SET_M_TO_PARENT", "IB|SET_M_TO_SIBLING", /* 92 */ @@ -905,7 +905,7 @@ static const char *const simon2talkie_opcode_name_table[256] = { "W|GET_DUMMY_WORD", "W|GET_WORD_COND_TRUE", "Bww|UNK_130", - NULL, /* opcode 131 doesn't exist */ + NULL, /* 132 */ "|SAVE_GAME", "|LOAD_GAME", @@ -969,17 +969,270 @@ static const char *const simon2talkie_opcode_name_table[256] = { /* 180 */ "|FORCE_UNLOCK", "|FORCE_LOCK", - "|READ_VGARES_328", - "|READ_VGARES_23", + NULL, + NULL, /* 184 */ "W|CLEAR_VGAPOINTER_ENTRY", - "W|DUMMY_185", + NULL, "|VGA_POINTER_OP_3", - "|FADE_TO_BLACK", + NULL, + /* 188 */ + "BSJ|STRING2_IS", + "|CLEAR_MARKS", + "B|WAIT_FOR_MARK", +}; + +static const char *const feeblefiles_opcode_name_table[256] = { + /* 0 */ + "|INV_COND", + "IJ|PTRA_PARENT_IS", + "IJ|PTRA_PARENT_ISNOT", + NULL, + /* 4 */ + NULL, + "IJ|PARENT_IS_1", + "IJ|PARENT_ISNOT_1", + "IIJ|PARENT_IS", + /* 8 */ + NULL, + NULL, + NULL, + "VJ|IS_ZERO", + /* 12 */ + "VJ|ISNOT_ZERO", + "VWJ|IS_EQ", + "VWJ|IS_NEQ", + "VWJ|IS_LE", + /* 16 */ + "VWJ|IS_GE", + "VVJ|IS_EQF", + "VVJ|IS_NEQF", + "VVJ|IS_LEF", + /* 20 */ + "VVJ|IS_GEF", + NULL, + NULL, + "WJ|CHANCE", + /* 24 */ + NULL, + "IJ|IS_ROOM", + "IJ|IS_OBJECT", + "IWJ|ITEM_UNK3_IS", + /* 28 */ + "IBJ|CHILD_HAS_FLAG", + NULL, + NULL, + "I|SET_NO_PARENT", + /* 32 */ + NULL, + "II|SET_PARENT", + NULL, + NULL, + /* 36 */ + "VV|MOVE", + NULL, + NULL, + NULL, + /* 40 */ + NULL, + "V|ZERO", + "VW|SET", + "VW|ADD", + /* 44 */ + "VW|SUB", + "VV|ADDF", + "VV|SUBF", + "VW|MUL", + /* 48 */ + "VW|DIV", + "VV|MULF", + "VV|DIVF", + "VW|MOD", + /* 52 */ + "VV|MODF", + "VW|RANDOM", + NULL, + "I|SET_A_PARENT", + /* 56 */ + "IB|SET_CHILD2_BIT", + "IB|CLEAR_CHILD2_BIT", + "II|MAKE_SIBLING", + "I|INC_UNK3", + /* 60 */ + "I|DEC_UNK3", + "IW|SET_UNK3", + "V|SHOW_INT", + "T|SHOW_STRING_NL", + /* 64 */ + "T|SHOW_STRING", + "WWWWWB|ADD_HITAREA", + "BT|SET_ITEM_NAME", + "BTw|SET_ITEM_DESC", + /* 68 */ + "x|HALT", + "x|RET1", + "V|SHOW_STRING_AR3", + "W|START_SUB", + /* 72 */ + NULL, + NULL, + NULL, + NULL, + /* 76 */ + "WW|ADD_TIMEOUT", + "J|IS_M1_EMPTY", + "J|IS_M3_EMPTY", + "ITJ|CHILD_FR2_IS", + /* 80 */ + "IIJ|IS_ITEM_EQ", + NULL, + "B|UNK_82", + "|RETM10", + /* 84 */ + NULL, + NULL, + NULL, + "W|UNK_87", + /* 88 */ + "|STOP_ANIMATION", + "|RESTART_ANIMATION", + "IB|SET_M_TO_PARENT", + "IB|SET_M_TO_SIBLING", + /* 92 */ + "IB|SET_M_TO_CHILD", + NULL, + NULL, + NULL, + /* 96 */ + "WB|UNK_96", + "W|LOAD_VGA", + "WWBWWW|START_VGA", + "WW|KILL_SPRITE", + /* 100 */ + "|VGA_RESET", + "BWWWWWW|UNK_101", + "B|UNK_102", + "|UNK_103", + /* 104 */ + "B|UNK_104", + NULL, + NULL, + "WWWWWIW|ADD_ITEM_HITAREA", + /* 108 */ + "W|DEL_HITAREA", + "W|CLEAR_HITAREA_0x40", + "W|SET_HITAREA_0x40", + "WWW|SET_HITAREA_XY", + /* 112 */ + NULL, + NULL, + "IB|UNK_114", + "IBJ|HAS_FLAG", + /* 116 */ + "IB|SET_FLAG", + "IB|CLEAR_FLAG", + NULL, + "W|WAIT_VGA", + /* 120 */ + "W|UNK_120", + "BI|SET_VGA_ITEM", + NULL, + NULL, + /* 124 */ + NULL, + "IJ|IS_SIBLING_WITH_A", + "IBB|UNK_126", + "WW|PLAY_MUSIC_RESOURCE", + /* 128 */ + "W|GET_DUMMY_WORD", + "W|GET_WORD_COND_TRUE", + "Bww|UNK_130", + NULL, + /* 132 */ + "|SAVE_GAME", + "|LOAD_GAME", + "|DUMMYPROC_134", + "|SWITCH_CD", + /* 136 */ + "IV|GET_ITEM_UNK3", + "B|UNK_137", + "|VGA_POINTER_OP_4", + "II|SET_PARENT_SPECIAL", + /* 140 */ + "|DEL_TE_AND_ADD_ONE", + "BI|SET_M1_OR_M3", + "WJ|IS_HITAREA_0x40_CLEAR", + "I|START_ITEM_SUB", + /* 144 */ + NULL, + NULL, + NULL, + NULL, + /* 148 */ + NULL, + NULL, + NULL, + "BI|SET_ARRAY6_TO", + /* 152 */ + "BB|SET_M1_M3_TO_ARRAY6", + "B|SET_BIT", + "B|CLEAR_BIT", + "BJ|IS_BIT_CLEAR", + /* 156 */ + "BJ|IS_BIT_SET", + "IBB|GET_ITEM_PROP", + "IBW|SET_ITEM_PROP", + NULL, + /* 160 */ + "B|UNK_160", + "BWBW|SETUP_TEXT", + "BBTW|PRINT_STR", + "W|SOUND_1", + /* 164 */ + "|UNK_164", + "IWWJ|ITEM_UNK1_UNK2_IS", + "B|SET_BIT2", + "B|CLEAR_BIT2", + /* 168 */ + "BJ|IS_BIT2_CLEAR", + "BJ|IS_BIT2_SET", + NULL, + NULL, + /* 172 */ + NULL, + NULL, + NULL, + "|VGA_POINTER_OP_1", + /* 176 */ + "|VGA_POINTER_OP_2", + "BBI|INVENTORY_DESCRIPTION", + "WWBB|PATHFIND", + "BBB|ROOM_DESCRIPTION", + /* 180 */ + "|FORCE_UNLOCK", + "|FORCE_LOCK", + "T|LOAD_VIDEO", + "|PLAY_VIDEO", + /* 184 */ + "W|CLEAR_VGAPOINTER_ENTRY", + NULL, + "|VGA_POINTER_OP_3", + NULL, /* 188 */ "BSJ|STRING2_IS", - "|UNK_189", - "B|UNK_190", + "|CLEAR_MARKS", + "B|WAIT_FOR_MARK", + "|RESET_PV_COUNT", + /* 192 */ + "BBBB|SET_PATH_VALUES", + "|PAUSE_CLOCK", + "|RESUME_CLOCK", + "BBBB|SET_COLOR", + /* 196 */ + "B|B3_SET", + "B|B3_CLEAR", + "B|B3_ZERO", + "B|B3_NOT_ZERO", }; const char *const simon1_video_opcode_name_table[] = { diff --git a/simon/items.cpp b/simon/items.cpp index c5e673b43a..9d2ae2eedb 100644 --- a/simon/items.cpp +++ b/simon/items.cpp @@ -149,13 +149,13 @@ int SimonEngine::runScript() { } break; - case 25:{ /* has child of type 1 */ - condition = hasChildOfType1(getNextItemPtr()); + case 25:{ /* is room */ + condition = isRoom(getNextItemPtr()); } break; - case 26:{ /* has child of type 2 */ - condition = hasChildOfType2(getNextItemPtr()); + case 26:{ /* is object */ + condition = isObject(getNextItemPtr()); } break; @@ -443,7 +443,7 @@ int SimonEngine::runScript() { } break; - case 82:{ /* dummy opcode */ + case 82:{ /* debug opcode */ getVarOrByte(); } break; @@ -459,12 +459,12 @@ int SimonEngine::runScript() { } break; - case 88:{ /* or_lockWord */ + case 88:{ /* stop animation */ _lockWord |= 0x10; } break; - case 89:{ /* and lock word */ + case 89:{ /* restart animation */ _lockWord &= ~0x10; } break; @@ -1010,26 +1010,26 @@ int SimonEngine::runScript() { } break; - case 182:{ /* read vgares 328 */ + case 182:{ /* load beard */ if (_game == GAME_FEEBLEFILES) { // Load Smacker filename debug(1,"Load Smacker: %s", getStringPtrByID(getNextStringID())); } else if (_game & GF_SIMON2) { goto invalid_opcode; } else { - o_read_vgares_328(); + o_loadBeard(); } } break; - case 183:{ /* read vgares 23 */ + case 183:{ /* unload beard */ if (_game == GAME_FEEBLEFILES) { // Play Smacker debug(1, "Play Smacker"); } else if (_game & GF_SIMON2) { goto invalid_opcode; } else { - o_read_vgares_23(); + o_unloadBeard(); } } break; diff --git a/simon/simon.cpp b/simon/simon.cpp index 0a958cfb2c..203fdebeb3 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -506,7 +506,7 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst) _runScriptReturn1 = 0; _skipVgaWait = 0; _noParentNotify = 0; - _vgaRes328Loaded = 0; + _beardLoaded = 0; _hitarea_unk_3 = 0; _mortalFlag = 0; _updateScreen = 0; @@ -1051,11 +1051,11 @@ Child *SimonEngine::findChildOfType(Item *i, uint type) { return NULL; } -bool SimonEngine::hasChildOfType1(Item *item) { +bool SimonEngine::isRoom(Item *item) { return findChildOfType(item, 1) != NULL; } -bool SimonEngine::hasChildOfType2(Item *item) { +bool SimonEngine::isObject(Item *item) { return findChildOfType(item, 2) != NULL; } diff --git a/simon/simon.h b/simon/simon.h index bdabf21790..7635fbd33e 100644 --- a/simon/simon.h +++ b/simon/simon.h @@ -187,7 +187,7 @@ protected: bool _runScriptReturn1; bool _skipVgaWait; bool _noParentNotify; - bool _vgaRes328Loaded; + bool _beardLoaded; bool _hitarea_unk_3; bool _mortalFlag; byte _updateScreen; @@ -463,8 +463,8 @@ protected: void addTimeEvent(uint timeout, uint subroutine_id); void delTimeEvent(TimeEvent *te); - bool hasChildOfType1(Item *item); - bool hasChildOfType2(Item *item); + bool isRoom(Item *item); + bool isObject(Item *item); void itemChildrenChanged(Item *item); void unlinkItem(Item *item); @@ -513,8 +513,8 @@ protected: void o_pathfind(int x, int y, uint var_1, uint var_2); void o_force_unlock(); void o_force_lock(); - void o_read_vgares_328(); - void o_read_vgares_23(); + void o_loadBeard(); + void o_unloadBeard(); void o_clear_vgapointer_entry(uint a); void o_unk_186(); void o_fade_to_black(); diff --git a/simon/vga.cpp b/simon/vga.cpp index cd28b9c137..17ec7d9987 100644 --- a/simon/vga.cpp +++ b/simon/vga.cpp @@ -223,20 +223,20 @@ void SimonEngine::vc_skip_next_instruction() { fprintf(_dumpFile, "; skipped\n"); } -void SimonEngine::o_read_vgares_23() { +void SimonEngine::o_unloadBeard() { // Simon1 Only - if (_vgaRes328Loaded == true) { - _vgaRes328Loaded = false; + if (_beardLoaded == true) { + _beardLoaded = false; _lockWord |= 0x8000; read_vga_from_datfile_1(23); _lockWord &= ~0x8000; } } -void SimonEngine::o_read_vgares_328() { +void SimonEngine::o_loadBeard() { // Simon1 Only - if (_vgaRes328Loaded == false) { - _vgaRes328Loaded = true; + if (_beardLoaded == false) { + _beardLoaded = true; _lockWord |= 0x8000; read_vga_from_datfile_1(328); _lockWord &= ~0x8000; |