Building Game Engines
Engine.hpp
Go to the documentation of this file.
1 #ifndef SDL_GRAPHICS_PROGRAM_HPP
2 #define SDL_GRAPHICS_PROGRAM_HPP
3 
4 #include <iostream>
5 #include <string>
6 #include <sstream>
7 #include <fstream>
8 #include <stdlib.h>
9 #include <time.h>
10 #include <vector>
11 
13 #include "ResourceManager.hpp"
14 #include "AudioManager.hpp"
15 #include "GameObject.hpp"
16 
20 class Engine {
21  public:
25  Engine();
26 
30  ~Engine();
31 
36  void Input(bool *quit);
37 
41  void Update();
42 
47  void Render();
48 
52  void MainGameLoop();
53 
57  void Start();
58 
62  void Shutdown();
63 
67  bool getDoQuit();
68 
73 
74  private:
75  // The target frame delay based on a specified FPS
76  const int frameDelay = 1000 / 60;
77 
78  // Points to the renderer once it has been set up
79  GraphicsEngineRenderer* m_renderer = nullptr;
80 
81  // Points to the resource manager
82  ResourceManager* resourceManager;
83 
84  // Points to the audio manager
85  AudioManager* audioManager;
86 };
87 
88 
89 #endif
void Update()
Definition: Engine.cpp:58
void InitializeGraphicsSubSystem()
Definition: Engine.cpp:155
void Start()
Definition: Engine.cpp:127
Definition: Engine.hpp:20
~Engine()
Definition: Engine.cpp:9
void Render()
Definition: Engine.cpp:69
Definition: ResourceManager.hpp:14
void Input(bool *quit)
Definition: Engine.cpp:21
Definition: GraphicsEngineRenderer.hpp:8
void MainGameLoop()
Definition: Engine.cpp:84
void Shutdown()
Definition: Engine.cpp:143
Definition: AudioManager.hpp:10
bool getDoQuit()
Definition: Engine.cpp:15
Engine()
Definition: Engine.cpp:6