aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2010-02-03 01:33:48 +0000
committerMax Horn2010-02-03 01:33:48 +0000
commitbec3a0d539b3fc23f56e09e895d06b457034faf2 (patch)
tree047a60b375c0c0f6e425f15d245b4a6fa728d75f
parent4ecaf4d4aca61000db542c19a717f6b9530b8ee7 (diff)
downloadscummvm-rg350-bec3a0d539b3fc23f56e09e895d06b457034faf2.tar.gz
scummvm-rg350-bec3a0d539b3fc23f56e09e895d06b457034faf2.tar.bz2
scummvm-rg350-bec3a0d539b3fc23f56e09e895d06b457034faf2.zip
cleanup
svn-id: r47835
-rw-r--r--engines/sci/engine/savegame.cpp2
-rw-r--r--engines/sci/engine/segment.h10
-rw-r--r--engines/sci/sci.cpp1
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();