pokered/scripts/route22gate.asm

93 lines
1.8 KiB
NASM
Raw Normal View History

2014-05-18 18:19:10 +00:00
Route22GateScript: ; 1e683 (7:6683)
call EnableAutoTextBoxDrawing
ld hl, Route22GateScriptPointers
2015-08-31 02:38:41 +00:00
ld a, [wRoute22GateCurScript]
2014-05-18 18:19:10 +00:00
call CallFunctionInTable
2015-08-31 02:38:41 +00:00
ld a, [wYCoord]
2014-05-18 18:19:10 +00:00
cp $4
ld a, ROUTE_23
jr c, .asm_1e69a
ld a, ROUTE_22
2014-05-18 18:19:10 +00:00
.asm_1e69a
ld [wLastMap], a
2014-05-18 18:19:10 +00:00
ret
Route22GateScriptPointers: ; 1e69e (7:669e)
dw Route22GateScript0
dw Route22GateScript1
dw Route22GateScript2
Route22GateScript0: ; 1e6a4 (7:66a4)
ld hl, Route22GateScriptCoords
call ArePlayerCoordsInArray
ret nc
xor a
2014-05-25 17:51:53 +00:00
ld [hJoyHeld], a
2014-05-18 18:19:10 +00:00
ld a, $1
2015-07-18 15:17:29 +00:00
ld [hSpriteIndexOrTextID], a
2014-05-18 18:19:10 +00:00
jp DisplayTextID
Route22GateScriptCoords: ; 1e6b5 (7:66b5)
db 2,4
db 2,5
db $ff
Route22GateScript_1e6ba: ; 1e6ba (7:66ba)
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
ld a, D_DOWN
ld [wSimulatedJoypadStatesEnd], a
ld [wSpriteStateData1 + 9], a
2014-05-25 17:51:53 +00:00
ld [wJoyIgnore], a
jp StartSimulatingJoypadStates
2014-05-18 18:19:10 +00:00
Route22GateScript1: ; 1e6cd (7:66cd)
ld a, [wSimulatedJoypadStatesIndex]
2014-05-18 18:19:10 +00:00
and a
ret nz
xor a
2014-05-25 17:51:53 +00:00
ld [wJoyIgnore], a
2014-05-18 18:19:10 +00:00
call Delay3
ld a, $0
2015-08-31 02:38:41 +00:00
ld [wRoute22GateCurScript], a
2014-05-18 18:19:10 +00:00
Route22GateScript2: ; 1e6de (7:66de)
ret
Route22GateTextPointers: ; 1e6df (7:66df)
dw Route22GateText1
Route22GateText1: ; 1e6e1 (7:66e1)
2015-07-03 19:58:50 +00:00
TX_ASM
2015-08-31 02:38:41 +00:00
ld a, [wObtainedBadges]
2014-05-18 18:19:10 +00:00
bit 0, a
jr nz, .asm_1e6f6
2014-05-18 18:19:10 +00:00
ld hl, Route22GateText_1e704
call PrintText
call Route22GateScript_1e6ba
ld a, $1
jr .asm_1e6fe
.asm_1e6f6
2014-05-18 18:19:10 +00:00
ld hl, Route22GateText_1e71a
call PrintText
ld a, $2
.asm_1e6fe
2015-08-31 02:38:41 +00:00
ld [wRoute22GateCurScript], a
2014-05-18 18:19:10 +00:00
jp TextScriptEnd
Route22GateText_1e704: ; 1e704 (7:6704)
TX_FAR _Route22GateText_1e704
2015-07-03 19:58:50 +00:00
TX_ASM
2015-07-19 08:46:12 +00:00
ld a, SFX_DENIED
2014-05-18 18:19:10 +00:00
call PlaySoundWaitForCurrent
call WaitForSoundToFinish
ld hl, Route22GateText_1e715
2014-05-18 18:19:10 +00:00
ret
Route22GateText_1e715: ; 1e715 (7:6715)
TX_FAR _Route22GateText_1e715
db "@"
Route22GateText_1e71a: ; 1e71a (7:671a)
TX_FAR _Route22GateText_1e71a
2014-05-18 18:19:10 +00:00
db $0B, "@"