diff options
| author | Xander Swan <no email> | 2025-12-05 09:27:12 -0500 |
|---|---|---|
| committer | Xander Swan <no email> | 2025-12-05 09:27:12 -0500 |
| commit | 3375d712e40cce1d17198ba20839f58a2a77d202 (patch) | |
| tree | 856f517c9e9e59173b81b62a40bd4d2f1115d378 /src/draw/sprite.odin | |
| parent | 53cba1d004451f0782312cb203afb7da47a29c5f (diff) | |
add platforms and AABB collision
Diffstat (limited to 'src/draw/sprite.odin')
| -rw-r--r-- | src/draw/sprite.odin | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/draw/sprite.odin b/src/draw/sprite.odin index ff8ce58..59d1c32 100644 --- a/src/draw/sprite.odin +++ b/src/draw/sprite.odin @@ -1,12 +1,10 @@ package draw import "core:log" -import "core:math" import "core:image" import "core:image/qoi" import sg "shared:sokol/gfx" -import stime "shared:sokol/time" Sprite :: struct { image: sg.Image, @@ -85,13 +83,13 @@ update_sprite :: proc(sprite: ^Sprite, dt: f32) { } } -draw_sprite :: proc( +sprite :: proc( r: ^Renderer, sprite: Sprite, ) { frame := sprite.anim.frames[sprite.current_frame] - draw_texture( + texture( r, sprite.image, Rect { |
