summaryrefslogtreecommitdiff
path: root/scripts/celadonmartelevator.asm
diff options
context:
space:
mode:
authorU-Fish-PC\Daniel <corrnondacqb@yahoo.com>2014-05-18 14:19:10 -0400
committerU-Fish-PC\Daniel <corrnondacqb@yahoo.com>2014-05-18 14:19:10 -0400
commit24c01b09bb2b617812bd826d1cf9ab5e3ec6a023 (patch)
tree07d2ed81b23de081f2003d9f8d50170344dd5ada /scripts/celadonmartelevator.asm
parent4e4e72d02a5a202daea3a73363d2a4c3ba34e724 (diff)
Pull map scripts out of main.asm
Diffstat (limited to 'scripts/celadonmartelevator.asm')
-rwxr-xr-xscripts/celadonmartelevator.asm71
1 files changed, 71 insertions, 0 deletions
diff --git a/scripts/celadonmartelevator.asm b/scripts/celadonmartelevator.asm
new file mode 100755
index 00000000..9712ef04
--- /dev/null
+++ b/scripts/celadonmartelevator.asm
@@ -0,0 +1,71 @@
+CeladonMartElevatorScript: ; 48600 (12:4600)
+ ld hl, $d126
+ bit 5, [hl]
+ res 5, [hl]
+ push hl
+ call nz, CeladonMartElevatorScript_4861c
+ pop hl
+ bit 7, [hl]
+ res 7, [hl]
+ call nz, CeladonMartElevatorScript_48654
+ xor a
+ ld [$cf0c], a
+ inc a
+ ld [$cc3c], a
+ ret
+
+CeladonMartElevatorScript_4861c: ; 4861c (12:461c)
+ ld hl, $d3af
+ ld a, [$d73b]
+ ld b, a
+ ld a, [$d73c]
+ ld c, a
+ call CeladonMartElevatorScript_4862a
+
+CeladonMartElevatorScript_4862a: ; 4862a (12:462a)
+ inc hl
+ inc hl
+ ld a, b
+ ld [hli], a
+ ld a, c
+ ld [hli], a
+ ret
+
+CeladonMartElevatorScript_48631: ; 48631 (12:4631)
+ ld hl, CeladonMartElavatorFloors ; $4643
+ call LoadItemList
+ ld hl, CeldaonMartElevatorWarpMaps ; $464a
+ ld de, $cc5b
+ ld bc, $000a
+ jp CopyData
+
+CeladonMartElavatorFloors: ; 48643 (12:4643)
+ db $05 ; num elements in list
+ db $56, $57, $58, $59, $5A ; "1F", "2F", "3F", "4F, "5F"
+ db $FF ; terminator
+
+CeldaonMartElevatorWarpMaps: ; 4864a (12:464a)
+; first byte is warp number
+; second byte is map number
+; These specify where the player goes after getting out of the elevator.
+ db $05, CELADON_MART_1
+ db $02, CELADON_MART_2
+ db $02, CELADON_MART_3
+ db $02, CELADON_MART_4
+ db $02, CELADON_MART_5
+
+CeladonMartElevatorScript_48654: ; 48654 (12:4654)
+ ld b, BANK(ShakeElevator)
+ ld hl, ShakeElevator
+ jp Bankswitch
+
+CeladonMartElevatorTextPointers: ; 4865c (12:465c)
+ dw CeladonMartElevatorText1
+
+CeladonMartElevatorText1: ; 4865e (12:465e)
+ db $08 ; asm
+ call CeladonMartElevatorScript_48631
+ ld hl, CeldaonMartElevatorWarpMaps ; $464a
+ ld a, $61
+ call Predef
+ jp TextScriptEnd