From 0052edae47d1e6ae613497c524719eff5838f52a Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 18 Feb 2022 23:54:30 +0100 Subject: Switched to use GetIntance for Game instead of static methods --- Stars45/VidDlg.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Stars45/VidDlg.cpp') diff --git a/Stars45/VidDlg.cpp b/Stars45/VidDlg.cpp index 95aa8e1..2a68f86 100644 --- a/Stars45/VidDlg.cpp +++ b/Stars45/VidDlg.cpp @@ -59,7 +59,7 @@ closed(true) stars = Starshatter::GetInstance(); Init(def); - orig_gamma = Game::GammaLevel(); + orig_gamma = Game::GetInstance()->GammaLevel(); } VidDlg::~VidDlg() @@ -150,7 +150,7 @@ VidDlg::Show() } } - Video* video = Game::GetVideo(); + Video* video = Game::GetInstance()->GetVideo(); if (video) { if (shadows) @@ -198,7 +198,7 @@ VidDlg::Show() if (gamma) { - orig_gamma = Game::GammaLevel(); + orig_gamma = Game::GetInstance()->GammaLevel(); gamma->SetValue(orig_gamma); } } @@ -254,7 +254,7 @@ VidDlg::OnGamma(AWEvent* event) int g = gamma->GetValue(); if (g >= 0 && g <= 255) { - Game::SetGammaLevel(g); + Game::GetInstance()->SetGammaLevel(g); } } @@ -364,7 +364,7 @@ VidDlg::Apply() bool video_change = false; - Video* video = Game::GetVideo(); + Video* video = Game::GetInstance()->GetVideo(); if (video) { const VideoSettings* vs = video->GetVideoSettings(); @@ -392,7 +392,7 @@ VidDlg::Apply() d = 32; } - if (Game::MaxTexSize() != t) + if (Game::GetInstance()->MaxTexSize() != t) video_change = true; } @@ -451,7 +451,7 @@ VidDlg::Apply() void VidDlg::Cancel() { - Game::SetGammaLevel(orig_gamma); + Game::GetInstance()->SetGammaLevel(orig_gamma); closed = true; } -- cgit v1.1