2019-01-01 20:06:23 +00:00
|
|
|
CinnabarIsland_Script:
|
2014-05-18 18:19:10 +00:00
|
|
|
call EnableAutoTextBoxDrawing
|
2016-01-03 19:17:10 +00:00
|
|
|
ld hl, wCurrentMapScriptFlags
|
2014-05-18 18:19:10 +00:00
|
|
|
set 5, [hl]
|
2015-07-21 17:36:03 +00:00
|
|
|
ResetEvent EVENT_MANSION_SWITCH_ON
|
|
|
|
ResetEvent EVENT_LAB_STILL_REVIVING_FOSSIL
|
2019-01-01 20:06:23 +00:00
|
|
|
ld hl, CinnabarIsland_ScriptPointers
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wCinnabarIslandCurScript]
|
2014-05-18 18:19:10 +00:00
|
|
|
jp CallFunctionInTable
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
CinnabarIsland_ScriptPointers:
|
2023-07-14 01:27:56 +00:00
|
|
|
def_script_pointers
|
|
|
|
dw_const CinnabarIslandDefaultScript, SCRIPT_CINNABARISLAND_DEFAULT
|
|
|
|
dw_const CinnabarIslandPlayerMovingScript, SCRIPT_CINNABARISLAND_PLAYER_MOVING
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CinnabarIslandDefaultScript:
|
2014-05-18 18:19:10 +00:00
|
|
|
ld b, SECRET_KEY
|
|
|
|
call IsItemInBag
|
|
|
|
ret nz
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wYCoord]
|
2020-08-28 16:10:55 +00:00
|
|
|
cp 4
|
2014-05-18 18:19:10 +00:00
|
|
|
ret nz
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wXCoord]
|
2020-08-28 16:10:55 +00:00
|
|
|
cp 18
|
2014-05-18 18:19:10 +00:00
|
|
|
ret nz
|
2015-07-20 00:52:26 +00:00
|
|
|
ld a, PLAYER_DIR_UP
|
|
|
|
ld [wPlayerMovingDirection], a
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, TEXT_CINNABARISLAND_DOOR_IS_LOCKED
|
2024-09-19 01:01:18 +00:00
|
|
|
ldh [hTextID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextID
|
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [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
|
2020-07-05 21:29:11 +00:00
|
|
|
ld [wSpritePlayerStateData1FacingDirection], a
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, SCRIPT_CINNABARISLAND_PLAYER_MOVING
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wCinnabarIslandCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CinnabarIslandPlayerMovingScript:
|
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
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, SCRIPT_CINNABARISLAND_DEFAULT
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wCinnabarIslandCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
CinnabarIsland_TextPointers:
|
2023-07-14 01:27:56 +00:00
|
|
|
def_text_pointers
|
|
|
|
dw_const CinnabarIslandGirlText, TEXT_CINNABARISLAND_GIRL
|
|
|
|
dw_const CinnabarIslandGamblerText, TEXT_CINNABARISLAND_GAMBLER
|
|
|
|
dw_const CinnabarIslandSignText, TEXT_CINNABARISLAND_SIGN
|
|
|
|
dw_const MartSignText, TEXT_CINNABARISLAND_MART_SIGN
|
|
|
|
dw_const PokeCenterSignText, TEXT_CINNABARISLAND_POKECENTER_SIGN
|
|
|
|
dw_const CinnabarIslandPokemonLabSignText, TEXT_CINNABARISLAND_POKEMONLAB_SIGN
|
|
|
|
dw_const CinnabarIslandGymSignText, TEXT_CINNABARISLAND_GYM_SIGN
|
|
|
|
dw_const CinnabarIslandDoorIsLockedText, TEXT_CINNABARISLAND_DOOR_IS_LOCKED
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CinnabarIslandDoorIsLockedText:
|
|
|
|
text_far _CinnabarIslandDoorIsLockedText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CinnabarIslandGirlText:
|
|
|
|
text_far _CinnabarIslandGirlText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CinnabarIslandGamblerText:
|
|
|
|
text_far _CinnabarIslandGamblerText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CinnabarIslandSignText:
|
|
|
|
text_far _CinnabarIslandSignText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CinnabarIslandPokemonLabSignText:
|
|
|
|
text_far _CinnabarIslandPokemonLabSignText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CinnabarIslandGymSignText:
|
|
|
|
text_far _CinnabarIslandGymSignText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|