Game Engine 2D Platformer
Engine.hpp
Go to the documentation of this file.
1 /*
2  * @file Engine.hpp
3  * @brief Engine class interface
4  * @date 2021-03-12
5  ***********************************************/
6 #ifndef SDLGRAPHICSPROGRAM
7 #define SDLGRAPHICSPROGRAM
8 
9 #include <iostream>
10 #include <string>
11 #include <sstream>
12 #include <fstream>
13 #include <stdlib.h>
14 #include <time.h>
15 
17 
21 class Engine
22 {
23 public:
27  Engine();
31  ~Engine();
35  void Input(bool *quit, bool *startGame);
39  void Update();
43  void Render();
47  void StartScreenLoop(bool *quit, bool *startGame);
51  void MainGameLoop();
56  void WinScreenLoop(bool *quit, bool *startGame);
57  void GameOverScreenLoop(bool *quit, bool *startGame);
58  void Start();
63  void Shutdown();
64 
69 
70 private:
71  // Engine Subsystem
72  // Setup the Graphics Rendering Engine
73  GraphicsEngineRenderer *m_renderer = nullptr;
74 };
75 
76 #endif
This class sets up the main game engine.
Definition: Engine.hpp:22
void Start()
Definition: Engine.cpp:292
void WinScreenLoop(bool *quit, bool *startGame)
Initialization and shutdown pattern Explicitly call 'Start' to launch the engine.
Definition: Engine.cpp:202
void StartScreenLoop(bool *quit, bool *startGame)
Start screen Loop.
Definition: Engine.cpp:175
void Shutdown()
Initialization and shutdown pattern Explicitly call 'Shutdown' to terminate the engine.
Definition: Engine.cpp:358
void GameOverScreenLoop(bool *quit, bool *startGame)
Definition: Engine.cpp:218
void InitializeGraphicsSubSystem()
Request to startup the Graphics Subsystem.
Definition: Engine.cpp:373
Engine()
Constructor of Engine.
Definition: Engine.cpp:64
~Engine()
Destructor.
Definition: Engine.cpp:69
void MainGameLoop()
Main Game Loop that runs forever.
Definition: Engine.cpp:234
void Update()
Per frame update.
Definition: Engine.cpp:113
void Render()
Per frame render.
Definition: Engine.cpp:121
void Input(bool *quit, bool *startGame)
Input engine.
Definition: Engine.cpp:74
This class serves as an interface to the main graphics renderer for our engine.
Definition: GraphicsEngineRenderer.hpp:33