mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Rename 'hidden' Trainers/obj events to 'buried'
This commit is contained in:
parent
78925916f3
commit
70ff6c3b84
@ -9,7 +9,7 @@ LavaridgeTown_Gym_1F_MapScripts:: @ 81FE6F4
|
|||||||
|
|
||||||
LavaridgeTown_Gym_1F_OnTransition: @ 81FE6FA
|
LavaridgeTown_Gym_1F_OnTransition: @ 81FE6FA
|
||||||
call LavaridgeTown_Gym_1F_EventScript_SetTrainerTempVars
|
call LavaridgeTown_Gym_1F_EventScript_SetTrainerTempVars
|
||||||
call LavaridgeTown_Gym_1F_EventScript_CheckHideTrainers
|
call LavaridgeTown_Gym_1F_EventScript_CheckBuryTrainers
|
||||||
end
|
end
|
||||||
|
|
||||||
@ Unclear where/if these temp vars are getting checked
|
@ Unclear where/if these temp vars are getting checked
|
||||||
@ -33,19 +33,19 @@ LavaridgeTown_Gym_1F_EventScript_SetDanielleTempVar:: @ 81FE748
|
|||||||
LavaridgeTown_Gym_1F_EventScript_EndSetTrainerTempVars:: @ 81FE756
|
LavaridgeTown_Gym_1F_EventScript_EndSetTrainerTempVars:: @ 81FE756
|
||||||
return
|
return
|
||||||
|
|
||||||
LavaridgeTown_Gym_1F_EventScript_CheckHideTrainers:: @ 81FE757
|
LavaridgeTown_Gym_1F_EventScript_CheckBuryTrainers:: @ 81FE757
|
||||||
goto_if_defeated TRAINER_COLE, LavaridgeTown_Gym_1F_EventScript_CheckHideGerald
|
goto_if_defeated TRAINER_COLE, LavaridgeTown_Gym_1F_EventScript_CheckBuryGerald
|
||||||
setobjectmovementtype LOCALID_COLE, MOVEMENT_TYPE_HIDDEN
|
setobjectmovementtype LOCALID_COLE, MOVEMENT_TYPE_BURIED
|
||||||
LavaridgeTown_Gym_1F_EventScript_CheckHideGerald:: @ 81FE764
|
LavaridgeTown_Gym_1F_EventScript_CheckBuryGerald:: @ 81FE764
|
||||||
goto_if_defeated TRAINER_GERALD, LavaridgeTown_Gym_1F_EventScript_CheckHideAxle
|
goto_if_defeated TRAINER_GERALD, LavaridgeTown_Gym_1F_EventScript_CheckBuryAxle
|
||||||
setobjectmovementtype LOCALID_GERALD, MOVEMENT_TYPE_HIDDEN
|
setobjectmovementtype LOCALID_GERALD, MOVEMENT_TYPE_BURIED
|
||||||
LavaridgeTown_Gym_1F_EventScript_CheckHideAxle:: @ 81FE771
|
LavaridgeTown_Gym_1F_EventScript_CheckBuryAxle:: @ 81FE771
|
||||||
goto_if_defeated TRAINER_AXLE, LavaridgeTown_Gym_1F_EventScript_CheckHideDanielle
|
goto_if_defeated TRAINER_AXLE, LavaridgeTown_Gym_1F_EventScript_CheckBuryDanielle
|
||||||
setobjectmovementtype LOCALID_AXLE, MOVEMENT_TYPE_HIDDEN
|
setobjectmovementtype LOCALID_AXLE, MOVEMENT_TYPE_BURIED
|
||||||
LavaridgeTown_Gym_1F_EventScript_CheckHideDanielle:: @ 81FE77E
|
LavaridgeTown_Gym_1F_EventScript_CheckBuryDanielle:: @ 81FE77E
|
||||||
goto_if_defeated TRAINER_DANIELLE, LavaridgeTown_Gym_1F_EventScript_EndCheckHideTrainers
|
goto_if_defeated TRAINER_DANIELLE, LavaridgeTown_Gym_1F_EventScript_EndCheckBuryTrainers
|
||||||
setobjectmovementtype LOCALID_DANIELLE, MOVEMENT_TYPE_HIDDEN
|
setobjectmovementtype LOCALID_DANIELLE, MOVEMENT_TYPE_BURIED
|
||||||
LavaridgeTown_Gym_1F_EventScript_EndCheckHideTrainers:: @ 81FE78B
|
LavaridgeTown_Gym_1F_EventScript_EndCheckBuryTrainers:: @ 81FE78B
|
||||||
return
|
return
|
||||||
|
|
||||||
LavaridgeTown_Gym_1F_EventScript_Flannery:: @ 81FE78C
|
LavaridgeTown_Gym_1F_EventScript_Flannery:: @ 81FE78C
|
||||||
|
@ -9,7 +9,7 @@ LavaridgeTown_Gym_B1F_MapScripts:: @ 81FF87E
|
|||||||
|
|
||||||
LavaridgeTown_Gym_B1F_OnTransition: @ 81FF884
|
LavaridgeTown_Gym_B1F_OnTransition: @ 81FF884
|
||||||
call LavaridgeTown_Gym_B1F_EventScript_SetTrainerTempVars
|
call LavaridgeTown_Gym_B1F_EventScript_SetTrainerTempVars
|
||||||
call LavaridgeTown_Gym_B1F_EventScript_CheckHideTrainers
|
call LavaridgeTown_Gym_B1F_EventScript_CheckBuryTrainers
|
||||||
end
|
end
|
||||||
|
|
||||||
@ Unclear where/if these temp vars are getting checked
|
@ Unclear where/if these temp vars are getting checked
|
||||||
@ -32,18 +32,18 @@ LavaridgeTown_Gym_B1F_EventScript_SetEliTempVar:: @ 81FF8CD
|
|||||||
LavaridgeTown_Gym_B1F_EventScript_EndSetTrainerTempVars:: @ 81FF8DB
|
LavaridgeTown_Gym_B1F_EventScript_EndSetTrainerTempVars:: @ 81FF8DB
|
||||||
return
|
return
|
||||||
|
|
||||||
LavaridgeTown_Gym_B1F_EventScript_CheckHideTrainers:: @ 81FF8DC
|
LavaridgeTown_Gym_B1F_EventScript_CheckBuryTrainers:: @ 81FF8DC
|
||||||
goto_if_defeated TRAINER_KEEGAN, LavaridgeTown_Gym_B1F_EventScript_CheckHideJace
|
goto_if_defeated TRAINER_KEEGAN, LavaridgeTown_Gym_B1F_EventScript_CheckBuryJace
|
||||||
setobjectmovementtype LOCALID_KEEGAN, MOVEMENT_TYPE_HIDDEN
|
setobjectmovementtype LOCALID_KEEGAN, MOVEMENT_TYPE_BURIED
|
||||||
LavaridgeTown_Gym_B1F_EventScript_CheckHideJace:: @ 81FF8E9
|
LavaridgeTown_Gym_B1F_EventScript_CheckBuryJace:: @ 81FF8E9
|
||||||
goto_if_defeated TRAINER_JACE, LavaridgeTown_Gym_B1F_EventScript_CheckHideJeff
|
goto_if_defeated TRAINER_JACE, LavaridgeTown_Gym_B1F_EventScript_CheckBuryJeff
|
||||||
setobjectmovementtype LOCALID_JACE, MOVEMENT_TYPE_HIDDEN
|
setobjectmovementtype LOCALID_JACE, MOVEMENT_TYPE_BURIED
|
||||||
LavaridgeTown_Gym_B1F_EventScript_CheckHideJeff:: @ 81FF8F6
|
LavaridgeTown_Gym_B1F_EventScript_CheckBuryJeff:: @ 81FF8F6
|
||||||
goto_if_defeated TRAINER_JEFF, LavaridgeTown_Gym_B1F_EventScript_CheckHideEli
|
goto_if_defeated TRAINER_JEFF, LavaridgeTown_Gym_B1F_EventScript_CheckBuryEli
|
||||||
setobjectmovementtype LOCALID_JEFF, MOVEMENT_TYPE_HIDDEN
|
setobjectmovementtype LOCALID_JEFF, MOVEMENT_TYPE_BURIED
|
||||||
LavaridgeTown_Gym_B1F_EventScript_CheckHideEli:: @ 81FF903
|
LavaridgeTown_Gym_B1F_EventScript_CheckBuryEli:: @ 81FF903
|
||||||
goto_if_defeated TRAINER_ELI, LavaridgeTown_Gym_B1F_EventScript_EndCheckHideTrainers
|
goto_if_defeated TRAINER_ELI, LavaridgeTown_Gym_B1F_EventScript_EndCheckBuryTrainers
|
||||||
setobjectmovementtype LOCALID_ELI, MOVEMENT_TYPE_HIDDEN
|
setobjectmovementtype LOCALID_ELI, MOVEMENT_TYPE_BURIED
|
||||||
LavaridgeTown_Gym_B1F_EventScript_EndCheckHideTrainers:: @ 81FF910
|
LavaridgeTown_Gym_B1F_EventScript_EndCheckBuryTrainers:: @ 81FF910
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@
|
|||||||
"x": 29,
|
"x": 29,
|
||||||
"y": 6,
|
"y": 6,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
"movement_type": "MOVEMENT_TYPE_HIDDEN",
|
"movement_type": "MOVEMENT_TYPE_BURIED",
|
||||||
"movement_range_x": 0,
|
"movement_range_x": 0,
|
||||||
"movement_range_y": 0,
|
"movement_range_y": 0,
|
||||||
"trainer_type": "TRAINER_TYPE_BURIED",
|
"trainer_type": "TRAINER_TYPE_BURIED",
|
||||||
@ -139,7 +139,7 @@
|
|||||||
"x": 71,
|
"x": 71,
|
||||||
"y": 2,
|
"y": 2,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
"movement_type": "MOVEMENT_TYPE_HIDDEN",
|
"movement_type": "MOVEMENT_TYPE_BURIED",
|
||||||
"movement_range_x": 0,
|
"movement_range_x": 0,
|
||||||
"movement_range_y": 0,
|
"movement_range_y": 0,
|
||||||
"trainer_type": "TRAINER_TYPE_BURIED",
|
"trainer_type": "TRAINER_TYPE_BURIED",
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
#define MOVEMENT_TYPE_COPY_PLAYER_OPPOSITE_IN_GRASS 0x3C
|
#define MOVEMENT_TYPE_COPY_PLAYER_OPPOSITE_IN_GRASS 0x3C
|
||||||
#define MOVEMENT_TYPE_COPY_PLAYER_COUNTERCLOCKWISE_IN_GRASS 0x3D
|
#define MOVEMENT_TYPE_COPY_PLAYER_COUNTERCLOCKWISE_IN_GRASS 0x3D
|
||||||
#define MOVEMENT_TYPE_COPY_PLAYER_CLOCKWISE_IN_GRASS 0x3E
|
#define MOVEMENT_TYPE_COPY_PLAYER_CLOCKWISE_IN_GRASS 0x3E
|
||||||
#define MOVEMENT_TYPE_HIDDEN 0x3F
|
#define MOVEMENT_TYPE_BURIED 0x3F
|
||||||
#define MOVEMENT_TYPE_WALK_IN_PLACE_DOWN 0x40
|
#define MOVEMENT_TYPE_WALK_IN_PLACE_DOWN 0x40
|
||||||
#define MOVEMENT_TYPE_WALK_IN_PLACE_UP 0x41
|
#define MOVEMENT_TYPE_WALK_IN_PLACE_UP 0x41
|
||||||
#define MOVEMENT_TYPE_WALK_IN_PLACE_LEFT 0x42
|
#define MOVEMENT_TYPE_WALK_IN_PLACE_LEFT 0x42
|
||||||
|
@ -255,7 +255,7 @@ void MovementType_CopyPlayer(struct Sprite *);
|
|||||||
void MovementType_TreeDisguise(struct Sprite *);
|
void MovementType_TreeDisguise(struct Sprite *);
|
||||||
void MovementType_MountainDisguise(struct Sprite *);
|
void MovementType_MountainDisguise(struct Sprite *);
|
||||||
void MovementType_CopyPlayerInGrass(struct Sprite *);
|
void MovementType_CopyPlayerInGrass(struct Sprite *);
|
||||||
void MovementType_Hidden(struct Sprite *);
|
void MovementType_Buried(struct Sprite *);
|
||||||
void MovementType_WalkInPlace(struct Sprite *);
|
void MovementType_WalkInPlace(struct Sprite *);
|
||||||
void MovementType_JogInPlace(struct Sprite *);
|
void MovementType_JogInPlace(struct Sprite *);
|
||||||
void MovementType_RunInPlace(struct Sprite *);
|
void MovementType_RunInPlace(struct Sprite *);
|
||||||
@ -413,7 +413,7 @@ bool8 cph_IM_DIFFERENT(struct ObjectEvent *, struct Sprite *, u8, bool8(u8));
|
|||||||
bool8 CopyablePlayerMovement_GoSpeed4(struct ObjectEvent *, struct Sprite *, u8, bool8(u8));
|
bool8 CopyablePlayerMovement_GoSpeed4(struct ObjectEvent *, struct Sprite *, u8, bool8(u8));
|
||||||
bool8 CopyablePlayerMovement_Jump(struct ObjectEvent *, struct Sprite *, u8, bool8(u8));
|
bool8 CopyablePlayerMovement_Jump(struct ObjectEvent *, struct Sprite *, u8, bool8(u8));
|
||||||
u8 MovementType_CopyPlayerInGrass_Step1(struct ObjectEvent *, struct Sprite *);
|
u8 MovementType_CopyPlayerInGrass_Step1(struct ObjectEvent *, struct Sprite *);
|
||||||
u8 MovementType_Hidden_Step0(struct ObjectEvent *, struct Sprite *);
|
u8 MovementType_Buried_Step0(struct ObjectEvent *, struct Sprite *);
|
||||||
u8 MovementType_WalkInPlace_Step0(struct ObjectEvent *, struct Sprite *);
|
u8 MovementType_WalkInPlace_Step0(struct ObjectEvent *, struct Sprite *);
|
||||||
u8 MovementType_MoveInPlace_Step1(struct ObjectEvent *, struct Sprite *);
|
u8 MovementType_MoveInPlace_Step1(struct ObjectEvent *, struct Sprite *);
|
||||||
u8 MovementType_WalkSlowlyInPlace_Step0(struct ObjectEvent *, struct Sprite *);
|
u8 MovementType_WalkSlowlyInPlace_Step0(struct ObjectEvent *, struct Sprite *);
|
||||||
|
@ -17,7 +17,7 @@ extern bool8 gTrainerApproachedPlayer;
|
|||||||
extern u8 gApproachingTrainerId;
|
extern u8 gApproachingTrainerId;
|
||||||
|
|
||||||
bool8 CheckForTrainersWantingBattle(void);
|
bool8 CheckForTrainersWantingBattle(void);
|
||||||
void SetHiddenTrainerMovement(struct ObjectEvent *var);
|
void SetBuriedTrainerMovement(struct ObjectEvent *var);
|
||||||
void DoTrainerApproach(void);
|
void DoTrainerApproach(void);
|
||||||
void TryPrepareSecondApproachingTrainer(void);
|
void TryPrepareSecondApproachingTrainer(void);
|
||||||
u8 FldEff_ExclamationMarkIcon(void);
|
u8 FldEff_ExclamationMarkIcon(void);
|
||||||
|
@ -407,8 +407,8 @@ u8 (*const gMovementTypeFuncs_CopyPlayerInGrass[])(struct ObjectEvent *, struct
|
|||||||
MovementType_CopyPlayer_Step2,
|
MovementType_CopyPlayer_Step2,
|
||||||
};
|
};
|
||||||
|
|
||||||
u8 (*const gMovementTypeFuncs_Hidden[])(struct ObjectEvent *, struct Sprite *) = {
|
u8 (*const gMovementTypeFuncs_Buried[])(struct ObjectEvent *, struct Sprite *) = {
|
||||||
MovementType_Hidden_Step0,
|
MovementType_Buried_Step0,
|
||||||
};
|
};
|
||||||
|
|
||||||
u8 (*const gMovementTypeFuncs_WalkInPlace[])(struct ObjectEvent *, struct Sprite *) = {
|
u8 (*const gMovementTypeFuncs_WalkInPlace[])(struct ObjectEvent *, struct Sprite *) = {
|
||||||
|
@ -101,7 +101,7 @@ static void DoGroundEffects_OnFinishStep(struct ObjectEvent*, struct Sprite*);
|
|||||||
static void UpdateObjectEventSpritePosition(struct Sprite*);
|
static void UpdateObjectEventSpritePosition(struct Sprite*);
|
||||||
static void ApplyLevitateMovement(u8);
|
static void ApplyLevitateMovement(u8);
|
||||||
static bool8 MovementType_Disguise_Callback(struct ObjectEvent *, struct Sprite *);
|
static bool8 MovementType_Disguise_Callback(struct ObjectEvent *, struct Sprite *);
|
||||||
static bool8 MovementType_Hidden_Callback(struct ObjectEvent *, struct Sprite *);
|
static bool8 MovementType_Buried_Callback(struct ObjectEvent *, struct Sprite *);
|
||||||
static void CreateReflectionEffectSprites(void);
|
static void CreateReflectionEffectSprites(void);
|
||||||
static u8 GetObjectEventIdByLocalId(u8);
|
static u8 GetObjectEventIdByLocalId(u8);
|
||||||
static u8 GetObjectEventIdByLocalIdAndMapInternal(u8, u8, u8);
|
static u8 GetObjectEventIdByLocalIdAndMapInternal(u8, u8, u8);
|
||||||
@ -212,7 +212,7 @@ static void (*const sMovementTypeCallbacks[])(struct Sprite *) =
|
|||||||
[MOVEMENT_TYPE_COPY_PLAYER_OPPOSITE_IN_GRASS] = MovementType_CopyPlayerInGrass,
|
[MOVEMENT_TYPE_COPY_PLAYER_OPPOSITE_IN_GRASS] = MovementType_CopyPlayerInGrass,
|
||||||
[MOVEMENT_TYPE_COPY_PLAYER_COUNTERCLOCKWISE_IN_GRASS] = MovementType_CopyPlayerInGrass,
|
[MOVEMENT_TYPE_COPY_PLAYER_COUNTERCLOCKWISE_IN_GRASS] = MovementType_CopyPlayerInGrass,
|
||||||
[MOVEMENT_TYPE_COPY_PLAYER_CLOCKWISE_IN_GRASS] = MovementType_CopyPlayerInGrass,
|
[MOVEMENT_TYPE_COPY_PLAYER_CLOCKWISE_IN_GRASS] = MovementType_CopyPlayerInGrass,
|
||||||
[MOVEMENT_TYPE_HIDDEN] = MovementType_Hidden,
|
[MOVEMENT_TYPE_BURIED] = MovementType_Buried,
|
||||||
[MOVEMENT_TYPE_WALK_IN_PLACE_DOWN] = MovementType_WalkInPlace,
|
[MOVEMENT_TYPE_WALK_IN_PLACE_DOWN] = MovementType_WalkInPlace,
|
||||||
[MOVEMENT_TYPE_WALK_IN_PLACE_UP] = MovementType_WalkInPlace,
|
[MOVEMENT_TYPE_WALK_IN_PLACE_UP] = MovementType_WalkInPlace,
|
||||||
[MOVEMENT_TYPE_WALK_IN_PLACE_LEFT] = MovementType_WalkInPlace,
|
[MOVEMENT_TYPE_WALK_IN_PLACE_LEFT] = MovementType_WalkInPlace,
|
||||||
@ -296,7 +296,7 @@ const u8 gRangedMovementTypes[] = {
|
|||||||
[MOVEMENT_TYPE_COPY_PLAYER_OPPOSITE_IN_GRASS] = 1,
|
[MOVEMENT_TYPE_COPY_PLAYER_OPPOSITE_IN_GRASS] = 1,
|
||||||
[MOVEMENT_TYPE_COPY_PLAYER_COUNTERCLOCKWISE_IN_GRASS] = 1,
|
[MOVEMENT_TYPE_COPY_PLAYER_COUNTERCLOCKWISE_IN_GRASS] = 1,
|
||||||
[MOVEMENT_TYPE_COPY_PLAYER_CLOCKWISE_IN_GRASS] = 1,
|
[MOVEMENT_TYPE_COPY_PLAYER_CLOCKWISE_IN_GRASS] = 1,
|
||||||
[MOVEMENT_TYPE_HIDDEN] = 0,
|
[MOVEMENT_TYPE_BURIED] = 0,
|
||||||
[MOVEMENT_TYPE_WALK_IN_PLACE_DOWN] = 0,
|
[MOVEMENT_TYPE_WALK_IN_PLACE_DOWN] = 0,
|
||||||
[MOVEMENT_TYPE_WALK_IN_PLACE_UP] = 0,
|
[MOVEMENT_TYPE_WALK_IN_PLACE_UP] = 0,
|
||||||
[MOVEMENT_TYPE_WALK_IN_PLACE_LEFT] = 0,
|
[MOVEMENT_TYPE_WALK_IN_PLACE_LEFT] = 0,
|
||||||
@ -380,7 +380,7 @@ const u8 gInitialMovementTypeFacingDirections[] = {
|
|||||||
[MOVEMENT_TYPE_COPY_PLAYER_OPPOSITE_IN_GRASS] = DIR_SOUTH,
|
[MOVEMENT_TYPE_COPY_PLAYER_OPPOSITE_IN_GRASS] = DIR_SOUTH,
|
||||||
[MOVEMENT_TYPE_COPY_PLAYER_COUNTERCLOCKWISE_IN_GRASS] = DIR_WEST,
|
[MOVEMENT_TYPE_COPY_PLAYER_COUNTERCLOCKWISE_IN_GRASS] = DIR_WEST,
|
||||||
[MOVEMENT_TYPE_COPY_PLAYER_CLOCKWISE_IN_GRASS] = DIR_EAST,
|
[MOVEMENT_TYPE_COPY_PLAYER_CLOCKWISE_IN_GRASS] = DIR_EAST,
|
||||||
[MOVEMENT_TYPE_HIDDEN] = DIR_SOUTH,
|
[MOVEMENT_TYPE_BURIED] = DIR_SOUTH,
|
||||||
[MOVEMENT_TYPE_WALK_IN_PLACE_DOWN] = DIR_SOUTH,
|
[MOVEMENT_TYPE_WALK_IN_PLACE_DOWN] = DIR_SOUTH,
|
||||||
[MOVEMENT_TYPE_WALK_IN_PLACE_UP] = DIR_NORTH,
|
[MOVEMENT_TYPE_WALK_IN_PLACE_UP] = DIR_NORTH,
|
||||||
[MOVEMENT_TYPE_WALK_IN_PLACE_LEFT] = DIR_WEST,
|
[MOVEMENT_TYPE_WALK_IN_PLACE_LEFT] = DIR_WEST,
|
||||||
@ -4467,7 +4467,7 @@ void MovementType_MountainDisguise(struct Sprite *sprite)
|
|||||||
UpdateObjectEventCurrentMovement(&gObjectEvents[sprite->data[0]], sprite, MovementType_Disguise_Callback);
|
UpdateObjectEventCurrentMovement(&gObjectEvents[sprite->data[0]], sprite, MovementType_Disguise_Callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MovementType_Hidden(struct Sprite *sprite)
|
void MovementType_Buried(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (!sprite->data[7])
|
if (!sprite->data[7])
|
||||||
{
|
{
|
||||||
@ -4476,15 +4476,15 @@ void MovementType_Hidden(struct Sprite *sprite)
|
|||||||
sprite->oam.priority = 3;
|
sprite->oam.priority = 3;
|
||||||
sprite->data[7]++;
|
sprite->data[7]++;
|
||||||
}
|
}
|
||||||
UpdateObjectEventCurrentMovement(&gObjectEvents[sprite->data[0]], sprite, MovementType_Hidden_Callback);
|
UpdateObjectEventCurrentMovement(&gObjectEvents[sprite->data[0]], sprite, MovementType_Buried_Callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 MovementType_Hidden_Callback(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
static bool8 MovementType_Buried_Callback(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
return gMovementTypeFuncs_Hidden[sprite->data[1]](objectEvent, sprite);
|
return gMovementTypeFuncs_Buried[sprite->data[1]](objectEvent, sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 MovementType_Hidden_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
bool8 MovementType_Buried_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
ClearObjectEventMovement(objectEvent, sprite);
|
ClearObjectEventMovement(objectEvent, sprite);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -6600,9 +6600,9 @@ bool8 MovementAction_EmoteHeart_Step0(struct ObjectEvent *objectEvent, struct Sp
|
|||||||
|
|
||||||
bool8 MovementAction_RevealTrainer_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
bool8 MovementAction_RevealTrainer_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (objectEvent->movementType == MOVEMENT_TYPE_HIDDEN)
|
if (objectEvent->movementType == MOVEMENT_TYPE_BURIED)
|
||||||
{
|
{
|
||||||
SetHiddenTrainerMovement(objectEvent);
|
SetBuriedTrainerMovement(objectEvent);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (objectEvent->movementType != MOVEMENT_TYPE_TREE_DISGUISE && objectEvent->movementType != MOVEMENT_TYPE_MOUNTAIN_DISGUISE)
|
if (objectEvent->movementType != MOVEMENT_TYPE_TREE_DISGUISE && objectEvent->movementType != MOVEMENT_TYPE_MOUNTAIN_DISGUISE)
|
||||||
|
@ -41,10 +41,10 @@ static bool8 PlayerFaceApproachingTrainer(u8 taskId, struct Task *task, struct O
|
|||||||
static bool8 WaitPlayerFaceApproachingTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj);
|
static bool8 WaitPlayerFaceApproachingTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj);
|
||||||
static bool8 RevealDisguisedTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj);
|
static bool8 RevealDisguisedTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj);
|
||||||
static bool8 WaitRevealDisguisedTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj);
|
static bool8 WaitRevealDisguisedTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj);
|
||||||
static bool8 RevealHiddenTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj);
|
static bool8 RevealBuriedTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj);
|
||||||
static bool8 PopOutOfAshHiddenTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj);
|
static bool8 PopOutOfAshBuriedTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj);
|
||||||
static bool8 JumpInPlaceHiddenTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj);
|
static bool8 JumpInPlaceBuriedTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj);
|
||||||
static bool8 WaitRevealHiddenTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj);
|
static bool8 WaitRevealBuriedTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj);
|
||||||
|
|
||||||
static void SpriteCB_TrainerIcons(struct Sprite *sprite);
|
static void SpriteCB_TrainerIcons(struct Sprite *sprite);
|
||||||
|
|
||||||
@ -80,10 +80,10 @@ enum {
|
|||||||
TRSEE_PLAYER_FACE_WAIT,
|
TRSEE_PLAYER_FACE_WAIT,
|
||||||
TRSEE_REVEAL_DISGUISE,
|
TRSEE_REVEAL_DISGUISE,
|
||||||
TRSEE_REVEAL_DISGUISE_WAIT,
|
TRSEE_REVEAL_DISGUISE_WAIT,
|
||||||
TRSEE_REVEAL_HIDDEN,
|
TRSEE_REVEAL_BURIED,
|
||||||
TRSEE_HIDDEN_POP_OUT,
|
TRSEE_BURIED_POP_OUT,
|
||||||
TRSEE_HIDDEN_JUMP,
|
TRSEE_BURIED_JUMP,
|
||||||
TRSEE_REVEAL_HIDDEN_WAIT,
|
TRSEE_REVEAL_BURIED_WAIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool8 (*const sTrainerSeeFuncList[])(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj) =
|
static bool8 (*const sTrainerSeeFuncList[])(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj) =
|
||||||
@ -96,18 +96,18 @@ static bool8 (*const sTrainerSeeFuncList[])(u8 taskId, struct Task *task, struct
|
|||||||
[TRSEE_PLAYER_FACE_WAIT] = WaitPlayerFaceApproachingTrainer,
|
[TRSEE_PLAYER_FACE_WAIT] = WaitPlayerFaceApproachingTrainer,
|
||||||
[TRSEE_REVEAL_DISGUISE] = RevealDisguisedTrainer,
|
[TRSEE_REVEAL_DISGUISE] = RevealDisguisedTrainer,
|
||||||
[TRSEE_REVEAL_DISGUISE_WAIT] = WaitRevealDisguisedTrainer,
|
[TRSEE_REVEAL_DISGUISE_WAIT] = WaitRevealDisguisedTrainer,
|
||||||
[TRSEE_REVEAL_HIDDEN] = RevealHiddenTrainer,
|
[TRSEE_REVEAL_BURIED] = RevealBuriedTrainer,
|
||||||
[TRSEE_HIDDEN_POP_OUT] = PopOutOfAshHiddenTrainer,
|
[TRSEE_BURIED_POP_OUT] = PopOutOfAshBuriedTrainer,
|
||||||
[TRSEE_HIDDEN_JUMP] = JumpInPlaceHiddenTrainer,
|
[TRSEE_BURIED_JUMP] = JumpInPlaceBuriedTrainer,
|
||||||
[TRSEE_REVEAL_HIDDEN_WAIT] = WaitRevealHiddenTrainer,
|
[TRSEE_REVEAL_BURIED_WAIT] = WaitRevealBuriedTrainer,
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool8 (*const sTrainerSeeFuncList2[])(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj) =
|
static bool8 (*const sTrainerSeeFuncList2[])(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj) =
|
||||||
{
|
{
|
||||||
RevealHiddenTrainer,
|
RevealBuriedTrainer,
|
||||||
PopOutOfAshHiddenTrainer,
|
PopOutOfAshBuriedTrainer,
|
||||||
JumpInPlaceHiddenTrainer,
|
JumpInPlaceBuriedTrainer,
|
||||||
WaitRevealHiddenTrainer,
|
WaitRevealBuriedTrainer,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct OamData sOamData_Icons =
|
static const struct OamData sOamData_Icons =
|
||||||
@ -481,8 +481,8 @@ static bool8 WaitTrainerExclamationMark(u8 taskId, struct Task *task, struct Obj
|
|||||||
task->tFuncId++; // TRSEE_MOVE_TO_PLAYER
|
task->tFuncId++; // TRSEE_MOVE_TO_PLAYER
|
||||||
if (trainerObj->movementType == MOVEMENT_TYPE_TREE_DISGUISE || trainerObj->movementType == MOVEMENT_TYPE_MOUNTAIN_DISGUISE)
|
if (trainerObj->movementType == MOVEMENT_TYPE_TREE_DISGUISE || trainerObj->movementType == MOVEMENT_TYPE_MOUNTAIN_DISGUISE)
|
||||||
task->tFuncId = TRSEE_REVEAL_DISGUISE;
|
task->tFuncId = TRSEE_REVEAL_DISGUISE;
|
||||||
if (trainerObj->movementType == MOVEMENT_TYPE_HIDDEN)
|
if (trainerObj->movementType == MOVEMENT_TYPE_BURIED)
|
||||||
task->tFuncId = TRSEE_REVEAL_HIDDEN;
|
task->tFuncId = TRSEE_REVEAL_BURIED;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -561,8 +561,8 @@ static bool8 WaitRevealDisguisedTrainer(u8 taskId, struct Task *task, struct Obj
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TRSEE_REVEAL_HIDDEN
|
// TRSEE_REVEAL_BURIED
|
||||||
static bool8 RevealHiddenTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj)
|
static bool8 RevealBuriedTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj)
|
||||||
{
|
{
|
||||||
if (!ObjectEventIsMovementOverridden(trainerObj)
|
if (!ObjectEventIsMovementOverridden(trainerObj)
|
||||||
|| ObjectEventClearHeldMovementIfFinished(trainerObj))
|
|| ObjectEventClearHeldMovementIfFinished(trainerObj))
|
||||||
@ -573,8 +573,8 @@ static bool8 RevealHiddenTrainer(u8 taskId, struct Task *task, struct ObjectEven
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TRSEE_HIDDEN_POP_OUT
|
// TRSEE_BURIED_POP_OUT
|
||||||
static bool8 PopOutOfAshHiddenTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj)
|
static bool8 PopOutOfAshBuriedTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj)
|
||||||
{
|
{
|
||||||
if (ObjectEventCheckHeldMovementStatus(trainerObj))
|
if (ObjectEventCheckHeldMovementStatus(trainerObj))
|
||||||
{
|
{
|
||||||
@ -588,8 +588,8 @@ static bool8 PopOutOfAshHiddenTrainer(u8 taskId, struct Task *task, struct Objec
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TRSEE_HIDDEN_JUMP
|
// TRSEE_BURIED_JUMP
|
||||||
static bool8 JumpInPlaceHiddenTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj)
|
static bool8 JumpInPlaceBuriedTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj)
|
||||||
{
|
{
|
||||||
struct Sprite *sprite;
|
struct Sprite *sprite;
|
||||||
|
|
||||||
@ -608,8 +608,8 @@ static bool8 JumpInPlaceHiddenTrainer(u8 taskId, struct Task *task, struct Objec
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TRSEE_REVEAL_HIDDEN_WAIT
|
// TRSEE_REVEAL_BURIED_WAIT
|
||||||
static bool8 WaitRevealHiddenTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj)
|
static bool8 WaitRevealBuriedTrainer(u8 taskId, struct Task *task, struct ObjectEvent *trainerObj)
|
||||||
{
|
{
|
||||||
if (!FieldEffectActiveListContains(FLDEFF_ASH_PUFF))
|
if (!FieldEffectActiveListContains(FLDEFF_ASH_PUFF))
|
||||||
task->tFuncId = TRSEE_MOVE_TO_PLAYER;
|
task->tFuncId = TRSEE_MOVE_TO_PLAYER;
|
||||||
@ -623,7 +623,7 @@ static bool8 WaitRevealHiddenTrainer(u8 taskId, struct Task *task, struct Object
|
|||||||
|
|
||||||
#define tObjEvent data[1]
|
#define tObjEvent data[1]
|
||||||
|
|
||||||
static void Task_SetHiddenTrainerMovement(u8 taskId)
|
static void Task_SetBuriedTrainerMovement(u8 taskId)
|
||||||
{
|
{
|
||||||
struct Task *task = &gTasks[taskId];
|
struct Task *task = &gTasks[taskId];
|
||||||
struct ObjectEvent *objEvent;
|
struct ObjectEvent *objEvent;
|
||||||
@ -647,10 +647,10 @@ static void Task_SetHiddenTrainerMovement(u8 taskId)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when a "buried" trainer has the reveal_trainer movement applied, from direct interaction
|
// Called when a buried Trainer has the reveal_trainer movement applied, from direct interaction
|
||||||
void SetHiddenTrainerMovement(struct ObjectEvent *objEvent)
|
void SetBuriedTrainerMovement(struct ObjectEvent *objEvent)
|
||||||
{
|
{
|
||||||
StoreWordInTwoHalfwords(&gTasks[CreateTask(Task_SetHiddenTrainerMovement, 0)].tObjEvent, (u32)objEvent);
|
StoreWordInTwoHalfwords(&gTasks[CreateTask(Task_SetBuriedTrainerMovement, 0)].tObjEvent, (u32)objEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoTrainerApproach(void)
|
void DoTrainerApproach(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user