-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
42 lines (37 loc) · 1.04 KB
/
main.cpp
File metadata and controls
42 lines (37 loc) · 1.04 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
#include <iostream>
//#include "include/Interpreter.hpp"
#include "GameCode/Cena.hpp"
#include "GameCode/PlatformScene.hpp"
#include "GameCode/TileScene.hpp"
#include "LudkernoLib.hpp"
bool isWeb = false;
#ifdef __EMSCRIPTEN__
#include <emscripten.h>
isWeb = true;
#endif
// void emscripten_set_main_loop(void *func, int fps, int
// simulate_infinite_loop);
Ludkerno *game = nullptr;
extern "C" {
#ifdef __linux__
int main(int argc, char **argv) {
#else
int SDL_main(int argc, char **argv) {
#endif
std::cout << "Loaded " << argc << "Arguments: ";
for (int i = 0; i < argc; i++) {
std::cout << i << " - " << argv[i] << std::endl;
}
// Uint32 lastframe = SDL_GetTicks();
SceneMngr::GetInstance()->insertScene(new PlatformScene());
Ludkerno::EngineInit("Ludkerno", 854, 480);
if (isWeb) {
} else {
Ludkerno::Loop();
}
/*#ifdef __EMSCRIPTEN__ #else #endif emscripten_set_main_loop(game->Loop(), 0,
* 1);*/
Ludkerno::Clear();
return 0;
}
}