2014-05-18 18:19:10 +00:00
|
|
|
CinnabarIslandScript: ; 1ca19 (7:4a19)
|
|
|
|
call EnableAutoTextBoxDrawing
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd126
|
2014-05-18 18:19:10 +00:00
|
|
|
set 5, [hl]
|
2015-07-21 01:32:02 +00:00
|
|
|
ResetEvent EVENT_278
|
|
|
|
ResetEvent EVENT_2E1
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CinnabarIslandScriptPointers
|
|
|
|
ld a, [W_CINNABARISLANDCURSCRIPT]
|
|
|
|
jp CallFunctionInTable
|
|
|
|
|
|
|
|
CinnabarIslandScriptPointers: ; 1ca34 (7:4a34)
|
|
|
|
dw CinnabarIslandScript0
|
|
|
|
dw CinnabarIslandScript1
|
|
|
|
|
|
|
|
CinnabarIslandScript0: ; 1ca38 (7:4a38)
|
|
|
|
ld b, SECRET_KEY
|
|
|
|
call IsItemInBag
|
|
|
|
ret nz
|
|
|
|
ld a, [W_YCOORD]
|
|
|
|
cp $4
|
|
|
|
ret nz
|
|
|
|
ld a, [W_XCOORD]
|
|
|
|
cp $12
|
|
|
|
ret nz
|
2015-07-20 00:52:26 +00:00
|
|
|
ld a, PLAYER_DIR_UP
|
|
|
|
ld [wPlayerMovingDirection], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $8
|
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
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $1
|
2014-09-10 03:55:19 +00:00
|
|
|
ld [wSimulatedJoypadStatesIndex], a
|
|
|
|
ld a, D_DOWN
|
|
|
|
ld [wSimulatedJoypadStatesEnd], a
|
|
|
|
call StartSimulatingJoypadStates
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2014-05-26 21:04:56 +00:00
|
|
|
ld [wSpriteStateData1 + 9], a
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $1
|
|
|
|
ld [W_CINNABARISLANDCURSCRIPT], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
CinnabarIslandScript1: ; 1ca73 (7:4a73)
|
2014-09-10 03:55:19 +00:00
|
|
|
ld a, [wSimulatedJoypadStatesIndex]
|
2014-05-18 18:19:10 +00:00
|
|
|
and a
|
|
|
|
ret nz
|
|
|
|
call Delay3
|
|
|
|
ld a, $0
|
|
|
|
ld [W_CINNABARISLANDCURSCRIPT], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
CinnabarIslandTextPointers: ; 1ca81 (7:4a81)
|
|
|
|
dw CinnabarIslandText1
|
|
|
|
dw CinnabarIslandText2
|
|
|
|
dw CinnabarIslandText3
|
|
|
|
dw MartSignText
|
|
|
|
dw PokeCenterSignText
|
|
|
|
dw CinnabarIslandText6
|
|
|
|
dw CinnabarIslandText7
|
|
|
|
dw CinnabarIslandText8
|
|
|
|
|
|
|
|
CinnabarIslandText8: ; 1ca91 (7:4a91)
|
|
|
|
TX_FAR _CinnabarIslandText8
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
CinnabarIslandText1: ; 1ca96 (7:4a96)
|
|
|
|
TX_FAR _CinnabarIslandText1
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
CinnabarIslandText2: ; 1ca9b (7:4a9b)
|
|
|
|
TX_FAR _CinnabarIslandText2
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
CinnabarIslandText3: ; 1caa0 (7:4aa0)
|
|
|
|
TX_FAR _CinnabarIslandText3
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
CinnabarIslandText6: ; 1caa5 (7:4aa5)
|
|
|
|
TX_FAR _CinnabarIslandText6
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
CinnabarIslandText7: ; 1caaa (7:4aaa)
|
|
|
|
TX_FAR _CinnabarIslandText7
|
|
|
|
db "@"
|