route7gate.asm 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. Route7GateScript:
  2. call EnableAutoTextBoxDrawing
  3. ld a, [wRoute7GateCurScript]
  4. ld hl, Route7GateScriptPointers
  5. call CallFunctionInTable
  6. ret
  7. Route7GateScriptPointers:
  8. dw Route7GateScript0
  9. dw Route7GateScript1
  10. Route7GateScript_1e111:
  11. ld hl, wd730
  12. set 7, [hl]
  13. ld a, $20
  14. ld [wSimulatedJoypadStatesEnd], a
  15. ld a, $1
  16. ld [wSimulatedJoypadStatesIndex], a
  17. xor a
  18. ld [wSpriteStateData2 + $06], a
  19. ld [wOverrideSimulatedJoypadStatesMask], a
  20. ret
  21. Route7GateScript0:
  22. ld a, [wd728]
  23. bit 6, a
  24. ret nz
  25. ld hl, CoordsData_1e167
  26. call ArePlayerCoordsInArray
  27. ret nc
  28. ld a, PLAYER_DIR_UP
  29. ld [wPlayerMovingDirection], a
  30. xor a
  31. ld [hJoyHeld], a
  32. callba RemoveGuardDrink
  33. ld a, [$ffdb]
  34. and a
  35. jr nz, .asm_1e15a
  36. ld a, $2
  37. ld [hSpriteIndexOrTextID], a
  38. call DisplayTextID
  39. call Route7GateScript_1e111
  40. ld a, $1
  41. ld [wRoute7GateCurScript], a
  42. ret
  43. .asm_1e15a
  44. ld a, $3
  45. ld [hSpriteIndexOrTextID], a
  46. call DisplayTextID
  47. ld hl, wd728
  48. set 6, [hl]
  49. ret
  50. CoordsData_1e167:
  51. db 3,3
  52. db 4,3
  53. db $ff
  54. Route7GateScript1:
  55. ld a, [wSimulatedJoypadStatesIndex]
  56. and a
  57. ret nz
  58. call Delay3
  59. xor a
  60. ld [wJoyIgnore], a
  61. ld [wRoute7GateCurScript], a
  62. ld [wCurMapScript], a
  63. ret
  64. Route7GateTextPointers:
  65. dw Route7GateText1
  66. dw Route7GateText2
  67. dw Route7GateText3