Fixed camera follow offset to int.

This commit is contained in:
Ulysse Cura 2026-09-02 18:37:59 +02:00
parent 365df6a0c8
commit 60b58036a9
2 changed files with 6 additions and 6 deletions

View File

@ -6,16 +6,16 @@
void camera_init(void)
{
game.camera.view_rect = (rect_t) {
.x = 0.0f,
.y = 0.0f,
.x = 0,
.y = 0,
.w = DISPLAY_WIDTH / 2,
.h = DISPLAY_HEIGHT / 2
};
game.camera.tracking_pos = NULL;
game.camera.tracking_center_offset = (fvector2d_t) {
.x = 0.0f,
.y = 0.0f
game.camera.tracking_center_offset = (vector2d_t) {
.x = 0,
.y = 0
};
}

View File

@ -6,7 +6,7 @@
typedef struct camera_t {
rect_t view_rect;
fvector2d_t *tracking_pos;
fvector2d_t tracking_center_offset;
vector2d_t tracking_center_offset;
} camera_t;
void camera_init(void);