2016-06-12 00:24:04 +00:00
|
|
|
Route18GateScript:
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd732
|
2014-05-18 18:19:10 +00:00
|
|
|
res 5, [hl]
|
|
|
|
call EnableAutoTextBoxDrawing
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wRoute18GateCurScript]
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route18GateScriptPointers
|
|
|
|
jp CallFunctionInTable
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route18GateScriptPointers:
|
2014-05-18 18:19:10 +00:00
|
|
|
dw Route18GateScript0
|
|
|
|
dw Route18GateScript1
|
|
|
|
dw Route18GateScript2
|
|
|
|
dw Route18GateScript3
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route18GateScript0:
|
2014-05-31 14:35:46 +00:00
|
|
|
call Route16GateScript_49755
|
2014-05-18 18:19:10 +00:00
|
|
|
ret nz
|
|
|
|
ld hl, CoordsData_498cc
|
|
|
|
call ArePlayerCoordsInArray
|
|
|
|
ret nc
|
|
|
|
ld a, $2
|
2015-07-18 15:17:29 +00:00
|
|
|
ld [hSpriteIndexOrTextID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextID
|
|
|
|
xor a
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [hJoyHeld], a
|
2015-07-18 15:17:29 +00:00
|
|
|
ld a, [wCoordIndex]
|
2014-05-18 18:19:10 +00:00
|
|
|
cp $1
|
2015-07-03 19:38:12 +00:00
|
|
|
jr z, .asm_498c6
|
2015-07-18 15:17:29 +00:00
|
|
|
ld a, [wCoordIndex]
|
2014-05-18 18:19:10 +00:00
|
|
|
dec a
|
2014-09-10 03:55:19 +00:00
|
|
|
ld [wSimulatedJoypadStatesIndex], a
|
2015-07-18 15:17:29 +00:00
|
|
|
ld b, 0
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, a
|
2015-07-17 07:52:25 +00:00
|
|
|
ld a, D_UP
|
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
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wRoute18GateCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
.asm_498c6
|
|
|
|
ld a, $2
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wRoute18GateCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CoordsData_498cc:
|
2014-05-18 18:19:10 +00:00
|
|
|
db $03,$04
|
|
|
|
db $04,$04
|
|
|
|
db $05,$04
|
|
|
|
db $06,$04
|
|
|
|
db $FF
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route18GateScript1:
|
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
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route18GateScript2:
|
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
|
|
|
call DisplayTextID
|
|
|
|
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_RIGHT
|
2014-09-10 03:55:19 +00:00
|
|
|
ld [wSimulatedJoypadStatesEnd], a
|
|
|
|
call StartSimulatingJoypadStates
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $3
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wRoute18GateCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route18GateScript3:
|
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
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wRoute18GateCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route18GateTextPointers:
|
2014-05-18 18:19:10 +00:00
|
|
|
dw Route18GateText1
|
|
|
|
dw Route18GateText2
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route18GateText1:
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-31 14:35:46 +00:00
|
|
|
call Route16GateScript_49755
|
2015-07-03 19:38:12 +00:00
|
|
|
jr z, .asm_3c84d
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route18GateText_4992d
|
|
|
|
call PrintText
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .asm_a8410
|
|
|
|
.asm_3c84d
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, Route18GateText_49928
|
|
|
|
call PrintText
|
2015-07-03 19:38:12 +00:00
|
|
|
.asm_a8410
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route18GateText_49928:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route18GateText_49928
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route18GateText_4992d:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route18GateText_4992d
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
Route18GateText2:
|
2014-05-18 18:19:10 +00:00
|
|
|
TX_FAR _Route18GateText_49932
|
|
|
|
db "@"
|