diff --git a/src/player.odin b/src/player.odin index b51a70d..32a222b 100644 --- a/src/player.odin +++ b/src/player.odin @@ -15,7 +15,7 @@ Player :: struct { player_init :: proc(assets: ^Player_Assets) -> Player { player := Player{} // center for now not really needed - player.pos = {(WINDOW_WIDTH / 2), (WINDOW_HEIGHT / 2)} + player.pos = {(WINDOW_WIDTH / 2), (WINDOW_HEIGHT / 2)} player.state = .IDLE animation_play(&player.ani_state, &assets.clips[.IDLE]) @@ -55,8 +55,8 @@ renderer_draw_player :: proc(player: ^Player) { } dst_rect := rl.Rectangle{ - x = player.pos.x, - y = player.pos.y, + x = player.pos.x - f32(clip.frame_width) / 2, + y = player.pos.y - f32(clip.frame_height) / 2, width = f32(clip.frame_width), height = f32(clip.frame_height), }