2020-11-05 16:44:34 +01:00
|
|
|
#pragma once
|
2020-11-29 16:50:49 +01:00
|
|
|
#include "gdrv.h"
|
2020-11-05 16:44:34 +01:00
|
|
|
|
2020-11-07 16:41:14 +01:00
|
|
|
class winmain
|
|
|
|
{
|
|
|
|
public:
|
2021-02-09 16:09:44 +01:00
|
|
|
static const DWORD WndStyle = WS_GROUP | WS_SYSMENU | WS_DLGFRAME | WS_BORDER | WS_MAXIMIZE | WS_CLIPCHILDREN |
|
|
|
|
WS_THICKFRAME | WS_MAXIMIZEBOX;
|
2020-12-02 18:12:34 +01:00
|
|
|
static char DatFileName[300];
|
|
|
|
static int single_step;
|
2020-12-03 15:47:36 +01:00
|
|
|
static HINSTANCE hinst;
|
|
|
|
static HWND hwnd_frame;
|
2020-12-02 18:12:34 +01:00
|
|
|
|
2020-11-07 16:41:14 +01:00
|
|
|
static int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd);
|
|
|
|
static LRESULT CALLBACK message_handler(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
|
|
|
static void memalloc_failure();
|
|
|
|
static int ProcessWindowMessages();
|
|
|
|
static int check_expiration_date();
|
|
|
|
static HDC _GetDC(HWND hWnd);
|
|
|
|
static int a_dialog(HINSTANCE hInstance, HWND hWnd);
|
2020-12-02 18:12:34 +01:00
|
|
|
static void end_pause();
|
|
|
|
static void new_game();
|
|
|
|
static void pause();
|
|
|
|
static void help_introduction(HINSTANCE a1, HWND a2);
|
2021-02-06 14:53:47 +01:00
|
|
|
static void Restart();
|
2020-11-07 16:41:14 +01:00
|
|
|
private:
|
2020-12-02 18:12:34 +01:00
|
|
|
static int return_value, bQuit, DispFrameRate, DispGRhistory, activated;
|
|
|
|
static int has_focus, mouse_down, last_mouse_x, last_mouse_y, no_time_loss;
|
2020-11-29 16:50:49 +01:00
|
|
|
static DWORD then, now;
|
2020-12-02 18:12:34 +01:00
|
|
|
static UINT iFrostUniqueMsg;
|
2020-11-29 16:50:49 +01:00
|
|
|
static gdrv_bitmap8 gfr_display;
|
2020-12-02 18:12:34 +01:00
|
|
|
static HCURSOR mouse_hsave;
|
2021-02-06 14:53:47 +01:00
|
|
|
static bool restart;
|
2020-11-07 16:41:14 +01:00
|
|
|
|
|
|
|
static HDC _BeginPaint(HWND hWnd, LPPAINTSTRUCT lpPaint);
|
|
|
|
};
|