bool stageThreeShutDown(void) { debug(LOG_WZ, "== stageThreeShutDown =="); removeSpotters(); // There is an assymetry in scripts initialization and destruction, due // the many different ways scripts get loaded. if (!shutdownScripts()) { return false; } challengesUp = false; challengeActive = false; isInGamePopupUp = false; shutdownTemplates(); // make sure any button tips are gone. widgReset(); audio_StopAll(); if(bMultiPlayer) { multiGameShutdown(); } cmdDroidMultiExpBoost(false); eventReset(); // reset the script values system scrvReset(); //call this here before mission data is released if (!missionShutDown()) { return false; } /* When this line wasn't at this point. The PSX version always failed on the next script after the tutorial ... unexplained why? */ // bInTutorial=false; scrExternReset(); //reset the run data so that doesn't need to be initialised in the scripts initRunData(); resetVTOLLandingPos(); setScriptWinLoseVideo(PLAY_NONE); return true; }
bool stageThreeShutDown() { debug(LOG_WZ, "== stageThreeShutDown =="); hostlaunch = 0; removeSpotters(); // There is an asymmetry in scripts initialization and destruction, due // the many different ways scripts get loaded. if (!shutdownScripts()) { return false; } challengesUp = false; challengeActive = false; isInGamePopupUp = false; shutdownTemplates(); // make sure any button tips are gone. widgReset(); audio_StopAll(); if (bMultiPlayer) { multiGameShutdown(); } eventReset(); // reset the script values system scrvReset(); //call this here before mission data is released if (!missionShutDown()) { return false; } scrExternReset(); // reset the run data so that doesn't need to be initialised in the scripts initRunData(); resetVTOLLandingPos(); setScriptWinLoseVideo(PLAY_NONE); return true; }
// //////////////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////////////// // Free up after level specific data has been released but before base data is released // bool stageTwoShutDown(void) { debug(LOG_WZ, "== stageTwoShutDown =="); cdAudio_Stop(); freeAllStructs(); freeAllDroids(); freeAllFeatures(); freeAllFlagPositions(); if (!shutdownScripts()) { return false; } if (!messageShutdown()) { return false; } if (!mechanicsShutdown()) { return false; } if(!ShutdownRadar()) { return false; } interfaceShutDown(); cmdDroidShutDown(); //free up the gateway stuff? gwShutDown(); if (!mapShutdown()) { return false; } return true; }
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; } if (!shutdownScripts()) { return false; } debug(LOG_TEXTURE, "=== stageOneShutDown ==="); pie_TexShutDown(); // no map for the main menu setCurrentMap(NULL, 1); // 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; }