diff options
author | U-Fish-PC\Daniel <corrnondacqb@yahoo.com> | 2014-05-18 14:19:10 -0400 |
---|---|---|
committer | U-Fish-PC\Daniel <corrnondacqb@yahoo.com> | 2014-05-18 14:19:10 -0400 |
commit | 24c01b09bb2b617812bd826d1cf9ab5e3ec6a023 (patch) | |
tree | 07d2ed81b23de081f2003d9f8d50170344dd5ada /scripts/route11gateupstairs.asm | |
parent | 4e4e72d02a5a202daea3a73363d2a4c3ba34e724 (diff) |
Pull map scripts out of main.asm
Diffstat (limited to 'scripts/route11gateupstairs.asm')
-rwxr-xr-x | scripts/route11gateupstairs.asm | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/scripts/route11gateupstairs.asm b/scripts/route11gateupstairs.asm new file mode 100755 index 00000000..0ee428c4 --- /dev/null +++ b/scripts/route11gateupstairs.asm @@ -0,0 +1,81 @@ +Route11GateUpstairsScript: ; 49454 (12:5454) + jp DisableAutoTextBoxDrawing + +Route11GateUpstairsTextPointers: ; 49457 (12:5457) + dw Route11GateUpstairsText1 + dw Route11GateUpstairsText2 + dw Route11GateUpstairsText3 + dw Route11GateUpstairsText4 + +Route11GateUpstairsText1: ; 4945f (12:545f) + db $08 ; asm + xor a + ld [wWhichTrade], a + ld a, $54 + call Predef +asm_49469: ; 49469 (12:5469) + jp TextScriptEnd + +Route11GateUpstairsText2: ; 4946c (12:546c) + db $8 + ld a, [$d7d6] + add a + jr c, .asm_4949b ; 0x49471 $28 + ld a, $1e + ld [$ffdb], a + ld a, $47 + ld [$ffdc], a + ld [$d11e], a + call GetItemName + ld h, d + ld l, e + ld de, $cc5b + ld bc, $000d + call CopyData + ld a, $62 + call Predef + ld a, [$ffdb] + dec a + jr nz, .asm_494a1 ; 0x49494 $b + ld hl, $d7d6 + set 7, [hl] +.asm_4949b + ld hl, Route11GateUpstairsText_494a3 + call PrintText +.asm_494a1 + jr asm_49469 ; 0x494a1 $c6 + +Route11GateUpstairsText_494a3: ; 494a3 (12:54a3) + TX_FAR _Route11GateUpstairsText_494a3 + db "@" + +Route11GateUpstairsText3: ; 494a8 (12:54a8) + db $08 ; asm + ld a, [$c109] + cp $4 + jp nz, Route12GateUpstairsScript_495c9 + ld a, [$d7d8] + bit 7, a ; fought snorlax? + ld hl, BinocularsSnorlaxText + jr z, .print + ld hl, BinocularsNoSnorlaxText +.print + call PrintText + jp TextScriptEnd + +BinocularsSnorlaxText: + TX_FAR _BinocularsSnorlaxText + db "@" + +BinocularsNoSnorlaxText: + TX_FAR _BinocularsNoSnorlaxText + db "@" + +Route11GateUpstairsText4: ; 494ce (12:54ce) + db $8 + ld hl, Route11GateUpstairsText_494d5 ; $54d5 + jp Route12GateUpstairsScript_495c9 + +Route11GateUpstairsText_494d5: ; 494d5 (12:54d5) + TX_FAR _Route11GateUpstairsText_494d5 + db "@" |