This commit is contained in:
GriffinR
2022-06-03 15:43:21 -04:00
128 changed files with 1530 additions and 1525 deletions

View File

@@ -318,7 +318,7 @@ static u8 MovementEventModeCB_Normal(struct LinkPlayerObjectEvent *, struct Obje
static u8 MovementEventModeCB_Ignored(struct LinkPlayerObjectEvent *, struct ObjectEvent *, u8);
static u8 MovementEventModeCB_Scripted(struct LinkPlayerObjectEvent *, struct ObjectEvent *, u8);
static u8 (*const gLinkPlayerMovementModes[])(struct LinkPlayerObjectEvent *, struct ObjectEvent *, u8) =
static u8 (*const sLinkPlayerMovementModes[])(struct LinkPlayerObjectEvent *, struct ObjectEvent *, u8) =
{
[MOVEMENT_MODE_FREE] = MovementEventModeCB_Normal,
[MOVEMENT_MODE_FROZEN] = MovementEventModeCB_Ignored,
@@ -330,7 +330,7 @@ static u8 FacingHandler_DpadMovement(struct LinkPlayerObjectEvent *, struct Obje
static u8 FacingHandler_ForcedFacingChange(struct LinkPlayerObjectEvent *, struct ObjectEvent *, u8);
// These handlers return TRUE if the movement was scripted and successful, and FALSE otherwise.
static bool8 (*const gLinkPlayerFacingHandlers[])(struct LinkPlayerObjectEvent *, struct ObjectEvent *, u8) =
static bool8 (*const sLinkPlayerFacingHandlers[])(struct LinkPlayerObjectEvent *, struct ObjectEvent *, u8) =
{
FacingHandler_DoNothing,
FacingHandler_DpadMovement,
@@ -349,7 +349,7 @@ static void MovementStatusHandler_EnterFreeMode(struct LinkPlayerObjectEvent *,
static void MovementStatusHandler_TryAdvanceScript(struct LinkPlayerObjectEvent *, struct ObjectEvent *);
// These handlers are run after an attempted movement.
static void (*const gMovementStatusHandler[])(struct LinkPlayerObjectEvent *, struct ObjectEvent *) =
static void (*const sMovementStatusHandler[])(struct LinkPlayerObjectEvent *, struct ObjectEvent *) =
{
// FALSE:
MovementStatusHandler_EnterFreeMode,
@@ -3048,9 +3048,9 @@ static void SetPlayerFacingDirection(u8 linkPlayerId, u8 facing)
{
// This is a hack to split this code onto two separate lines, without declaring a local variable.
// C++ style inline variables would be nice here.
#define TEMP gLinkPlayerMovementModes[linkPlayerObjEvent->movementMode](linkPlayerObjEvent, objEvent, facing)
#define TEMP sLinkPlayerMovementModes[linkPlayerObjEvent->movementMode](linkPlayerObjEvent, objEvent, facing)
gMovementStatusHandler[TEMP](linkPlayerObjEvent, objEvent);
sMovementStatusHandler[TEMP](linkPlayerObjEvent, objEvent);
// Clean up the hack.
#undef TEMP
@@ -3061,7 +3061,7 @@ static void SetPlayerFacingDirection(u8 linkPlayerId, u8 facing)
static u8 MovementEventModeCB_Normal(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
{
return gLinkPlayerFacingHandlers[dir](linkPlayerObjEvent, objEvent, dir);
return sLinkPlayerFacingHandlers[dir](linkPlayerObjEvent, objEvent, dir);
}
static u8 MovementEventModeCB_Ignored(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
@@ -3072,7 +3072,7 @@ static u8 MovementEventModeCB_Ignored(struct LinkPlayerObjectEvent *linkPlayerOb
// Identical to MovementEventModeCB_Normal
static u8 MovementEventModeCB_Scripted(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
{
return gLinkPlayerFacingHandlers[dir](linkPlayerObjEvent, objEvent, dir);
return sLinkPlayerFacingHandlers[dir](linkPlayerObjEvent, objEvent, dir);
}
static bool8 FacingHandler_DoNothing(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)