aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular/game_nebular.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads/nebular/game_nebular.cpp')
-rw-r--r--engines/mads/nebular/game_nebular.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index e8e0a4f42c..1db5eaea00 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -118,6 +118,10 @@ void GameNebular::startGame() {
initializeGlobals();
+ if (_loadGameSlot >= 0)
+ // User selected to resume a savegame
+ return;
+
// Check copy protection
ProtectionResult protectionResult = checkCopyProtection();
@@ -350,7 +354,7 @@ void GameNebular::setSectionHandler() {
void GameNebular::checkShowDialog() {
// Loop for showing dialogs, if any need to be shown
- if (_vm->_dialogs->_pendingDialog && (_player._stepEnabled || _winStatus)
+ if (_vm->_dialogs->_pendingDialog && (_player._stepEnabled || _winStatus)
&& !_globals[kCopyProtectFailed]) {
_player.releasePlayerSprites();
@@ -689,8 +693,6 @@ void GameNebular::doObjectAction() {
_globals[kHandsetCellStatus] = _difficulty != DIFFICULTY_HARD || _globals[kHandsetCellStatus] ? 1 : 2;
dialogs.show(425);
}
- } else if (action.isAction(VERB_SET, NOUN_TIMEBOMB)) {
- dialogs.show(427);
} else if (action.isAction(VERB_PUT, NOUN_BOMB, NOUN_CHICKEN) || action.isAction(VERB_PUT, NOUN_BOMBS, NOUN_CHICKEN)) {
_objects.setRoom(OBJ_CHICKEN, NOWHERE);
if (_objects.isInInventory(OBJ_BOMBS)) {
@@ -824,8 +826,8 @@ void GameNebular::unhandledAction() {
void GameNebular::step() {
if (_player._visible && _player._stepEnabled && !_player._moving &&
(_player._facing == _player._turnToFacing)) {
- if (_scene._frameStartTime >= *((uint32 *)&_globals[kWalkerTiming])) {
- if (!_player._stopWalkerIndex) {
+ if (_scene._frameStartTime >= (uint32)_globals[kWalkerTiming]) {
+ if (_player._stopWalkers.empty()) {
int randomVal = _vm->getRandomNumber(29999);
if (_globals[kSexOfRex] == REX_MALE) {
switch (_player._facing) {
@@ -873,19 +875,19 @@ void GameNebular::step() {
}
}
- *((uint32 *)&_globals[kWalkerTiming]) += 6;
+ _globals[kWalkerTiming] += 6;
}
}
// Below is countdown to set the timebomb off in room 604
if (_globals[kTimebombStatus] == TIMEBOMB_ACTIVATED) {
- int diff = _scene._frameStartTime - *((uint32 *)&_globals[kTimebombClock]);
- if ((diff >= 0) && (diff <= 60)) {
- *((uint32 *)&_globals[kTimebombTimer]) += diff;
- } else {
- ++*((uint32 *)&_globals[kTimebombTimer]);
- }
- *((uint32 *)&_globals[kTimebombClock]) = _scene._frameStartTime;
+ int diff = _scene._frameStartTime - _globals[kTimebombClock];
+ if ((diff >= 0) && (diff <= 60))
+ _globals[kTimebombTimer] += diff;
+ else
+ ++_globals[kTimebombTimer];
+
+ _globals[kTimebombClock] = (int) _scene._frameStartTime;
}
}