diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/illusions/bbdou/illusions_bbdou.cpp | 4 | ||||
-rw-r--r-- | engines/illusions/bbdou/illusions_bbdou.h | 2 | ||||
-rw-r--r-- | engines/illusions/duckman/illusions_duckman.cpp | 8 | ||||
-rw-r--r-- | engines/illusions/duckman/illusions_duckman.h | 2 | ||||
-rw-r--r-- | engines/illusions/duckman/scriptopcodes_duckman.cpp | 6 | ||||
-rw-r--r-- | engines/illusions/duckman/scriptopcodes_duckman.h | 1 | ||||
-rw-r--r-- | engines/illusions/illusions.h | 4 |
7 files changed, 26 insertions, 1 deletions
diff --git a/engines/illusions/bbdou/illusions_bbdou.cpp b/engines/illusions/bbdou/illusions_bbdou.cpp index 6ce367fb62..95be82f2cf 100644 --- a/engines/illusions/bbdou/illusions_bbdou.cpp +++ b/engines/illusions/bbdou/illusions_bbdou.cpp @@ -463,6 +463,10 @@ uint32 IllusionsEngine_BBDOU::startTalkThread(int16 duration, uint32 objectId, u return tempThreadId; } +void IllusionsEngine_BBDOU::resumeFromSavegame(uint32 callingThreadId) { + // TODO +} + uint32 IllusionsEngine_BBDOU::startTempScriptThread(byte *scriptCodeIp, uint32 callingThreadId, uint32 value8, uint32 valueC, uint32 value10) { uint32 tempThreadId = newTempThreadId(); diff --git a/engines/illusions/bbdou/illusions_bbdou.h b/engines/illusions/bbdou/illusions_bbdou.h index f2dbd1aee7..3b190ea7db 100644 --- a/engines/illusions/bbdou/illusions_bbdou.h +++ b/engines/illusions/bbdou/illusions_bbdou.h @@ -114,6 +114,8 @@ public: uint32 sequenceId2, uint32 namedPointId, uint32 callingThreadId); uint32 startTempScriptThread(byte *scriptCodeIp, uint32 callingThreadId, uint32 value8, uint32 valueC, uint32 value10); + void resumeFromSavegame(uint32 callingThreadId); + void newScriptThread(uint32 threadId, uint32 callingThreadId, uint notifyFlags, byte *scriptCodeIp, uint32 value8, uint32 valueC, uint32 value10); uint32 newTimerThread(uint32 duration, uint32 callingThreadId, bool isAbortable); diff --git a/engines/illusions/duckman/illusions_duckman.cpp b/engines/illusions/duckman/illusions_duckman.cpp index db8f83c295..272a7d619b 100644 --- a/engines/illusions/duckman/illusions_duckman.cpp +++ b/engines/illusions/duckman/illusions_duckman.cpp @@ -694,6 +694,14 @@ uint32 IllusionsEngine_Duckman::startTempScriptThread(byte *scriptCodeIp, uint32 return tempThreadId; } +void IllusionsEngine_Duckman::resumeFromSavegame(uint32 callingThreadId) { + _input->discardAllEvents(); + if (changeScene(_savegameSceneId, _savegameThreadId, callingThreadId)) { + _savegameSceneId = 0; + _savegameThreadId = 0; + } +} + void IllusionsEngine_Duckman::newScriptThread(uint32 threadId, uint32 callingThreadId, uint notifyFlags, byte *scriptCodeIp) { ScriptThread *scriptThread = new ScriptThread(this, threadId, callingThreadId, notifyFlags, diff --git a/engines/illusions/duckman/illusions_duckman.h b/engines/illusions/duckman/illusions_duckman.h index e2b3223efc..c9467366f5 100644 --- a/engines/illusions/duckman/illusions_duckman.h +++ b/engines/illusions/duckman/illusions_duckman.h @@ -150,6 +150,8 @@ public: uint32 sequenceId2, uint32 callingThreadId); uint32 startTempScriptThread(byte *scriptCodeIp, uint32 callingThreadId, uint32 value8, uint32 valueC, uint32 value10); + void resumeFromSavegame(uint32 callingThreadId); + void newScriptThread(uint32 threadId, uint32 callingThreadId, uint notifyFlags, byte *scriptCodeIp); uint32 newTimerThread(uint32 duration, uint32 callingThreadId, bool isAbortable); diff --git a/engines/illusions/duckman/scriptopcodes_duckman.cpp b/engines/illusions/duckman/scriptopcodes_duckman.cpp index 618a6e4a13..5abef682b6 100644 --- a/engines/illusions/duckman/scriptopcodes_duckman.cpp +++ b/engines/illusions/duckman/scriptopcodes_duckman.cpp @@ -76,7 +76,7 @@ void ScriptOpcodes_Duckman::initOpcodes() { OPCODE(18, opEnterScene18); OPCODE(19, opUnloadResourcesBySceneId); OPCODE(20, opChangeScene); - // TODO OPCODE(21, ); + OPCODE(21, opResumeFromSavegame); OPCODE(22, opStartModalScene); OPCODE(23, opExitModalScene); OPCODE(24, opEnterScene24); @@ -328,6 +328,10 @@ void ScriptOpcodes_Duckman::opChangeScene(ScriptThread *scriptThread, OpCall &op } } +void ScriptOpcodes_Duckman::opResumeFromSavegame(ScriptThread *scriptThread, OpCall &opCall) { + _vm->resumeFromSavegame(opCall._callerThreadId); +} + void ScriptOpcodes_Duckman::opStartModalScene(ScriptThread *scriptThread, OpCall &opCall) { ARG_SKIP(2); ARG_UINT32(sceneId); diff --git a/engines/illusions/duckman/scriptopcodes_duckman.h b/engines/illusions/duckman/scriptopcodes_duckman.h index 6b3b2ec6c4..1dbe6e6e6d 100644 --- a/engines/illusions/duckman/scriptopcodes_duckman.h +++ b/engines/illusions/duckman/scriptopcodes_duckman.h @@ -57,6 +57,7 @@ protected: void opEnterScene18(ScriptThread *scriptThread, OpCall &opCall); void opUnloadResourcesBySceneId(ScriptThread *scriptThread, OpCall &opCall); void opChangeScene(ScriptThread *scriptThread, OpCall &opCall); + void opResumeFromSavegame(ScriptThread *scriptThread, OpCall &opCall); void opStartModalScene(ScriptThread *scriptThread, OpCall &opCall); void opExitModalScene(ScriptThread *scriptThread, OpCall &opCall); void opEnterScene24(ScriptThread *scriptThread, OpCall &opCall); diff --git a/engines/illusions/illusions.h b/engines/illusions/illusions.h index 097a2c766b..f188d5cee3 100644 --- a/engines/illusions/illusions.h +++ b/engines/illusions/illusions.h @@ -132,6 +132,9 @@ public: uint32 _resGetTime; bool _unpauseControlActorFlag; uint32 _lastUpdateTime; + + uint32 _savegameSceneId; + uint32 _savegameThreadId; uint32 _fontId; int _field8; @@ -195,6 +198,7 @@ public: virtual void startScriptThreadSimple(uint32 threadId, uint32 callingThreadId) = 0; virtual uint32 startTempScriptThread(byte *scriptCodeIp, uint32 callingThreadId, uint32 value8, uint32 valueC, uint32 value10) = 0; + virtual void resumeFromSavegame(uint32 callingThreadId) = 0; #if 0 |