From 32d1aea1790b79ae465048d49e98ba8bc78c2c5c Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 20 Mar 2022 00:32:25 +0100 Subject: Moved screen color and size functions to GameWinDX9 --- Stars45/GameWinDX9.cpp | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'Stars45/GameWinDX9.cpp') diff --git a/Stars45/GameWinDX9.cpp b/Stars45/GameWinDX9.cpp index 65cf2a0..d670351 100644 --- a/Stars45/GameWinDX9.cpp +++ b/Stars45/GameWinDX9.cpp @@ -9,6 +9,7 @@ #include #include +#include "Color.h" #include "DataLoader.h" #include "Game.h" #include "MachineInfo.h" @@ -28,7 +29,8 @@ GameWinDX9::GetInstance() GameWinDX9::GameWinDX9() : - max_tex_size {2048} + max_tex_size {2048}, + screen_color {Color::Black} { if (instance != nullptr) Panic::Panic("Multiple instances of GameWinDX9"); @@ -307,9 +309,43 @@ GameWinDX9::MaxTexAspect() const } +Color +GameWinDX9::GetScreenColor() const +{ + return screen_color; +} + + +int +GameWinDX9::GetScreenWidth() const +{ + if (video) + return video->Width(); + return 0; +} + + +int +GameWinDX9::GetScreenHeight() const +{ + if (video) + return video->Height(); + return 0; +} + + void GameWinDX9::SetMaxTexSize(int n) { if (n >= 64 && n <= 4096) max_tex_size = n; } + + +void +GameWinDX9::SetScreenColor(Color c) +{ + screen_color = c; + if (screen) + screen->SetBackgroundColor(c); +} -- cgit v1.1