diff options
author | Aki <please@ignore.pl> | 2022-03-20 00:32:25 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-03-20 00:37:05 +0100 |
commit | 32d1aea1790b79ae465048d49e98ba8bc78c2c5c (patch) | |
tree | 9832059a59fb9ae22e41dcceb776760ba0e3cd41 /Stars45/GameWinDX9.cpp | |
parent | a13a9405a3516c03218e710a353cce7557b2dee2 (diff) | |
download | starshatter-32d1aea1790b79ae465048d49e98ba8bc78c2c5c.zip starshatter-32d1aea1790b79ae465048d49e98ba8bc78c2c5c.tar.gz starshatter-32d1aea1790b79ae465048d49e98ba8bc78c2c5c.tar.bz2 |
Moved screen color and size functions to GameWinDX9
Diffstat (limited to 'Stars45/GameWinDX9.cpp')
-rw-r--r-- | Stars45/GameWinDX9.cpp | 38 |
1 files changed, 37 insertions, 1 deletions
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 <stdio.h> #include <string.h> +#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); +} |