-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCore.h
More file actions
65 lines (53 loc) · 2.17 KB
/
Copy pathCore.h
File metadata and controls
65 lines (53 loc) · 2.17 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
61
62
63
64
65
// ===========================================================================
/// <summary>
/// Core.h
/// DirectXIntroduction
/// created by Mehrdad Soleimanimajd on 19.07.2019
/// </summary>
/// <created>ʆϒʅ, 19.07.2019</created>
/// <changed>ʆϒʅ, 04.07.2023</changed>
// ===========================================================================
#ifndef CORE_H
#define CORE_H
#include "Window.h"
#include "Timer.h"
#include "Direct3D.h"
#include "Direct2D.h"
#include "Game.h"
// Game Framework wrapper
class TheCore
{
friend class Window;
friend class Direct3D;
friend class Direct2D;
friend class Game;
private:
HINSTANCE appInstance; // handle to the application instance
Timer* timer; // pointer to DirectX high-precision timer application
int fps; // frames per second
double mspf; // render time of a frame in milliseconds
Window* appWindow; // pointer to game window (main window)
HWND appHandle; // handle to game window (main window)
Direct3D* d3d; // pointer to Direct3D application
Direct2D* d2d; // pointer to Direct2D application
Game* game; // pointer to the game wrapper class
bool initialized; // true if the initialization was successful
bool paused; // true if the game is paused
bool resized; // true if the resizing was successful
public:
TheCore (HINSTANCE&, Game*); // constructor and initializer
const bool& isInitialized (void); // get the initialized state
const HINSTANCE& getInstance (void); // get the handle to application instance
const HWND& getHandle (void); // get the handle to main window
const bool& isPaused (void); // get the paused state
Timer* getTimer (void); // get the pointer to application timer
const int& getFPS (void); // get the FPS
//Direct3D* getd3d ( void ); // get the pointer to application Direct3D
//Direct2D* getd2d ( void ); // get the pointer to application Direct2D
void frameStatistics (void); // frame statistics calculations
void setResolution (const bool&); // resolution changer
void resizeResources (const bool&); // free and resize the resources
void shutdown (void); // destruction preparations
};
#endif // !CORE_H