ThomasSpeedrunner

Tails Flying Up - Theoretical

May 23rd, 2013
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. ; ---------------------------------------------------------------------------
  2. ; Subroutine doing the extra logic for Tails' flight
  3. ; ---------------------------------------------------------------------------
  4. Tails_FlyingSwimming:
  5. jsr (ObjectMove).l
  6. addi.w #4,y_vel(a0)
  7.  
  8. moveq #0,d0
  9. move.b (Ctrl_1_Press_Logical).w,d0
  10. andi.b #button_B_mask|button_C_mask,d0 ; is B or C pressed?
  11. beq.w Tails_NoFlyUp ; if not, branch
  12. subi.w #7,y_vel(a0)
  13.  
  14. Tails_NoFlyUp:
  15. moveq #0,d1
  16. move.b ($FFFFFE05).w,d1
  17. andi.b #9,d1
  18. bne.s +
  19. subq.b #1,flight_time(a0)
  20. bne.s +
  21. btst #2,flight_property(a0) ; Did we already tell the game that Tails is tired?
  22. bne.s + ; If so, don't keep telling it, since that's completely pointless and just wastes CPU cycles.
  23. bset #2,flight_property(a0) ; If we haven't yet, tell the game that Tails is tired.
  24. +
  25. rts
Advertisement
Add Comment
Please, Sign In to add comment