2014-05-18 18:19:10 +00:00
|
|
|
Route16GateScript: ; 496be (12:56be)
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd732
|
2014-05-18 18:19:10 +00:00
|
|
|
res 5, [hl]
|
|
|
|
call EnableAutoTextBoxDrawing
|
|
|
|
ld a, [W_ROUTE16GATECURSCRIPT]
|
|
|
|
ld hl, Route16GateScriptPointers
|
|
|
|
jp CallFunctionInTable
|
|
|
|
|
|
|
|
Route16GateScriptPointers: ; 496cf (12:56cf)
|
|
|
|
dw Route16GateScript0
|
|
|
|
dw Route16GateScript1
|
|
|
|
dw Route16GateScript2
|
|
|
|
dw Route16GateScript3
|
|
|
|
|
|
|
|
Route16GateScript0: ; 496d7 (12:56d7)
|
2014-05-31 14:35:46 +00:00
|
|
|
call Route16GateScript_49755
|
2014-05-18 18:19:10 +00:00
|
|
|
ret nz
|
|
|
|
ld hl, CoordsData_49714
|
|
|
|
call ArePlayerCoordsInArray
|
|
|
|
ret nc
|
|
|
|
ld a, $3
|
|
|
|
ld [$ff8c], a
|
|
|
|
call DisplayTextID
|
|
|
|
xor a
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [hJoyHeld], a
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wWhichTrade]
|
2014-05-18 18:19:10 +00:00
|
|
|
cp $1
|
2015-07-03 19:38:12 +00:00
|
|
|
jr z, .asm_4970e
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wWhichTrade]
|
2014-05-18 18:19:10 +00:00
|
|
|
dec a
|
2014-09-10 03:55:19 +00:00
|
|
|
ld [wSimulatedJoypadStatesIndex], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld b, $0
|
|
|
|
ld c, a
|
|
|
|
ld a, $40
|
2014-09-10 03:55:19 +00:00
|
|
|
ld hl, wSimulatedJoypadStatesEnd
|
2014-05-18 18:19:10 +00:00
|
|
|
call FillMemory
|
2014-09-10 03:55:19 +00:00
|
|
|
call StartSimulatingJoypadStates
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [W_ROUTE16GATECURSCRIPT], a
|
|
|
|
ret
|
|
|
|
.asm_4970e
|
|
|
|
ld a, $2
|
|
|
|
ld [W_ROUTE16GATECURSCRIPT], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
CoordsData_49714: ; 49714 (12:5714)
|
|
|
|
db $07,$04
|
|
|
|
db $08,$04
|
|
|
|
db $09,$04
|
|
|
|
db $0A,$04
|
|
|
|
db $FF
|
|
|
|
|
|
|
|
Route16GateScript1: ; 4971d (12:571d)
|
2014-09-10 03:55:19 +00:00
|
|
|
ld a, [wSimulatedJoypadStatesIndex]
|
2014-05-18 18:19:10 +00:00
|
|
|
and a
|
|
|
|
ret nz
|
|
|
|
ld a, $f0
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2014-05-18 18:19:10 +00:00
|
|
|
|
|
|
|
Route16GateScript2: ; 49727 (12:5727)
|
|
|
|
ld a, $1
|
|
|
|
ld [H_SPRITEHEIGHT], a
|
|
|
|
call DisplayTextID
|
|
|
|
ld a, $1
|
2014-09-10 03:55:19 +00:00
|
|
|
ld [wSimulatedJoypadStatesIndex], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $10
|
2014-09-10 03:55:19 +00:00
|
|
|
ld [wSimulatedJoypadStatesEnd], a
|
|
|
|
call StartSimulatingJoypadStates
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $3
|
|
|
|
ld [W_ROUTE16GATECURSCRIPT], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
Route16GateScript3: ; 49741 (12:5741)
|
2014-09-10 03:55:19 +00:00
|
|
|
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-26 21:04:56 +00:00
|
|
|
ld hl, wd730
|
2014-05-18 18:19:10 +00:00
|
|
|
res 7, [hl]
|
|
|
|
ld a, $0
|
|
|
|
ld [W_ROUTE16GATECURSCRIPT], a
|
|
|
|
ret
|
|
|
|
|
2014-05-31 14:35:46 +00:00
|
|
|
Route16GateScript_49755: ; 49755 (12:5755)
|
2014-05-18 18:19:10 +00:00
|
|
|
ld b, BICYCLE
|
|
|
|
jp IsItemInBag
|
|
|
|
|
|
|
|
Route16GateTextPointers: ; 4975a (12:575a)
|
|
|
|
dw Route16GateText1
|
|
|
|
dw Route16GateText2
|
|
|
|
dw Route16GateText3
|
|
|
|
|
|
|
|
Route16GateText1: ; 49760 (12:5760)
|
|
|
|
db $08 ; asm
|
2014-05-31 14:35:46 +00:00
|
|
|
call Route16GateScript_49755
|
2015-07-03 19:38:12 +00:00
|
|
|
jr z, .asm_0bdf3
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route16GateText_4977c
|
|
|
|
call PrintText
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .asm_56c9d
|
|
|
|
.asm_0bdf3
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route16GateText_49777
|
|
|
|
call PrintText
|
2015-07-03 19:38:12 +00:00
|
|
|
.asm_56c9d
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
|
|
|
Route16GateText_49777: ; 49777 (12:5777)
|
|
|
|
TX_FAR _Route16GateText_49777
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
Route16GateText_4977c: ; 4977c (12:577c)
|
|
|
|
TX_FAR _Route16GateText_4977c
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
Route16GateText3: ; 49781 (12:5781)
|
|
|
|
TX_FAR _Route16GateText_49781
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
Route16GateText2: ; 49786 (12:5786)
|
|
|
|
TX_FAR _Route16GateText2
|
|
|
|
db "@"
|