bool stageOneShutDown(void) { debug(LOG_WZ, "== stageOneShutDown =="); if ( audio_Disabled() == false ) { sound_CheckAllUnloaded(); } proj_Shutdown(); releaseMission(); if (!aiShutdown()) { return false; } if (!objShutdown()) { return false; } grpShutDown(); ResearchRelease(); //free up the gateway stuff? gwShutDown(); shutdownTerrain(); if (!mapShutdown()) { return false; } scrShutDown(); gridShutDown(); if ( !anim_Shutdown() ) { return false; } if ( !animObj_Shutdown() ) { return false; } debug(LOG_TEXTURE, "=== stageOneShutDown ==="); pie_TexShutDown(); // Use mod_multiplay as the default (campaign might have set it to mod_singleplayer) rebuildSearchPath( mod_multiplay, true ); pie_TexInit(); // restart it initMiscVars(); return true; }
bool stageOneShutDown() { debug(LOG_WZ, "== stageOneShutDown =="); atmosSetWeatherType(WT_NONE); // reset weather and free its data wzPerfShutdown(); pie_FreeShaders(); if (audio_Disabled() == false) { sound_CheckAllUnloaded(); } proj_Shutdown(); releaseMission(); if (!aiShutdown()) { return false; } if (!objShutdown()) { return false; } grpShutDown(); ResearchRelease(); //free up the gateway stuff? gwShutDown(); shutdownTerrain(); if (!mapShutdown()) { return false; } scrShutDown(); gridShutDown(); debug(LOG_TEXTURE, "== stageOneShutDown =="); modelShutdown(); pie_TexShutDown(); // Use mod_multiplay as the default (campaign might have set it to mod_singleplayer) rebuildSearchPath(mod_multiplay, true); pie_TexInit(); // restart it initMiscVars(); wzSceneEnd("Main game loop"); wzSceneBegin("Main menu loop"); return true; }
bool frontendInitialise(const char *ResourceFile) { debug(LOG_MAIN, "Initialising frontend : %s", ResourceFile); if(!InitialiseGlobals()) // Initialise all globals and statics everywhere. { return false; } iV_Reset(); // Reset the IV library. if (!scrTabInitialise()) // Initialise the script system { return false; } if (!stringsInitialise()) // Initialise the string system { return false; } if (!objInitialise()) // Initialise the object system { return false; } if (!anim_Init()) { return false; } if ( !animObj_Init( init_ObjectDead ) ) { return false; } if (!allocPlayerPower()) //set up the PlayerPower for each player - this should only be done ONCE now { return false; } debug(LOG_MAIN, "frontEndInitialise: loading resource file ....."); if (!resLoad(ResourceFile, 0)) { //need the object heaps to have been set up before loading in the save game return false; } if (!dispInitialise()) // Initialise the display system { return false; } FrontImages = (IMAGEFILE*)resGetData("IMG", "frontend.img"); /* Shift the interface initialisation here temporarily so that it can pick up the stats after they have been loaded */ if (!intInitialise()) { return false; } // keymappings // clear out any existing mappings keyClearMappings(); keyInitMappings(false); // Set the default uncoloured cursor here, since it looks slightly // better for menus and such. wzSetCursor(CURSOR_DEFAULT); SetFormAudioIDs(-1,ID_SOUND_WINDOWCLOSE); // disable the open noise since distorted in 3dfx builds. initMiscVars(); gameTimeInit(); // hit me with some funky beats.... cdAudio_PlayTrack(SONG_FRONTEND); return true; }