route8gate.asm 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. Route8GateScript:
  2. call EnableAutoTextBoxDrawing
  3. ld hl, Route8GateScriptPointers
  4. ld a, [wRoute8GateCurScript]
  5. jp CallFunctionInTable
  6. Route8GateScriptPointers:
  7. dw Route8GateScript0
  8. dw Route8GateScript1
  9. Route8GateScript_1e1d7:
  10. ld hl, wd730
  11. set 7, [hl]
  12. ld a, $10
  13. ld [wSimulatedJoypadStatesEnd], a
  14. ld a, $1
  15. ld [wSimulatedJoypadStatesIndex], a
  16. xor a
  17. ld [wSpriteStateData2 + $06], a
  18. ld [wOverrideSimulatedJoypadStatesMask], a
  19. ret
  20. Route8GateScript0:
  21. ld a, [wd728]
  22. bit 6, a
  23. ret nz
  24. ld hl, CoordsData_1e22c
  25. call ArePlayerCoordsInArray
  26. ret nc
  27. ld a, PLAYER_DIR_LEFT
  28. ld [wPlayerMovingDirection], a
  29. xor a
  30. ld [hJoyHeld], a
  31. callba RemoveGuardDrink
  32. ld a, [$ffdb]
  33. and a
  34. jr nz, .asm_1e220
  35. ld a, $2
  36. ld [hSpriteIndexOrTextID], a
  37. call DisplayTextID
  38. call Route8GateScript_1e1d7
  39. ld a, $1
  40. ld [wRoute8GateCurScript], a
  41. ret
  42. .asm_1e220
  43. ld hl, wd728
  44. set 6, [hl]
  45. ld a, $3
  46. ld [hSpriteIndexOrTextID], a
  47. jp DisplayTextID
  48. CoordsData_1e22c:
  49. db 3,2
  50. db 4,2
  51. db $ff
  52. Route8GateScript1:
  53. ld a, [wSimulatedJoypadStatesIndex]
  54. and a
  55. ret nz
  56. call Delay3
  57. xor a
  58. ld [wJoyIgnore], a
  59. ld [wRoute8GateCurScript], a
  60. ret
  61. Route8GateTextPointers:
  62. dw Route8GateText1
  63. dw Route8GateText2
  64. dw Route8GateText3