diff options
Diffstat (limited to 'engines/agos/script_e2.cpp')
-rw-r--r-- | engines/agos/script_e2.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/agos/script_e2.cpp b/engines/agos/script_e2.cpp index 13cb15a8b9..8251510fac 100644 --- a/engines/agos/script_e2.cpp +++ b/engines/agos/script_e2.cpp @@ -145,7 +145,7 @@ void AGOSEngine_Elvira2::setupOpcodes() { OPCODE(o_comment), /* 88 */ OPCODE(o_invalid), - OPCODE(oe1_loadGame), + OPCODE(oe2_loadGame), OPCODE(o_getParent), OPCODE(o_getNext), /* 92 */ @@ -315,6 +315,17 @@ void AGOSEngine_Elvira2::oe2_pObj() { showMessageFormat("%s\n", (const char *)getStringPtrByID(subObject->objectFlagValue[0])); // Difference } +void AGOSEngine_Elvira2::oe2_loadGame() { + // 89: load game + uint16 stringId = getNextStringID(); + + if (!scumm_stricmp(getFileName(GAME_RESTFILE), (const char *)getStringPtrByID(stringId))) { + loadGame(getFileName(GAME_RESTFILE), true); + } else { + loadGame((const char *)getStringPtrByID(stringId)); + } +} + void AGOSEngine_Elvira2::oe2_drawItem() { // 113: draw item Item *i = getNextItemPtr(); |