diff options
Diffstat (limited to 'src/main.odin')
| -rw-r--r-- | src/main.odin | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/main.odin b/src/main.odin index 4a059ad..257c4f3 100644 --- a/src/main.odin +++ b/src/main.odin @@ -17,23 +17,14 @@ Vec2i :: fw.Vec2i Color :: fw.Color Rect :: fw.Rect -ROOM_FADE_SIZE :: 8 - -FIXED_UPDATE_RATE :: 1.0/60 - -SCREEN_WIDTH :: 256 -SCREEN_HEIGHT :: 256 -SCREEN_SIZE :: Vec2{SCREEN_WIDTH, SCREEN_HEIGHT} -SCREEN_SIZE_INT :: Vec2i{SCREEN_WIDTH, SCREEN_HEIGHT} - state: struct { debug_mode: bool, camera_target: Vec2, camera_pos: Vec2, last_fixed_update: f64, + enemy_list: [dynamic]^Enemy, bullet_list: hm.Dynamic_Handle_Map(Bullet, Handle), - muntik_list: hm.Dynamic_Handle_Map(Muntik, Handle), platform_list: hm.Dynamic_Handle_Map(Platform, Handle), prop_list: hm.Dynamic_Handle_Map(Prop, Handle), rope_list: hm.Dynamic_Handle_Map(Rope, Handle), @@ -96,7 +87,6 @@ frame :: proc() { color = get_room(current_room.id).background_color, ) - for cb in draw_callbacks { cb() } @@ -158,8 +148,10 @@ frame :: proc() { cleanup :: proc() { deinit_player() + + clear_enemies() + delete(state.enemy_list) hm.dynamic_destroy(&state.bullet_list) - hm.dynamic_destroy(&state.muntik_list) hm.dynamic_destroy(&state.platform_list) hm.dynamic_destroy(&state.prop_list) hm.dynamic_destroy(&state.wiggle_prop_list) |
