blob: d827561eb52ec6a322332c5c2a2968b618594fc1 (
plain)
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
|
#include "gameCommon.h"
#include "game.h"
//#define PLATFORM_WEB
#if defined(PLATFORM_WEB)
#include <emscripten/emscripten.h>
#endif
Game game;
void updateFrame() {
updateGame(&game);
}
int main(int argc, char ** argv) {
initGame(&game);
#if defined(PLATFORM_WEB)
emscripten_set_main_loop(updateFrame, 0, 1);
#else
while (!WindowShouldClose()) {
updateFrame();
}
#endif
closeGame(&game);
return 0;
}
|