void ShutdownJA2(void) { UINT32 uiIndex; // Clear screen.... ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, 640, 480, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) ); InvalidateScreen( ); // Remove cursor.... SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR ); RefreshScreen( NULL ); ShutdownStrategicLayer(); // remove temp files built by laptop ClearOutTempLaptopFiles( ); // Shutdown queue system ShutdownDialogueControl(); // Shutdown Screens for (uiIndex = 0; uiIndex < MAX_SCREENS; uiIndex++) { (*(GameScreens[uiIndex].ShutdownScreen))(); } // Shutdown animation system DeInitAnimationSystem( ); ShutdownLightingSystem(); CursorDatabaseClear(); ShutdownTacticalEngine( ); // Shutdown Overhead ShutdownOverhead( ); DeinitializeWorld( ); DeleteTileCache( ); ShutdownJA2Clock( ); ShutdownFonts(); ShutdownJA2Sound( ); ShutdownEventManager( ); ShutdownBaseDirtyRectQueue( ); // Unload any text box images! RemoveTextMercPopupImages( ); ClearOutVehicleList(); }
void InitStrategicLayer( void ) { // Clear starategic layer! SetupNewStrategicGame(); InitQuestEngine(); //Setup a new campaign via the enemy perspective. InitNewCampaign(); // Init Squad Lists InitSquads(); // Init vehicles InitVehicles( ); // init town loyalty InitTownLoyalty(); // init the mine management system InitializeMines(); // initialize map screen flags InitMapScreenFlags(); // initialize NPCs, select alternate maps, etc InitNPCs(); // init Skyrider and his helicopter InitializeHelicopter(); //Clear out the vehicle list ClearOutVehicleList(); InitBloodCatSectors(); InitializeSAMSites(); // make Orta, Tixa, SAM sites not found InitMapSecrets(); // free up any leave list arrays that were left allocated ShutDownLeaveList( ); // re-set up leave list arrays for dismissed mercs InitLeaveList( ); // reset time compression mode to X0 (this will also pause it) SetGameTimeCompressionLevel( TIME_COMPRESS_X0 ); // select A9 Omerta as the initial selected sector ChangeSelectedMapSector( 9, 1, 0 ); // Reset these flags or mapscreen could be disabled and cause major headache. fDisableDueToBattleRoster = FALSE; fDisableMapInterfaceDueToBattle = FALSE; }