1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#include "gameCommon.h" #include "game.h" Game game; void updateFrame() { updateGame(&game); } int main(int argc, char ** argv) { initGame(&game); #ifdef PLATFORM_WEB emscripten_set_main_loop(updateFrame, 0, 1); #else while (!WindowShouldClose()) { updateFrame(); } #endif closeGame(&game); return 0; }