CoriEngine
Loading...
Searching...
No Matches
Engine.cpp
Go to the documentation of this file.
1#include "Engine.hpp"
2#include <SDL3_image/SDL_image.h>
3
4namespace Cori {
5 namespace Core {
6 namespace Internal {
7 void Engine::Start(const bool asyncLogging, const bool fileLogging) {
9
10 Logger::Init(asyncLogging, fileLogging);
11
12 CORI_CORE_INFO_TAGGED({ Logger::Tags::Core::Self }, "Starting Cori Engine.");
13
14 const bool success = SDL_Init(SDL_INIT_VIDEO);
15 CORI_CORE_ASSERT(success, "SDL3 failed to initialized! SDL_Error: {}", SDL_GetError());
16 }
17
18 void Engine::Stop() {
19 SDL_Quit();
20
21 CORI_CORE_INFO_TAGGED({ Logger::Tags::Core::Self }, "Cori Engine stopped.");
23 spdlog::shutdown();
24 }
25 }
26 }
27}
#define CORI_CORE_ASSERT(x,...)
Definition Logger.hpp:1029
#define CORI_CORE_INFO_TAGGED(...)
Definition Logger.hpp:1027
static void Start(const bool asyncLogging, const bool fileLogging)
Definition Engine.cpp:7
static void EnableVirtualTerminalProcessing()
Definition Logger.cpp:23
static void Init(bool async, bool fileWrite)
Definition Logger.cpp:43
Core systems of the engine are here.
Global engine namespace.
static constexpr char Self[]
Definition Logger.hpp:83