sovereignx/include/trainer_see.h

33 lines
947 B
C
Raw Normal View History

#ifndef GUARD_TRAINER_SEE_H
#define GUARD_TRAINER_SEE_H
2017-12-01 20:25:13 +00:00
struct ApproachingTrainer
{
u8 objectEventId;
2017-12-18 18:35:50 +00:00
u8 radius; // plus 1
2017-12-01 20:25:13 +00:00
const u8 *trainerScriptPtr;
2017-12-18 22:26:44 +00:00
u8 taskId;
2017-12-01 20:25:13 +00:00
};
2019-11-01 07:41:55 +00:00
extern u16 gWhichTrainerToFaceAfterBattle;
extern u8 gPostBattleMovementScript[4];
2017-12-18 22:26:44 +00:00
extern struct ApproachingTrainer gApproachingTrainers[2];
2017-12-19 16:33:07 +00:00
extern u8 gNoOfApproachingTrainers;
2019-11-01 07:41:55 +00:00
extern bool8 gTrainerApproachedPlayer;
2017-12-19 16:33:07 +00:00
extern u8 gApproachingTrainerId;
2017-12-01 20:25:13 +00:00
2017-12-19 16:18:44 +00:00
bool8 CheckForTrainersWantingBattle(void);
void SetBuriedTrainerMovement(struct ObjectEvent *var);
void DoTrainerApproach(void);
2018-12-07 22:50:56 +00:00
void TryPrepareSecondApproachingTrainer(void);
u8 FldEff_ExclamationMarkIcon(void);
u8 FldEff_QuestionMarkIcon(void);
2017-12-19 16:18:44 +00:00
u8 FldEff_HeartIcon(void);
u8 GetCurrentApproachingTrainerObjectEventId(void);
u8 GetChosenApproachingTrainerObjectEventId(u8 arrayId);
2019-11-01 07:41:55 +00:00
void PlayerFaceTrainerAfterBattle(void);
Port pokefirered's Vs. Seeker to pokeemerald (#3256) * First version of Vs. Seeker * Update movement.inc https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files/98f7e9978d8cd16083ea1bc7857f4f0235a9f1af#r1306721924 * Update field_effect_scripts.s https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722004 * Update field_effect_scripts.s https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722024 * Update item_use.h https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722401 * Update movement_action_func_tables.h https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722828 * Update event_object_movement.c https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722887 * Update overworld.c https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306723396 * Update vs_seeker.h https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306724158 * Update vs_seeker.c Addressed some cleanup comments from SBird * Update UpdateRandomTrainerRematches Fixed typo in ClearAllTrainerRematchStates Fixed types in GetRematchableTrainerLocalId * Updated UseVsSeekerEffect_2 * Updated UseVsSeekerEffect_3 * Updated UseVsSeekerEffect_4 * Fixed bug that allowed Vs Seeker to be used indoors in correct places Moved VsSeeker function declarations into header * Refactored FieldUseFunc_VsSeeker * Added curly braces to else case in FieldUseFunc_VsSeeker * renamed data[x] in Task_ResetObjectsRematchWantedState * Refactored Task_ResetObjectsRematchWantedState * Refactored VsSeekerResetObjectMovementAfterChargeComplete * Refactored ResetMovementOfRematchableTrainers * Refactored GatherNearbyTrainerInfo * Refactored Task_VsSeeker_3 * CanUseVsSeeker * Refactored GetVsSeekerResponseInArea * GetCurVsSeekerResponse refactored * Cleaned up GetTrainerFlagFromScript * Gave sensible names to Task_VsSeeker * Fixed two bugs where player would not have the right gfx state after using VsSeeker on a Bike or Underwater * Renamed UseVsSeeker Functions * Added I_VS_SEEKER_CHARGING to make Vs. Seeker broken until flag is assigned Removed extra VsSeeker animation code * Addressed PR feedback * Fixed issue with building non-modern * Refactored GetRunningBehaviorFromGraphicsId and renamed to GetResponseMovementTypeFromTrainerGraphicsId * Addresses Lunos's PR feedback: https://github.com/rh-hideout/pokeemerald-expansion/pull/3256\#pullrequestreview-1623547850 Removed the check to see if a map was not indoors to improve readability Made IsValidLocationForVsSeeker into a static function * Added changes in response to Jasper's feedback https://github.com/rh-hideout/pokeemerald-expansion/pull/3256\#pullrequestreview-1725276522 * Updated with Edu's discord feedback https://discord.com/channels/419213663107416084/1135040810082123907/1176872015085453392 * Removed ifdef tags around the repo unless needed https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files/b5dc744cedc8e14c88d461afbbdc693c4f54e950
2023-11-26 17:58:43 +00:00
u8 FldEff_DoubleExclMarkIcon(void);
u8 FldEff_XIcon(void);
2017-12-18 22:26:44 +00:00
#endif // GUARD_TRAINER_SEE_H