-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
59 lines (42 loc) · 1.51 KB
/
main.cpp
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
#include "OpenSiv3D/Siv3D/include/Siv3D.hpp"
#include "Minigames/TheracSimulator/TheracMinigame.hpp"
#include "Scene2D/Scenes/HomeSlum/HomeSlum.hpp"
#include "Scene3D/Scenes/RadiationLab/RadiationLab.hpp"
#include "LDtkLoader/include/LDtkLoader/Project.hpp"
void Main() {
int32 fps;
auto main_monitor = System::GetCurrentMonitor();
auto const mms = main_monitor.fullscreenResolution;
Window::SetStyle(WindowStyle::Frameless);
Window::Resize(mms);
Window::Maximize();
ldtk::Project ldtk_project;
ldtk_project.loadFromFile("resources/ldtk_test/Therac2D.ldtk");
auto const & world = ldtk_project.getWorld(ldtk::IID{"cf261870-8990-11ee-bcab-25349806fcb2"});
// auto const & world = ldtk_project.allWorlds()[0];
std::cout << world.getName() << std::endl;
std::cout << world.iid << std::endl;
// auto const & level0 = world.getLevel("Level_0");
// auto const & bg_layer = level0.getLayer("Static_Tile_Ents");
// std::cout << bg_layer.getTileset().path << std::endl;
// for (const auto& tile : bg_layer.allTiles()) {
// std::cout << tile.tileId << std::endl;
// }
while (System::Update()) {
ClearPrint();
if (KeyF5.up())
goto TheracMinigame;
if (KeyF6.up())
goto Therac3D;
if (KeyF7.up())
goto Therac2D;
fps = Profiler::FPS();
Print(fps);
}
Therac2D:
GAME::Scene2D::HomeSlum::HomeSlum();
Therac3D :
GAME::Scene3D::RadiationLab::RadiationLab();
TheracMinigame:
GAME::Minigames::TheracSimulator::TheracMinigame();
}