From 89e4744b7a059b61285f9928c2eabc9718e43936 Mon Sep 17 00:00:00 2001 From: Ulysse Cura Date: Fri, 21 Aug 2026 23:13:36 +0200 Subject: [PATCH] Centering camera to map. --- SDL3_Core | 2 +- TODO.md | 7 +++++-- src/game.c | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/SDL3_Core b/SDL3_Core index 2a0803d..45a7323 160000 --- a/SDL3_Core +++ b/SDL3_Core @@ -1 +1 @@ -Subproject commit 2a0803d4c4e15048fced7d3c402b76fc782e0d85 +Subproject commit 45a73232132a6da2646bc7d5c4537ae6e058430d diff --git a/TODO.md b/TODO.md index 58b14cc..834ee3f 100644 --- a/TODO.md +++ b/TODO.md @@ -17,14 +17,17 @@ - [ ] Make camera use acceleration -- [ ] Make camera center on map - ###### Bugs +- [ ] Fix transparency issues + - [ ] Rethink export properties and platforms ? + ### In progress ### Done +- [x] Make camera center on map + - [x] Create camera - [x] Optimize asset builder file analize diff --git a/src/game.c b/src/game.c index cfc94ce..ce4cd6f 100644 --- a/src/game.c +++ b/src/game.c @@ -21,7 +21,7 @@ int game_init(void) entity_manager_init(); if(asset_manager_init()) return_failure_int; - asset_t *map_asset = asset_manager_load_asset("dungeon_entry", ASSET_MAP); + asset_t *map_asset = asset_manager_load_asset("dungeon_room_1", ASSET_MAP); if(!map_asset) return_failure_int; game.map = map_asset->data; @@ -45,8 +45,8 @@ int game_init(void) transform_component_data_t *transform_component_data = transform_component->data; transform_component_data->bounds = (frect_t) { - .x = 100.0f, - .y = 100.0f, + .x = 96.0f, + .y = 176.0f, .w = 32.0f, .h = 32.0f };