act_r_bat:
push de
call rand ; pick a random direction
- and a, 3
+ and a, 7 ; 0-3 direction 4-7 noop
pop de
ld hl, act_pos_y
add hl, de
; how often should turns auto-end
; frame timer
-#define TICK_RATE 10
+#define TICK_RATE 30
.def int OAMDMAFN = 0xFF80
#define WRAM 0xC000
ret nc ; no carry? good to exit
; when carry is set -> set flag
- ld a, M16_CARRY
+ ld b, M16_CARRY
+ ld a, [m16_flags]
+ or a, b
ld [m16_flags], a
ret
ret nc
; when carry is set -> set flag
- ld a, M16_CARRY
+ ld b, M16_CARRY
+ ld a, [m16_flags]
+ or a, b
ld [m16_flags], a
ret