From a12e588079700d55a0b788fea2df7727c2e41f52 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 27 Mar 2022 17:42:26 +0200 Subject: Removed MemDebug from FoundationEx --- Stars45/Starshatter.cpp | 59 ++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 33 deletions(-) (limited to 'Stars45/Starshatter.cpp') diff --git a/Stars45/Starshatter.cpp b/Stars45/Starshatter.cpp index b49fbc4..77aaca5 100644 --- a/Stars45/Starshatter.cpp +++ b/Stars45/Starshatter.cpp @@ -8,7 +8,6 @@ */ -#include "MemDebug.h" #include "Starshatter.h" #include "MenuScreen.h" @@ -208,20 +207,20 @@ chat_mode(0), exit_time(1.2), cutscene(0) // create the fonts loader->SetDataPath("Fonts/"); - HUDfont = new(__FILE__,__LINE__) Font("HUDfont"); + HUDfont = new Font("HUDfont"); FontMgr::Register("HUD", HUDfont); - GUIfont = new(__FILE__,__LINE__) Font("GUIfont"); + GUIfont = new Font("GUIfont"); FontMgr::Register("GUI", GUIfont); - GUI_small_font = new(__FILE__,__LINE__) Font("GUIsmall"); + GUI_small_font = new Font("GUIsmall"); FontMgr::Register("GUIsmall", GUI_small_font); - limerick12 = new(__FILE__,__LINE__) Font("Limerick12"); - limerick18 = new(__FILE__,__LINE__) Font("Limerick18"); - terminal = new(__FILE__,__LINE__) Font("Terminal"); - verdana = new(__FILE__,__LINE__) Font("Verdana"); - ocrb = new(__FILE__,__LINE__) Font("OCRB"); + limerick12 = new Font("Limerick12"); + limerick18 = new Font("Limerick18"); + terminal = new Font("Terminal"); + verdana = new Font("Verdana"); + ocrb = new Font("OCRB"); FontMgr::Register("Limerick12", limerick12); FontMgr::Register("Limerick18", limerick18); @@ -421,23 +420,23 @@ Starshatter::InitGame() Print(" Loaded key.cfg\n\n"); // create the appropriate motion controller and player_ship - input = new(__FILE__,__LINE__) MultiController; - Keyboard* k = new(__FILE__,__LINE__) Keyboard; + input = new MultiController; + Keyboard* k = new Keyboard; input->AddController(k); ActivateKeyboardLayout(GetKeyboardLayout(0), 0); - mouse_input = new(__FILE__,__LINE__) MouseController; + mouse_input = new MouseController; input->AddController(mouse_input); ::Print("\nStarshatter::InitGame() create joystick\n"); - Joystick* j = new(__FILE__,__LINE__) Joystick; + Joystick* j = new Joystick; j->SetSensitivity(15, 5000); input->AddController(j); Joystick::EnumerateDevices(); ::Print("\n"); - head_tracker = new(__FILE__,__LINE__) TrackIR(); + head_tracker = new TrackIR(); MapKeys(); SystemDesign::Initialize("sys.def"); @@ -742,7 +741,7 @@ Starshatter::CreateWorld() // create world if (!world) { - Sim* sim = new(__FILE__,__LINE__) Sim(input); + Sim* sim = new Sim(input); world = sim; Print(" World Created.\n"); } @@ -753,8 +752,6 @@ Starshatter::CreateWorld() void Starshatter::InstantiateMission() { - Memory::Check(); - current_mission = 0; if (Campaign::GetCampaign()) { @@ -777,8 +774,6 @@ Starshatter::InstantiateMission() Print(" Mission Instantiated.\n"); } - - Memory::Check(); } // +--------------------------------------------------------------------+ @@ -1080,8 +1075,6 @@ Starshatter::GameState() if (music_dir) music_dir->ExecFrame(); - - Memory::Check(); } // +--------------------------------------------------------------------+ @@ -2239,11 +2232,11 @@ Starshatter::SetupSplash() int screen_width = GetScreenWidth(); int screen_height = GetScreenHeight(); - gamewin = new(__FILE__,__LINE__) Window(screen, 0, 0, screen_width, screen_height); - splash = new(__FILE__,__LINE__) FadeView(gamewin, 2, 2, 2); + gamewin = new Window(screen, 0, 0, screen_width, screen_height); + splash = new FadeView(gamewin, 2, 2, 2); gamewin->AddView(splash); - gamewin->AddView(new(__FILE__,__LINE__) ImgView(gamewin, &splash_image)); + gamewin->AddView(new ImgView(gamewin, &splash_image)); screen->AddWindow(gamewin); } @@ -2257,7 +2250,7 @@ Starshatter::SetupMenuScreen() menuscreen = 0; } - menuscreen = new(__FILE__,__LINE__) MenuScreen(); + menuscreen = new MenuScreen(); menuscreen->Setup(screen); } @@ -2271,7 +2264,7 @@ Starshatter::SetupCmpnScreen() cmpnscreen = 0; } - cmpnscreen = new(__FILE__,__LINE__) CmpnScreen(); + cmpnscreen = new CmpnScreen(); cmpnscreen->Setup(screen); } @@ -2285,7 +2278,7 @@ Starshatter::SetupPlanScreen() planscreen = 0; } - planscreen = new(__FILE__,__LINE__) PlanScreen(); + planscreen = new PlanScreen(); planscreen->Setup(screen); } @@ -2299,7 +2292,7 @@ Starshatter::SetupLoadScreen() loadscreen = 0; } - loadscreen = new(__FILE__,__LINE__) LoadScreen(); + loadscreen = new LoadScreen(); loadscreen->Setup(screen); } @@ -2313,7 +2306,7 @@ Starshatter::SetupGameScreen() gamescreen = 0; } - gamescreen = new(__FILE__,__LINE__) GameScreen(); + gamescreen = new GameScreen(); gamescreen->Setup(screen); gamescreen->SetFieldOfView(field_of_view); @@ -2357,7 +2350,7 @@ Starshatter::LoadVideoConfig(const char* filename) blocklen = ftell(f); ::fseek(f, 0, SEEK_SET); - block = new(__FILE__,__LINE__) BYTE[blocklen+1]; + block = new BYTE[blocklen+1]; block[blocklen] = 0; ::fread(block, blocklen, 1, f); @@ -2367,7 +2360,7 @@ Starshatter::LoadVideoConfig(const char* filename) if (blocklen == 0) return; - Parser parser(new(__FILE__,__LINE__) BlockReader((const char*) block, blocklen)); + Parser parser(new BlockReader((const char*) block, blocklen)); Term* term = parser.ParseTerm(); if (!term) { @@ -2624,7 +2617,7 @@ Starshatter::ExecCutscene(const char* msn_file, const char* path) if (!world) CreateWorld(); - cutscene_mission = new(__FILE__,__LINE__) Mission(0); + cutscene_mission = new Mission(0); cutscene_basetime = StarSystem::GetBaseTime(); if (cutscene_mission->Load(msn_file, path)) { @@ -2782,7 +2775,7 @@ Starshatter::StartLobby() NetServerConfig* server_config = NetServerConfig::GetInstance(); if (server_config) - net_lobby = new(__FILE__,__LINE__) NetLobbyServer; + net_lobby = new NetLobbyServer; } else { -- cgit v1.1