forked from megayuchi/D3D12Lecture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGame.h
56 lines (41 loc) · 1.19 KB
/
Game.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
#pragma once
class CD3D12Renderer;
class CGameObject;
class CGame
{
CD3D12Renderer* m_pRenderer = nullptr;
HWND m_hWnd = nullptr;
void* m_pSpriteObjCommon = nullptr;
BYTE* m_pTextImage = nullptr;
UINT m_TextImageWidth = 0;
UINT m_TextImageHeight = 0;
void* m_pTextTexTexHandle = nullptr;
void* m_pFontObj = nullptr;
BOOL m_bShiftKeyDown = FALSE;
float m_CamOffsetX = 0.0f;
float m_CamOffsetY = 0.0f;
float m_CamOffsetZ = 0.0f;
// Game Objects
SORT_LINK* m_pGameObjLinkHead = nullptr;
SORT_LINK* m_pGameObjLinkTail = nullptr;
ULONGLONG m_PrvFrameCheckTick = 0;
ULONGLONG m_PrvUpdateTick = 0;
DWORD m_FrameCount = 0;
DWORD m_FPS = 0;
WCHAR m_wchText[64] = {};
void Render();
CGameObject* CreateGameObject();
void DeleteGameObject(CGameObject* pGameObj);
void DeleteAllGameObjects();
void Cleanup();
public:
BOOL Initialiize(HWND hWnd, BOOL bEnableDebugLayer, BOOL bEnableGBV);
void Run();
BOOL Update(ULONGLONG CurTick);
void OnKeyDown(UINT nChar, UINT uiScanCode);
void OnKeyUp(UINT nChar, UINT uiScanCode);
BOOL UpdateWindowSize(DWORD dwBackBufferWidth, DWORD dwBackBufferHeight);
CD3D12Renderer* INL_GetRenderer() const { return m_pRenderer; }
CGame();
~CGame();
};