route5gate.asm 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. Route5GateScript:
  2. call EnableAutoTextBoxDrawing
  3. ld a, [wRoute5GateCurScript]
  4. ld hl, Route5GateScriptPointers
  5. jp CallFunctionInTable
  6. Route5GateScriptPointers:
  7. dw Route5GateScript0
  8. dw Route5GateScript1
  9. Route5GateScript_1df43:
  10. ld a, D_UP
  11. ld [wSimulatedJoypadStatesEnd], a
  12. ld a, $1
  13. ld [wSimulatedJoypadStatesIndex], a
  14. jp StartSimulatingJoypadStates
  15. Route5GateScript0:
  16. ld a, [wd728]
  17. bit 6, a
  18. ret nz
  19. ld hl, CoordsData_1df8f
  20. call ArePlayerCoordsInArray
  21. ret nc
  22. ld a, PLAYER_DIR_LEFT
  23. ld [wPlayerMovingDirection], a
  24. xor a
  25. ld [hJoyHeld], a
  26. callba RemoveGuardDrink
  27. ld a, [$ffdb]
  28. and a
  29. jr nz, .asm_1df82
  30. ld a, $2
  31. ld [hSpriteIndexOrTextID], a
  32. call DisplayTextID
  33. call Route5GateScript_1df43
  34. ld a, $1
  35. ld [wRoute5GateCurScript], a
  36. ret
  37. .asm_1df82
  38. ld a, $3
  39. ld [hSpriteIndexOrTextID], a
  40. call DisplayTextID
  41. ld hl, wd728
  42. set 6, [hl]
  43. ret
  44. CoordsData_1df8f:
  45. db 3,3
  46. db 3,4
  47. db $ff
  48. Route5GateScript1:
  49. ld a, [wSimulatedJoypadStatesIndex]
  50. and a
  51. ret nz
  52. call Delay3
  53. xor a
  54. ld [wJoyIgnore], a
  55. ld [wRoute5GateCurScript], a
  56. ret
  57. Route5GateTextPointers:
  58. dw Route5GateText1
  59. dw Route5GateText2
  60. dw Route5GateText3
  61. Route8GateText1:
  62. Route7GateText1:
  63. Route6GateText1:
  64. Route5GateText1:
  65. TX_ASM
  66. ld a, [wd728]
  67. bit 6, a
  68. jr nz, .asm_88856
  69. callba RemoveGuardDrink
  70. ld a, [$ffdb]
  71. and a
  72. jr nz, .asm_768a2
  73. ld hl, Route5GateText2
  74. call PrintText
  75. call Route5GateScript_1df43
  76. ld a, $1
  77. ld [wRoute5GateCurScript], a
  78. jp TextScriptEnd
  79. .asm_768a2
  80. ld hl, Route5GateText3
  81. call PrintText
  82. ld hl, wd728
  83. set 6, [hl]
  84. jp TextScriptEnd
  85. .asm_88856
  86. ld hl, SaffronGateText_1dff6
  87. call PrintText
  88. jp TextScriptEnd
  89. Route8GateText2:
  90. Route7GateText2:
  91. Route6GateText2:
  92. Route5GateText2:
  93. TX_FAR _SaffronGateText_1dfe7
  94. db "@"
  95. Route8GateText3:
  96. Route7GateText3:
  97. Route6GateText3:
  98. Route5GateText3:
  99. TX_FAR _SaffronGateText_8aaa9
  100. TX_SFX_KEY_ITEM
  101. TX_FAR _SaffronGateText_1dff1
  102. db "@"
  103. SaffronGateText_1dff6:
  104. TX_FAR _SaffronGateText_1dff6
  105. db "@"