diff options
author | Torbjörn Andersson | 2006-09-30 07:00:42 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-09-30 07:00:42 +0000 |
commit | 0baff357531f2c6b74a8a4da3282705776e20826 (patch) | |
tree | a238364fb9b3981374596754fa9e0c4f39bf8ad7 /engines | |
parent | c8689b29d891eaca26e80393b89e8a41e0f2dddf (diff) | |
download | scummvm-rg350-0baff357531f2c6b74a8a4da3282705776e20826.tar.gz scummvm-rg350-0baff357531f2c6b74a8a4da3282705776e20826.tar.bz2 scummvm-rg350-0baff357531f2c6b74a8a4da3282705776e20826.zip |
Partially unstubbed the PP "oops" opcodes.
svn-id: r24028
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agos/agos.cpp | 4 | ||||
-rw-r--r-- | engines/agos/agos.h | 3 | ||||
-rw-r--r-- | engines/agos/items.cpp | 23 |
3 files changed, 29 insertions, 1 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 260d1d0f4a..06a10705e2 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -331,6 +331,7 @@ AGOSEngine::AGOSEngine(OSystem *syst) _variableArray = 0; _variableArray2 = 0; _variableArrayPtr = 0; + _variableBackupArray = 0; memset(_windowArray, 0, sizeof(_windowArray)); @@ -379,6 +380,8 @@ AGOSEngine::AGOSEngine(OSystem *syst) _saveOrLoad = false; _saveLoadEdit = false; + _oopsValid = false; + _hyperLink = 0; _interactY = 0; _oracleMaxScrollY = 0; @@ -614,6 +617,7 @@ void AGOSEngine::setupGame() { _variableArray = (int16 *)calloc(_numVars, sizeof(int16)); _variableArray2 = (int16 *)calloc(_numVars, sizeof(int16)); + _variableBackupArray = (int16 *)calloc(_numVars, sizeof(int16)); setupOpcodes(); diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 1ebda88f95..c1543988df 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -412,6 +412,7 @@ protected: int16 *_variableArray; int16 *_variableArray2; int16 *_variableArrayPtr; + int16 *_variableBackupArray; WindowBlock *_windowArray[16]; @@ -475,6 +476,8 @@ protected: byte _saveLoadType, _saveLoadSlot; char _saveLoadName[108]; + bool _oopsValid; + int _sdlMouseX, _sdlMouseY; byte *_backGroundBuf; diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp index 565f90c260..60e0f3e35c 100644 --- a/engines/agos/items.cpp +++ b/engines/agos/items.cpp @@ -2569,10 +2569,24 @@ void AGOSEngine::o4_opcode30() { void AGOSEngine::o4_restoreOopsPosition() { // 32: restore oops position getNextItemPtr(); + if (_oopsValid) { + for (uint i = 0; i < _numVars; i++) { + _variableArray[i] = _variableBackupArray[i]; + } +// i=FlagData[999]*100+11; +// C_PICTURE(4,i); + if (getBitFlag(110)) { + _gameTime += 10; + } else { + // Swampy adventures + _gameTime += 30; + } + _oopsValid = false; + } } void AGOSEngine::o4_checkTiles() { - // 37: for MahJongg game + // 37: for MahJongg game getVarOrByte(); } @@ -2627,6 +2641,13 @@ void AGOSEngine::o4_loadUserGame() { void AGOSEngine::o4_saveOopsPosition() { // 173: save oops position +// if (IsVQueueEmpty() == 0) { + _oopsValid = true; + for (uint i = 0; i < _numVars; i++) { + _variableBackupArray[i] = _variableArray[i]; + } +// } else +// _oopsValid = false; } void AGOSEngine::o4_resetGameTime() { |