diff options
-rw-r--r-- | engines/sci/engine/savegame.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/segment.h | 10 | ||||
-rw-r--r-- | engines/sci/sci.cpp | 1 |
3 files changed, 9 insertions, 4 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index ab7f19d423..d322a80c15 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -990,7 +990,7 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { retval->script_000 = retval->_segMan->getScript(retval->_segMan->getScriptSegment(0, SCRIPT_GET_DONT_LOAD)); retval->gc_countdown = GC_INTERVAL - 1; retval->sys_strings_segment = retval->_segMan->findSegmentByType(SEG_TYPE_SYS_STRINGS); - retval->sys_strings = (SystemStrings *)GET_SEGMENT(*retval->_segMan, retval->sys_strings_segment, SEG_TYPE_SYS_STRINGS); + retval->sys_strings = (SystemStrings *)(retval->_segMan->_heap[retval->sys_strings_segment]); // Time state: retval->last_wait_time = g_system->getMillis(); diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h index ef1535a6b3..8108e0695e 100644 --- a/engines/sci/engine/segment.h +++ b/engines/sci/engine/segment.h @@ -200,7 +200,9 @@ public: }; /** Clone has been marked as 'freed' */ -#define OBJECT_FLAG_FREED (1 << 0) +enum { + OBJECT_FLAG_FREED = (1 << 0) +}; class Object { public: @@ -517,8 +519,10 @@ public: virtual void saveLoadWithSerializer(Common::Serializer &ser); }; -#define CLONE_USED -1 -#define CLONE_NONE -1 +enum { + CLONE_USED = -1, + CLONE_NONE = -1 +}; typedef Object Clone; diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 2ebdd98aa9..c03b9dbc68 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -206,6 +206,7 @@ Common::Error SciEngine::run() { // Set the savegame dir (actually, we set it to a fake value, // since we cannot let the game control where saves are stored) + assert(_gamestate->sys_strings->_strings[SYS_STRING_SAVEDIR]._value != 0); strcpy(_gamestate->sys_strings->_strings[SYS_STRING_SAVEDIR]._value, ""); SciVersion soundVersion = _gamestate->detectDoSoundType(); |