aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/game.cpp
diff options
context:
space:
mode:
authorMax Horn2009-04-22 17:54:11 +0000
committerMax Horn2009-04-22 17:54:11 +0000
commit3af8918e1a0888d46df13eff088104dce4c88974 (patch)
treef82555b776ff10f38e5de6cd65ad3538137f79a0 /engines/sci/engine/game.cpp
parent7a71fd35aeede3bd1f262e5d0b229235a36a2aeb (diff)
downloadscummvm-rg350-3af8918e1a0888d46df13eff088104dce4c88974.tar.gz
scummvm-rg350-3af8918e1a0888d46df13eff088104dce4c88974.tar.bz2
scummvm-rg350-3af8918e1a0888d46df13eff088104dce4c88974.zip
SCI: Changed kfunct_table to a Common::Array
svn-id: r40080
Diffstat (limited to 'engines/sci/engine/game.cpp')
-rw-r--r--engines/sci/engine/game.cpp31
1 files changed, 10 insertions, 21 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index 39f1b2135b..a955b0058b 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -68,22 +68,6 @@ static int _init_vocabulary(EngineState *s) { // initialize vocabulary and relat
extern int _allocd_rules;
-static void _free_vocabulary(EngineState *s) {
- sciprintf("Freeing vocabulary\n");
-
- s->_parserWords.clear();
- vocab_free_suffixes(s->resmgr, s->_parserSuffixes);
- vocab_free_branches(s->parser_branches);
- vocab_free_rule_list(s->parser_rules);
-
- s->_selectorNames.clear();
- s->_kernelNames.clear();
- vocabulary_free_opcodes(s->opcodes);
- s->opcodes = NULL;
-
- s->opcodes = NULL;
-}
-
static void _sci1_alloc_system_colors(EngineState *s) {
gfx_color_t black = { PaletteEntry(0, 0, 0), 0, 0, 0, GFX_MASK_VISUAL };
gfxop_set_system_color(s->gfx_state, 0, &black);
@@ -537,17 +521,22 @@ void script_free_vm_memory(EngineState *s) {
s->_fileHandles.resize(5);
}
-extern void free_kfunct_tables(EngineState *s);
-// From kernel.c
-
void script_free_engine(EngineState *s) {
script_free_vm_memory(s);
sciprintf("Freeing state-dependant data\n");
- free_kfunct_tables(s);
+ s->_kfuncTable.clear();
+
+ s->_parserWords.clear();
+ vocab_free_suffixes(s->resmgr, s->_parserSuffixes);
+ vocab_free_branches(s->parser_branches);
+ vocab_free_rule_list(s->parser_rules);
- _free_vocabulary(s);
+ s->_selectorNames.clear();
+ s->_kernelNames.clear();
+ vocabulary_free_opcodes(s->opcodes);
+ s->opcodes = NULL;
}
void script_free_breakpoints(EngineState *s) {