halloffameroom.asm 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. HallofFameRoomScript:
  2. call EnableAutoTextBoxDrawing
  3. ld hl, HallofFameRoomScriptPointers
  4. ld a, [wHallOfFameRoomCurScript]
  5. jp CallFunctionInTable
  6. HallofFameRoomScript_5a4aa:
  7. xor a
  8. ld [wJoyIgnore], a
  9. ld [wHallOfFameRoomCurScript], a
  10. ret
  11. HallofFameRoomScriptPointers:
  12. dw HallofFameRoomScript0
  13. dw HallofFameRoomScript1
  14. dw HallofFameRoomScript2
  15. dw HallofFameRoomScript3
  16. HallofFameRoomScript3:
  17. ret
  18. HallofFameRoomScript2:
  19. call Delay3
  20. ld a, [wLetterPrintingDelayFlags]
  21. push af
  22. xor a
  23. ld [wJoyIgnore], a
  24. predef HallOfFamePC
  25. pop af
  26. ld [wLetterPrintingDelayFlags], a
  27. ld hl, wFlags_D733
  28. res 1, [hl]
  29. inc hl
  30. set 0, [hl]
  31. xor a
  32. ld hl, wLoreleiCurScript
  33. ld [hli], a
  34. ld [hli], a
  35. ld [hl], a
  36. ld [wLanceCurScript], a
  37. ld [wHallOfFameRoomCurScript], a
  38. ; Elite 4 events
  39. ResetEventRange ELITE4_EVENTS_START, ELITE4_CHAMPION_EVENTS_END, 1
  40. xor a
  41. ld [wHallOfFameRoomCurScript], a
  42. ld a, PALLET_TOWN
  43. ld [wLastBlackoutMap], a
  44. callba SaveSAVtoSRAM
  45. ld b, 5
  46. .delayLoop
  47. ld c, 600 / 5
  48. call DelayFrames
  49. dec b
  50. jr nz, .delayLoop
  51. call WaitForTextScrollButtonPress
  52. jp Init
  53. HallofFameRoomScript0:
  54. ld a, $ff
  55. ld [wJoyIgnore], a
  56. ld hl, wSimulatedJoypadStatesEnd
  57. ld de, RLEMovement5a528
  58. call DecodeRLEList
  59. dec a
  60. ld [wSimulatedJoypadStatesIndex], a
  61. call StartSimulatingJoypadStates
  62. ld a, $1
  63. ld [wHallOfFameRoomCurScript], a
  64. ret
  65. RLEMovement5a528:
  66. db D_UP,$5
  67. db $ff
  68. HallofFameRoomScript1:
  69. ld a, [wSimulatedJoypadStatesIndex]
  70. and a
  71. ret nz
  72. ld a, PLAYER_DIR_RIGHT
  73. ld [wPlayerMovingDirection], a
  74. ld a, $1
  75. ld [H_SPRITEINDEX], a
  76. call SetSpriteMovementBytesToFF
  77. ld a, SPRITE_FACING_LEFT
  78. ld [hSpriteFacingDirection], a
  79. call SetSpriteFacingDirectionAndDelay
  80. call Delay3
  81. xor a
  82. ld [wJoyIgnore], a
  83. inc a ; PLAYER_DIR_RIGHT
  84. ld [wPlayerMovingDirection], a
  85. ld a, $1
  86. ld [hSpriteIndexOrTextID], a
  87. call DisplayTextID
  88. ld a, $ff
  89. ld [wJoyIgnore], a
  90. ld a, HS_UNKNOWN_DUNGEON_GUY
  91. ld [wMissableObjectIndex], a
  92. predef HideObject
  93. ld a, $2
  94. ld [wHallOfFameRoomCurScript], a
  95. ret
  96. HallofFameRoomTextPointers:
  97. dw HallofFameRoomText1
  98. HallofFameRoomText1:
  99. TX_FAR _HallofFameRoomText1
  100. db "@"