aboutsummaryrefslogtreecommitdiff
path: root/src/main.odin
diff options
context:
space:
mode:
authoriamcheeseman <[hidden email]>2026-01-14 19:21:33 -0500
committeriamcheeseman <[hidden email]>2026-01-14 19:21:33 -0500
commitd6f276be6bc1214c88cfc5346ceb7a5bea610638 (patch)
tree9b1f4d1aa4a02f2855c14dea2bf440f58343cc0e /src/main.odin
parent1b8553bf96017795dcf081b78371c3b2a8d5ecc5 (diff)
i HATE physics bugs (i haven't fixed them yet)
Diffstat (limited to 'src/main.odin')
-rw-r--r--src/main.odin16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/main.odin b/src/main.odin
index 8a528eb..1e3f8ba 100644
--- a/src/main.odin
+++ b/src/main.odin
@@ -11,7 +11,6 @@ import os "core:os/os2"
import rl "vendor:raylib"
-import "draw"
import "phys"
Vec2 :: [2]f32
@@ -24,6 +23,7 @@ Rect :: struct {
state: struct {
camera: rl.Camera2D,
platform_list: Entity_List(Platform),
+ bullet_list: Entity_List(Bullet),
}
logger: log.Logger
@@ -59,21 +59,23 @@ init :: proc() {
state.camera.zoom = 1
init_keybinds()
- draw.init()
+ init_draw()
init_player()
open_room(.ROOM_BEGIN)
}
frame :: proc() {
update_player(rl.GetFrameTime())
+ update_bullets(rl.GetFrameTime())
- draw.new_frame()
+ draw_new_frame()
rl.BeginMode2D(state.camera)
draw_player()
draw_room(current_room.id)
- draw_platforms()
+ draw_bullets()
+ // draw_platforms()
rl.EndMode2D()
@@ -84,12 +86,13 @@ frame :: proc() {
)
rl.DrawText(fps_text, 5, 5, 8, rl.GREEN)
- draw.end_frame()
+ draw_end_frame()
}
cleanup :: proc() {
- delete_player()
+ deinit_player()
delete_entity_list(state.platform_list)
+ delete_entity_list(state.bullet_list)
phys.destroy_world()
}
@@ -143,4 +146,3 @@ main :: proc() {
cleanup()
}
-