forked from LemonHaze420/DCPopulous
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgamewindow.h
80 lines (65 loc) · 1.65 KB
/
gamewindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#ifndef _GAMEWINDOW_H_
#define _GAMEWINDOW_H_
#include "Object.h"
#include <windows.h>
#include <gx.h>
#include "GraphicsClasses.h"
#include "Controls.h"
#include "Preferences.h"
class CGameWindow : public CObject
{
public:
CGameWindow();
~CGameWindow();
// ----
// Opens a window.
bool Init( HINSTANCE _hInstance,
LPTSTR _lpCmdLine,
int _nCmdShow,
CPlatform* _PlatformRef,
CPreferences* _PreferencesRef);
// ----
// Return a handle to the GAPI wrapper object.
CGraphics* GetGraphicsObject();
// ----
// Return a handle to the GAPI wrapper object.
CControls* GetControlObject();
// ----
// Process Windows(R) messages.
// Returns true to indicate all is okay.
// Returns false if the program should exit.
// This method will block execution if the app is minimised / lost focus.
bool Process();
#if (defined(PROJECT) && (PROJECT == SPEEDBALL))
// ----
// Returns the location of the mouse pointer.
// -1, -1 means there is no mouse.
POINT* GetMousePoint();
#endif
// ----
void InvalidateMouse();
// ----
// Returns true if the program has just woken up.
bool GetJustActivated();
// ----
HWND GetWindowHandle() {return WindowHandle;}
// ----
// Static callback method used to process windows messages.
static LRESULT CALLBACK WindowProc(HWND _hWnd,
UINT _uMsg,
WPARAM _wParam,
LPARAM _lParam);
protected:
HWND WindowHandle;
HINSTANCE HInstance;
bool Active;
bool JustActivated;
LPLOGPALETTE LogicalPalette;
int PaletteSize;
HPALETTE Palette;
PALETTEENTRY *SystemPalette;
POINT MousePointer;
CGraphics* TheGraphicsObject;
CControls* TheController;
};
#endif