route12gateupstairs.asm 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. Route12GateUpstairsScript:
  2. jp DisableAutoTextBoxDrawing
  3. Route12GateUpstairsTextPointers:
  4. dw Route12GateUpstairsText1
  5. dw Route12GateUpstairsText2
  6. dw Route12GateUpstairsText3
  7. Route12GateUpstairsText1:
  8. TX_ASM
  9. CheckEvent EVENT_GOT_TM39, 1
  10. jr c, .asm_0ad3c
  11. ld hl, TM39PreReceiveText
  12. call PrintText
  13. lb bc, TM_39, 1
  14. call GiveItem
  15. jr nc, .BagFull
  16. ld hl, ReceivedTM39Text
  17. call PrintText
  18. SetEvent EVENT_GOT_TM39
  19. jr .asm_4ba56
  20. .BagFull
  21. ld hl, TM39NoRoomText
  22. call PrintText
  23. jr .asm_4ba56
  24. .asm_0ad3c
  25. ld hl, TM39ExplanationText
  26. call PrintText
  27. .asm_4ba56
  28. jp TextScriptEnd
  29. TM39PreReceiveText:
  30. TX_FAR _TM39PreReceiveText
  31. db "@"
  32. ReceivedTM39Text:
  33. TX_FAR _ReceivedTM39Text
  34. TX_SFX_ITEM_1
  35. db "@"
  36. TM39ExplanationText:
  37. TX_FAR _TM39ExplanationText
  38. db "@"
  39. TM39NoRoomText:
  40. TX_FAR _TM39NoRoomText
  41. db "@"
  42. Route12GateUpstairsText2:
  43. TX_ASM
  44. ld hl, Route12GateUpstairsText_495b8
  45. jp GateUpstairsScript_PrintIfFacingUp
  46. Route12GateUpstairsText_495b8:
  47. TX_FAR _Route12GateUpstairsText_495b8
  48. db "@"
  49. Route12GateUpstairsText3:
  50. TX_ASM
  51. ld hl, Route12GateUpstairsText_495c4
  52. jp GateUpstairsScript_PrintIfFacingUp
  53. Route12GateUpstairsText_495c4:
  54. TX_FAR _Route12GateUpstairsText_495c4
  55. db "@"
  56. GateUpstairsScript_PrintIfFacingUp:
  57. ld a, [wSpriteStateData1 + 9]
  58. cp SPRITE_FACING_UP
  59. jr z, .up
  60. ld a, $1
  61. jr .done
  62. .up
  63. call PrintText
  64. xor a
  65. .done
  66. ld [wDoNotWaitForButtonPressAfterDisplayingText], a
  67. jp TextScriptEnd