From cb22cac6c363536ac6583508eb05a1e6ee803fba Mon Sep 17 00:00:00 2001 From: En Yi Date: Thu, 27 Mar 2025 21:24:20 +0800 Subject: [PATCH] Update UI + Fix destroying ladder --- scenes/game_scene.c | 8 +++++++- scenes/scene_systems.c | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scenes/game_scene.c b/scenes/game_scene.c index cf1eb68..b4e5a72 100644 --- a/scenes/game_scene.c +++ b/scenes/game_scene.c @@ -67,9 +67,15 @@ static void level_scene_render_func(Scene_t* scene) DrawText(buffer, gui_x, data->game_rec.height - 12, 12, WHITE); DrawRectangle(0, 0, data->game_rec.width, 32, (Color){0,0,0,128}); + DrawText("Z", 300, 5, 24, RED); + if (data->camera.mode == CAMERA_RANGED_MOVEMENT) + { + DrawText("Eyes", 320, 5, 24, RED); + } + DrawText(data->level_pack->levels[data->current_level].level_name, 5, 5, 24, WHITE); sprintf(buffer, "Chests: %u / %u", data->coins.current, data->coins.total); gui_x = data->game_rec.width - MeasureText(buffer, 24) - 5; - DrawText(buffer, gui_x, 0, 24, RED); + DrawText(buffer, gui_x, 5, 24, RED); EndTextureMode(); } diff --git a/scenes/scene_systems.c b/scenes/scene_systems.c index 5a584cd..93a150f 100644 --- a/scenes/scene_systems.c +++ b/scenes/scene_systems.c @@ -1,3 +1,4 @@ +#include "collisions.h" #include "scene_impl.h" #include "water_flow.h" #include "ent_impl.h" @@ -355,7 +356,7 @@ void change_a_tile(TileGrid_t* tilemap, unsigned int tile_idx, TileType_t new_ty unsigned int down_tile = tile_idx + tilemap->width; if (down_tile < tilemap->n_tiles && tilemap->tiles[down_tile].tile_type == LADDER) { - tilemap->tiles[down_tile].solid = ONE_WAY; + tilemap->tiles[down_tile].solid = NOT_SOLID; } }