summaryrefslogtreecommitdiffhomepage
path: root/Stars45/HUDView.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-03-14 19:36:33 +0100
committerAki <please@ignore.pl>2022-03-14 19:36:33 +0100
commit2e5d0eb1eecc52b20d1e9f7a3ce0317b851442c4 (patch)
treea1e7873c9086e5d1f4be8092d775e6127f5c388c /Stars45/HUDView.cpp
parent92f7c58068c6a7bfe0b32af5c1ace6bdde2f3951 (diff)
downloadstarshatter-2e5d0eb1eecc52b20d1e9f7a3ce0317b851442c4.zip
starshatter-2e5d0eb1eecc52b20d1e9f7a3ce0317b851442c4.tar.gz
starshatter-2e5d0eb1eecc52b20d1e9f7a3ce0317b851442c4.tar.bz2
Moved max texture size to GameWinDX9
Diffstat (limited to 'Stars45/HUDView.cpp')
-rw-r--r--Stars45/HUDView.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/Stars45/HUDView.cpp b/Stars45/HUDView.cpp
index 2f0ec20..f2b4b02 100644
--- a/Stars45/HUDView.cpp
+++ b/Stars45/HUDView.cpp
@@ -62,6 +62,7 @@
#include "Polygon.h"
#include "Sound.h"
#include "Game.h"
+#include "GameWinDX9.h"
#include "ContentBundle.h"
#include "Window.h"
@@ -787,7 +788,7 @@ HUDView::SetTacticalMode(int mode)
for (int i = 0; i < 31; i++)
pitch_ladder[i]->Hide();
}
- else if (Game::GetInstance()->MaxTexSize() > 128) {
+ else if (GameWinDX9::GetInstance()->MaxTexSize() > 128) {
hud_left_sprite->Show();
hud_right_sprite->Show();
}
@@ -1617,7 +1618,7 @@ HUDView::DrawPitchLadder()
for (int i = 0; i < 31; i++)
pitch_ladder[i]->Hide();
- if (ship->IsAirborne() && Game::GetInstance()->MaxTexSize() > 128) {
+ if (ship->IsAirborne() && GameWinDX9::GetInstance()->MaxTexSize() > 128) {
double xtarg = xcenter;
double ytarg = ycenter;
@@ -2648,7 +2649,7 @@ HUDView::DrawWarningPanel()
}
if (ship) {
- if (Game::GetInstance()->MaxTexSize() > 128) {
+ if (GameWinDX9::GetInstance()->MaxTexSize() > 128) {
warn_left_sprite->Show();
warn_right_sprite->Show();
}
@@ -2755,7 +2756,7 @@ HUDView::DrawInstructions()
{
if (!ship) return;
- if (Game::GetInstance()->MaxTexSize() > 128) {
+ if (GameWinDX9::GetInstance()->MaxTexSize() > 128) {
instr_left_sprite->Show();
instr_right_sprite->Show();
}
@@ -3728,7 +3729,7 @@ HUDView::ExecFrame()
}
if (!tactical) {
- if (Game::GetInstance()->MaxTexSize() > 128) {
+ if (GameWinDX9::GetInstance()->MaxTexSize() > 128) {
hud_left_sprite->Show();
hud_right_sprite->Show();
}
@@ -3939,7 +3940,7 @@ HUDView::RestoreHUD()
icon_target_sprite->Hide();
}
- if (!tactical && Game::GetInstance()->MaxTexSize() > 128) {
+ if (!tactical && GameWinDX9::GetInstance()->MaxTexSize() > 128) {
hud_left_sprite->Show();
hud_right_sprite->Show();
}
@@ -4040,7 +4041,7 @@ HUDView::SetHUDColorSet(int c)
ColorizeBitmap(cross3, cross3_shade, hud_color, true);
ColorizeBitmap(cross4, cross4_shade, hud_color, true);
- if (Game::GetInstance()->MaxTexSize() > 128) {
+ if (GameWinDX9::GetInstance()->MaxTexSize() > 128) {
ColorizeBitmap(hud_left_air, hud_left_shade_air, hud_color);
ColorizeBitmap(hud_right_air, hud_right_shade_air, hud_color);
ColorizeBitmap(hud_left_fighter, hud_left_shade_fighter, hud_color);
@@ -4187,10 +4188,10 @@ HUDView::ColorizeBitmap(Bitmap& img, BYTE* shades, Color color, bool force_alpha
{
if (!shades) return;
- int max_tex_size = Game::GetInstance()->MaxTexSize();
+ int max_tex_size = GameWinDX9::GetInstance()->MaxTexSize();
if (max_tex_size < 128)
- Game::GetInstance()->SetMaxTexSize(128);
+ GameWinDX9::GetInstance()->SetMaxTexSize(128);
if (hud_view && hud_view->cockpit_hud_texture && !force_alpha) {
img.FillColor(Color::Black);
@@ -4217,7 +4218,7 @@ HUDView::ColorizeBitmap(Bitmap& img, BYTE* shades, Color color, bool force_alpha
}
if (max_tex_size < 128)
- Game::GetInstance()->SetMaxTexSize(max_tex_size);
+ GameWinDX9::GetInstance()->SetMaxTexSize(max_tex_size);
}
// +--------------------------------------------------------------------+