diff options
author | Joseph-Eugene Winzer | 2017-12-24 12:12:40 +0100 |
---|---|---|
committer | Thierry Crozat | 2018-01-23 02:15:44 +0000 |
commit | 6e7da438896b4fe089c90d26d4d2e1aab934677a (patch) | |
tree | 903e22e4d764c44e2ba485b1c9e36b6a26bf8bad | |
parent | b6bb1f9709e345add857ac0a2bcd6a926d6133d5 (diff) | |
download | scummvm-rg350-6e7da438896b4fe089c90d26d4d2e1aab934677a.tar.gz scummvm-rg350-6e7da438896b4fe089c90d26d4d2e1aab934677a.tar.bz2 scummvm-rg350-6e7da438896b4fe089c90d26d4d2e1aab934677a.zip |
SUPERNOVA: Introduces INT32_MAX for eventTime
-rw-r--r-- | engines/supernova/rooms.cpp | 2 | ||||
-rw-r--r-- | engines/supernova/state.cpp | 4 | ||||
-rw-r--r-- | engines/supernova/state.h | 2 | ||||
-rw-r--r-- | engines/supernova/supernova.cpp | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/engines/supernova/rooms.cpp b/engines/supernova/rooms.cpp index 71753719e8..24d9c83cc2 100644 --- a/engines/supernova/rooms.cpp +++ b/engines/supernova/rooms.cpp @@ -2745,7 +2745,7 @@ bool AxacussBcorridor::interact(Action verb, Object &obj1, Object &obj2) { if (!_gm->_rooms[OFFICE_L1 + obj1._id - DOOR1]->isSectionVisible(4)) _gm->search(180); else - _gm->_state._eventTime = 0x7FFFFFF; + _gm->_state._eventTime = INT32_MAX; } } else if (((verb == ACTION_WALK) || ((verb == ACTION_OPEN) && !obj1.hasProperty(OPENED))) && (obj1._id >= DOOR1) && (obj1._id <= DOOR4) && diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp index 3f9f38aee1..7a77705e57 100644 --- a/engines/supernova/state.cpp +++ b/engines/supernova/state.cpp @@ -368,7 +368,7 @@ void GameManager::initState() { _state._time = ticksToMsec(916364); // 2 pm _state._timeSleep = 0; _state._timeAlarm = ticksToMsec(458182); // 7 am - _state._eventTime = 0x7FFFFFFF; + _state._eventTime = INT32_MAX; _state._eventCallback = kNoFn; _state._arrivalDaysLeft = 2840; _state._shipEnergyDaysLeft = 2135; @@ -849,7 +849,7 @@ void GameManager::telomat(int nr) { } _rooms[BCORRIDOR]->setSectionVisible(7, true); _rooms[BCORRIDOR]->setSectionVisible(i + 1, true); - _state._eventTime = 0x7FFFFFFF; + _state._eventTime = INT32_MAX; _currentRoom->addSentence(0, 1); } _guiEnabled = true; diff --git a/engines/supernova/state.h b/engines/supernova/state.h index 50a0ce18d8..568d4cf22e 100644 --- a/engines/supernova/state.h +++ b/engines/supernova/state.h @@ -29,6 +29,8 @@ namespace Supernova { +const int32 INT32_MAX = 0x7FFFFFFF; + enum EventFunction { kNoFn, kSupernovaFn, kGuardReturnedFn, kGuardWalkFn, kTaxiFn, kSearchStartFn }; struct GameState { diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp index b13b52163a..c3846d0498 100644 --- a/engines/supernova/supernova.cpp +++ b/engines/supernova/supernova.cpp @@ -186,7 +186,7 @@ void SupernovaEngine::updateEvents() { if (_gm->_state._eventCallback != kNoFn && _gm->_state._time >= _gm->_state._eventTime) { _allowLoadGame = false; _allowSaveGame = false; - _gm->_state._eventTime = 0x7FFFFFFF; + _gm->_state._eventTime = INT32_MAX; EventFunction fn = _gm->_state._eventCallback; _gm->_state._eventCallback = kNoFn; switch (fn) { |