diff options
author | Travis Howell | 2006-10-06 04:51:22 +0000 |
---|---|---|
committer | Travis Howell | 2006-10-06 04:51:22 +0000 |
commit | 7f99566784fd03339b1af43609c7572748213a9f (patch) | |
tree | 58530d1defddefd322abe2a0ab8aa4d0bc868496 /engines/agos | |
parent | c22289416fb20a603c83ca33724e1198c39706bb (diff) | |
download | scummvm-rg350-7f99566784fd03339b1af43609c7572748213a9f.tar.gz scummvm-rg350-7f99566784fd03339b1af43609c7572748213a9f.tar.bz2 scummvm-rg350-7f99566784fd03339b1af43609c7572748213a9f.zip |
Add support for skipping introduction in Elivra 1/2/WW
svn-id: r24131
Diffstat (limited to 'engines/agos')
-rw-r--r-- | engines/agos/agos.cpp | 18 | ||||
-rw-r--r-- | engines/agos/agos.h | 2 | ||||
-rw-r--r-- | engines/agos/debug.h | 22 | ||||
-rw-r--r-- | engines/agos/items.cpp | 20 | ||||
-rw-r--r-- | engines/agos/rooms.cpp | 8 |
5 files changed, 52 insertions, 18 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index ab9a26ee74..5c473cda8f 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -1768,9 +1768,21 @@ void AGOSEngine::waitForSync(uint a) { } } if (_exitCutscene) { - if (getBitFlag(9)) { - endCutscene(); - break; + if (getGameType() == GType_ELVIRA) { + if (_variableArray[105] == 0) { + _variableArray[105] = 255; + break; + } + } else if (getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) { + if (_vgaWaitFor == 51) { + setBitFlag(244, 1); + break; + } + } else { + if (getBitFlag(9)) { + endCutscene(); + break; + } } } processSpecialKeys(); diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 9d9d143289..3ed965b06d 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -1042,6 +1042,8 @@ public: void oww_textMenu(); void oww_ifDoorOpen(); void oww_opcode184(); + void oww_opcode185(); + void oww_opcode186(); void oww_opcode187(); // Opcodes, Simon 1 only diff --git a/engines/agos/debug.h b/engines/agos/debug.h index 86ffc7024c..487a283a54 100644 --- a/engines/agos/debug.h +++ b/engines/agos/debug.h @@ -245,12 +245,12 @@ static const char *const ww_opcode_name_table[256] = { /* 172 */ NULL, NULL, - NULL, - "|LOCK_ZONES", + "W|UNK_174", + "|getDollar2", /* 176 */ - "|UNLOCK_ZONES", - "BBI|SCREEN_TEXT_POBJ", - "WWBB|GETPATHPOSN", + "IWBB|UNK_176", + "B|UNK_177", + "B|UNK_178", "IWWJ|IS_ADJ_NOUN", /* 180 */ "B|SET_BIT2", @@ -258,10 +258,14 @@ static const char *const ww_opcode_name_table[256] = { "BJ|IS_BIT2_CLEAR", "BJ|IS_BIT2_SET", /* 184 */ - "W|UNLOAD_ZONE", - "W|LOAD_SOUND_FILES", - "|UNFREEZE_ZONES", - "|FADE_TO_BLACK", + "T|UNK_184", + "T|UNK_185", + "B|UNK_186", + "|UNK_187", + /* 188 */ + "I|UNK_188", + "|UNK_189", + "|UNK_190", }; static const char *const simon1dos_opcode_name_table[256] = { diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp index e90201afaf..89cf2e7d2f 100644 --- a/engines/agos/items.cpp +++ b/engines/agos/items.cpp @@ -379,6 +379,8 @@ void AGOSEngine::setupWaxworksOpcodes(OpcodeProc *op) { op[182] = &AGOSEngine::o_b2Zero; op[183] = &AGOSEngine::o_b2NotZero; op[184] = &AGOSEngine::oww_opcode184; + op[185] = &AGOSEngine::oww_opcode185; + op[186] = &AGOSEngine::oww_opcode186; op[187] = &AGOSEngine::oww_opcode187; // Code difference, check if triggered @@ -399,8 +401,6 @@ void AGOSEngine::setupWaxworksOpcodes(OpcodeProc *op) { op[176] = NULL; op[177] = NULL; op[178] = NULL; - op[185] = NULL; - op[186] = NULL; op[188] = NULL; op[189] = NULL; op[190] = NULL; @@ -1106,6 +1106,10 @@ void AGOSEngine::o_loadZone() { uint vga_res = getVarOrWord(); _lockWord |= 0x80; + + vc27_resetSprite(); + vc29_stopAllSounds(); + loadZone(vga_res); _lockWord &= ~0x80; } @@ -1870,9 +1874,9 @@ void AGOSEngine::oww_whereTo() { int16 f = getVarOrByte(); if (f == 1) - _subjectItem = _itemArrayPtr[getExitOf(i, d)]; + _subjectItem = derefItem(getExitOf(i, d)); else - _objectItem = _itemArrayPtr[getExitOf(i, d)]; + _objectItem = derefItem(getExitOf(i, d)); } void AGOSEngine::oww_menu() { @@ -1901,6 +1905,14 @@ void AGOSEngine::oww_opcode184() { printf("%s\n", getStringPtrByID(getNextStringID())); } +void AGOSEngine::oww_opcode185() { + printf("%s\n", getStringPtrByID(getNextStringID())); +} + +void AGOSEngine::oww_opcode186() { + printf("%s\n", getStringPtrByID(_longText[getVarOrByte()])); +} + void AGOSEngine::oww_opcode187() { } diff --git a/engines/agos/rooms.cpp b/engines/agos/rooms.cpp index b3bf2fccb4..c42180377f 100644 --- a/engines/agos/rooms.cpp +++ b/engines/agos/rooms.cpp @@ -245,8 +245,12 @@ bool AGOSEngine::loadRoomItems(uint item) { } while ((i = in.readUint16BE()) != 0) { - _itemArrayPtr[i] = (Item *)allocateItem(sizeof(Item)); - readItemFromGamePc(&in, _itemArrayPtr[i]); + _itemArrayPtr[i + 1] = (Item *)allocateItem(sizeof(Item)); + readItemFromGamePc(&in, _itemArrayPtr[i + 1]); + + Item *tmp = _itemArrayPtr[i + 1]; + tmp->child = 0; + tmp->parent = 0; } in.close(); |