-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
52 lines (41 loc) · 1.73 KB
/
main.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
/*-----------------------------------------------------------------------------------
File: main.h
Author: Steve Costa
Description: Define the windows class and the necessary constants
-----------------------------------------------------------------------------------*/
#ifndef MAIN_H_
#define MAIN_H_
/*-----------------------------------------------------------------------------------
Header files
-----------------------------------------------------------------------------------*/
// Include the following in order to detect memory leaks
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#include "commonUtil.h" // Common Macros, and headers
#include "game.h" // Game header file
/*-----------------------------------------------------------------------------------
Constants
-----------------------------------------------------------------------------------*/
#define WINDOW_CLASS_NAME "Particles" // Class name
/*-----------------------------------------------------------------------------------
Define the main window class for the game.
-----------------------------------------------------------------------------------*/
class CWin
{
// ATTRIBUTES
private:
WNDCLASSEX m_winClass; // Window class
DEVMODE m_screenSettings; // Screen settings
public:
static HWND m_sWinHandle; // Window handle
static HINSTANCE m_sMainInstance; // Program instance
static HGLRC m_sRenderContext; // Rendering context
static HDC m_sDeviceContext; // GDI device context
static PIXELFORMATDESCRIPTOR m_sPfd; // Format desired for pixels
// METHODS
public:
int Init(WNDPROC windowProc, HINSTANCE hInstance); // Class constructor
int Shutdown(); // Class destructor
};
#endif