diff options
author | Filippos Karapetis | 2010-06-01 14:41:48 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-01 14:41:48 +0000 |
commit | e083c20da1aab0090a5fc3ea624c9810c63dad52 (patch) | |
tree | 8afe1c12bdba317e799049cdd49dec49281e728f /engines/sci/engine/game.cpp | |
parent | 400542a1fe688bb702a89333c833bc1d89dd1ed4 (diff) | |
download | scummvm-rg350-e083c20da1aab0090a5fc3ea624c9810c63dad52.tar.gz scummvm-rg350-e083c20da1aab0090a5fc3ea624c9810c63dad52.tar.bz2 scummvm-rg350-e083c20da1aab0090a5fc3ea624c9810c63dad52.zip |
The system strings segment is a fixed segment of the segment manager, which doesn't change during the game, thus move all the system strings code and variables inside the segment manager
svn-id: r49372
Diffstat (limited to 'engines/sci/engine/game.cpp')
-rw-r--r-- | engines/sci/engine/game.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp index 232e0eca55..02e66f2142 100644 --- a/engines/sci/engine/game.cpp +++ b/engines/sci/engine/game.cpp @@ -67,13 +67,7 @@ int script_init_engine(EngineState *s) { s->script_000 = s->_segMan->getScript(script_000_segment); - s->sys_strings = s->_segMan->allocateSysStrings(&s->sys_strings_segment); - - // Allocate static buffer for savegame and CWD directories - SystemString *str = &s->sys_strings->_strings[SYS_STRING_SAVEDIR]; - str->_name = "savedir"; - str->_maxSize = MAX_SAVE_DIR_SIZE; - str->_value = (char *)calloc(MAX_SAVE_DIR_SIZE, sizeof(char)); + s->_segMan->initSysStrings(); s->r_acc = s->r_prev = NULL_REG; s->restAdjust = 0; @@ -108,7 +102,7 @@ int game_init(EngineState *s) { if (s->_voc) { s->_voc->parserIsValid = false; // Invalidate parser s->_voc->parser_event = NULL_REG; // Invalidate parser event - s->_voc->parser_base = make_reg(s->sys_strings_segment, SYS_STRING_PARSER_BASE); + s->_voc->parser_base = make_reg(s->_segMan->getSysStringsSegment(), SYS_STRING_PARSER_BASE); } // Initialize menu TODO: Actually this should be another init() @@ -117,11 +111,6 @@ int game_init(EngineState *s) { s->successor = NULL; // No successor - SystemString *str = &s->sys_strings->_strings[SYS_STRING_PARSER_BASE]; - str->_name = "parser-base"; - str->_maxSize = MAX_PARSER_BASE; - str->_value = (char *)calloc(MAX_PARSER_BASE, sizeof(char)); - s->game_start_time = g_system->getMillis(); s->last_wait_time = s->game_start_time; |