forked from BuildSucceeded/2D-Platformer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEngineBase.h
More file actions
40 lines (28 loc) · 790 Bytes
/
EngineBase.h
File metadata and controls
40 lines (28 loc) · 790 Bytes
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
#pragma once
#include "resource.h"
#include "Point2D.h"
#include "EngineBase.h"
#include "GameObjectBase.h"
class EngineBase
{
public:
EngineBase();
~EngineBase();
HRESULT InitializeD2D(HWND m_hwnd);
void MousePosition(int x, int y);
virtual void KeyUp(WPARAM wParam);
virtual void KeyDown(WPARAM wParam);
virtual void MouseButtonUp(bool left, bool right);
virtual void MouseButtonDown(bool left, bool right);
void AddGameObject(GameObjectBase* gameObj);
void RemoveGameObject(GameObjectBase* gameObj);
virtual void Logic(double elapsedTime);
HRESULT Draw();
ID2D1Bitmap* LoadImage(LPCWSTR imageFile);
protected:
Point2D mousePosition;
private:
ID2D1Factory* m_pDirect2dFactory;
ID2D1HwndRenderTarget* m_pRenderTarget;
std::list<GameObjectBase*> objectList;
};