[Community PR] Integrate merrp's followers branch (#4022)
@@ -1393,7 +1393,7 @@
|
||||
@ The specified id can be used to refer to the sprite again later with turnvobject.
|
||||
.macro createvobject graphicsId:req, id:req, x:req, y:req, elevation=3, direction=DIR_SOUTH
|
||||
.byte 0xaa
|
||||
.byte \graphicsId
|
||||
.2byte \graphicsId
|
||||
.byte \id
|
||||
.2byte \x
|
||||
.2byte \y
|
||||
@@ -1813,7 +1813,6 @@
|
||||
_dynmultichoice \left, \top, \ignoreBPress, \maxBeforeScroll, \shouldSort, \initialSelected, \callbacks, NULL
|
||||
.endm
|
||||
|
||||
|
||||
@ Supplementary
|
||||
|
||||
.macro goto_if_unset flag:req, dest:req
|
||||
@@ -2185,3 +2184,42 @@
|
||||
.byte \type
|
||||
.2byte \slot
|
||||
.endm
|
||||
|
||||
@ Saves species and forms of Daycare Pokémon to specific vars. Saves the amount of Daycare mon to VAR_RESULT.
|
||||
.macro getdaycaregfx varSpecies1:req varSpecies2:req varForm1:req varForm2:req
|
||||
callnative GetDaycareGraphics
|
||||
.2byte \varSpecies1
|
||||
.2byte \varSpecies2
|
||||
.2byte \varForm1
|
||||
.2byte \varForm2
|
||||
.endm
|
||||
|
||||
@ Plays the cry of the first alive party member.
|
||||
.macro playfirstmoncry
|
||||
callnative PlayFirstMonCry
|
||||
.endm
|
||||
|
||||
@ Buffers the nickname of the first alive party member.
|
||||
.macro bufferlivemonnickname out:req
|
||||
callnative BufferFirstLiveMonNickname
|
||||
.byte \out
|
||||
.endm
|
||||
|
||||
@ Executes Follower actions
|
||||
.macro getfolloweraction
|
||||
callnative GetFollowerAction
|
||||
.endm
|
||||
|
||||
@ Checks if Field move is being used by the current follower.
|
||||
.macro isfollowerfieldmoveuser var:req
|
||||
callnative IsFollowerFieldMoveUser
|
||||
.2byte \var
|
||||
.endm
|
||||
|
||||
@ Saves the direction from where source object event would need to turn to to face the target into the specified var.
|
||||
.macro getdirectiontoface var:req, sourceId:req, targetId:req
|
||||
callnative GetDirectionToFaceScript
|
||||
.2byte \var
|
||||
.byte \sourceId
|
||||
.byte \targetId
|
||||
.endm
|
||||
|
||||
@@ -22,9 +22,8 @@
|
||||
@ Defines an object event template for map data, to be used by a normal object. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h
|
||||
.macro object_event index:req, gfx:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req
|
||||
.byte \index
|
||||
.byte \gfx
|
||||
.2byte \gfx
|
||||
.byte OBJ_KIND_NORMAL
|
||||
.space 1 @ Padding
|
||||
.2byte \x, \y
|
||||
.byte \elevation
|
||||
.byte \movement_type
|
||||
|
||||
@@ -165,4 +165,6 @@
|
||||
create_movement_action emote_double_exclamation_mark, MOVEMENT_ACTION_EMOTE_DOUBLE_EXCL_MARK
|
||||
create_movement_action emote_x, MOVEMENT_ACTION_EMOTE_X
|
||||
|
||||
create_movement_action exit_pokeball, MOVEMENT_ACTION_EXIT_POKEBALL
|
||||
create_movement_action enter_pokeball, MOVEMENT_ACTION_ENTER_POKEBALL
|
||||
create_movement_action step_end, MOVEMENT_ACTION_STEP_END
|
||||
|
||||
@@ -725,6 +725,7 @@ Common_EventScript_OutOfCenterPartyHeal::
|
||||
playfanfare MUS_HEAL
|
||||
waitfanfare
|
||||
special HealPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
fadescreen FADE_FROM_BLACK
|
||||
return
|
||||
|
||||
@@ -1069,6 +1070,7 @@ EventScript_VsSeekerChargingDone::
|
||||
.include "data/scripts/move_tutors.inc"
|
||||
.include "data/scripts/trainer_hill.inc"
|
||||
.include "data/scripts/test_signpost.inc"
|
||||
.include "data/scripts/follower.inc"
|
||||
.include "data/text/frontier_brain.inc"
|
||||
.include "data/text/save.inc"
|
||||
.include "data/text/birch_speech.inc"
|
||||
|
||||
@@ -76,6 +76,9 @@ gFieldEffectScriptPointers::
|
||||
.4byte gFldEffScript_UseVsSeeker @ FLDEFF_USE_VS_SEEKER
|
||||
.4byte gFldEffScript_XIcon @ FLDEFF_X_ICON
|
||||
.4byte gFldEffScript_DoubleExclMarkIcon @ FLDEFF_DOUBLE_EXCL_MARK_ICON
|
||||
.4byte gFieldEffectScript_TracksSlither @ FLDEFF_TRACKS_SLITHER
|
||||
.4byte gFieldEffectScript_TracksBug @ FLDEFF_TRACKS_BUG
|
||||
.4byte gFieldEffectScript_TracksSpot @ FLDEFF_TRACKS_SPOT
|
||||
|
||||
gFieldEffectScript_ExclamationMarkIcon1::
|
||||
field_eff_callnative FldEff_ExclamationMarkIcon
|
||||
@@ -359,3 +362,15 @@ gFldEffScript_XIcon::
|
||||
gFldEffScript_DoubleExclMarkIcon::
|
||||
field_eff_callnative FldEff_DoubleExclMarkIcon
|
||||
field_eff_end
|
||||
|
||||
gFieldEffectScript_TracksBug::
|
||||
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_TracksBug
|
||||
field_eff_end
|
||||
|
||||
gFieldEffectScript_TracksSpot::
|
||||
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_TracksSpot
|
||||
field_eff_end
|
||||
|
||||
gFieldEffectScript_TracksSlither::
|
||||
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_TracksSlither
|
||||
field_eff_end
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
#include "constants/trainer_hill.h"
|
||||
#include "constants/trainer_types.h"
|
||||
#include "constants/berry.h"
|
||||
#include "constants/species.h"
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
.include "data/maps/events.inc"
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ BattleFrontier_BattleArenaLobby_EventScript_SaveAfterChallenge::
|
||||
frontier_checkairshow
|
||||
special LoadPlayerParty
|
||||
special HealPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
arena_save 0
|
||||
playse SE_SAVE
|
||||
waitse
|
||||
@@ -133,6 +134,7 @@ BattleFrontier_BattleArenaLobby_EventScript_TryEnterChallenge::
|
||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||
msgbox BattleFrontier_BattleArenaLobby_Text_SelectThreeMons, MSGBOX_DEFAULT
|
||||
fadescreen FADE_TO_BLACK
|
||||
callnative RemoveFollowingPokemon
|
||||
call BattleFrontier_EventScript_GetLvlMode
|
||||
copyvar VAR_0x8004, VAR_RESULT
|
||||
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
||||
@@ -194,6 +196,7 @@ BattleFrontier_BattleArenaLobby_EventScript_CancelChallengeSaveFailed::
|
||||
|
||||
BattleFrontier_BattleArenaLobby_EventScript_LoadPartyAndCancelChallenge::
|
||||
special LoadPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
BattleFrontier_BattleArenaLobby_EventScript_CancelChallenge::
|
||||
msgbox BattleFrontier_BattleArenaLobby_Text_AwaitAnotherChallenge, MSGBOX_DEFAULT
|
||||
BattleFrontier_BattleArenaLobby_EventScript_EndCancelChallenge::
|
||||
|
||||
@@ -17,6 +17,7 @@ BattleFrontier_BattleDomeBattleRoom_MapScripts::
|
||||
.byte 0
|
||||
|
||||
BattleFrontier_BattleDomeBattleRoom_OnTransition:
|
||||
setflag FLAG_TEMP_HIDE_FOLLOWER
|
||||
dome_setopponentgfx
|
||||
frontier_get FRONTIER_DATA_BATTLE_NUM
|
||||
copyvar VAR_TEMP_F, VAR_RESULT
|
||||
|
||||
@@ -68,6 +68,7 @@ BattleFrontier_BattleDomeLobby_EventScript_GiveBattlePoints::
|
||||
dome_set DOME_DATA_WIN_STREAK_ACTIVE, TRUE
|
||||
special LoadPlayerParty
|
||||
special HealPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
goto BattleFrontier_BattleDomeLobby_EventScript_AskRecordBattle
|
||||
|
||||
BattleFrontier_BattleDomeLobby_EventScript_LostChallenge::
|
||||
@@ -82,6 +83,7 @@ BattleFrontier_BattleDomeLobby_EventScript_LostChallenge::
|
||||
dome_set DOME_DATA_ATTEMPTED_CHALLENGE, TRUE
|
||||
special LoadPlayerParty
|
||||
special HealPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
BattleFrontier_BattleDomeLobby_EventScript_AskRecordBattle::
|
||||
dome_save 0
|
||||
playse SE_SAVE
|
||||
@@ -160,6 +162,7 @@ BattleFrontier_BattleDomeLobby_EventScript_TryEnterChallenge::
|
||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||
msgbox BattleFrontier_BattleDomeLobby_Text_SelectThreeMons, MSGBOX_DEFAULT
|
||||
fadescreen FADE_TO_BLACK
|
||||
callnative RemoveFollowingPokemon
|
||||
call BattleFrontier_EventScript_GetLvlMode
|
||||
copyvar VAR_0x8004, VAR_RESULT
|
||||
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
||||
@@ -222,6 +225,7 @@ BattleFrontier_BattleDomeLobby_EventScript_CancelChallengeSaveFailed::
|
||||
|
||||
BattleFrontier_BattleDomeLobby_EventScript_LoadPartyCancelChallenge::
|
||||
special LoadPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
BattleFrontier_BattleDomeLobby_EventScript_CancelChallenge::
|
||||
msgbox BattleFrontier_BattleDomeLobby_Text_HopeToSeeYouAgain, MSGBOX_DEFAULT
|
||||
BattleFrontier_BattleDomeLobby_EventScript_EndCancelChallenge::
|
||||
|
||||
@@ -59,6 +59,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_GiveBattlePoints::
|
||||
waitmessage
|
||||
frontier_checkairshow
|
||||
special LoadPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
factory_save 0
|
||||
playse SE_SAVE
|
||||
waitse
|
||||
@@ -71,6 +72,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_LostChallenge::
|
||||
waitmessage
|
||||
frontier_checkairshow
|
||||
special LoadPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
factory_set FACTORY_DATA_WIN_STREAK_ACTIVE, FALSE
|
||||
factory_save 0
|
||||
playse SE_SAVE
|
||||
@@ -196,6 +198,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_CancelChallengeSaveFailed::
|
||||
|
||||
BattleFrontier_BattleFactoryLobby_EventScript_LoadPartyAndCancelChallenge::
|
||||
special LoadPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
BattleFrontier_BattleFactoryLobby_EventScript_CancelChallenge::
|
||||
msgbox BattleFrontier_BattleFactoryLobby_Text_LookForwardToNextVisit, MSGBOX_DEFAULT
|
||||
release
|
||||
|
||||
@@ -76,6 +76,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_SaveAfterChallenge::
|
||||
frontier_checkairshow
|
||||
special LoadPlayerParty
|
||||
special HealPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
palace_save 0
|
||||
playse SE_SAVE
|
||||
waitse
|
||||
@@ -151,6 +152,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_TryEnterChallenge::
|
||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||
msgbox BattleFrontier_BattlePalaceLobby_Text_NowSelectThreeMons, MSGBOX_DEFAULT
|
||||
fadescreen FADE_TO_BLACK
|
||||
callnative RemoveFollowingPokemon
|
||||
call BattleFrontier_EventScript_GetLvlMode
|
||||
copyvar VAR_0x8004, VAR_RESULT
|
||||
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
||||
@@ -215,6 +217,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_CancelChallengeSaveFailed::
|
||||
|
||||
BattleFrontier_BattlePalaceLobby_EventScript_LoadPartyAndCancelChallenge::
|
||||
special LoadPlayerParty
|
||||
callnative LoadPlayerParty
|
||||
BattleFrontier_BattlePalaceLobby_EventScript_CancelChallenge::
|
||||
msgbox BattleFrontier_BattlePalaceLobby_Text_ReturnWhenFortified, MSGBOX_DEFAULT
|
||||
BattleFrontier_BattlePalaceLobby_EventScript_EndCancelChallenge::
|
||||
|
||||
@@ -59,6 +59,7 @@ BattleFrontier_BattlePikeLobby_EventScript_GiveBattlePoints::
|
||||
pike_set PIKE_DATA_TOTAL_STREAKS, VAR_RESULT
|
||||
special LoadPlayerParty
|
||||
special HealPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
pike_resethelditems
|
||||
message BattleFrontier_BattlePikeLobby_Text_ShallRecordResults
|
||||
waitmessage
|
||||
@@ -80,6 +81,7 @@ BattleFrontier_BattlePikeLobby_EventScript_LostChallenge::
|
||||
pike_set PIKE_DATA_WIN_STREAK_ACTIVE, FALSE
|
||||
special LoadPlayerParty
|
||||
special HealPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
pike_resethelditems
|
||||
pike_save 0
|
||||
playse SE_SAVE
|
||||
@@ -119,6 +121,7 @@ BattleFrontier_BattlePikeLobby_EventScript_TryEnterChallenge::
|
||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||
msgbox BattleFrontier_BattlePikeLobby_Text_PleaseChooseThreeMons, MSGBOX_DEFAULT
|
||||
fadescreen FADE_TO_BLACK
|
||||
callnative RemoveFollowingPokemon
|
||||
call BattleFrontier_EventScript_GetLvlMode
|
||||
copyvar VAR_0x8004, VAR_RESULT
|
||||
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
||||
@@ -183,6 +186,7 @@ BattleFrontier_BattlePikeLobby_EventScript_CancelChallengeSaveFailed::
|
||||
|
||||
BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge::
|
||||
special LoadPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
BattleFrontier_BattlePikeLobby_EventScript_CancelChallenge::
|
||||
msgbox BattleFrontier_BattlePikeLobby_Text_LookForwardToSeeingYou, MSGBOX_DEFAULT
|
||||
BattleFrontier_BattlePikeLobby_EventScript_EndCancelChallenge::
|
||||
|
||||
@@ -59,6 +59,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_GiveBattlePoints::
|
||||
special LoadPlayerParty
|
||||
pyramid_clearhelditems
|
||||
special HealPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
message BattleFrontier_BattlePyramidLobby_Text_UsedBattleBagWillBeKept
|
||||
waitmessage
|
||||
playse SE_EXP_MAX
|
||||
@@ -83,6 +84,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_LostChallenge::
|
||||
special LoadPlayerParty
|
||||
pyramid_clearhelditems
|
||||
special HealPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
lockall
|
||||
message BattleFrontier_BattlePyramidLobby_Text_DisappointingHereIsBag
|
||||
waitmessage
|
||||
@@ -132,6 +134,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_TryEnterChallenge::
|
||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||
msgbox BattleFrontier_BattlePyramidLobby_Text_SelectThreeMons, MSGBOX_DEFAULT
|
||||
fadescreen FADE_TO_BLACK
|
||||
callnative RemoveFollowingPokemon
|
||||
call BattleFrontier_EventScript_GetLvlMode
|
||||
copyvar VAR_0x8004, VAR_RESULT
|
||||
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
||||
@@ -196,6 +199,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_CancelChallengeSaveFailed::
|
||||
|
||||
BattleFrontier_BattlePyramidLobby_EventScript_LoadPartyAndCancelChallenge::
|
||||
special LoadPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
BattleFrontier_BattlePyramidLobby_EventScript_CancelChallenge::
|
||||
msgbox BattleFrontier_BattlePyramidLobby_Text_AwaitFutureChallenge, MSGBOX_DEFAULT
|
||||
BattleFrontier_BattlePyramidLobby_EventScript_EndCancelChallenge::
|
||||
|
||||
@@ -95,6 +95,7 @@ BattleFrontier_BattleTowerLobby_EventScript_LookForwardToChallenge::
|
||||
msgbox BattleFrontier_BattleTowerLobby_Text_LookForwardToAnotherChallenge, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
setvar VAR_TEMP_CHALLENGE_STATUS, 255
|
||||
callnative UpdateFollowingPokemon
|
||||
release
|
||||
end
|
||||
|
||||
@@ -114,6 +115,7 @@ BattleFrontier_BattleTowerLobby_EventScript_LostThanksForPlaying::
|
||||
msgbox BattleFrontier_BattleTowerLobby_Text_LookForwardToAnotherChallenge, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
setvar VAR_TEMP_CHALLENGE_STATUS, 255
|
||||
callnative UpdateFollowingPokemon
|
||||
release
|
||||
end
|
||||
|
||||
@@ -200,6 +202,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterSinglesChallenge::
|
||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||
msgbox BattleFrontier_BattleTowerLobby_Text_SelectThreeMons, MSGBOX_DEFAULT
|
||||
fadescreen FADE_TO_BLACK
|
||||
callnative RemoveFollowingPokemon
|
||||
call BattleFrontier_EventScript_GetLvlMode
|
||||
copyvar VAR_0x8004, VAR_RESULT
|
||||
setvar VAR_0x8005, FRONTIER_PARTY_SIZE
|
||||
@@ -263,6 +266,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterDoublesChallenge::
|
||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||
msgbox BattleFrontier_BattleTowerLobby_Text_PleaseSelectFourMons, MSGBOX_DEFAULT
|
||||
fadescreen FADE_TO_BLACK
|
||||
callnative RemoveFollowingPokemon
|
||||
call BattleFrontier_EventScript_GetLvlMode
|
||||
copyvar VAR_0x8004, VAR_RESULT
|
||||
setvar VAR_0x8005, FRONTIER_DOUBLES_PARTY_SIZE
|
||||
@@ -327,6 +331,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterMultisChallenge::
|
||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||
msgbox BattleFrontier_BattleTowerLobby_Text_PleaseSelectTwoMons, MSGBOX_DEFAULT
|
||||
fadescreen FADE_TO_BLACK
|
||||
callnative RemoveFollowingPokemon
|
||||
call BattleFrontier_EventScript_GetLvlMode
|
||||
copyvar VAR_0x8004, VAR_RESULT
|
||||
setvar VAR_0x8005, FRONTIER_MULTI_PARTY_SIZE
|
||||
@@ -390,6 +395,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterLinkMultisChallenge::
|
||||
frontier_set FRONTIER_DATA_LVL_MODE, VAR_RESULT
|
||||
msgbox BattleFrontier_BattleTowerLobby_Text_PleaseSelectTwoMons2, MSGBOX_DEFAULT
|
||||
fadescreen FADE_TO_BLACK
|
||||
callnative RemoveFollowingPokemon
|
||||
call BattleFrontier_EventScript_GetLvlMode
|
||||
copyvar VAR_0x8004, VAR_RESULT
|
||||
setvar VAR_0x8005, FRONTIER_MULTI_PARTY_SIZE
|
||||
@@ -582,6 +588,7 @@ BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed::
|
||||
|
||||
BattleFrontier_BattleTowerLobby_EventScript_LoadPartyCancelChallenge::
|
||||
special LoadPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
BattleFrontier_BattleTowerLobby_EventScript_CancelChallenge::
|
||||
special CloseLink
|
||||
msgbox BattleFrontier_BattleTowerLobby_Text_LookForwardToAnotherChallenge, MSGBOX_DEFAULT
|
||||
|
||||
@@ -5,6 +5,7 @@ FortreeCity_Gym_MapScripts::
|
||||
|
||||
FortreeCity_Gym_OnTransition:
|
||||
special RotatingGate_InitPuzzle
|
||||
setflag FLAG_TEMP_HIDE_FOLLOWER @ Hide follower bc of rotating gates
|
||||
end
|
||||
|
||||
FortreeCity_Gym_OnWarp:
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
MossdeepCity_Gym_MapScripts::
|
||||
map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_Gym_OnTransition
|
||||
map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_Gym_OnLoad
|
||||
.byte 0
|
||||
|
||||
@ NOTE: Mossdeep Gym was redesigned between R/S and E. Leftover (and now functionally unused) scripts are commented below
|
||||
|
||||
MossdeepCity_Gym_OnTransition:
|
||||
setflag FLAG_TEMP_HIDE_FOLLOWER @ Hide follower since it can collide with moving statues
|
||||
end
|
||||
|
||||
@ All the below checks are leftover from RS. FLAG_MOSSDEEP_GYM_SWITCH_X is never set
|
||||
MossdeepCity_Gym_OnLoad:
|
||||
goto_if_set FLAG_MOSSDEEP_GYM_SWITCH_1, MossdeepCity_Gym_EventScript_SetSwitch1Metatiles
|
||||
|
||||
@@ -105,8 +105,8 @@
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_PIKACHU",
|
||||
"x": 49,
|
||||
"y": 2,
|
||||
"x": 51,
|
||||
"y": 1,
|
||||
"elevation": 3,
|
||||
"movement_type": "MOVEMENT_TYPE_LOOK_AROUND",
|
||||
"movement_range_x": 0,
|
||||
@@ -336,6 +336,32 @@
|
||||
"trainer_sight_or_berry_tree_id": "4",
|
||||
"script": "Route117_EventScript_Melina",
|
||||
"flag": "0"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_VAR_0",
|
||||
"x": 47,
|
||||
"y": 2,
|
||||
"elevation": 3,
|
||||
"movement_type": "MOVEMENT_TYPE_LOOK_AROUND",
|
||||
"movement_range_x": 0,
|
||||
"movement_range_y": 0,
|
||||
"trainer_type": "TRAINER_TYPE_NONE",
|
||||
"trainer_sight_or_berry_tree_id": "VAR_TEMP_0",
|
||||
"script": "NULL",
|
||||
"flag": "FLAG_TEMP_1"
|
||||
},
|
||||
{
|
||||
"graphics_id": "OBJ_EVENT_GFX_VAR_1",
|
||||
"x": 49,
|
||||
"y": 2,
|
||||
"elevation": 3,
|
||||
"movement_type": "MOVEMENT_TYPE_LOOK_AROUND",
|
||||
"movement_range_x": 0,
|
||||
"movement_range_y": 0,
|
||||
"trainer_type": "TRAINER_TYPE_NONE",
|
||||
"trainer_sight_or_berry_tree_id": "VAR_TEMP_1",
|
||||
"script": "NULL",
|
||||
"flag": "FLAG_TEMP_2"
|
||||
}
|
||||
],
|
||||
"warp_events": [
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
.set LOCALID_DAYCARE_MAN, 3
|
||||
.set LOCALID_DAYCARE_MON_0, 25
|
||||
.set LOCALID_DAYCARE_MON_1, 26
|
||||
|
||||
Route117_MapScripts::
|
||||
map_script MAP_SCRIPT_ON_TRANSITION, Route117_OnTransition
|
||||
@@ -6,8 +8,42 @@ Route117_MapScripts::
|
||||
|
||||
Route117_OnTransition:
|
||||
call Route117_EventScript_TryMoveDayCareMan
|
||||
@ set flags for OW daycare mons
|
||||
setflag FLAG_TEMP_1
|
||||
setflag FLAG_TEMP_2
|
||||
getdaycaregfx VAR_OBJ_GFX_ID_0, VAR_OBJ_GFX_ID_1, VAR_TEMP_0, VAR_TEMP_1
|
||||
switch VAR_RESULT
|
||||
case 2, Route117_EventScript_ShowDaycareMon1
|
||||
case 1, Route117_EventScript_ShowDaycareMon0
|
||||
end
|
||||
|
||||
Route117_EventScript_ShowDaycareMon1:
|
||||
@ set pokemon movement type based on compatibility
|
||||
special SetDaycareCompatibilityString
|
||||
call_if_eq VAR_RESULT, PARENTS_INCOMPATIBLE, Route117_EventScript_DaycareMonIncompatible
|
||||
@ Don't do anything if PARENTS_LOW_COMPATIBILITY
|
||||
call_if_eq VAR_RESULT, PARENTS_MED_COMPATIBILITY, Route117_EventScript_DaycareMonMedCompatibility
|
||||
call_if_eq VAR_RESULT, PARENTS_MAX_COMPATIBILITY, Route117_EventScript_DaycareMonMaxCompatibility
|
||||
clearflag FLAG_TEMP_2
|
||||
Route117_EventScript_ShowDaycareMon0:
|
||||
clearflag FLAG_TEMP_1
|
||||
end
|
||||
|
||||
Route117_EventScript_DaycareMonIncompatible: @ mons never face each other
|
||||
setobjectmovementtype LOCALID_DAYCARE_MON_0, MOVEMENT_TYPE_FACE_DOWN_UP_AND_LEFT
|
||||
setobjectmovementtype LOCALID_DAYCARE_MON_1, MOVEMENT_TYPE_FACE_DOWN_UP_AND_RIGHT
|
||||
return
|
||||
|
||||
Route117_EventScript_DaycareMonMedCompatibility: @ down and towards each other
|
||||
setobjectmovementtype LOCALID_DAYCARE_MON_0, MOVEMENT_TYPE_FACE_DOWN_AND_RIGHT
|
||||
setobjectmovementtype LOCALID_DAYCARE_MON_1, MOVEMENT_TYPE_FACE_DOWN_AND_LEFT
|
||||
return
|
||||
|
||||
Route117_EventScript_DaycareMonMaxCompatibility: @ facing; walk in place
|
||||
setobjectmovementtype LOCALID_DAYCARE_MON_0, MOVEMENT_TYPE_WALK_IN_PLACE_RIGHT
|
||||
setobjectmovementtype LOCALID_DAYCARE_MON_1, MOVEMENT_TYPE_WALK_IN_PLACE_LEFT
|
||||
return
|
||||
|
||||
Route117_EventScript_TryMoveDayCareMan::
|
||||
goto_if_unset FLAG_PENDING_DAYCARE_EGG, Route117_EventScript_StopMoveDayCareMan
|
||||
setobjectxyperm LOCALID_DAYCARE_MAN, 47, 6
|
||||
@@ -205,4 +241,3 @@ Route117_Text_RouteSignMauville:
|
||||
Route117_Text_DayCareSign:
|
||||
.string "POKéMON DAY CARE\n"
|
||||
.string "“Let us raise your POKéMON.”$"
|
||||
|
||||
|
||||
@@ -274,6 +274,7 @@ RusturfTunnel_EventScript_TunnelBlockagePos3::
|
||||
|
||||
RusturfTunnel_EventScript_AquaGruntBackUp::
|
||||
lockall
|
||||
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||
msgbox RusturfTunnel_Text_ComeAndGetSome, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
applymovement LOCALID_GRUNT, RusturfTunnel_Movement_GruntAndPeekoBackUp
|
||||
|
||||
@@ -79,6 +79,7 @@ SlateportCity_OceanicMuseum_2F_EventScript_CaptStern::
|
||||
playfanfare MUS_HEAL
|
||||
waitfanfare
|
||||
special HealPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
removeobject LOCALID_CAPT_STERN
|
||||
setflag FLAG_HIDE_ROUTE_110_TEAM_AQUA
|
||||
call_if_eq VAR_REGISTER_BIRCH_STATE, 0, SlateportCity_OceanicMuseum_2F_EventScript_ReadyRegisterBirch
|
||||
|
||||
@@ -495,6 +495,7 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter::
|
||||
removeobject LOCALID_GROUDON
|
||||
removeobject LOCALID_KYOGRE
|
||||
addobject LOCALID_RAYQUAZA
|
||||
hideobjectat LOCALID_RAYQUAZA, MAP_SOOTOPOLIS_CITY
|
||||
setvar VAR_0x8004, TRUE
|
||||
special Script_DoRayquazaScene
|
||||
waitstate
|
||||
|
||||
@@ -96,6 +96,7 @@ TrainerHill_Entrance_EventScript_PlayerExitChallenge::
|
||||
waitmovement 0
|
||||
setvar VAR_TRAINER_HILL_IS_ACTIVE, 0
|
||||
special HealPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
releaseall
|
||||
TrainerHill_Entrance_EventScript_EndExitChallenge::
|
||||
end
|
||||
@@ -161,6 +162,7 @@ TrainerHill_Entrance_EventScript_ChooseChallenge::
|
||||
setvar VAR_TRAINER_HILL_IS_ACTIVE, 1
|
||||
setvar VAR_TEMP_5, 0
|
||||
special HealPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
msgbox TrainerHill_Entrance_Text_TimeProgessGetSetGo, MSGBOX_DEFAULT
|
||||
trainerhill_start
|
||||
releaseall
|
||||
|
||||
@@ -26,6 +26,7 @@ UnionRoom_OnResume:
|
||||
end
|
||||
|
||||
UnionRoom_OnTransition:
|
||||
setflag FLAG_TEMP_HIDE_FOLLOWER
|
||||
end
|
||||
|
||||
UnionRoom_EventScript_Player1::
|
||||
@@ -106,4 +107,3 @@ UnionRoom_EventScript_Unused::
|
||||
waitstate
|
||||
releaseall
|
||||
end
|
||||
|
||||
|
||||
@@ -133,6 +133,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_NoTurningBack::
|
||||
lockall
|
||||
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
releaseall
|
||||
end
|
||||
|
||||
BattleFrontier_BattlePikeRoomNormal_EventScript_SetEnteredRoom::
|
||||
@@ -146,6 +147,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_NoTurningBack::
|
||||
lockall
|
||||
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
releaseall
|
||||
end
|
||||
|
||||
BattleFrontier_BattlePikeRoomNormal_EventScript_Exit::
|
||||
@@ -214,6 +216,7 @@ BattleFrontier_BattlePikeRoomWildMons_EventScript_NoTurningBack::
|
||||
lockall
|
||||
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
releaseall
|
||||
end
|
||||
|
||||
BattleFrontier_BattlePike_EventScript_Retire::
|
||||
|
||||
@@ -103,6 +103,7 @@ Route117_PokemonDayCare_EventScript_GiveMonToRaise::
|
||||
msgbox Route117_PokemonDayCare_Text_WellRaiseYourMon, MSGBOX_DEFAULT
|
||||
waitmoncry
|
||||
special StoreSelectedPokemonInDaycare
|
||||
callnative UpdateFollowingPokemon
|
||||
incrementgamestat GAME_STAT_USED_DAYCARE
|
||||
specialvar VAR_RESULT, GetDaycareState
|
||||
goto_if_eq VAR_RESULT, DAYCARE_ONE_MON, Route117_PokemonDayCare_EventScript_CanRaiseOneMore
|
||||
|
||||
@@ -11,26 +11,25 @@ EventScript_CutTree::
|
||||
goto_if_eq VAR_RESULT, NO, EventScript_CancelCut
|
||||
msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
EventScript_CutTreeCommon:
|
||||
isfollowerfieldmoveuser VAR_0x8004
|
||||
setfieldeffectargument 3, VAR_0x8004 @ skip pose if so
|
||||
dofieldeffect FLDEFF_USE_CUT_ON_TREE
|
||||
waitstate
|
||||
goto EventScript_CutTreeDown
|
||||
end
|
||||
|
||||
@ Use cut from party menu
|
||||
EventScript_UseCut::
|
||||
lockall
|
||||
dofieldeffect FLDEFF_USE_CUT_ON_TREE
|
||||
waitstate
|
||||
goto EventScript_CutTreeDown
|
||||
end
|
||||
|
||||
EventScript_CutTreeDown::
|
||||
EventScript_CutTreeDown:: @ fallthrough
|
||||
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||
call_if_eq VAR_0x8004, TRUE, EventScript_FollowerFieldMove
|
||||
applymovement VAR_LAST_TALKED, Movement_CutTreeDown
|
||||
waitmovement 0
|
||||
removeobject VAR_LAST_TALKED
|
||||
releaseall
|
||||
end
|
||||
|
||||
@ Use cut from party menu
|
||||
EventScript_UseCut::
|
||||
lockall
|
||||
goto EventScript_CutTreeCommon
|
||||
|
||||
Movement_CutTreeDown:
|
||||
cut_tree
|
||||
step_end
|
||||
@@ -57,6 +56,11 @@ Text_CantCut:
|
||||
.string "This tree looks like it can be\n"
|
||||
.string "CUT down!$"
|
||||
|
||||
@ Use rock smash from party menu
|
||||
EventScript_UseRockSmash::
|
||||
lockall
|
||||
goto EventScript_RockSmashCommon
|
||||
|
||||
@ Interact with smashable rock
|
||||
EventScript_RockSmash::
|
||||
lockall
|
||||
@@ -70,20 +74,15 @@ EventScript_RockSmash::
|
||||
goto_if_eq VAR_RESULT, NO, EventScript_CancelSmash
|
||||
msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT
|
||||
closemessage
|
||||
EventScript_RockSmashCommon:
|
||||
@ check if follower should use the field move
|
||||
isfollowerfieldmoveuser VAR_0x8004
|
||||
setfieldeffectargument 3, VAR_0x8004 @ skip pose if so
|
||||
dofieldeffect FLDEFF_USE_ROCK_SMASH
|
||||
waitstate
|
||||
goto EventScript_SmashRock
|
||||
end
|
||||
|
||||
@ Use rock smash from party menu
|
||||
EventScript_UseRockSmash::
|
||||
lockall
|
||||
dofieldeffect FLDEFF_USE_ROCK_SMASH
|
||||
waitstate
|
||||
goto EventScript_SmashRock
|
||||
end
|
||||
|
||||
EventScript_SmashRock::
|
||||
EventScript_SmashRock:: @ fallthrough
|
||||
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||
call_if_eq VAR_0x8004, TRUE, EventScript_FollowerFieldMove
|
||||
applymovement VAR_LAST_TALKED, Movement_SmashRock
|
||||
waitmovement 0
|
||||
removeobject VAR_LAST_TALKED
|
||||
@@ -95,10 +94,117 @@ EventScript_SmashRock::
|
||||
releaseall
|
||||
end
|
||||
|
||||
EventScript_FollowerFieldMove:
|
||||
getdirectiontoface VAR_0x8005, OBJ_EVENT_ID_FOLLOWER, OBJ_EVENT_ID_PLAYER
|
||||
specialvar VAR_0x8006, GetPlayerFacingDirection
|
||||
goto_if_eq VAR_0x8005, DIR_NONE, EventScript_FollowerFieldMoveEnd
|
||||
@ Swap follower and player
|
||||
call EventScript_FollowerSwap
|
||||
@ Face follower in direction and jump
|
||||
switch VAR_0x8006
|
||||
case DIR_NORTH, EventScript_FollowerJumpNorth
|
||||
case DIR_EAST, EventScript_FollowerJumpEast
|
||||
case DIR_SOUTH, EventScript_FollowerJumpSouth
|
||||
case DIR_WEST, EventScript_FollowerJumpWest
|
||||
EventScript_FollowerFieldMoveEnd:
|
||||
return
|
||||
|
||||
EventScript_FollowerSwap:
|
||||
switch VAR_0x8005
|
||||
case DIR_NORTH, EventScript_FollowerMoveNorth
|
||||
case DIR_EAST, EventScript_FollowerMoveEast
|
||||
case DIR_SOUTH, EventScript_FollowerMoveSouth
|
||||
case DIR_WEST, EventScript_FollowerMoveWest
|
||||
return
|
||||
|
||||
EventScript_FollowerMoveNorth:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_WalkUp
|
||||
applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkDown
|
||||
waitmovement 0
|
||||
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceUp
|
||||
waitmovement 0
|
||||
return
|
||||
|
||||
EventScript_FollowerMoveEast:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_WalkRight
|
||||
applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkLeft
|
||||
waitmovement 0
|
||||
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceRight
|
||||
waitmovement 0
|
||||
return
|
||||
|
||||
EventScript_FollowerMoveSouth:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_WalkDown
|
||||
applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkUp
|
||||
waitmovement 0
|
||||
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceDown
|
||||
waitmovement 0
|
||||
return
|
||||
|
||||
EventScript_FollowerMoveWest:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_WalkLeft
|
||||
applymovement OBJ_EVENT_ID_PLAYER, Movement_WalkRight
|
||||
waitmovement 0
|
||||
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceLeft
|
||||
waitmovement 0
|
||||
return
|
||||
|
||||
EventScript_FollowerJumpNorth:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_JumpUp
|
||||
waitmovement 0
|
||||
return
|
||||
|
||||
EventScript_FollowerJumpEast:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_JumpRight
|
||||
waitmovement 0
|
||||
return
|
||||
|
||||
EventScript_FollowerJumpSouth:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_JumpDown
|
||||
waitmovement 0
|
||||
return
|
||||
|
||||
EventScript_FollowerJumpWest:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, Movement_JumpLeft
|
||||
waitmovement 0
|
||||
return
|
||||
|
||||
EventScript_EndSmash::
|
||||
releaseall
|
||||
end
|
||||
|
||||
Movement_WalkUp:
|
||||
walk_up
|
||||
step_end
|
||||
|
||||
Movement_JumpUp:
|
||||
jump_in_place_up
|
||||
step_end
|
||||
|
||||
Movement_WalkRight:
|
||||
walk_right
|
||||
step_end
|
||||
|
||||
Movement_JumpRight:
|
||||
jump_in_place_right
|
||||
step_end
|
||||
|
||||
Movement_WalkDown:
|
||||
walk_down
|
||||
step_end
|
||||
|
||||
Movement_JumpDown:
|
||||
jump_in_place_down
|
||||
step_end
|
||||
|
||||
Movement_WalkLeft:
|
||||
walk_left
|
||||
step_end
|
||||
|
||||
Movement_JumpLeft:
|
||||
jump_in_place_left
|
||||
step_end
|
||||
|
||||
Movement_SmashRock:
|
||||
rock_smash_break
|
||||
step_end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
EventScript_UseFlash::
|
||||
animateflash 1
|
||||
setflashlevel 1
|
||||
releaseall
|
||||
end
|
||||
|
||||
648
data/scripts/follower.inc
Normal file
@@ -0,0 +1,648 @@
|
||||
gText_FollowerLovesYou::
|
||||
.string "{STR_VAR_1} is regarding you with\nadoration!$"
|
||||
|
||||
gText_FollowerLostInThought::
|
||||
.string "{STR_VAR_1} seems lost in thought.$"
|
||||
|
||||
gText_FollowerDefault::
|
||||
.string "ERROR 404: Script not found.$"
|
||||
|
||||
gText_WantsToFly::
|
||||
.string "{STR_VAR_1} looks up at the\nsky restlessly.\pWould you like to use FLY?$"
|
||||
|
||||
EventScript_Follower::
|
||||
lock
|
||||
bufferlivemonnickname 0
|
||||
playfirstmoncry
|
||||
getfolloweraction
|
||||
EventScript_FollowerEnd::
|
||||
waitfieldeffect FLDEFF_EMOTE
|
||||
release
|
||||
end
|
||||
|
||||
EventScript_FollowerLovesYou::
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, ContestHall_Movement_Heart
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
waitmoncry
|
||||
msgbox gText_FollowerLovesYou, MSGBOX_DEFAULT
|
||||
return
|
||||
|
||||
@ Message address must be loaded into bank 0
|
||||
EventScript_FollowerGeneric:: @ similar to Std_MsgboxDefault
|
||||
faceplayer
|
||||
EventScript_FollowerGenericSkipFace:
|
||||
waitfieldeffect FLDEFF_EMOTE
|
||||
message 0x0
|
||||
waitmessage
|
||||
waitbuttonpress
|
||||
return
|
||||
|
||||
EventScript_FollowerJump::
|
||||
faceplayer
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, FollowerSplashMovement
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
waitfieldeffect FLDEFF_EMOTE
|
||||
message 0x0
|
||||
waitmessage
|
||||
waitbuttonpress
|
||||
return
|
||||
|
||||
EnterPokeballMovement::
|
||||
enter_pokeball
|
||||
step_end
|
||||
|
||||
@ Movement scripts below, movements are defined in movement.inc
|
||||
|
||||
FollowerSplashMovement::
|
||||
jump_in_place_down
|
||||
delay_4
|
||||
jump_in_place_down
|
||||
face_player
|
||||
step_end
|
||||
|
||||
FollowerShiverVerticalMovement:
|
||||
lock_facing_direction
|
||||
slide_left
|
||||
slide_right
|
||||
slide_right
|
||||
slide_left
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerShiverHorizontalMovement:
|
||||
lock_facing_direction
|
||||
slide_up
|
||||
slide_down
|
||||
slide_down
|
||||
slide_up
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerNostalgiaMovement:
|
||||
face_away_player
|
||||
lock_facing_direction
|
||||
jump_in_place_down
|
||||
jump_in_place_down
|
||||
jump_in_place_down
|
||||
unlock_facing_direction
|
||||
face_player
|
||||
lock_facing_direction
|
||||
jump_in_place_down
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerSkippingMovement:
|
||||
lock_facing_direction
|
||||
jump_in_place_down
|
||||
delay_4
|
||||
jump_in_place_down
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerJumpOnPlayerNorth:
|
||||
jump_up
|
||||
delay_4
|
||||
lock_facing_direction
|
||||
walk_fast_down
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerJumpOnPlayerSouth:
|
||||
jump_down
|
||||
delay_4
|
||||
lock_facing_direction
|
||||
walk_fast_up
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerJumpOnPlayerEast:
|
||||
jump_right
|
||||
delay_4
|
||||
lock_facing_direction
|
||||
walk_fast_left
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerJumpOnPlayerWest:
|
||||
jump_left
|
||||
delay_4
|
||||
lock_facing_direction
|
||||
walk_fast_right
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerCuddlingNorth:
|
||||
face_left
|
||||
lock_facing_direction
|
||||
walk_up
|
||||
walk_in_place_left
|
||||
walk_in_place_left
|
||||
unlock_facing_direction
|
||||
walk_down
|
||||
face_player
|
||||
step_end
|
||||
|
||||
FollowerCuddlingSouth:
|
||||
face_right
|
||||
lock_facing_direction
|
||||
walk_down
|
||||
walk_in_place_right
|
||||
walk_in_place_right
|
||||
unlock_facing_direction
|
||||
walk_up
|
||||
face_player
|
||||
step_end
|
||||
|
||||
FollowerCuddlingEast:
|
||||
face_down
|
||||
lock_facing_direction
|
||||
walk_right
|
||||
walk_in_place_down
|
||||
walk_in_place_down
|
||||
unlock_facing_direction
|
||||
walk_left
|
||||
face_player
|
||||
step_end
|
||||
|
||||
FollowerCuddlingWest:
|
||||
face_down
|
||||
lock_facing_direction
|
||||
walk_left
|
||||
walk_in_place_down
|
||||
walk_in_place_down
|
||||
unlock_facing_direction
|
||||
walk_right
|
||||
face_player
|
||||
step_end
|
||||
|
||||
FollowerGetCloserNorth:
|
||||
walk_up
|
||||
delay_16
|
||||
lock_facing_direction
|
||||
walk_down
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerGetCloserSouth:
|
||||
walk_down
|
||||
delay_16
|
||||
lock_facing_direction
|
||||
walk_up
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerGetCloserEast:
|
||||
walk_right
|
||||
delay_16
|
||||
lock_facing_direction
|
||||
walk_left
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerGetCloserWest:
|
||||
walk_left
|
||||
delay_16
|
||||
lock_facing_direction
|
||||
walk_right
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerPokeNorth:
|
||||
walk_faster_up
|
||||
delay_8
|
||||
lock_facing_direction
|
||||
walk_faster_down
|
||||
delay_4
|
||||
walk_faster_up
|
||||
delay_4
|
||||
walk_faster_down
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerPokeSouth:
|
||||
walk_faster_down
|
||||
delay_8
|
||||
lock_facing_direction
|
||||
walk_faster_up
|
||||
delay_4
|
||||
walk_faster_down
|
||||
delay_4
|
||||
walk_faster_up
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerPokeEast:
|
||||
walk_faster_right
|
||||
delay_8
|
||||
lock_facing_direction
|
||||
walk_faster_left
|
||||
delay_4
|
||||
walk_faster_right
|
||||
delay_4
|
||||
walk_faster_left
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerPokeWest:
|
||||
walk_faster_left
|
||||
delay_8
|
||||
lock_facing_direction
|
||||
walk_faster_right
|
||||
delay_4
|
||||
walk_faster_left
|
||||
delay_4
|
||||
walk_faster_right
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerLookAround:
|
||||
face_away_player
|
||||
delay_16
|
||||
delay_16
|
||||
face_left
|
||||
delay_16
|
||||
delay_16
|
||||
face_up
|
||||
delay_16
|
||||
delay_16
|
||||
face_down
|
||||
delay_16
|
||||
delay_16
|
||||
step_end
|
||||
|
||||
FollowerLookAway:
|
||||
face_away_player
|
||||
delay_16
|
||||
delay_16
|
||||
step_end
|
||||
|
||||
FollowerLookAwayBark:
|
||||
face_away_player
|
||||
lock_facing_direction
|
||||
jump_in_place_down
|
||||
jump_in_place_down
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerLookAwayPokeG:
|
||||
face_away_player
|
||||
lock_facing_direction
|
||||
walk_in_place_down
|
||||
walk_in_place_down
|
||||
walk_in_place_down
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerPokeGround:
|
||||
lock_facing_direction
|
||||
walk_in_place_down
|
||||
walk_in_place_down
|
||||
walk_in_place_down
|
||||
unlock_facing_direction
|
||||
step_end
|
||||
|
||||
FollowerStartled:
|
||||
face_away_player
|
||||
lock_facing_direction
|
||||
jump_in_place_down
|
||||
unlock_facing_direction
|
||||
face_player
|
||||
step_end
|
||||
|
||||
FollowerHopFast:
|
||||
jump_in_place_up
|
||||
jump_in_place_down
|
||||
jump_in_place_left
|
||||
jump_in_place_right
|
||||
face_player
|
||||
step_end
|
||||
|
||||
FollowerDizzy:
|
||||
walk_in_place_left
|
||||
walk_in_place_fast_right
|
||||
walk_in_place_slow_up
|
||||
walk_in_place_fast_down
|
||||
delay_4
|
||||
face_away_player
|
||||
step_end
|
||||
|
||||
FollowerLookAroundScared:
|
||||
face_up
|
||||
delay_16
|
||||
face_down
|
||||
delay_16
|
||||
face_left
|
||||
delay_16
|
||||
face_right
|
||||
delay_16
|
||||
face_up
|
||||
delay_16
|
||||
face_down
|
||||
delay_16
|
||||
face_left
|
||||
delay_16
|
||||
face_right
|
||||
delay_16
|
||||
face_player
|
||||
step_end
|
||||
|
||||
FollowerDance:
|
||||
lock_facing_direction
|
||||
jump_in_place_up
|
||||
unlock_facing_direction
|
||||
walk_in_place_fast_up
|
||||
walk_in_place_fast_left
|
||||
walk_in_place_fast_down
|
||||
walk_in_place_fast_right
|
||||
walk_in_place_fast_up
|
||||
walk_in_place_fast_left
|
||||
walk_in_place_fast_down
|
||||
walk_in_place_fast_right
|
||||
jump_in_place_up
|
||||
jump_in_place_down
|
||||
jump_in_place_up
|
||||
face_player
|
||||
step_end
|
||||
|
||||
@ Movement scripts
|
||||
|
||||
EventScript_FollowerIsShivering::
|
||||
faceplayer
|
||||
compare VAR_FACING, DIR_NORTH
|
||||
call_if_eq ShiverVertical
|
||||
compare VAR_FACING, DIR_SOUTH
|
||||
call_if_eq ShiverVertical
|
||||
compare VAR_FACING, DIR_WEST
|
||||
call_if_eq ShiverHorizontal
|
||||
compare VAR_FACING, DIR_EAST
|
||||
call_if_eq ShiverHorizontal
|
||||
goto EventScript_FollowerGeneric
|
||||
|
||||
ShiverVertical:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, FollowerShiverVerticalMovement
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
ShiverHorizontal:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, FollowerShiverHorizontalMovement
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
EventScript_FollowerNostalgia::
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, FollowerNostalgiaMovement
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
goto EventScript_FollowerGeneric
|
||||
|
||||
EventScript_FollowerHopping::
|
||||
faceplayer
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, FollowerSkippingMovement
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
goto EventScript_FollowerGeneric
|
||||
|
||||
JumpOnN:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, FollowerJumpOnPlayerNorth
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
JumpOnS:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, FollowerJumpOnPlayerSouth
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
JumpOnE:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, FollowerJumpOnPlayerEast
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
JumpOnW:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, FollowerJumpOnPlayerWest
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
EventScript_FollowerJumpOnPlayer::
|
||||
faceplayer
|
||||
compare VAR_FACING, DIR_NORTH
|
||||
call_if_eq JumpOnS
|
||||
compare VAR_FACING, DIR_SOUTH
|
||||
call_if_eq JumpOnN
|
||||
compare VAR_FACING, DIR_WEST
|
||||
call_if_eq JumpOnE
|
||||
compare VAR_FACING, DIR_EAST
|
||||
call_if_eq JumpOnW
|
||||
goto EventScript_FollowerGeneric
|
||||
|
||||
CuddleN:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, FollowerCuddlingNorth
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
CuddleS:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, FollowerCuddlingSouth
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
CuddleE:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, FollowerCuddlingEast
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
CuddleW:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER, FollowerCuddlingWest
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
EventScript_FollowerCuddling:: @ similar to Std_MsgboxDefault
|
||||
faceplayer
|
||||
compare VAR_FACING, DIR_NORTH
|
||||
call_if_eq CuddleS
|
||||
compare VAR_FACING, DIR_SOUTH
|
||||
call_if_eq CuddleN
|
||||
compare VAR_FACING, DIR_WEST
|
||||
call_if_eq CuddleE
|
||||
compare VAR_FACING, DIR_EAST
|
||||
call_if_eq CuddleW
|
||||
goto EventScript_FollowerGeneric
|
||||
|
||||
ShCuddleN:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerShiverVerticalMovement
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerCuddlingNorth
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
ShCuddleS:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerShiverVerticalMovement
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerCuddlingSouth
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
ShCuddleE:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerShiverHorizontalMovement
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerCuddlingEast
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
ShCuddleW:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerShiverHorizontalMovement
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerCuddlingWest
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
EventScript_FollowerShiverCuddling::
|
||||
faceplayer
|
||||
compare VAR_FACING, DIR_NORTH
|
||||
call_if_eq ShCuddleS
|
||||
compare VAR_FACING, DIR_SOUTH
|
||||
call_if_eq ShCuddleN
|
||||
compare VAR_FACING, DIR_WEST
|
||||
call_if_eq ShCuddleE
|
||||
compare VAR_FACING, DIR_EAST
|
||||
call_if_eq ShCuddleW
|
||||
goto EventScript_FollowerGeneric
|
||||
|
||||
CreepCloserN:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerGetCloserNorth
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
CreepCloserS:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerGetCloserSouth
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
CreepCloserE:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerGetCloserEast
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
CreepCloserW:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerGetCloserWest
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
EventScript_FollowerGetCloser::
|
||||
faceplayer
|
||||
compare VAR_FACING, DIR_NORTH
|
||||
call_if_eq CreepCloserS
|
||||
compare VAR_FACING, DIR_SOUTH
|
||||
call_if_eq CreepCloserN
|
||||
compare VAR_FACING, DIR_WEST
|
||||
call_if_eq CreepCloserE
|
||||
compare VAR_FACING, DIR_EAST
|
||||
call_if_eq CreepCloserW
|
||||
goto EventScript_FollowerGeneric
|
||||
|
||||
PokePlayerN:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerGetCloserNorth
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
PokePlayerS:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerGetCloserSouth
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
PokePlayerE:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerGetCloserEast
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
PokePlayerW:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerGetCloserWest
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
return
|
||||
|
||||
EventScript_FollowerPokingPlayer::
|
||||
faceplayer
|
||||
compare VAR_FACING, DIR_NORTH
|
||||
call_if_eq PokePlayerS
|
||||
compare VAR_FACING, DIR_SOUTH
|
||||
call_if_eq PokePlayerN
|
||||
compare VAR_FACING, DIR_WEST
|
||||
call_if_eq PokePlayerE
|
||||
compare VAR_FACING, DIR_EAST
|
||||
call_if_eq PokePlayerW
|
||||
goto EventScript_FollowerGeneric
|
||||
|
||||
EventScript_FollowerLookAround::
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerLookAround
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
goto EventScript_FollowerGeneric
|
||||
|
||||
EventScript_FollowerLookAway::
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerLookAway
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
goto EventScript_FollowerGenericSkipFace
|
||||
|
||||
EventScript_FollowerLookAwayBark::
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerLookAwayBark
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
goto EventScript_FollowerGenericSkipFace
|
||||
|
||||
EventScript_FollowerLookAwayPoke::
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerLookAwayPokeG
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
goto EventScript_FollowerGenericSkipFace
|
||||
|
||||
EventScript_FollowerPokeGround::
|
||||
faceplayer
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerPokeGround
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
goto EventScript_FollowerGeneric
|
||||
|
||||
EventScript_FollowerStartled::
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerStartled
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
goto EventScript_FollowerGenericSkipFace
|
||||
|
||||
EventScript_FollowerFastHopping::
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerHopFast
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
goto EventScript_FollowerGenericSkipFace
|
||||
|
||||
EventScript_FollowerDizzy::
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerDizzy
|
||||
waitmovement 0
|
||||
goto EventScript_FollowerGenericSkipFace
|
||||
|
||||
EventScript_FollowerLookAroundScared::
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerLookAroundScared
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
goto EventScript_FollowerGeneric
|
||||
|
||||
EventScript_FollowerDance::
|
||||
faceplayer
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER FollowerDance
|
||||
waitmovement 0
|
||||
goto EventScript_FollowerGenericSkipFace
|
||||
|
||||
EventScript_FollowerFaceUp::
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER Common_Movement_FaceUp
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
goto EventScript_FollowerGenericSkipFace
|
||||
|
||||
EventScript_FollowerFaceResult:: @ Face towards direction in VAR_RESULT
|
||||
switch VAR_RESULT
|
||||
case DIR_SOUTH, EventScript_FollowerFaceDown
|
||||
case DIR_NORTH, EventScript_FollowerFaceUp
|
||||
case DIR_WEST, EventScript_FollowerFaceLeft
|
||||
case DIR_EAST, EventScript_FollowerFaceRight
|
||||
goto EventScript_FollowerGeneric
|
||||
|
||||
EventScript_FollowerFaceDown:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER Common_Movement_FaceDown
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
goto EventScript_FollowerGenericSkipFace
|
||||
|
||||
EventScript_FollowerFaceLeft:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER Common_Movement_FaceLeft
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
goto EventScript_FollowerGenericSkipFace
|
||||
|
||||
EventScript_FollowerFaceRight:
|
||||
applymovement OBJ_EVENT_ID_FOLLOWER Common_Movement_FaceRight
|
||||
waitmovement OBJ_EVENT_ID_FOLLOWER
|
||||
goto EventScript_FollowerGenericSkipFace
|
||||
@@ -1,3 +1,6 @@
|
||||
@ Starting from here, these movements are considered
|
||||
@ 'safe' (won't put follower into a Pokeball)
|
||||
Common_Movement_FollowerSafeStart::
|
||||
Common_Movement_QuestionMark:
|
||||
emote_question_mark
|
||||
step_end
|
||||
@@ -68,6 +71,10 @@ Common_Movement_WalkInPlaceRight:
|
||||
walk_in_place_right
|
||||
step_end
|
||||
|
||||
@ End of follower-safe movements
|
||||
Common_Movement_FollowerSafeEnd::
|
||||
step_end
|
||||
|
||||
Common_Movement_WalkUp6:
|
||||
walk_up
|
||||
walk_up
|
||||
|
||||
@@ -33,13 +33,14 @@ EventScript_PkmnCenterNurse_IllTakeYourPkmn2::
|
||||
return
|
||||
|
||||
EventScript_PkmnCenterNurse_TakeAndHealPkmn::
|
||||
applymovement VAR_0x800B, Common_Movement_WalkInPlaceFasterLeft
|
||||
applymovement VAR_0x800B, Movement_PkmnCenterNurse_Turn @ Changed from Common_Movement_WalkInPlaceFasterLeft to force the follower to enter their Poké Ball
|
||||
waitmovement 0
|
||||
dofieldeffect FLDEFF_POKECENTER_HEAL
|
||||
waitfieldeffect FLDEFF_POKECENTER_HEAL
|
||||
applymovement VAR_0x800B, Common_Movement_WalkInPlaceFasterDown
|
||||
waitmovement 0
|
||||
special HealPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
return
|
||||
|
||||
EventScript_PkmnCenterNurse_CheckTrainerHillAndUnionRoom::
|
||||
@@ -120,3 +121,7 @@ Movement_PkmnCenterNurse_Bow:
|
||||
nurse_joy_bow
|
||||
delay_4
|
||||
step_end
|
||||
|
||||
Movement_PkmnCenterNurse_Turn:
|
||||
walk_in_place_faster_left
|
||||
step_end
|
||||
|
||||
@@ -646,6 +646,7 @@ SecretBase_EventScript_BattleTrainer::
|
||||
call_if_eq VAR_RESULT, B_OUTCOME_WON, SecretBase_EventScript_WonSecretBaseBattle
|
||||
call_if_eq VAR_RESULT, B_OUTCOME_LOST, SecretBase_EventScript_LostSecretBaseBattle
|
||||
special HealPlayerParty
|
||||
callnative UpdateFollowingPokemon
|
||||
release
|
||||
end
|
||||
|
||||
|
||||
@@ -10,8 +10,10 @@ EventScript_TrainerApproach::
|
||||
EventScript_TryDoNormalTrainerBattle::
|
||||
lock
|
||||
faceplayer
|
||||
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
|
||||
waitmovement 0
|
||||
clearflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||
specialvar VAR_RESULT, GetTrainerFlag
|
||||
goto_if_ne VAR_RESULT, FALSE, EventScript_NoNormalTrainerBattle
|
||||
special PlayTrainerEncounterMusic
|
||||
@@ -44,8 +46,10 @@ EventScript_NoDoubleTrainerBattle::
|
||||
gotopostbattlescript
|
||||
|
||||
EventScript_DoNoIntroTrainerBattle::
|
||||
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
|
||||
waitmovement 0
|
||||
clearflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||
special PlayTrainerEncounterMusic
|
||||
dotrainerbattle
|
||||
gotopostbattlescript
|
||||
@@ -93,8 +97,10 @@ EventScript_NotEnoughMonsForDoubleRematchBattle::
|
||||
end
|
||||
|
||||
EventScript_RevealTrainer::
|
||||
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||
applymovement VAR_LAST_TALKED, Movement_RevealTrainer
|
||||
waitmovement 0
|
||||
clearflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||
return
|
||||
|
||||
Movement_RevealTrainer:
|
||||
|
||||
110
dev_scripts/followers/extract_sprites.py
Normal file
@@ -0,0 +1,110 @@
|
||||
#!/usr/bin/env python3
|
||||
""" Extract sprites from HGSS follower spritesheets. """
|
||||
import os.path
|
||||
import subprocess
|
||||
import sys
|
||||
from glob import glob
|
||||
|
||||
import png
|
||||
|
||||
|
||||
SPRITESHEETS = [('gen1.png', 15, 11, 1)]
|
||||
output_dir = 'sprites'
|
||||
index_to_name = {}
|
||||
with open('names.txt', 'r') as f:
|
||||
for line in f:
|
||||
index, name = line.split(' ')[:2]
|
||||
name = name.strip()
|
||||
index_to_name[int(index)] = name.lower()
|
||||
name_to_index = {v: k for k, v in index_to_name.items()}
|
||||
PKMN_GRAPHICS = os.path.join('graphics', 'pokemon')
|
||||
|
||||
|
||||
def extract_sprites(spritesheet):
|
||||
path, width, height, offset = spritesheet
|
||||
for y in range(height):
|
||||
for x in range(width):
|
||||
if x == 3 and y == 0 or x == 10 and y == 1:
|
||||
continue
|
||||
output_path = os.path.join(output_dir, f'{offset:03d}.png')
|
||||
subprocess.run(['convert', '-extract', f'64x128+{x*(64+1)}+{y*(128+1)}', path, output_path], check=True)
|
||||
offset += 1
|
||||
|
||||
|
||||
def stack_sprite(name, path):
|
||||
joinp = os.path.join
|
||||
frames = [joinp(path, 'down', name), joinp(path, 'down', 'frame2', name),
|
||||
joinp(path, 'up', name), joinp(path, 'up', 'frame2', name),
|
||||
joinp(path, 'left', name), joinp(path, 'left', 'frame2', name)]
|
||||
output = joinp(path, name)
|
||||
subprocess.run(['convert'] + frames + ['+append', output], check=True)
|
||||
print(f'Stacked {output}')
|
||||
|
||||
def canonicalize_names():
|
||||
for path in glob('overworld/**/*.png', recursive=True):
|
||||
head, tail = os.path.split(path)
|
||||
name, ext = os.path.splitext(tail)
|
||||
try:
|
||||
num = int(name)
|
||||
except ValueError:
|
||||
continue
|
||||
new_name = f'{num:03d}'
|
||||
new_path = os.path.join(head, new_name+ext)
|
||||
os.rename(path, new_path)
|
||||
print(path, '->', new_path)
|
||||
|
||||
def closest_color(c, palette):
|
||||
min_d = float('inf')
|
||||
best = 0
|
||||
r1, g1, b1 = c
|
||||
for i, (r2, g2, b2) in enumerate(palette[1:], 1):
|
||||
# Color diff from https://stackoverflow.com/questions/1847092/given-an-rgb-value-what-would-be-the-best-way-to-find-the-closest-match-in-the-d
|
||||
d = ((r2-r1)*0.30)**2 + ((g2-g1)*0.59)**2 + ((b2-b1)*0.11)**2
|
||||
if d < min_d:
|
||||
min_d = d
|
||||
best = i
|
||||
return best
|
||||
|
||||
def apply_palette(palette_file, input_file, output_file): # Apply one file's palette to another
|
||||
plt = png.Reader(palette_file)
|
||||
plt.read()
|
||||
target_palette = tuple(c[:3] for c in plt.palette())
|
||||
inp = png.Reader(input_file)
|
||||
w, h, rows, _ = inp.read()
|
||||
src_palette = tuple(c[:3] for c in inp.palette())
|
||||
with open(output_file, 'wb') as f:
|
||||
new_rows = []
|
||||
for row in rows:
|
||||
new_rows.append([closest_color(src_palette[c], target_palette) if c else 0 for c in row])
|
||||
w = png.Writer(width=w, height=h, bitdepth=4, palette=target_palette)
|
||||
w.write(f, new_rows)
|
||||
|
||||
def paletteify(path, output_path=None):
|
||||
output_path = output_path or path
|
||||
joinp = os.path.join
|
||||
_, tail = os.path.split(path)
|
||||
species, _ = os.path.splitext(tail)
|
||||
front = png.Reader(joinp(PKMN_GRAPHICS, species, 'anim_front.png'))
|
||||
front.read()
|
||||
target_palette = tuple(c[:3] for c in front.palette())
|
||||
r, g, b = target_palette[0]
|
||||
color = f'rgb({r},{g},{b})'
|
||||
# Strip alpha color
|
||||
subprocess.run(['convert', path, '-background', color, '-alpha', 'remove', output_path], check=True)
|
||||
apply_palette(joinp(PKMN_GRAPHICS, species, 'anim_front.png'), output_path, output_path)
|
||||
|
||||
# Sprites from https://veekun.com/dex/downloads
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = sys.argv[1:]
|
||||
if args:
|
||||
paletteify(args[0])
|
||||
else:
|
||||
for path in sorted(glob('overworld/*.png')):
|
||||
_, tail = os.path.split(path)
|
||||
name, _ = os.path.splitext(tail)
|
||||
output_path = os.path.join('graphics/object_events/pics/pokemon', f'{name}.png')
|
||||
try:
|
||||
paletteify(path, output_path)
|
||||
except Exception as e:
|
||||
print(name, e.__class__.__name__, e, file=sys.stderr)
|
||||
50
dev_scripts/followers/follower_emotions.py
Normal file
@@ -0,0 +1,50 @@
|
||||
""" Processes & outputs follower emotion messages """
|
||||
import sys
|
||||
import re
|
||||
import textwrap
|
||||
|
||||
blank_regex = re.compile(r'\(?_+\)?')
|
||||
|
||||
|
||||
# Converts a series of message lines to a better format
|
||||
def convert_messages(infile, outfile='emotions.txt'):
|
||||
with open(infile, 'r') as f_in, open(outfile, 'w') as f_out:
|
||||
for line in f_in:
|
||||
line = line.rstrip('\n')
|
||||
if line and line[0] == '-':
|
||||
line = line[1:]
|
||||
line = line.lstrip()
|
||||
if not line:
|
||||
continue
|
||||
line = blank_regex.sub('{STR_VAR_1}', line)
|
||||
if line[-1] not in ('.', '?', '!', ':'):
|
||||
line += '.'
|
||||
print(line)
|
||||
f_out.write('\n' + line)
|
||||
|
||||
# Prepares a string for field-message display, performing line-wrapping, etc
|
||||
# Does not add a terminator, as this is done by _("")
|
||||
def prepare_string(s):
|
||||
lines = textwrap.wrap(s, width=36) # Width of message window
|
||||
s = lines[0]
|
||||
for i, line in enumerate(lines[1:]):
|
||||
ending = r'\p' if i % 2 else r'\n'
|
||||
s += ending + line
|
||||
return s
|
||||
|
||||
|
||||
# Exports up to n messages in C format to outfile
|
||||
def export_messages(infile, outfile, n=None, indent=0, start=0):
|
||||
with open(infile, 'r') as f_in:
|
||||
lines = f_in.readlines()
|
||||
if n is not None:
|
||||
lines = lines[:n]
|
||||
with open(outfile, 'w') as f_out:
|
||||
codelines = [' '*indent + f'static const u8 sCondMsg{start+i:02d}[] = _("{prepare_string(s)}");' for i, s in enumerate(lines)]
|
||||
f_out.write('\n'.join(codelines))
|
||||
print(f'{len(lines)} lines written')
|
||||
return len(lines)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
export_messages('emotions.txt', 'emotions.h', n=1, start=7)
|
||||
77
dev_scripts/followers/front_palette.py
Normal file
@@ -0,0 +1,77 @@
|
||||
#!/usr/bin/env python3
|
||||
""" Extract sprites from HGSS follower spritesheets. """
|
||||
import os.path
|
||||
from os.path import join as joinp
|
||||
import subprocess
|
||||
import sys
|
||||
from glob import glob
|
||||
|
||||
import png
|
||||
from tqdm import tqdm
|
||||
|
||||
import shutil
|
||||
|
||||
def stack_sprite(name, path):
|
||||
frames = [joinp(path, 'down', name), joinp(path, 'down', 'frame2', name),
|
||||
joinp(path, 'up', name), joinp(path, 'up', 'frame2', name),
|
||||
joinp(path, 'left', name), joinp(path, 'left', 'frame2', name)]
|
||||
output = joinp(path, name)
|
||||
subprocess.run(['convert'] + frames + ['+append', output], check=True)
|
||||
print(f'Stacked {output}')
|
||||
|
||||
def closest_color(c, palette):
|
||||
min_d = float('inf')
|
||||
best = 0
|
||||
r1, g1, b1 = c
|
||||
for i, (r2, g2, b2) in enumerate(palette[1:], 1):
|
||||
# Color diff from https://stackoverflow.com/questions/1847092/given-an-rgb-value-what-would-be-the-best-way-to-find-the-closest-match-in-the-d
|
||||
d = ((r2-r1)*0.30)**2 + ((g2-g1)*0.59)**2 + ((b2-b1)*0.11)**2
|
||||
if d < min_d:
|
||||
min_d = d
|
||||
best = i
|
||||
return best
|
||||
|
||||
def apply_palette(palette_file, input_file, output_file): # Apply one file's palette to another
|
||||
plt = png.Reader(palette_file)
|
||||
plt.read()
|
||||
target_palette = tuple(c[:3] for c in plt.palette())
|
||||
inp = png.Reader(input_file)
|
||||
w, h, rows, info = inp.read()
|
||||
src_palette = tuple(c[:3] for c in inp.palette())
|
||||
new_rows = [[closest_color(src_palette[c][:3], target_palette) if c else 0 for c in row] for row in rows]
|
||||
with open(output_file, 'wb') as f:
|
||||
w = png.Writer(width=w, height=h, bitdepth=4, palette=target_palette)
|
||||
w.write(f, new_rows)
|
||||
|
||||
# Sprites from https://veekun.com/dex/downloads
|
||||
|
||||
def apply_front_palettes(ow_dir, project_root=''):
|
||||
mon_graphics = joinp(project_root, 'graphics', 'pokemon')
|
||||
for x in os.walk(ow_dir):
|
||||
current_dir = x[0]
|
||||
sub_dir = current_dir[len(ow_dir) + 1:1000]
|
||||
t = tqdm(sorted(glob(joinp(current_dir, '*.png'))))
|
||||
spaces = 0
|
||||
for path in t:
|
||||
name, _ = os.path.splitext(os.path.basename(path))
|
||||
name = joinp(sub_dir, name)
|
||||
# old_path = joinp(project_root, 'graphics', 'object_events', 'pics', 'pokemon', f'{name}.png')
|
||||
# new_path = joinp(project_root, 'graphics', 'object_events', 'pics', 'pokemon', name, 'follower.png')
|
||||
# os.mkdir(joinp(project_root, 'graphics', 'object_events', 'pics', 'pokemon', name))
|
||||
# shutil.move(old_path, new_path)
|
||||
spaces = min(max(len(name), spaces), 10)
|
||||
t.set_description(name + ' '*(spaces-len(name)))
|
||||
output_path = joinp(project_root, 'graphics', 'object_events', 'pics', 'pokemon', f'{name}.png')
|
||||
palette_path = joinp(mon_graphics, name, 'anim_front.png')
|
||||
try:
|
||||
apply_palette(palette_path, path, output_path)
|
||||
except Exception as e:
|
||||
palette_path = joinp(mon_graphics, name, 'front.png')
|
||||
try:
|
||||
apply_palette(palette_path, path, output_path)
|
||||
except Exception as e2:
|
||||
t.write(f'{name}: {e2.__class__.__name__}: {e2}', file=sys.stderr)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
apply_front_palettes('graphics/object_events/pics/pokemon')
|
||||
26
dev_scripts/followers/palette.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/python3
|
||||
""" Extract a GBA-compatible palette from a PNG. """
|
||||
import sys
|
||||
import os.path
|
||||
import png
|
||||
|
||||
PAL_PRELUDE = 'JASC-PAL\n0100\n'
|
||||
|
||||
|
||||
def extract_palette(path):
|
||||
r = png.Reader(path)
|
||||
r.read()
|
||||
root, _ = os.path.splitext(path)
|
||||
out_path = root + '.pal'
|
||||
with open(out_path, 'w', newline='\r\n') as f:
|
||||
f.write(PAL_PRELUDE)
|
||||
colors = r.palette()
|
||||
if len(colors) < 16:
|
||||
colors += [(0, 0, 0) for _ in range(16-len(colors))]
|
||||
f.write(f'{len(colors)}\n')
|
||||
for r, g, b in colors:
|
||||
f.write(f'{r} {g} {b}\n')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
extract_palette(*sys.argv[1:])
|
||||
11
dev_scripts/followers/rename.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
lalala1="graphics/object_events/pics/pokemon/"
|
||||
lalala2="a2"
|
||||
for file in graphics/object_events/pics/pokemon/*.png; do
|
||||
name=${file##*/}
|
||||
base=${name%.png}
|
||||
#echo "${file}"
|
||||
#echo "${base}"
|
||||
echo "graphics/pokemon/${base}/follower.png"
|
||||
mv -- "$file" "graphics/pokemon/${base}/follower.png"
|
||||
done
|
||||
64
dev_scripts/followers/rename_to_graphics_pokemon.py
Normal file
@@ -0,0 +1,64 @@
|
||||
import glob
|
||||
import re
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
# THIS IS A TEMPORARY SCRIPT MADE TO MOVE EXISTING FOLLOWER GRAPHICS FROM A SINGLE DIRECTORY.
|
||||
# IT TAKES FOLLOWER GRAPHICS FROM a 'followers' FOLDER IN THE ROOT FOLDER AND MOVES THEM BASED ON THEIR NAME.
|
||||
# EG. 'followers/bulbasaur.png' WILL BE MOVED to 'graphics/pokemon/bulbasaur/follower.png'.
|
||||
#
|
||||
# I'M SAVING IT HERE IN CASE IT'S NEEDED SOMEWHERE IN THE FUTURE, THOUGH TWEAKING MIGHT BE NEEDED.
|
||||
# - AsparagusEduardo
|
||||
|
||||
def rellocate_follower_graphics():
|
||||
dict_out = {}
|
||||
count = 0
|
||||
for pth in sorted(glob.glob('followers/*.png')):
|
||||
name = pth.replace(".png", "").replace("followers/", "")
|
||||
count+=1
|
||||
#if (count == 2):
|
||||
# break
|
||||
print(name)
|
||||
newname = name
|
||||
newname = newname.replace("_female", "/female")
|
||||
newname = newname.replace("_hisuian", "/hisuian")
|
||||
newname = newname.replace("_galarian", "/galarian")
|
||||
newname = newname.replace("_origin", "/origin")
|
||||
newname = newname.replace("_therian", "/therian")
|
||||
newname = newname.replace("_east_sea", "/east_sea")
|
||||
newname = newname.replace("_crowned", "/crowned")
|
||||
|
||||
newname = newname.replace("arceus_", "arceus/")
|
||||
newname = newname.replace("burmy_", "burmy/")
|
||||
newname = newname.replace("basculin_", "basculin/")
|
||||
newname = newname.replace("castform_", "castform/")
|
||||
newname = newname.replace("calyrex_", "calyrex/")
|
||||
newname = newname.replace("deerling_", "deerling/")
|
||||
newname = newname.replace("deoxys_", "deoxys/")
|
||||
newname = newname.replace("flabebe_", "flabebe/")
|
||||
newname = newname.replace("floette_", "floette/")
|
||||
newname = newname.replace("florges_", "florges/")
|
||||
newname = newname.replace("furfrou_", "furfrou/")
|
||||
newname = newname.replace("hoopa_", "hoopa/")
|
||||
newname = newname.replace("lycanroc_", "lycanroc/")
|
||||
newname = newname.replace("meloetta_", "meloetta/")
|
||||
newname = newname.replace("necrozma_", "necrozma/")
|
||||
newname = newname.replace("pichu_", "pichu/")
|
||||
newname = newname.replace("rotom_", "rotom/")
|
||||
newname = newname.replace("sawsbuck_", "sawsbuck/")
|
||||
newname = newname.replace("toxtricity_", "toxtricity/")
|
||||
newname = newname.replace("unown_", "unown/")
|
||||
newname = newname.replace("ursaluna_", "ursaluna/")
|
||||
newname = newname.replace("vivillon_", "vivillon/")
|
||||
newname = newname.replace("wormadam_", "wormadam/")
|
||||
|
||||
if (os.path.exists('followers/' + newname) == False):
|
||||
os.mkdir('followers/' + newname)
|
||||
os.rename('followers/' + name + '.png', 'followers/' + newname + '/follower.png')
|
||||
#os.popen('cp followers/' + name + '.png followers/' + name + '/follower.png')
|
||||
#os.remove('followers/' + name + '.png')
|
||||
#print(pth)
|
||||
#subprocess.run(["tools/gbagfx/gbagfx " + name +".png " + name + "_normal.pal'" + str(count) + "'"])
|
||||
|
||||
rellocate_follower_graphics()
|
||||
@@ -52,7 +52,6 @@ static void SortSprites(u32 *spritePriorities, s32 n);
|
||||
static u32 CreateSpriteAt(u32 index, const struct SpriteTemplate *template, s16 x, s16 y, u32 subpriority);
|
||||
static void ResetOamMatrices(void);
|
||||
static void ResetSprite(struct Sprite *sprite);
|
||||
static s16 AllocSpriteTiles(u16 tileCount);
|
||||
static void RequestSpriteFrameImageCopy(u16 index, u16 tileNum, const struct SpriteFrameImage *images);
|
||||
static void ResetAllSprites(void);
|
||||
static void BeginAnim(struct Sprite *sprite);
|
||||
@@ -879,9 +878,15 @@ void BeginAnim(struct Sprite *sprite)
|
||||
SetSpriteOamFlipBits(sprite, hFlip, vFlip);
|
||||
|
||||
if (sprite->usingSheet)
|
||||
{
|
||||
if (OW_GFX_COMPRESS && sprite->sheetSpan)
|
||||
imageValue = (imageValue + 1) << sprite->sheetSpan;
|
||||
sprite->oam.tileNum = sprite->sheetTileStart + imageValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
RequestSpriteFrameImageCopy(imageValue, sprite->oam.tileNum, sprite->images);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -931,9 +936,15 @@ void AnimCmd_frame(struct Sprite *sprite)
|
||||
SetSpriteOamFlipBits(sprite, hFlip, vFlip);
|
||||
|
||||
if (sprite->usingSheet)
|
||||
{
|
||||
if (OW_GFX_COMPRESS && sprite->sheetSpan)
|
||||
imageValue = (imageValue + 1) << sprite->sheetSpan;
|
||||
sprite->oam.tileNum = sprite->sheetTileStart + imageValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
RequestSpriteFrameImageCopy(imageValue, sprite->oam.tileNum, sprite->images);
|
||||
}
|
||||
}
|
||||
|
||||
void AnimCmd_end(struct Sprite *sprite)
|
||||
@@ -965,9 +976,15 @@ void AnimCmd_jump(struct Sprite *sprite)
|
||||
SetSpriteOamFlipBits(sprite, hFlip, vFlip);
|
||||
|
||||
if (sprite->usingSheet)
|
||||
{
|
||||
if (OW_GFX_COMPRESS && sprite->sheetSpan)
|
||||
imageValue = (imageValue + 1) << sprite->sheetSpan;
|
||||
sprite->oam.tileNum = sprite->sheetTileStart + imageValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
RequestSpriteFrameImageCopy(imageValue, sprite->oam.tileNum, sprite->images);
|
||||
}
|
||||
}
|
||||
|
||||
void AnimCmd_loop(struct Sprite *sprite)
|
||||
@@ -1346,6 +1363,8 @@ void SetSpriteSheetFrameTileNum(struct Sprite *sprite)
|
||||
if (sprite->usingSheet)
|
||||
{
|
||||
s16 tileOffset = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.imageValue;
|
||||
if (OW_GFX_COMPRESS && sprite->sheetSpan)
|
||||
tileOffset = (tileOffset + 1) << sprite->sheetSpan;
|
||||
if (tileOffset < 0)
|
||||
tileOffset = 0;
|
||||
sprite->oam.tileNum = sprite->sheetTileStart + tileOffset;
|
||||
@@ -1435,11 +1454,27 @@ u16 LoadSpriteSheet(const struct SpriteSheet *sheet)
|
||||
else
|
||||
{
|
||||
AllocSpriteTileRange(sheet->tag, (u16)tileStart, sheet->size / TILE_SIZE_4BPP);
|
||||
CpuCopy16(sheet->data, (u8 *)OBJ_VRAM0 + TILE_SIZE_4BPP * tileStart, sheet->size);
|
||||
CpuSmartCopy16(sheet->data, (u8 *)OBJ_VRAM0 + TILE_SIZE_4BPP * tileStart, sheet->size);
|
||||
return (u16)tileStart;
|
||||
}
|
||||
}
|
||||
|
||||
// Like LoadSpriteSheet, but checks if already loaded, and uses template image frames
|
||||
u16 LoadSpriteSheetByTemplate(const struct SpriteTemplate *template, u32 frame, s32 offset)
|
||||
{
|
||||
u16 tileStart;
|
||||
struct SpriteSheet sheet;
|
||||
// error if template is null or tile tag or images not set
|
||||
if (!template || template->tileTag == TAG_NONE || !template->images)
|
||||
return TAG_NONE;
|
||||
if ((tileStart = GetSpriteTileStartByTag(template->tileTag)) != TAG_NONE) // return if already loaded
|
||||
return tileStart;
|
||||
sheet.data = template->images[frame].data - offset;
|
||||
sheet.size = template->images[frame].size;
|
||||
sheet.tag = template->tileTag;
|
||||
return LoadSpriteSheet(&sheet);
|
||||
}
|
||||
|
||||
void LoadSpriteSheets(const struct SpriteSheet *sheets)
|
||||
{
|
||||
u32 i;
|
||||
@@ -1691,10 +1726,36 @@ bool8 AddSubspritesToOamBuffer(struct Sprite *sprite, struct OamData *destOam, u
|
||||
destOam[i].y = baseY + y;
|
||||
destOam[i].tileNum = tileNum + subspriteTable->subsprites[i].tileOffset;
|
||||
|
||||
if (sprite->subspriteMode != SUBSPRITES_IGNORE_PRIORITY)
|
||||
if (sprite->subspriteMode < SUBSPRITES_IGNORE_PRIORITY)
|
||||
destOam[i].priority = subspriteTable->subsprites[i].priority;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const u8 sSpanPerImage[4][4] =
|
||||
{
|
||||
[ST_OAM_SQUARE] =
|
||||
{
|
||||
[ST_OAM_SIZE_0] = 0, // SPRITE_SIZE_8x8
|
||||
[ST_OAM_SIZE_1] = 2, // SPRITE_SIZE_16x16
|
||||
[ST_OAM_SIZE_2] = 4, // SPRITE_SIZE_32x32
|
||||
[ST_OAM_SIZE_3] = 6 // SPRITE_SIZE_64x64
|
||||
},
|
||||
[ST_OAM_H_RECTANGLE ... ST_OAM_V_RECTANGLE] =
|
||||
{
|
||||
[ST_OAM_SIZE_0] = 1, // SPRITE_SIZE_16x8
|
||||
[ST_OAM_SIZE_1] = 2, // SPRITE_SIZE_32x8
|
||||
[ST_OAM_SIZE_2] = 3, // SPRITE_SIZE_32x16
|
||||
[ST_OAM_SIZE_3] = 5 // SPRITE_SIZE_64x32
|
||||
},
|
||||
};
|
||||
|
||||
// For a given sprite shape & size, returns
|
||||
// the value for sheetSpan:
|
||||
// i.e, a 32x32 sprite has span 4, because 1 << 4 == 16 == 4x4 tiles
|
||||
u32 GetSpanPerImage(u32 shape, u32 size)
|
||||
{
|
||||
return sSpanPerImage[shape][size];
|
||||
}
|
||||
|
||||
@@ -217,22 +217,26 @@ struct Sprite
|
||||
// general purpose data fields
|
||||
/*0x2E*/ s16 data[8];
|
||||
|
||||
/*0x3E*/ bool16 inUse:1; //1
|
||||
bool16 coordOffsetEnabled:1; //2
|
||||
bool16 invisible:1; //4
|
||||
bool16 flags_3:1; //8
|
||||
bool16 flags_4:1; //0x10
|
||||
bool16 flags_5:1; //0x20
|
||||
bool16 flags_6:1; //0x40
|
||||
bool16 flags_7:1; //0x80
|
||||
/*0x3F*/ bool16 hFlip:1; //1
|
||||
bool16 vFlip:1; //2
|
||||
bool16 animBeginning:1; //4
|
||||
bool16 affineAnimBeginning:1; //8
|
||||
bool16 animEnded:1; //0x10
|
||||
bool16 affineAnimEnded:1; //0x20
|
||||
bool16 usingSheet:1; //0x40
|
||||
bool16 anchored:1; //0x80
|
||||
/*0x3E*/ u16 inUse:1; //1
|
||||
u16 coordOffsetEnabled:1; //2
|
||||
u16 invisible:1; //4
|
||||
u16 flags_3:1; //8
|
||||
// if nonzero, tile offset for usingSheet sprites
|
||||
// is (offset + 1) << sheetSpan;
|
||||
// (This allows using frame-based anim tables for sheet sprites)
|
||||
u16 sheetSpan:3;
|
||||
// u16 flags_4:1; //0x10
|
||||
// u16 flags_5:1; //0x20
|
||||
// u16 flags_6:1; //0x40
|
||||
u16 flags_7:1; //0x80
|
||||
/*0x3F*/ u16 hFlip:1; //1
|
||||
u16 vFlip:1; //2
|
||||
u16 animBeginning:1; //4
|
||||
u16 affineAnimBeginning:1; //8
|
||||
u16 animEnded:1; //0x10
|
||||
u16 affineAnimEnded:1; //0x20
|
||||
u16 usingSheet:1; //0x40
|
||||
u16 anchored:1; //0x80
|
||||
|
||||
/*0x40*/ u16 sheetTileStart;
|
||||
|
||||
@@ -298,7 +302,9 @@ void FreeOamMatrix(u8 matrixNum);
|
||||
void InitSpriteAffineAnim(struct Sprite *sprite);
|
||||
void SetOamMatrixRotationScaling(u8 matrixNum, s16 xScale, s16 yScale, u16 rotation);
|
||||
u16 LoadSpriteSheet(const struct SpriteSheet *sheet);
|
||||
u16 LoadSpriteSheetByTemplate(const struct SpriteTemplate *template, u32 frame, s32 offset);
|
||||
void LoadSpriteSheets(const struct SpriteSheet *sheets);
|
||||
s16 AllocSpriteTiles(u16 tileCount);
|
||||
u16 AllocTilesForSpriteSheet(struct SpriteSheet *sheet);
|
||||
void AllocTilesForSpriteSheets(struct SpriteSheet *sheets);
|
||||
void LoadTilesForSpriteSheet(const struct SpriteSheet *sheet);
|
||||
@@ -324,5 +330,6 @@ void CopyFromSprites(u8 *dest);
|
||||
u8 SpriteTileAllocBitmapOp(u16 bit, u8 op);
|
||||
void ClearSpriteCopyRequests(void);
|
||||
void ResetAffineAnimData(void);
|
||||
u32 GetSpanPerImage(u32 shape, u32 size);
|
||||
|
||||
#endif //GUARD_SPRITE_H
|
||||
|
||||
BIN
graphics/field_effects/pics/bug_tracks.png
Normal file
|
After Width: | Height: | Size: 275 B |
|
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 144 B After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 4.7 KiB |
BIN
graphics/field_effects/pics/slither_tracks.png
Normal file
|
After Width: | Height: | Size: 354 B |
BIN
graphics/field_effects/pics/spot_tracks.png
Normal file
|
After Width: | Height: | Size: 269 B |
19
graphics/misc/emotes.pal
Normal file
@@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
255 255 0
|
||||
151 48 0
|
||||
74 75 87
|
||||
88 88 97
|
||||
164 72 167
|
||||
248 63 2
|
||||
78 128 207
|
||||
48 160 0
|
||||
237 131 0
|
||||
205 144 203
|
||||
168 168 178
|
||||
251 167 159
|
||||
240 176 183
|
||||
219 181 221
|
||||
165 225 69
|
||||
247 249 246
|
||||
BIN
graphics/misc/emotes.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
graphics/object_events/pics/misc/ball_beast.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
graphics/object_events/pics/misc/ball_cherish.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
graphics/object_events/pics/misc/ball_dive.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
graphics/object_events/pics/misc/ball_dream.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
graphics/object_events/pics/misc/ball_dusk.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
graphics/object_events/pics/misc/ball_fast.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
graphics/object_events/pics/misc/ball_friend.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
graphics/object_events/pics/misc/ball_great.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
graphics/object_events/pics/misc/ball_heal.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
graphics/object_events/pics/misc/ball_heavy.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
graphics/object_events/pics/misc/ball_level.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
graphics/object_events/pics/misc/ball_love.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
graphics/object_events/pics/misc/ball_lure.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
graphics/object_events/pics/misc/ball_luxury.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
graphics/object_events/pics/misc/ball_master.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
graphics/object_events/pics/misc/ball_moon.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
graphics/object_events/pics/misc/ball_nest.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
graphics/object_events/pics/misc/ball_net.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
graphics/object_events/pics/misc/ball_park.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
graphics/object_events/pics/misc/ball_poke.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
graphics/object_events/pics/misc/ball_premier.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
graphics/object_events/pics/misc/ball_quick.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
graphics/object_events/pics/misc/ball_repeat.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
graphics/object_events/pics/misc/ball_safari.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
graphics/object_events/pics/misc/ball_sport.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
graphics/object_events/pics/misc/ball_strange.png
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
graphics/object_events/pics/misc/ball_timer.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
graphics/object_events/pics/misc/ball_ultra.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 192 B |
BIN
graphics/object_events/pics/misc/light.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 325 B |
|
Before Width: | Height: | Size: 308 B After Width: | Height: | Size: 308 B |
|
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 547 B |
|
Before Width: | Height: | Size: 640 B After Width: | Height: | Size: 640 B |
|
Before Width: | Height: | Size: 726 B After Width: | Height: | Size: 726 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 529 B After Width: | Height: | Size: 529 B |
|
Before Width: | Height: | Size: 345 B After Width: | Height: | Size: 345 B |
|
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 469 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 573 B After Width: | Height: | Size: 573 B |
|
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 410 B |
|
Before Width: | Height: | Size: 801 B After Width: | Height: | Size: 801 B |
|
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 335 B |
|
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 674 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 525 B |
|
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 332 B |
BIN
graphics/object_events/pics/pokemon_old/substitute.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 335 B |