Add inital pause code for Elvira 1/2 & WW, and cleanup
svn-id: r24723
This commit is contained in:
parent
7b0e6f1489
commit
f55320f988
11 changed files with 443 additions and 144 deletions
|
@ -57,6 +57,7 @@ void AGOSEngine::setupElvira2Opcodes(OpcodeProc *op) {
|
|||
op[123] = &AGOSEngine::oe1_setTime;
|
||||
op[124] = &AGOSEngine::oe1_ifTime;
|
||||
op[127] = &AGOSEngine::os1_playTune;
|
||||
op[135] = &AGOSEngine::oe2_pauseGame;
|
||||
op[144] = &AGOSEngine::oe2_setDoorOpen;
|
||||
op[145] = &AGOSEngine::oe2_setDoorClosed;
|
||||
op[146] = &AGOSEngine::oe2_setDoorLocked;
|
||||
|
@ -171,6 +172,35 @@ void AGOSEngine::oe2_doTable() {
|
|||
}
|
||||
}
|
||||
|
||||
void AGOSEngine::oe2_pauseGame() {
|
||||
// 135: pause game
|
||||
HitArea *ha;
|
||||
|
||||
time_t pauseTime = time(NULL);
|
||||
haltAnimation();
|
||||
|
||||
for (;;) {
|
||||
_lastHitArea = NULL;
|
||||
_lastHitArea3 = NULL;
|
||||
|
||||
for (;;) {
|
||||
if (processSpecialKeys() != 0 || _lastHitArea3 != 0)
|
||||
break;
|
||||
delay(1);
|
||||
}
|
||||
|
||||
ha = _lastHitArea;
|
||||
|
||||
if (ha == NULL) {
|
||||
} else if (ha->id == 201) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
restartAnimation();
|
||||
_gameStoppedClock = time(NULL) - pauseTime + _gameStoppedClock;
|
||||
}
|
||||
|
||||
void AGOSEngine::oe2_setDoorOpen() {
|
||||
// 144: set door open
|
||||
Item *i = getNextItemPtr();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue