This repository was archived by the owner on Jan 18, 2024. It is now read-only.
forked from rpbpolis/spic-prj-api
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEngine.hpp
More file actions
58 lines (47 loc) · 1.44 KB
/
Engine.hpp
File metadata and controls
58 lines (47 loc) · 1.44 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
#ifndef SPIC_PRJ_API_CD_ENGINE_HPP
#define SPIC_PRJ_API_CD_ENGINE_HPP
#include "EngineConfig.hpp"
#include "Scene.hpp"
#if __has_include("Engine_includes.hpp")
#include "Engine_includes.hpp"
#endif
namespace spic {
/**
* @brief The engine class responsible for the game loop.
* @sharedapi
*/
class Engine {
private:
static Engine instance;
Engine();
#if __has_include("Engine_private.hpp")
#include "Engine_private.hpp"
#endif
public:
static Engine& Instance();
Engine(const Engine&) = delete;
Engine& operator=(const Engine&) = delete;
Engine(const Engine&&) = delete;
Engine& operator=(Engine&&) = delete;
/**
* @brief Initialize the engine with the given configuration.
* @param config The engine configuration struct.
*/
void Init(const spic::EngineConfig& config);
/**
* @brief Get a modifiable reference to the engine configuration.
* @return A reference to the engine configuration that you can modify.
*/
spic::EngineConfig& Config();
void Start();
void PushScene(const std::shared_ptr<Scene>& scene);
std::shared_ptr<Scene> PeekScene() const;
void PopScene();
void Shutdown();
// Include "package private" methods
#if __has_include("Engine_public.hpp")
#include "Engine_public.hpp"
#endif
};
}
#endif //SPIC_PRJ_API_CD_ENGINE_HPP