pokered/scripts/Route7Gate.asm

74 lines
1.2 KiB
NASM
Raw Normal View History

Route7Gate_Script:
2014-05-18 18:19:10 +00:00
call EnableAutoTextBoxDrawing
2015-08-31 02:38:41 +00:00
ld a, [wRoute7GateCurScript]
ld hl, Route7Gate_ScriptPointers
2014-05-18 18:19:10 +00:00
call CallFunctionInTable
ret
Route7Gate_ScriptPointers:
2014-05-18 18:19:10 +00:00
dw Route7GateScript0
dw Route7GateScript1
2016-06-12 00:24:04 +00:00
Route7GateScript_1e111:
ld hl, wd730
2014-05-18 18:19:10 +00:00
set 7, [hl]
ld a, $20
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
2016-06-12 00:24:04 +00:00
Route7GateScript0:
ld a, [wd728]
2014-05-18 18:19:10 +00:00
bit 6, a
ret nz
ld hl, CoordsData_1e167
call ArePlayerCoordsInArray
ret nc
2015-07-20 00:52:26 +00:00
ld a, PLAYER_DIR_UP
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_1e15a
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 Route7GateScript_1e111
ld a, $1
2015-08-31 02:38:41 +00:00
ld [wRoute7GateCurScript], a
2014-05-18 18:19:10 +00:00
ret
.asm_1e15a
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_1e167:
2014-05-18 18:19:10 +00:00
db 3,3
db 4,3
db $ff
2016-06-12 00:24:04 +00:00
Route7GateScript1:
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 [wRoute7GateCurScript], a
ld [wCurMapScript], a
2014-05-18 18:19:10 +00:00
ret
Route7Gate_TextPointers:
2014-05-18 18:19:10 +00:00
dw Route7GateText1
dw Route7GateText2
dw Route7GateText3