diff options
-rw-r--r-- | engines/agos/agos.h | 1 | ||||
-rw-r--r-- | engines/agos/cursor.cpp | 9 | ||||
-rw-r--r-- | engines/agos/debug.cpp | 4 | ||||
-rw-r--r-- | engines/agos/debug.h | 248 | ||||
-rw-r--r-- | engines/agos/items.cpp | 15 | ||||
-rw-r--r-- | engines/agos/verb.cpp | 6 |
6 files changed, 272 insertions, 11 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 8689a428d3..f5846be3f4 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -1009,6 +1009,7 @@ public: void oe1_opcode178(); // Opcodes, Waxworks only + void oww_goto(); void oww_whereTo(); void oww_menu(); void oww_textMenu(); diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp index 27db13a019..c431ae490c 100644 --- a/engines/agos/cursor.cpp +++ b/engines/agos/cursor.cpp @@ -321,8 +321,7 @@ void AGOSEngine::handleMouseMoved() { _rightButtonDown = 0; setVerb(NULL); } - } - if (getGameType() == GType_SIMON2) { + } else if (getGameType() == GType_SIMON2) { if (getBitFlag(79)) { if (!_vgaVar9) { if (_mouseX >= 315 || _mouseX < 9) @@ -349,8 +348,14 @@ void AGOSEngine::handleMouseMoved() { x = 0; if (_lastHitArea3 == 0 && _leftButtonDown != 0) { + if (getGameType() == GType_PP) + _verbHitArea = 300; _leftButtonDown = 0; x = 1; + } else if (getGameType() == GType_PP && _rightButtonDown != 0) { + _verbHitArea = 300; + _rightButtonDown = 0; + x = 1; } else { if (_hitarea_unk_3 == 0 && _needHitAreaRecalc == 0) goto get_out; diff --git a/engines/agos/debug.cpp b/engines/agos/debug.cpp index d422832532..20e445b6d5 100644 --- a/engines/agos/debug.cpp +++ b/engines/agos/debug.cpp @@ -48,7 +48,9 @@ const byte *AGOSEngine::dumpOpcode(const byte *p) { return NULL; } - if (getGameType() == GType_FF || getGameType() == GType_PP) { + if (getGameType() == GType_PP) { + st = s = puzzlepack_opcode_name_table[opcode]; + } else if (getGameType() == GType_FF) { st = s = feeblefiles_opcode_name_table[opcode]; } else if (getGameType() == GType_SIMON2 && getFeatures() & GF_TALKIE) { st = s = simon2talkie_opcode_name_table[opcode]; diff --git a/engines/agos/debug.h b/engines/agos/debug.h index 9dbfa4f247..354aeafa8b 100644 --- a/engines/agos/debug.h +++ b/engines/agos/debug.h @@ -1477,6 +1477,254 @@ static const char *const feeblefiles_opcode_name_table[256] = { "B|B3_NOT_ZERO", }; +static const char *const puzzlepack_opcode_name_table[256] = { + /* 0 */ + "|NOT", + "IJ|AT", + "IJ|NOT_AT", + NULL, + /* 4 */ + NULL, + "IJ|CARRIED", + "IJ|NOT_CARRIED", + "IIJ|IS_AT", + /* 8 */ + NULL, + NULL, + NULL, + "WJ|IS_ZERO", + /* 12 */ + "WJ|ISNOT_ZERO", + "WWJ|IS_EQ", + "WWJ|IS_NEQ", + "WWJ|IS_LE", + /* 16 */ + "WWJ|IS_GE", + "WWJ|IS_EQF", + "WWJ|IS_NEQF", + "WWJ|IS_LEF", + /* 20 */ + "WWJ|IS_GEF", + NULL, + NULL, + "WJ|CHANCE", + /* 24 */ + NULL, + "IJ|IS_ROOM", + "IJ|IS_OBJECT", + "IWJ|ITEM_STATE_IS", + /* 28 */ + "IBJ|OBJECT_HAS_FLAG", + NULL, + "I|MINIMIZE_WINDOW", + "I|SET_NO_PARENT", + /* 32 */ + "I|RESTORE_OOOPS_POSITION", + "II|SET_PARENT", + NULL, + NULL, + /* 36 */ + "WW|MOVE", + "B|LOAD_MOUSE_IMAGE", + "BI|CHECK_TITLES", + NULL, + /* 40 */ + NULL, + "W|ZERO", + "WW|SET", + "WW|ADD", + /* 44 */ + "WW|SUB", + "WW|ADDF", + "WW|SUBF", + "WW|MUL", + /* 48 */ + "WW|DIV", + "WW|MULF", + "WW|DIVF", + "WW|MOD", + /* 52 */ + "WW|MODF", + "WW|RANDOM", + NULL, + "I|SET_A_PARENT", + /* 56 */ + "IB|SET_CHILD2_BIT", + "IB|CLEAR_CHILD2_BIT", + "II|MAKE_SIBLING", + "I|INC_STATE", + /* 60 */ + "I|DEC_STATE", + "IW|SET_STATE", + "W|SHOW_INT", + "T|SHOW_STRING_NL", + /* 64 */ + "T|SHOW_STRING", + "WWWWWB|ADD_TEXT_BOX", + "BTWW|SET_SHORT_TEXT", + "BTw|SET_LONG_TEXT", + /* 68 */ + "x|END", + "x|DONE", + "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|DEBUG", + "|RESCAN", + /* 84 */ + NULL, + NULL, + NULL, + "W|COMMENT", + /* 88 */ + "|STOP_ANIMATION", + "|RESTART_ANIMATION", + "IB|GET_PARENT", + "IB|GET_NEXT", + /* 92 */ + "IB|GET_CHILDREN", + NULL, + NULL, + NULL, + /* 96 */ + "WB|PICTURE", + "W|LOAD_ZONE", + "WWBWWW|ANIMATE", + "WW|STOP_ANIMATE", + /* 100 */ + "|KILL_ANIMATE", + "BWWWWWW|DEFINE_WINDOW", + "B|CHANGE_WINDOW", + "|CLS", + /* 104 */ + "B|CLOSE_WINDOW", + "B|LOAD_HIGH_SCORES", + "BB|CHECK_HIGH_SCORES", + "WWWWWIW|ADD_BOX", + /* 108 */ + "W|DEL_BOX", + "W|ENABLE_BOX", + "W|DISABLE_BOX", + "WWW|MOVE_BOX", + /* 112 */ + NULL, + NULL, + "IB|DO_ICONS", + "IBJ|IS_CLASS", + /* 116 */ + "IB|SET_CLASS", + "IB|UNSET_CLASS", + NULL, + "W|WAIT_SYNC", + /* 120 */ + "W|SYNC", + "BI|DEF_OBJ", + "|ORACLE_TEXT_DOWN", + "|ORACLE_TEXT_UP", + /* 124 */ + "WJ|IF_TIME", + "IJ|IS_SIBLING_WITH_A", + "IBB|DO_CLASS_ICONS", + "WWB|PLAY_TUNE", + /* 128 */ + "W|WAIT_END_TUNE", + "W|IF_END_TUNE", + "Bww|SET_ADJ_NOUN", + "|SET_TIME", + /* 132 */ + "|SAVE_GAME", + "|LOAD_GAME", + "|LIST_SAVED_GAMES", + "|SWITCH_CD", + /* 136 */ + "IV|COPY_SF", + "B|RESTORE_ICONS", + "|FREEZE_ZONES", + "II|SET_PARENT_SPECIAL", + /* 140 */ + "|CLEAR_TIMERS", + "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", + "W|SET_BIT", + "W|CLEAR_BIT", + "WJ|IS_BIT_CLEAR", + /* 156 */ + "WJ|IS_BIT_SET", + "IBB|GET_ITEM_PROP", + "IBW|SET_ITEM_PROP", + NULL, + /* 160 */ + "B|SET_INK", + "BWWW|SETUP_TEXT", + "BBTW|PRINT_STR", + "W|PLAY_EFFECT", + /* 164 */ + "|getDollar2", + "IWWJ|IS_ADJ_NOUN", + "B|SET_BIT2", + "B|CLEAR_BIT2", + /* 168 */ + "BJ|IS_BIT2_CLEAR", + "BJ|IS_BIT2_SET", + NULL, + "W|HYPERLINK_ON", + /* 172 */ + "|HYPERLINK_OFF", + "|SAVE_OOPS_POSITION", + NULL, + "|LOCK_ZONES", + /* 176 */ + "|UNLOCK_ZONES", + "BBI|SCREEN_TEXT_POBJ", + "WWBB|GETPATHPOSN", + "BBB|SCREEN_TEXT_LONG_TEXT", + /* 180 */ + "|MOUSE_ON", + "|MOUSE_OFF", + "T|LOAD_VIDEO", + "|PLAY_VIDEO", + /* 184 */ + "W|UNLOAD_ZONE", + NULL, + "|UNFREEZE_ZONES", + "|RESET_GAME_TIME", + /* 188 */ + "BSJ|STRING2_IS", + "|CLEAR_MARKS", + "B|WAIT_FOR_MARK", + "|RESET_PV_COUNT", + /* 192 */ + "BBBB|SET_PATH_VALUES", + "|STOP_CLOCK", + "|RESTART_CLOCK", + "BBBB|SET_COLOR", +}; + const char *const ww_video_opcode_name_table[] = { /* 0 */ "x|RET", diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp index 446cf6385f..1ed4968854 100644 --- a/engines/agos/items.cpp +++ b/engines/agos/items.cpp @@ -311,6 +311,7 @@ void AGOSEngine::setupWaxworksOpcodes(OpcodeProc *op) { setupAGOSOpcodes(op); // Confirmed + op[55] = &AGOSEngine::oww_goto; op[70] = &AGOSEngine::o1_printLongText; op[83] = &AGOSEngine::o1_rescan; op[98] = &AGOSEngine::o1_animate; @@ -785,10 +786,6 @@ void AGOSEngine::o_random() { void AGOSEngine::o_goto() { // 55: set itemA parent uint item = getNextItemID(); - if (_itemArrayPtr[item] == NULL) { - setItemParent(me(), NULL); - loadRoomItems(item); - } setItemParent(me(), _itemArrayPtr[item]); } @@ -1723,6 +1720,16 @@ void AGOSEngine::oe1_opcode178() { // Waxworks Opcodes // ----------------------------------------------------------------------- +void AGOSEngine::oww_goto() { + // 55: set itemA parent + uint item = getNextItemID(); + if (_itemArrayPtr[item] == NULL) { + setItemParent(me(), NULL); + loadRoomItems(item); + } + setItemParent(me(), _itemArrayPtr[item]); +} + void AGOSEngine::oww_whereTo() { // 85: where to Item *i = getNextItemPtr(); diff --git a/engines/agos/verb.cpp b/engines/agos/verb.cpp index 8431570e7f..7242cdb901 100644 --- a/engines/agos/verb.cpp +++ b/engines/agos/verb.cpp @@ -463,7 +463,6 @@ void AGOSEngine::defineBox(int id, int x, int y, int width, int height, int flag void AGOSEngine::resetVerbs() { if (getGameType() == GType_PP) { _verbHitArea = 300; - return; } else if (getGameType() == GType_FF) { _verbHitArea = 300; int cursor = 0; @@ -701,11 +700,10 @@ void AGOSEngine::boxController(uint x, uint y, uint mode) { uint16 x_ = x; uint16 y_ = y; - if (getGameType() == GType_FF) { + if (getGameType() == GType_FF || getGameType() == GType_PP) { x_ += _scrollX; y_ += _scrollY; - } - if (getGameType() == GType_SIMON2) { + } else if (getGameType() == GType_SIMON2) { if (getBitFlag(79) || y < 134) { x_ += _scrollX * 8; } |