This repository was archived by the owner on Jan 19, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTitan_Engine.hpp
More file actions
79 lines (68 loc) · 1.51 KB
/
Copy pathTitan_Engine.hpp
File metadata and controls
79 lines (68 loc) · 1.51 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/**
* Titan Engine Header
*
* Main engine context and lifecycle management
*/
#ifndef TITAN_ENGINE_HPP
#define TITAN_ENGINE_HPP
#include "Titan_Core.hpp"
#include "Titan_ECS.hpp"
#include "Titan_Input.hpp"
#include "Titan_Events.hpp"
#include "Titan_Scheduler.hpp"
#include "Titan_Audio.hpp"
#include "Titan_Platform.hpp"
#include "Titan_Graphics.hpp"
#include "Titan_State.hpp"
namespace Titan {
/**
* Main Engine class - singleton access to engine systems
*/
struct Engine
{
/**
* Engine context containing all major systems
*/
struct Context
{
bool isRunning = false;
ECS::FWorld world;
ECS::FScheduler scheduler;
FSnapshotStorage snapshots;
EventBus events;
InputManager input;
Audio::AudioManager audio;
StateManager stateMgr;
};
/**
* Get the global engine context
*/
static Context* Get();
/**
* Initialize the engine
* @param Title - Window title
* @param Width - Window width in pixels
* @param Height - Window height in pixels
*/
static void Init(const char* Title, uint32 Width, uint32 Height);
/**
* Shutdown the engine and cleanup resources
*/
static void Shutdown();
/**
* Check if engine is running
*/
static bool IsRunning()
{
return Get()->isRunning;
}
/**
* Request engine shutdown
*/
static void Quit()
{
Get()->isRunning = false;
}
};
} // namespace Titan
#endif // TITAN_ENGINE_HPP