mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 22:03:53 +01:00
port some documentation from FR
This commit is contained in:
parent
5b910a11b4
commit
7198d40ec8
@ -1280,7 +1280,7 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
|||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case CHAR_DYNAMIC:
|
case CHAR_SPECIAL_F7:
|
||||||
if (bufferPointer == NULL)
|
if (bufferPointer == NULL)
|
||||||
bufferPointer = DynamicPlaceholderTextUtil_GetPlaceholderPtr(*++str);
|
bufferPointer = DynamicPlaceholderTextUtil_GetPlaceholderPtr(*++str);
|
||||||
while (*bufferPointer != EOS)
|
while (*bufferPointer != EOS)
|
||||||
@ -1398,8 +1398,7 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
|||||||
|
|
||||||
if (lineWidth > width)
|
if (lineWidth > width)
|
||||||
return lineWidth;
|
return lineWidth;
|
||||||
else
|
return width;
|
||||||
return width;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str)
|
u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str)
|
||||||
|
@ -3048,32 +3048,32 @@ static void SetPlayerFacingDirection(u8 linkPlayerId, u8 facing)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static u8 MovementEventModeCB_Normal(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 a3)
|
static u8 MovementEventModeCB_Normal(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||||
{
|
{
|
||||||
return gLinkPlayerFacingHandlers[a3](linkPlayerObjEvent, objEvent, a3);
|
return gLinkPlayerFacingHandlers[dir](linkPlayerObjEvent, objEvent, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 MovementEventModeCB_Ignored(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 a3)
|
static u8 MovementEventModeCB_Ignored(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||||
{
|
{
|
||||||
return FACING_UP;
|
return FACING_UP;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Duplicate Function
|
// Duplicate Function
|
||||||
static u8 MovementEventModeCB_Normal_2(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 a3)
|
static u8 MovementEventModeCB_Normal_2(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||||
{
|
{
|
||||||
return gLinkPlayerFacingHandlers[a3](linkPlayerObjEvent, objEvent, a3);
|
return gLinkPlayerFacingHandlers[dir](linkPlayerObjEvent, objEvent, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 FacingHandler_DoNothing(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 a3)
|
static bool8 FacingHandler_DoNothing(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 FacingHandler_DpadMovement(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 a3)
|
static bool8 FacingHandler_DpadMovement(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||||
{
|
{
|
||||||
s16 x, y;
|
s16 x, y;
|
||||||
|
|
||||||
linkDirection(objEvent) = FlipVerticalAndClearForced(a3, linkDirection(objEvent));
|
linkDirection(objEvent) = FlipVerticalAndClearForced(dir, linkDirection(objEvent));
|
||||||
ObjectEventMoveDestCoords(objEvent, linkDirection(objEvent), &x, &y);
|
ObjectEventMoveDestCoords(objEvent, linkDirection(objEvent), &x, &y);
|
||||||
|
|
||||||
if (LinkPlayerDetectCollision(linkPlayerObjEvent->objEventId, linkDirection(objEvent), x, y))
|
if (LinkPlayerDetectCollision(linkPlayerObjEvent->objEventId, linkDirection(objEvent), x, y))
|
||||||
@ -3089,9 +3089,9 @@ static bool8 FacingHandler_DpadMovement(struct LinkPlayerObjectEvent *linkPlayer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool8 FacingHandler_ForcedFacingChange(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 a3)
|
static bool8 FacingHandler_ForcedFacingChange(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||||
{
|
{
|
||||||
linkDirection(objEvent) = FlipVerticalAndClearForced(a3, linkDirection(objEvent));
|
linkDirection(objEvent) = FlipVerticalAndClearForced(dir, linkDirection(objEvent));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user