route6gate.asm 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. Route6GateScript:
  2. call EnableAutoTextBoxDrawing
  3. ld hl, Route6GateScriptPointers
  4. ld a, [wRoute6GateCurScript]
  5. call CallFunctionInTable
  6. ret
  7. Route6GateScriptPointers:
  8. dw Route6GateScript0
  9. dw Route6GateScript1
  10. Route6GateScript0:
  11. ld a, [wd728]
  12. bit 6, a
  13. ret nz
  14. ld hl, CoordsData_1e08c
  15. call ArePlayerCoordsInArray
  16. ret nc
  17. ld a, PLAYER_DIR_RIGHT
  18. ld [wPlayerMovingDirection], a
  19. xor a
  20. ld [hJoyHeld], a
  21. callba RemoveGuardDrink
  22. ld a, [$ffdb]
  23. and a
  24. jr nz, .asm_1e080
  25. ld a, $2
  26. ld [hSpriteIndexOrTextID], a
  27. call DisplayTextID
  28. call Route6GateScript_1e0a1
  29. ld a, $1
  30. ld [wRoute6GateCurScript], a
  31. ret
  32. .asm_1e080
  33. ld hl, wd728
  34. set 6, [hl]
  35. ld a, $3
  36. ld [hSpriteIndexOrTextID], a
  37. jp DisplayTextID
  38. CoordsData_1e08c:
  39. db $02,$03
  40. db $02,$04,$FF
  41. Route6GateScript1:
  42. ld a, [wSimulatedJoypadStatesIndex]
  43. and a
  44. ret nz
  45. call Delay3
  46. xor a
  47. ld [wJoyIgnore], a
  48. ld [wRoute6GateCurScript], a
  49. ret
  50. Route6GateScript_1e0a1:
  51. ld hl, wd730
  52. set 7, [hl]
  53. ld a, $80
  54. ld [wSimulatedJoypadStatesEnd], a
  55. ld a, $1
  56. ld [wSimulatedJoypadStatesIndex], a
  57. xor a
  58. ld [wSpriteStateData2 + $06], a
  59. ld [wOverrideSimulatedJoypadStatesMask], a
  60. ret
  61. Route6GateTextPointers:
  62. dw Route6GateText1
  63. dw Route6GateText2
  64. dw Route6GateText3