]>
git.bts.cx Git - benzene.git/blob - src_platform/sdl/main.c
3 #include <bz/debug/log_internal.h>
4 #include <bz/debug/perfgraph_internal.h>
5 #include <bz/game/scene_internal.h>
6 #include <bz/input/input_internal.h>
7 #include <bz/input/platform.h>
8 #include <bz/renderer/renderer.h>
9 #include <bz/resources/file_system_internal.h>
11 extern void bzpGameLaunch(void);
12 extern void bzpGameInit(void);
13 extern bool bzpGameTick(void);
14 extern void bzpGameTeardown(void);
16 int main(int argc
, char *argv
[]) {
21 gSystemTicksPerSecond
= 60;
23 SDL_Init(SDL_INIT_EVERYTHING
);
24 bzFileSystemInit(argv
[0], SDL_GetBasePath());
29 //uint64_t targetUpdateTime = 1000 / 60;
30 //uint64_t nextUpdateTicks = 0;
33 // bzInputProcessFrame();
35 // FIXME, input stuff...
37 //uint64_t ticks = SDL_GetTicks64();
39 //if (ticks >= nextUpdateTicks) {
40 // nextUpdateTicks = ticks + targetUpdateTime;
42 if (bzpGameTick() == false) goto game_loop_exit
; // FIXME
43 if (bzInputGetBooleanValue(bzQuitInputID
)) goto game_loop_exit
; // FIXME
50 bzFileSystemTeardown();