-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.h
More file actions
60 lines (48 loc) · 1.79 KB
/
Copy pathGame.h
File metadata and controls
60 lines (48 loc) · 1.79 KB
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
// ===========================================================================
/// <summary>
/// Game.h
/// DirectXIntroduction
/// created by Mehrdad Soleimanimajd on 24.07.2019
/// </summary>
/// <created>ʆϒʅ, 24.07.2019</created>
/// <changed>ʆϒʅ, 04.07.2023</changed>
// ===========================================================================
#include "Core.h"
#include "Universe.h"
#include "Shader.h"
#include "Texture.h"
#include "Polygons.h"
#ifndef GAME_H
#define GAME_H
class Game
{
friend class TheCore;
friend class Direct3D;
friend class Direct2D;
private:
TheCore* core; // pointer to the framework core
Universe* universe; // world, camera, lights...
ShaderColour* shaderColour;
ShaderTexture* shaderTexture;
Texture<TargaHeader>* texture; // texture resource
ShaderDiffuseLight* shaderDiffuseLight;
Triangles* _2Dtriangles; // three triangles
Line* _2Dline; // a line (clockwise turn, dynamic rewrite)
TexturedTriangles* _2DtexturedTriangles; // two textured triangles
LightedTriangle* _2DlightedTriangle; // one triangle illuminated by diffuse light
Cube* _3Dcube;
bool initialized; // true if initialization was successful
bool allocated; // true if resources allocation was successful
public:
Game (HINSTANCE&); // game initialization
void allocateResources (void); // resources creation
//void validate ( void ); // validate the allocation of game resources
const bool& isReady (void); // get the initialized state
const bool run (void); // game engine loop
void render (void); // render the scene
void update (void); // updating the game world
Universe* getUniverse (void); // get the pointer to game universe
void shutdown (void); // destruction preparations
};
#endif // !GAME_H