unit display: removed cursor around active unit
authorLukas Krickl <lukas@krickl.dev>
Tue, 17 Jun 2025 03:16:03 +0000 (05:16 +0200)
committerLukas Krickl <lukas@krickl.dev>
Tue, 17 Jun 2025 03:16:03 +0000 (05:16 +0200)
Player units are not drawn with x-flip.

src/unit.s
src/update.s

index 83e0391ebc619f2eb44e6b457068a8379cfcac64..fabccbcf7c25a5423b952f89ea1d69886da4911e 100644 (file)
@@ -74,7 +74,7 @@ unit_demo_1_update:
   ld hl, act_oam_flags
   add hl, de
   ld a, [hl]
-  or a, OAM_DMG_PAL
+  or a, OAM_FXFLIP 
   ld [hl], a
   pop de
   
@@ -91,21 +91,10 @@ unit_demo_1_update:
 
   ; cpu controllerd unit update
 unit_demo_1_cpu_update:
-  push de
-  ld hl, act_oam_flags
-  add hl, de
-  ld a, [hl]
-  or a, OAM_DMG_PAL
-  ld [hl], a
-  pop de
-
   push de
   call unit_handle_cpu_inputs
   pop de
  
-  push de
-  call unit_scroll_center
-  pop de
   ret
 
 unit_handle_cpu_inputs:
@@ -713,13 +702,6 @@ unit_delay_to_active:
   ; inputs
   ;   de: actor
 unit_idle:
-  ; turn on OAM Palette 0
-  ld hl, act_oam_flags
-  add hl, de
-  ld a, [hl]
-  and a, ~OAM_DMG_PAL & 0xFF
-  ld [hl], a
-
   ldnull bc
   ret
 
@@ -827,7 +809,7 @@ unit_demo_2:
   act_inventory_empty
   act_equipment_empty
   act_effects_empty
-  act_st_def NULL, NULL, st_unit_demo_1_update, st_unit_idle
+  act_st_def NULL, NULL, st_unit_demo_1_cpu_update, st_unit_idle
   act_def_draw unit_draw, 0x84, 0
   act_rt_def
 
index b877ea699700ce7731f04abb5a3e4761cc95e00d..7e55201fb056e745d8b8df1e7ebac07d2f69941a 100644 (file)
@@ -14,7 +14,6 @@ update_game:
 
   ; clear oam
   call shadow_oam_clear
-  call ui_display_current_unit
 
   ld hl, p0_units
   call units_update