field_move_messages.asm 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. PrintStrengthTxt:
  2. ld hl, wd728
  3. set 0, [hl]
  4. ld hl, UsedStrengthText
  5. call PrintText
  6. ld hl, CanMoveBouldersText
  7. jp PrintText
  8. UsedStrengthText:
  9. TX_FAR _UsedStrengthText
  10. TX_ASM
  11. ld a, [wcf91]
  12. call PlayCry
  13. call Delay3
  14. jp TextScriptEnd
  15. CanMoveBouldersText:
  16. TX_FAR _CanMoveBouldersText
  17. db "@"
  18. IsSurfingAllowed:
  19. ; Returns whether surfing is allowed in bit 1 of wd728.
  20. ; Surfing isn't allowed on the Cycling Road or in the lowest level of the
  21. ; Seafoam Islands before the current has been slowed with boulders.
  22. ld hl, wd728
  23. set 1, [hl]
  24. ld a, [wd732]
  25. bit 5, a
  26. jr nz, .forcedToRideBike
  27. ld a, [wCurMap]
  28. cp SEAFOAM_ISLANDS_5
  29. ret nz
  30. CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE
  31. ret z
  32. ld hl, CoordsData_cdf7
  33. call ArePlayerCoordsInArray
  34. ret nc
  35. ld hl, wd728
  36. res 1, [hl]
  37. ld hl, CurrentTooFastText
  38. jp PrintText
  39. .forcedToRideBike
  40. ld hl, wd728
  41. res 1, [hl]
  42. ld hl, CyclingIsFunText
  43. jp PrintText
  44. CoordsData_cdf7:
  45. db $0B,$07,$FF
  46. CurrentTooFastText:
  47. TX_FAR _CurrentTooFastText
  48. db "@"
  49. CyclingIsFunText:
  50. TX_FAR _CyclingIsFunText
  51. db "@"