]> git.lizzy.rs Git - nothing.git/blobdiff - src/main.c
TODO(#395)
[nothing.git] / src / main.c
index c968732fe41969cde8d2cf64249de9edab3ecc6f..0f9921d9498d3c681a62c7b13214b1b3de3504ce 100644 (file)
@@ -11,7 +11,6 @@
 #include "game/level/player.h"
 #include "game/sound_samples.h"
 #include "game/sprite_font.h"
-#include "math/minmax.h"
 #include "math/point.h"
 #include "sdl/renderer.h"
 #include "system/error.h"
@@ -30,10 +29,10 @@ int main(int argc, char *argv[])
 {
     srand((unsigned int) time(NULL));
 
-    lt_t *const lt = create_lt();
+    Lt *const lt = create_lt();
 
     char *level_filename = NULL;
-    int fps = 60;
+    int fps = 30;
 
     for (int i = 1; i < argc;) {
         if (strcmp(argv[i], "--fps") == 0) {
@@ -135,7 +134,7 @@ int main(int argc, char *argv[])
     };
     const size_t sound_sample_files_count = sizeof(sound_sample_files) / sizeof(char*);
 
-    game_t *const game = PUSH_LT(
+    Game *const game = PUSH_LT(
         lt,
         create_game(
             level_filename,
@@ -189,8 +188,9 @@ int main(int argc, char *argv[])
         }
 
         const int64_t end_frame_time = (int64_t) SDL_GetTicks();
-
+#define max_int64(a, b) (a > b ? a : b)
         SDL_Delay((unsigned int) max_int64(10, delta_time - (end_frame_time - begin_frame_time)));
+#undef max_int64
     }
 
     RETURN_LT(lt, 0);