ui: fixed string drawing routine
authorLukas Krickl <lukas@krickl.dev>
Sun, 2 Nov 2025 13:07:59 +0000 (14:07 +0100)
committerLukas Krickl <lukas@krickl.dev>
Sun, 2 Nov 2025 13:07:59 +0000 (14:07 +0100)
src/tiles.s
src/ui.s
src/wram.s

index 74ae07ef21ec98e6d567fcd8de12a2e1ed23a628..63b7d9ff7166db257f9b0cb9f76b75ad39ad1410 100644 (file)
@@ -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
index 870e93623f698e465bbb8b25795b56518ade64d7..e6cd8b6b64a6473ad707ac40e3c81a9a1cbc6a15 100644 (file)
--- 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
index 8445324e088f31e17eedb69b2903c2d617dcfc72..dda07201f4c2ad6601c18cb290cd8826c40cdf1c 100644 (file)
@@ -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