diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-07 23:43:20 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-07 23:43:20 +0100 |
| commit | 0c44af8f6c45e5bb957f38cc3e9784ca69524261 (patch) | |
| tree | 49d01710686e5818532552e1346129d7beda616b /main.c | |
work
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 52 |
1 files changed, 52 insertions, 0 deletions
@@ -0,0 +1,52 @@ +#include <projectbase/project_base.h> + +#include "include/players.h" +#include "include/objects.h" +#include "include/map.h" +#include "include/zombies.h" + +#include "map.c" +#include "players.c" +#include "objects.c" +#include "zombies.c" + +#define CONFIG_DIRECTORY "zombieshooter" + +void update_func(platform_window* window) { + renderer->render_clear(window, rgb(0,255,0)); + + draw_grid(window); + draw_spawners(window); + draw_bullets(window); +} + +void resize_func(platform_window* window, u32 change_x,u32 change_y) { + +} + +void close_func(platform_window* window) { + +} + +int main(int argc, char **argv) +{ + platform_init(argc, argv, CONFIG_DIRECTORY); + + platform_window *window = platform_open_window_ex("Zombies!", 700, 700, 1200, 1000, 500, 500, FLAGS_MINIMIZE, update_func, resize_func, close_func, 0, 0); + settings_set_number("USE_GPU", 1); + + //fnt = assets_load_font(mono_ttf, mono_ttf+mono_ttf_len, 16); + load_map_from_data(); + create_objects(); + + while(platform_keep_running(window)) { + platform_handle_events(); + } + + settings_write_to_file(); + platform_destroy(); + + memory_print_leaks(); + + return 0; +}
\ No newline at end of file |
