mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
Partially unstubbed the PP "oops" opcodes.
svn-id: r24028
This commit is contained in:
parent
c8689b29d8
commit
0baff35753
@ -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();
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user