From a13a9405a3516c03218e710a353cce7557b2dee2 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 20 Mar 2022 00:16:44 +0100 Subject: Game no longer exposes Video instance --- Stars45/Game.cpp | 6 ------ Stars45/Game.h | 1 - Stars45/Sim.cpp | 2 +- Stars45/VidDlg.cpp | 5 ++--- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Stars45/Game.cpp b/Stars45/Game.cpp index c5c9ab8..322c068 100644 --- a/Stars45/Game.cpp +++ b/Stars45/Game.cpp @@ -559,12 +559,6 @@ Game::GetInstance() return game; } -Video* -Game::GetVideo() -{ - return video; -} - Color Game::GetScreenColor() { diff --git a/Stars45/Game.h b/Stars45/Game.h index 8d30f42..daf3fc5 100644 --- a/Stars45/Game.h +++ b/Stars45/Game.h @@ -74,7 +74,6 @@ public: void SetMaxFrameLength(double seconds) { max_frame_length = seconds; } double GetMaxFrameLength() { return max_frame_length; } - Video* GetVideo(); Color GetScreenColor(); void SetScreenColor(Color c); int GetScreenWidth(); diff --git a/Stars45/Sim.cpp b/Stars45/Sim.cpp index 9e193b9..910a778 100644 --- a/Stars45/Sim.cpp +++ b/Stars45/Sim.cpp @@ -303,7 +303,7 @@ Sim::LoadMission(Mission* m, bool preload_textures) mission->SetActive(true); if (preload_textures) { - Video* video = Game::GetInstance()->GetVideo(); + Video* video = Video::GetInstance(); List all_models; //List all_textures; diff --git a/Stars45/VidDlg.cpp b/Stars45/VidDlg.cpp index ee1473b..aca48fa 100644 --- a/Stars45/VidDlg.cpp +++ b/Stars45/VidDlg.cpp @@ -11,7 +11,6 @@ Main Menu Dialog Active Window class */ -#include "Game.h" #include "GameWinDX9.h" #include "MemDebug.h" #include "VidDlg.h" @@ -151,7 +150,7 @@ VidDlg::Show() } } - Video* video = Game::GetInstance()->GetVideo(); + Video* video = Video::GetInstance(); if (video) { if (shadows) @@ -364,7 +363,7 @@ VidDlg::Apply() bool video_change = false; - Video* video = Game::GetInstance()->GetVideo(); + Video* video = Video::GetInstance(); if (video) { const VideoSettings* vs = video->GetVideoSettings(); -- cgit v1.1