From: Lukas Krickl Date: Sun, 2 Nov 2025 13:07:59 +0000 (+0100) Subject: ui: fixed string drawing routine X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=3e57d430654a44b3a20e4e057d16fd4c2e95c697;p=gbrg%2F.git ui: fixed string drawing routine --- diff --git a/src/tiles.s b/src/tiles.s index 74ae07e..63b7d9f 100644 --- a/src/tiles.s +++ b/src/tiles.s @@ -22,12 +22,12 @@ tile_update_table: dw tile_update_enemy_hive dw tile_update_food -strz str_empty, "EMPTY" -strz str_player_hive, "YOUR HIVE" -strz str_enemy_hive, "HIVE" -strz str_player, "PLAYER" -strz str_enemy, "ENEMY" -strz str_food, "FOOD" +strz str_empty, "EMPTY " +strz str_player_hive, "YOUR HIVE " +strz str_enemy_hive, "HIVE " +strz str_player, "PLAYER " +strz str_enemy, "ENEMY " +strz str_food, "FOOD " ; mapping of tile ids to ; the tile names diff --git a/src/ui.s b/src/ui.s index 870e936..e6cd8b6 100644 --- a/src/ui.s +++ b/src/ui.s @@ -78,6 +78,7 @@ ui_draw_tile_name: ld a, [current_tile] ld h, a ld a, [current_tile+1] + ld l, a ld a, [hl] ; load type add a, a ; * 2 for offset diff --git a/src/wram.s b/src/wram.s index 8445324..dda0720 100644 --- a/src/wram.s +++ b/src/wram.s @@ -80,7 +80,7 @@ tile_curr: .adv 2 tiles: .adv t_size * MAP_TILES -ui_draw_routine: .adv 1 +ui_draw_routine: .adv 2 ; the following valuess are set by ui_update ; coordinates of current tile