Fixed take damage debug buttons
authorLukas Krickl <lukas@krickl.dev>
Mon, 18 Nov 2024 15:17:52 +0000 (16:17 +0100)
committerLukas Krickl <lukas@krickl.dev>
Mon, 18 Nov 2024 15:17:52 +0000 (16:17 +0100)
src/player.s

index 78bba70d4e15a1e0e9a457f76f2eb39bf27b463e..d53bf2f12151d5a0436a54947f65d74b8be1be08 100644 (file)
@@ -173,8 +173,7 @@ player_update:
   ld a, 1
   ; make sure we do not mess with hl
   push hl
-  ; hl = player_x right now 
-  dec hl ; hl = player_y == player_base
+  ; hl = player_y right now 
   push de ; de will get used in take damage
   call player_take_damage
   ; call for UI redraw 
@@ -191,7 +190,8 @@ player_update:
   ld a, 1
   ; make sure we do not mess with hl
   push hl
-  ; hl = player_x right now
+  ; hl = player_y right now
+  inc hl
   inc hl 
   inc hl ; hl = player_hp
   call player_gain_resource