rockethideoutelevator.asm 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. RocketHideoutElevatorScript:
  2. ld hl, wCurrentMapScriptFlags
  3. bit 5, [hl]
  4. res 5, [hl]
  5. push hl
  6. call nz, RocketHideoutElevatorScript_4572c
  7. pop hl
  8. bit 7, [hl]
  9. res 7, [hl]
  10. call nz, RocketHideoutElevatorScript_4575f
  11. xor a
  12. ld [wAutoTextBoxDrawingControl], a
  13. inc a
  14. ld [wDoNotWaitForButtonPressAfterDisplayingText], a
  15. ret
  16. RocketHideoutElevatorScript_4572c:
  17. ld hl, wWarpEntries
  18. ld a, [wWarpedFromWhichWarp]
  19. ld b, a
  20. ld a, [wWarpedFromWhichMap]
  21. ld c, a
  22. call RocketHideoutElevatorScript_4573a
  23. RocketHideoutElevatorScript_4573a:
  24. inc hl
  25. inc hl
  26. ld a, b
  27. ld [hli], a
  28. ld a, c
  29. ld [hli], a
  30. ret
  31. RocketHideoutElevatorScript_45741:
  32. ld hl, RocketHideoutElavatorFloors
  33. call LoadItemList
  34. ld hl, RocketHideoutElevatorWarpMaps
  35. ld de, wElevatorWarpMaps
  36. ld bc, RocketHideoutElevatorWarpMapsEnd - RocketHideoutElevatorWarpMaps
  37. call CopyData
  38. ret
  39. RocketHideoutElavatorFloors:
  40. db $03 ; num elements in list
  41. db FLOOR_B1F
  42. db FLOOR_B2F
  43. db FLOOR_B4F
  44. db $FF ; terminator
  45. RocketHideoutElevatorWarpMaps:
  46. ; first byte is warp number
  47. ; second byte is map number
  48. ; These specify where the player goes after getting out of the elevator.
  49. db $04, ROCKET_HIDEOUT_1
  50. db $04, ROCKET_HIDEOUT_2
  51. db $02, ROCKET_HIDEOUT_4
  52. RocketHideoutElevatorWarpMapsEnd:
  53. RocketHideoutElevatorScript_4575f:
  54. call Delay3
  55. callba ShakeElevator
  56. ret
  57. RocketHideoutElevatorTextPointers:
  58. dw RocketHideoutElevatorText1
  59. RocketHideoutElevatorText1:
  60. TX_ASM
  61. ld b, LIFT_KEY
  62. call IsItemInBag
  63. jr z, .asm_45782
  64. call RocketHideoutElevatorScript_45741
  65. ld hl, RocketHideoutElevatorWarpMaps
  66. predef DisplayElevatorFloorMenu
  67. jr .asm_45788
  68. .asm_45782
  69. ld hl, RocketHideoutElevatorText_4578b
  70. call PrintText
  71. .asm_45788
  72. jp TextScriptEnd
  73. RocketHideoutElevatorText_4578b:
  74. TX_FAR _RocketElevatorText_4578b
  75. TX_WAIT
  76. db "@"