2019-01-01 20:06:23 +00:00
|
|
|
Route22Gate_Script:
|
2014-05-18 18:19:10 +00:00
|
|
|
call EnableAutoTextBoxDrawing
|
2019-01-01 20:06:23 +00:00
|
|
|
ld hl, Route22Gate_ScriptPointers
|
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
|
2014-05-19 14:38:20 +00:00
|
|
|
ld a, ROUTE_23
|
2015-07-03 19:38:12 +00:00
|
|
|
jr c, .asm_1e69a
|
2014-05-19 14:38:20 +00:00
|
|
|
ld a, ROUTE_22
|
2014-05-18 18:19:10 +00:00
|
|
|
.asm_1e69a
|
2014-05-19 14:38:20 +00:00
|
|
|
ld [wLastMap], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
Route22Gate_ScriptPointers:
|
2014-05-18 18:19:10 +00:00
|
|
|
dw Route22GateScript0
|
|
|
|
dw Route22GateScript1
|
|
|
|
dw Route22GateScript2
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route22GateScript0:
|
2014-05-18 18:19:10 +00:00
|
|
|
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
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route22GateScriptCoords:
|
2014-05-18 18:19:10 +00:00
|
|
|
db 2,4
|
|
|
|
db 2,5
|
|
|
|
db $ff
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route22GateScript_1e6ba:
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $1
|
2014-09-10 03:55:19 +00:00
|
|
|
ld [wSimulatedJoypadStatesIndex], a
|
2015-07-17 07:52:25 +00:00
|
|
|
ld a, D_DOWN
|
2014-09-10 03:55:19 +00:00
|
|
|
ld [wSimulatedJoypadStatesEnd], a
|
2020-07-05 21:29:11 +00:00
|
|
|
ld [wSpritePlayerStateData1FacingDirection], a
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2014-09-10 03:55:19 +00:00
|
|
|
jp StartSimulatingJoypadStates
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route22GateScript1:
|
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-18 18:19:10 +00:00
|
|
|
call Delay3
|
|
|
|
ld a, $0
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wRoute22GateCurScript], a
|
2016-06-12 00:24:04 +00:00
|
|
|
Route22GateScript2:
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
Route22Gate_TextPointers:
|
2014-05-18 18:19:10 +00:00
|
|
|
dw Route22GateText1
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route22GateText1:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wObtainedBadges]
|
2014-05-18 18:19:10 +00:00
|
|
|
bit 0, a
|
2015-07-03 19:38:12 +00:00
|
|
|
jr nz, .asm_1e6f6
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route22GateText_1e704
|
|
|
|
call PrintText
|
|
|
|
call Route22GateScript_1e6ba
|
|
|
|
ld a, $1
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .asm_1e6fe
|
|
|
|
.asm_1e6f6
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route22GateText_1e71a
|
|
|
|
call PrintText
|
|
|
|
ld a, $2
|
2015-07-03 19:38:12 +00:00
|
|
|
.asm_1e6fe
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wRoute22GateCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route22GateText_1e704:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _Route22GateText_1e704
|
|
|
|
text_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
|
2015-07-03 19:38:12 +00:00
|
|
|
ld hl, Route22GateText_1e715
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route22GateText_1e715:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _Route22GateText_1e715
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route22GateText_1e71a:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_far _Route22GateText_1e71a
|
|
|
|
sound_get_item_1
|
|
|
|
text_end
|