-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpeppermint.cpp
More file actions
48 lines (32 loc) · 961 Bytes
/
Copy pathpeppermint.cpp
File metadata and controls
48 lines (32 loc) · 961 Bytes
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
#include <iostream>
#include <stb_image/stb_image.h>
#include <peppermint/managers/LogManager.h>
#include <peppermint/managers/EngineManager.h>
using namespace std;
using namespace glm;
using namespace peppermint;
using namespace peppermint::managers;
#include <peppermint/scripts/ScriptTypes.hpp>
#include <peppermint/Exceptions.hpp>
#include <ft2build.h>
#include <map>
#include FT_FREETYPE_H
using namespace peppermint::game::components;
int main() {
stbi_set_flip_vertically_on_load(true);
EngineManager::initialise();
if (EngineManager::status == -1) return -1;
Asset* gameFileAsset = new Asset(Asset::PPMINT_GAME_FILE);
gameFileAsset->path = (char*)"peppermint/game.pmint";
EngineManager::setGameFile(gameFileAsset);
EngineManager::loadFromGameFile();
try {
EngineManager::loop();
} catch (std::exception e) {
LogManager::critical(e.what());
EngineManager::destroy();
return -1;
}
EngineManager::destroy();
return 0;
}