From 150bd957db8eb19b1a07643317767ff5c3007f48 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 3 Apr 2022 10:55:28 +0200 Subject: Moved another part of application members from Game to WinDX9 --- StarsEx/Game.cpp | 2 +- StarsEx/Game.h | 7 ------- StarsEx/GameWinDX9.cpp | 6 ++++-- StarsEx/GameWinDX9.h | 6 ++++++ 4 files changed, 11 insertions(+), 10 deletions(-) (limited to 'StarsEx') diff --git a/StarsEx/Game.cpp b/StarsEx/Game.cpp index 3b480cc..f9bf31d 100644 --- a/StarsEx/Game.cpp +++ b/StarsEx/Game.cpp @@ -34,7 +34,7 @@ const double MAX_FRAME_TIME_NORMAL = 1.0 / 5.0; Game::Game() : world(0), video_factory(0), video(0), video_settings(0), soundcard(0), screen(0), totaltime(0), - status(Game::OK), exit_code(0), window_style(0) + status(Game::OK), exit_code(0) { Clock::Init(); if (!game) { diff --git a/StarsEx/Game.h b/StarsEx/Game.h index e4344f8..c3790f6 100644 --- a/StarsEx/Game.h +++ b/StarsEx/Game.h @@ -88,13 +88,6 @@ protected: RenderStats stats; DWORD totaltime; - HMENU hmenu; - - // Internal variables for the state of the app - DWORD window_style; // Saved window style for mode switches - RECT bounds_rect; // Saved window bounds for mode switches - RECT client_rect; // Saved client area size for mode switches - int status; int exit_code; diff --git a/StarsEx/GameWinDX9.cpp b/StarsEx/GameWinDX9.cpp index 5d04c97..9a63e36 100644 --- a/StarsEx/GameWinDX9.cpp +++ b/StarsEx/GameWinDX9.cpp @@ -36,8 +36,10 @@ GameWinDX9::GetInstance() GameWinDX9::GameWinDX9() : max_tex_size {2048}, screen_color {Color::Black}, - hInst{nullptr}, - hwnd{nullptr}, + hInst {nullptr}, + hwnd {nullptr}, + hmenu {nullptr}, + window_style {0}, is_windowed {false}, is_active {false}, is_device_lost {false}, diff --git a/StarsEx/GameWinDX9.h b/StarsEx/GameWinDX9.h index 9e96840..ee316b8 100644 --- a/StarsEx/GameWinDX9.h +++ b/StarsEx/GameWinDX9.h @@ -61,6 +61,12 @@ protected: HINSTANCE hInst; HWND hwnd; + HMENU hmenu; + + // Internal variables for the state of the app + DWORD window_style; // Saved window style for mode switches + RECT bounds_rect; // Saved window bounds for mode switches + RECT client_rect; // Saved client area size for mode switches const char* app_name; const char* title_text; -- cgit v1.1