; ---------------------------------------------------------------------------
; Subroutine doing the extra logic for Tails' flight
; ---------------------------------------------------------------------------
Tails_FlyingSwimming:
jsr (ObjectMove).l
addi.w #4,y_vel(a0)
moveq #0,d0
move.b (Ctrl_1_Press_Logical).w,d0
andi.b #button_B_mask|button_C_mask,d0 ; is B or C pressed?
beq.w Tails_NoFlyUp ; if not, branch
subi.w #7,y_vel(a0)
Tails_NoFlyUp:
moveq #0,d1
move.b ($FFFFFE05).w,d1
andi.b #9,d1
bne.s +
subq.b #1,flight_time(a0)
bne.s +
btst #2,flight_property(a0) ; Did we already tell the game that Tails is tired?
bne.s + ; If so, don't keep telling it, since that's completely pointless and just wastes CPU cycles.
bset #2,flight_property(a0) ; If we haven't yet, tell the game that Tails is tired.
+
rts
Comments