pokered/scripts/Route5Gate.asm

118 lines
2 KiB
NASM
Raw Normal View History

Route5Gate_Script:
2014-05-18 18:19:10 +00:00
call EnableAutoTextBoxDrawing
2015-08-31 02:38:41 +00:00
ld a, [wRoute5GateCurScript]
ld hl, Route5Gate_ScriptPointers
2014-05-18 18:19:10 +00:00
jp CallFunctionInTable
Route5Gate_ScriptPointers:
2014-05-18 18:19:10 +00:00
dw Route5GateScript0
dw Route5GateScript1
2016-06-12 00:24:04 +00:00
Route5GateScript_1df43:
ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
2014-05-18 18:19:10 +00:00
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
jp StartSimulatingJoypadStates
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
Route5GateScript0:
ld a, [wd728]
2014-05-18 18:19:10 +00:00
bit 6, a
ret nz
ld hl, CoordsData_1df8f
call ArePlayerCoordsInArray
ret nc
2015-07-20 00:52:26 +00:00
ld a, PLAYER_DIR_LEFT
ld [wPlayerMovingDirection], a
2014-05-18 18:19:10 +00:00
xor a
ldh [hJoyHeld], a
farcall RemoveGuardDrink
ldh a, [hItemToRemoveID]
2014-05-18 18:19:10 +00:00
and a
jr nz, .asm_1df82
2014-05-18 18:19:10 +00:00
ld a, $2
ldh [hSpriteIndexOrTextID], a
2014-05-18 18:19:10 +00:00
call DisplayTextID
call Route5GateScript_1df43
ld a, $1
2015-08-31 02:38:41 +00:00
ld [wRoute5GateCurScript], a
2014-05-18 18:19:10 +00:00
ret
.asm_1df82
ld a, $3
ldh [hSpriteIndexOrTextID], a
2014-05-18 18:19:10 +00:00
call DisplayTextID
ld hl, wd728
2014-05-18 18:19:10 +00:00
set 6, [hl]
ret
2016-06-12 00:24:04 +00:00
CoordsData_1df8f:
dbmapcoord 3, 3
dbmapcoord 4, 3
db -1 ; end
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
Route5GateScript1:
ld a, [wSimulatedJoypadStatesIndex]
2014-05-18 18:19:10 +00:00
and a
ret nz
call Delay3
xor a
2014-05-25 17:51:53 +00:00
ld [wJoyIgnore], a
2015-08-31 02:38:41 +00:00
ld [wRoute5GateCurScript], a
2014-05-18 18:19:10 +00:00
ret
2014-06-09 20:58:02 +00:00
Route5Gate_TextPointers:
2014-05-18 18:19:10 +00:00
dw Route5GateText1
dw Route5GateText2
dw Route5GateText3
2016-06-12 00:24:04 +00:00
Route8GateText1:
Route7GateText1:
Route6GateText1:
Route5GateText1:
text_asm
ld a, [wd728]
2014-05-18 18:19:10 +00:00
bit 6, a
jr nz, .asm_88856
farcall RemoveGuardDrink
ldh a, [hItemToRemoveID]
2014-05-18 18:19:10 +00:00
and a
jr nz, .asm_768a2
2014-05-18 18:19:10 +00:00
ld hl, Route5GateText2
call PrintText
call Route5GateScript_1df43
ld a, $1
2015-08-31 02:38:41 +00:00
ld [wRoute5GateCurScript], a
2014-05-18 18:19:10 +00:00
jp TextScriptEnd
.asm_768a2
2014-05-18 18:19:10 +00:00
ld hl, Route5GateText3
call PrintText
ld hl, wd728
2014-05-18 18:19:10 +00:00
set 6, [hl]
jp TextScriptEnd
.asm_88856
2014-05-18 18:19:10 +00:00
ld hl, SaffronGateText_1dff6
call PrintText
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
Route8GateText2:
Route7GateText2:
Route6GateText2:
Route5GateText2:
text_far _SaffronGateText_1dfe7
text_end
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
Route8GateText3:
Route7GateText3:
Route6GateText3:
Route5GateText3:
text_far _SaffronGateText_8aaa9
sound_get_key_item
text_far _SaffronGateText_1dff1
text_end
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
SaffronGateText_1dff6:
text_far _SaffronGateText_1dff6
text_end
2014-05-18 18:19:10 +00:00