summaryrefslogtreecommitdiff
path: root/scripts/route5gate.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/route5gate.asm
parent4e4e72d02a5a202daea3a73363d2a4c3ba34e724 (diff)
Pull map scripts out of main.asm
Diffstat (limited to 'scripts/route5gate.asm')
-rwxr-xr-xscripts/route5gate.asm121
1 files changed, 121 insertions, 0 deletions
diff --git a/scripts/route5gate.asm b/scripts/route5gate.asm
new file mode 100755
index 00000000..f6f1eb1a
--- /dev/null
+++ b/scripts/route5gate.asm
@@ -0,0 +1,121 @@
+Route5GateScript: ; 1df33 (7:5f33)
+ call EnableAutoTextBoxDrawing
+ ld a, [W_ROUTE5GATECURSCRIPT]
+ ld hl, Route5GateScriptPointers
+ jp CallFunctionInTable
+
+Route5GateScriptPointers: ; 1df3f (7:5f3f)
+ dw Route5GateScript0
+ dw Route5GateScript1
+
+Route5GateScript_1df43: ; 1df43 (7:5f43)
+ ld a, $40
+ ld [$ccd3], a
+ ld a, $1
+ ld [$cd38], a
+ jp Func_3486
+
+Route5GateScript0: ; 1df50 (7:5f50)
+ ld a, [$d728]
+ bit 6, a
+ ret nz
+ ld hl, CoordsData_1df8f
+ call ArePlayerCoordsInArray
+ ret nc
+ ld a, $2
+ ld [$d528], a
+ xor a
+ ld [H_CURRENTPRESSEDBUTTONS], a
+ ld b, BANK(RemoveGuardDrink)
+ ld hl, RemoveGuardDrink
+ call Bankswitch
+ ld a, [$ff00+$db]
+ and a
+ jr nz, .asm_1df82 ; 0x1df70 $10
+ ld a, $2
+ ld [$ff00+$8c], a
+ call DisplayTextID
+ call Route5GateScript_1df43
+ ld a, $1
+ ld [W_ROUTE5GATECURSCRIPT], a
+ ret
+.asm_1df82
+ ld a, $3
+ ld [$ff00+$8c], a
+ call DisplayTextID
+ ld hl, $d728
+ set 6, [hl]
+ ret
+
+CoordsData_1df8f: ; 1df8f (7:5f8f)
+ db 3,3
+ db 3,4
+ db $ff
+
+Route5GateScript1: ; 1df94 (7:5f94)
+ ld a, [$cd38]
+ and a
+ ret nz
+ call Delay3
+ xor a
+ ld [wJoypadForbiddenButtonsMask], a
+ ld [W_ROUTE5GATECURSCRIPT], a
+ ret
+
+Route5GateTextPointers: ; 1dfa4 (7:5fa4)
+ dw Route5GateText1
+ dw Route5GateText2
+ dw Route5GateText3
+
+Route8GateText1: ; 1dfaa (7:5faa)
+Route7GateText1: ; 1dfaa (7:5faa)
+Route6GateText1: ; 1dfaa (7:5faa)
+Route5GateText1: ; 1dfaa (7:5faa)
+ db $8
+ ld a, [$d728]
+ bit 6, a
+ jr nz, .asm_88856 ; 0x1dfb0 $2c
+ ld b, BANK(RemoveGuardDrink)
+ ld hl, RemoveGuardDrink
+ call Bankswitch
+ ld a, [$ff00+$db]
+ and a
+ jr nz, .asm_768a2 ; 0x1dfbd $11
+ ld hl, Route5GateText2
+ call PrintText
+ call Route5GateScript_1df43
+ ld a, $1
+ ld [W_ROUTE5GATECURSCRIPT], a
+ jp TextScriptEnd
+.asm_768a2 ; 0x1dfd0
+ ld hl, Route5GateText3
+ call PrintText
+ ld hl, $d728
+ set 6, [hl]
+ jp TextScriptEnd
+.asm_88856 ; 0x1dfde
+ ld hl, SaffronGateText_1dff6
+ call PrintText
+ jp TextScriptEnd
+
+Route8GateText2: ; 1dfe7 (7:5fe7)
+Route7GateText2: ; 1dfe7 (7:5fe7)
+Route6GateText2: ; 1dfe7 (7:5fe7)
+Route5GateText2: ; 1dfe7 (7:5fe7)
+ TX_FAR _SaffronGateText_1dfe7
+ db "@"
+
+Route8GateText3: ; 1dfec (7:5fec)
+Route7GateText3: ; 1dfec (7:5fec)
+Route6GateText3: ; 1dfec (7:5fec)
+Route5GateText3: ; 1dfec (7:5fec)
+ TX_FAR _SaffronGateText_8aaa9 ; 0x8aaa9
+ db $11
+ TX_FAR _SaffronGateText_1dff1 ; 0x8aaef
+ db "@"
+
+SaffronGateText_1dff6: ; 1dff6 (7:5ff6)
+ TX_FAR _SaffronGateText_1dff6
+ db "@"
+
+