From 0da933a0146a0689546b21231e14f2dfc2bc14e8 Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 23 Feb 2022 23:36:37 +0100 Subject: Switched to use ContentBundle's GetText --- Stars45/Starshatter.cpp | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) (limited to 'Stars45/Starshatter.cpp') diff --git a/Stars45/Starshatter.cpp b/Stars45/Starshatter.cpp index 59ad3fd..7326128 100644 --- a/Stars45/Starshatter.cpp +++ b/Stars45/Starshatter.cpp @@ -84,6 +84,7 @@ #include "MachineInfo.h" #include "Game.h" +#include "ContentBundle.h" #include "VideoFactory.h" #include "Screen.h" #include "Window.h" @@ -567,7 +568,7 @@ Starshatter::OpenTacticalReference() LoadDlg* load_dlg = menuscreen->GetLoadDlg(); if (load_dlg && load_dlg->IsShown()) { - load_activity = Game::GetInstance()->GetText("Starshatter.load.tac-ref"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.tac-ref"); load_progress = 1; catalog_index = 0; } @@ -608,14 +609,14 @@ Starshatter::SetGameMode(int m) if (m == CLOD_MODE || m == PREP_MODE || m == LOAD_MODE) { load_step = 0; load_progress = 0; - load_activity = Game::GetInstance()->GetText("Starshatter.load.general"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.general"); paused = true; } else if (m == CMPN_MODE) { load_step = 0; load_progress = 100; - load_activity = Game::GetInstance()->GetText("Starshatter.load.complete"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.complete"); paused = false; } @@ -624,7 +625,7 @@ Starshatter::SetGameMode(int m) player_ship = 0; load_progress = 100; - load_activity = Game::GetInstance()->GetText("Starshatter.load.complete"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.complete"); if (!world) { CreateWorld(); @@ -1159,7 +1160,7 @@ Starshatter::DoMenuScreenFrame() // load all ship designs in the standard catalog if (catalog_index < ShipDesign::StandardCatalogSize()) { ShipDesign::PreloadCatalog(catalog_index++); - load_activity = Game::GetInstance()->GetText("Starshatter.load.tac-ref"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.tac-ref"); if (load_progress < 95) load_progress++; @@ -1313,7 +1314,7 @@ Starshatter::DoLoadScreenFrame() switch (load_step) { case 0: - load_activity = Game::GetInstance()->GetText("Starshatter.load.campaign"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.campaign"); load_progress = 1; catalog_index = 0; break; @@ -1322,7 +1323,7 @@ Starshatter::DoLoadScreenFrame() // load all ship designs in the standard catalog if (catalog_index < ShipDesign::StandardCatalogSize()) { ShipDesign::PreloadCatalog(catalog_index++); - load_activity = Game::GetInstance()->GetText("Starshatter.load.campaign"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.campaign"); if (load_progress < 80) load_progress++; @@ -1330,7 +1331,7 @@ Starshatter::DoLoadScreenFrame() load_step = 0; // force return to current step on next frame } else { - load_activity = Game::GetInstance()->GetText("Starshatter.load.start"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.start"); load_progress = 80; } break; @@ -1345,7 +1346,7 @@ Starshatter::DoLoadScreenFrame() load_progress++; } else { - load_activity = Game::GetInstance()->GetText("Starshatter.load.ready"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.ready"); load_progress = 100; SetGameMode(CMPN_MODE); } @@ -1355,40 +1356,40 @@ Starshatter::DoLoadScreenFrame() else { switch (load_step) { case 0: - load_activity = Game::GetInstance()->GetText("Starshatter.load.drives"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.drives"); load_progress = 0; break; case 1: Drive::Initialize(); LandingGear::Initialize(); - load_activity = Game::GetInstance()->GetText("Starshatter.load.explosions"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.explosions"); load_progress = 5; break; case 2: Explosion::Initialize(); - load_activity = Game::GetInstance()->GetText("Starshatter.load.systems"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.systems"); load_progress = 10; break; case 3: FlightDeck::Initialize(); NavLight::Initialize(); - load_activity = Game::GetInstance()->GetText("Starshatter.load.ships"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.ships"); load_progress = 15; break; case 4: Ship::Initialize(); Shot::Initialize(); - load_activity = Game::GetInstance()->GetText("Starshatter.load.hud"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.hud"); load_progress = 20; break; case 5: MFD::Initialize(); - load_activity = Game::GetInstance()->GetText("Starshatter.load.menus"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.menus"); load_progress = 25; break; @@ -1400,7 +1401,7 @@ Starshatter::DoLoadScreenFrame() if (!gamescreen && game_mode != PREP_MODE) SetupGameScreen(); - load_activity = Game::GetInstance()->GetText("Starshatter.load.mission"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.mission"); load_progress = 65; break; @@ -1409,26 +1410,26 @@ Starshatter::DoLoadScreenFrame() if (Campaign::GetCampaign()) Campaign::GetCampaign()->GetMission(); SetGameMode(PLAN_MODE); - load_activity = Game::GetInstance()->GetText("Starshatter.load.loaded"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.loaded"); load_progress = 100; Button::PlaySound(4); } else { CreateWorld(); - load_activity = Game::GetInstance()->GetText("Starshatter.load.simulation"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.simulation"); load_progress = 75; } break; case 8: InstantiateMission(); - load_activity = Game::GetInstance()->GetText("Starshatter.load.viewscreen"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.viewscreen"); load_progress = 90; break; default: SetGameMode(PLAY_MODE); - load_activity = Game::GetInstance()->GetText("Starshatter.load.ready"); + load_activity = ContentBundle::GetInstance()->GetText("Starshatter.load.ready"); load_progress = 100; break; } -- cgit v1.1