diff options
author | Torbjörn Andersson | 2003-11-03 07:47:42 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-11-03 07:47:42 +0000 |
commit | b3b0118292df23a5d4bf0e9b32a56fb4ddfba1ea (patch) | |
tree | df5851f12ebb885d05db421078980e122698243e /sword2/startup.cpp | |
parent | 0ece8aab8b03e0aead5f18e33797ec85294bf158 (diff) | |
download | scummvm-rg350-b3b0118292df23a5d4bf0e9b32a56fb4ddfba1ea.tar.gz scummvm-rg350-b3b0118292df23a5d4bf0e9b32a56fb4ddfba1ea.tar.bz2 scummvm-rg350-b3b0118292df23a5d4bf0e9b32a56fb4ddfba1ea.zip |
The resource and memory managers are now created dynamically.
Renamed the resource manager's open/close methods openResource() and
closeResource() to avoid confusion. (It was I who originally shortened
their names to open() and close(), but I've changed my mind now.)
Moved more stuff into Sword2Engine.
svn-id: r11088
Diffstat (limited to 'sword2/startup.cpp')
-rw-r--r-- | sword2/startup.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sword2/startup.cpp b/sword2/startup.cpp index 674ff09319..3bca897a1c 100644 --- a/sword2/startup.cpp +++ b/sword2/startup.cpp @@ -125,17 +125,17 @@ uint32 Init_start_menu(void) { // - need to check in case un-built sections included in // start list - if (res_man.checkValid(res)) { + if (res_man->checkValid(res)) { debug(5, "- resource %d ok", res); - raw_script = (char*) res_man.open(res); + raw_script = (char*) res_man->openResource(res); null_pc = 0; g_logic.runScript(raw_script, raw_script, &null_pc); - res_man.close(res); + res_man->closeResource(res); } else debug(5, "- resource %d invalid", res); } - memory.freeMemory(temp); + memory->freeMemory(temp); return 1; } @@ -197,7 +197,7 @@ void Con_start(int start) { // restarting - stop sfx, music & speech! - Clear_fx_queue(); + g_sword2->clearFxQueue(); // fade out any music that is currently playing g_logic.fnStopMusic(NULL); @@ -212,12 +212,12 @@ void Con_start(int start) { // remove all resources from memory, including player // object & global variables - res_man.removeAll(); + res_man->removeAll(); // reopen global variables resource & send address to // interpreter - it won't be moving - g_logic.setGlobalInterpreterVariables((int32 *) (res_man.open(1) + sizeof(_standardHeader))); - res_man.close(1); + g_logic.setGlobalInterpreterVariables((int32 *) (res_man->openResource(1) + sizeof(_standardHeader))); + res_man->closeResource(1); // free all the route memory blocks from previous game router.freeAllRouteMem(); @@ -231,8 +231,8 @@ void Con_start(int start) { // set the key // Open George - raw_data_ad = (char *) res_man.open(8); - raw_script = (char *) res_man.open(start_list[start].start_res_id); + raw_data_ad = (char *) res_man->openResource(8); + raw_script = (char *) res_man->openResource(start_list[start].start_res_id); // denotes script to run null_pc = start_list[start].key & 0xffff; @@ -240,10 +240,10 @@ void Con_start(int start) { Debug_Printf("Running start %d\n", start); g_logic.runScript(raw_script, raw_data_ad, &null_pc); - res_man.close(start_list[start].start_res_id); + res_man->closeResource(start_list[start].start_res_id); // Close George - res_man.close(8); + res_man->closeResource(8); // make sure thre's a mouse, in case restarting while // mouse not available |