#define OAM_FYFLIP 0b01000000
#define OAM_FXFLIP 0b00100000
+#define OAM_DMG_PAL 0b00010000
; MBC1 registers
; inputs
; de: actor
unit_demo_1_update:
- ; TODO: call with correct values
- ldnull hl
- ld a, 1 ; hard-coded action remaining
+ 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_inputs
pop de
; 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