summaryrefslogtreecommitdiff
path: root/scripts/Route12Gate2F.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2019-01-01 15:06:23 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2019-01-01 23:33:10 -0500
commitc7796024590fec48ac79756793c1a6e3b54daf8f (patch)
tree0d61caa7ebe429995a61e800d1d78c3a82aec886 /scripts/Route12Gate2F.asm
parent90430e6dee9e207dc0b618d07566f83617343f60 (diff)
Rename map files, labels, and constants to be consistent and work with Polished Map
Diffstat (limited to 'scripts/Route12Gate2F.asm')
-rwxr-xr-xscripts/Route12Gate2F.asm78
1 files changed, 78 insertions, 0 deletions
diff --git a/scripts/Route12Gate2F.asm b/scripts/Route12Gate2F.asm
new file mode 100755
index 00000000..0cc2768b
--- /dev/null
+++ b/scripts/Route12Gate2F.asm
@@ -0,0 +1,78 @@
+Route12Gate2F_Script:
+ jp DisableAutoTextBoxDrawing
+
+Route12Gate2F_TextPointers:
+ dw Route12GateUpstairsText1
+ dw Route12GateUpstairsText2
+ dw Route12GateUpstairsText3
+
+Route12GateUpstairsText1:
+ TX_ASM
+ CheckEvent EVENT_GOT_TM39, 1
+ jr c, .asm_0ad3c
+ ld hl, TM39PreReceiveText
+ call PrintText
+ lb bc, TM_39, 1
+ call GiveItem
+ jr nc, .BagFull
+ ld hl, ReceivedTM39Text
+ call PrintText
+ SetEvent EVENT_GOT_TM39
+ jr .asm_4ba56
+.BagFull
+ ld hl, TM39NoRoomText
+ call PrintText
+ jr .asm_4ba56
+.asm_0ad3c
+ ld hl, TM39ExplanationText
+ call PrintText
+.asm_4ba56
+ jp TextScriptEnd
+
+TM39PreReceiveText:
+ TX_FAR _TM39PreReceiveText
+ db "@"
+
+ReceivedTM39Text:
+ TX_FAR _ReceivedTM39Text
+ TX_SFX_ITEM_1
+ db "@"
+
+TM39ExplanationText:
+ TX_FAR _TM39ExplanationText
+ db "@"
+
+TM39NoRoomText:
+ TX_FAR _TM39NoRoomText
+ db "@"
+
+Route12GateUpstairsText2:
+ TX_ASM
+ ld hl, Route12GateUpstairsText_495b8
+ jp GateUpstairsScript_PrintIfFacingUp
+
+Route12GateUpstairsText_495b8:
+ TX_FAR _Route12GateUpstairsText_495b8
+ db "@"
+
+Route12GateUpstairsText3:
+ TX_ASM
+ ld hl, Route12GateUpstairsText_495c4
+ jp GateUpstairsScript_PrintIfFacingUp
+
+Route12GateUpstairsText_495c4:
+ TX_FAR _Route12GateUpstairsText_495c4
+ db "@"
+
+GateUpstairsScript_PrintIfFacingUp:
+ ld a, [wSpriteStateData1 + 9]
+ cp SPRITE_FACING_UP
+ jr z, .up
+ ld a, $1
+ jr .done
+.up
+ call PrintText
+ xor a
+.done
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ jp TextScriptEnd