summaryrefslogtreecommitdiffhomepage
path: root/Stars45/Game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/Game.cpp')
-rw-r--r--Stars45/Game.cpp42
1 files changed, 2 insertions, 40 deletions
diff --git a/Stars45/Game.cpp b/Stars45/Game.cpp
index bd6484e..3b480cc 100644
--- a/Stars45/Game.cpp
+++ b/Stars45/Game.cpp
@@ -34,7 +34,6 @@ 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),
- hInst(0), hwnd(0),
status(Game::OK), exit_code(0), window_style(0)
{
Clock::Init();
@@ -75,24 +74,6 @@ Game::~Game()
// +--------------------------------------------------------------------+
-HINSTANCE Game::GetHINST()
-{
- if (game)
- return game->hInst;
-
- return 0;
-}
-
-HWND Game::GetHWND()
-{
- if (game)
- return game->hwnd;
-
- return 0;
-}
-
-// +--------------------------------------------------------------------+
-
bool
Game::Init(HINSTANCE hi, HINSTANCE hpi, LPSTR cmdline, int nCmdShow)
{
@@ -129,31 +110,12 @@ Game::InitGame()
int
Game::Run()
{
- MSG msg;
-
status = RUN;
- Print("\n");
- Print("+====================================================================+\n");
- Print("| RUN |\n");
- Print("+====================================================================+\n");
-
- // Polling messages from event queue until quit
Clock::GetInstance()->Set();
while (status < EXIT && !Panic::Panicked()) {
- if (PeekMessage(&msg, hwnd, 0, 0, PM_REMOVE)) {
- if (msg.message == WM_QUIT)
- break;
-
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- else {
- if (GameLoop())
- WaitMessage();
- }
+ GameLoop();
}
-
- return exit_code ? exit_code : msg.wParam;
+ return exit_code;
}
// +--------------------------------------------------------------------+