From 69bfcb3c5fec6957e00264d24990dd2f1263cd50 Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Wed, 4 Mar 2026 16:12:25 -0500 Subject: better muntik --- src/main.odin | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/main.odin') 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) -- cgit v1.3-2-g0d8e