pokered/scripts/Route6Gate.asm

72 lines
1.2 KiB
NASM
Raw Normal View History

Route6Gate_Script:
2014-05-18 18:19:10 +00:00
call EnableAutoTextBoxDrawing
ld hl, Route6Gate_ScriptPointers
2015-08-31 02:38:41 +00:00
ld a, [wRoute6GateCurScript]
2014-05-18 18:19:10 +00:00
call CallFunctionInTable
ret
Route6Gate_ScriptPointers:
2014-05-18 18:19:10 +00:00
dw Route6GateScript0
dw Route6GateScript1
2016-06-12 00:24:04 +00:00
Route6GateScript0:
ld a, [wd728]
2014-05-18 18:19:10 +00:00
bit 6, a
ret nz
ld hl, CoordsData_1e08c
call ArePlayerCoordsInArray
ret nc
2015-07-20 00:52:26 +00:00
ld a, PLAYER_DIR_RIGHT
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_1e080
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 Route6GateScript_1e0a1
ld a, $1
2015-08-31 02:38:41 +00:00
ld [wRoute6GateCurScript], a
2014-05-18 18:19:10 +00:00
ret
.asm_1e080
ld hl, wd728
2014-05-18 18:19:10 +00:00
set 6, [hl]
ld a, $3
ldh [hSpriteIndexOrTextID], a
2014-05-18 18:19:10 +00:00
jp DisplayTextID
2016-06-12 00:24:04 +00:00
CoordsData_1e08c:
dbmapcoord 3, 2
dbmapcoord 4, 2
db -1 ; end
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
Route6GateScript1:
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 [wRoute6GateCurScript], a
2014-05-18 18:19:10 +00:00
ret
2016-06-12 00:24:04 +00:00
Route6GateScript_1e0a1:
ld hl, wd730
2014-05-18 18:19:10 +00:00
set 7, [hl]
ld a, $80
ld [wSimulatedJoypadStatesEnd], a
2014-05-18 18:19:10 +00:00
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
2014-05-18 18:19:10 +00:00
xor a
ld [wSpritePlayerStateData2MovementByte1], a
ld [wOverrideSimulatedJoypadStatesMask], a
2014-05-18 18:19:10 +00:00
ret
Route6Gate_TextPointers:
2014-05-18 18:19:10 +00:00
dw Route6GateText1
dw Route6GateText2
dw Route6GateText3