Some pathing docs (#1205)

* Some pathing docs

* Missed one

* Uno mas

* Uno mas x2

* Cleanup

* fix

* namefixer

* NULL

* More

* PR

* Actually remove SQ

* -1 define, plus some more pathing cleanup

* Actor macros instead

* Format

* ADDITIONAL_PATH_INDEX_NONE

* Remove reliance on PATH_INDEX_NONE

* Missed some PathIndex cleanup

* Review

* format
This commit is contained in:
Derek Hensley
2023-06-04 19:46:39 -07:00
committed by GitHub
parent 47bc7c12e2
commit cd53dd317f
125 changed files with 450 additions and 347 deletions
+1 -1
View File
@@ -1503,7 +1503,7 @@ void Interface_Update(PlayState* play);
void Interface_Destroy(PlayState* play);
void Interface_Init(PlayState* play);
Path* Path_GetByIndex(PlayState* play, s16 index, s16 max);
Path* Path_GetByIndex(PlayState* play, s16 index, s16 indexNone);
f32 Path_OrientAndGetDistSq(Actor* actor, Path* path, s16 waypoint, s16* yaw);
void Path_CopyLastPoint(Path* path, Vec3f* dest);
+6 -3
View File
@@ -469,10 +469,13 @@ typedef struct {
/* 0x00C */ ObjectStatus status[OBJECT_EXCHANGE_BANK_MAX];
} ObjectContext; // size = 0x958
#define PATH_INDEX_NONE -1
#define ADDITIONAL_PATH_INDEX_NONE (u8)-1
typedef struct {
/* 0x0 */ u8 count; // number of points in the path
/* 0x1 */ u8 unk1;
/* 0x2 */ s16 unk2;
/* 0x0 */ u8 count; // Number of points in the path
/* 0x1 */ u8 additionalPathIndex;
/* 0x2 */ s16 customValue; // Path specific to help distinguish different paths
/* 0x4 */ Vec3s* points; // Segment Address to the array of points
} Path; // size = 0x8
+2 -2
View File
@@ -108,7 +108,7 @@ s32 SubS_ChangeAnimationByInfoS(SkelAnime* skelAnime, AnimationInfoS* animationI
s32 SubS_HasReachedPoint(Actor* actor, Path* path, s32 pointIndex);
Path* SubS_GetDayDependentPath(struct PlayState* play, u8 pathIndex, u8 max, s32* startPointIndex);
Path* SubS_GetDayDependentPath(struct PlayState* play, u8 pathIndex, u8 pathIndexNone, s32* startPointIndex);
s32 SubS_WeightPathing_ComputePoint(Path* path, s32 waypoint, Vec3f* point, f32 progress, s32 direction);
s32 SubS_WeightPathing_Move(Actor* actor, Path* path, s32* waypoint, f32* progress, s32 direction, s32 returnStart);
@@ -126,7 +126,7 @@ s32 SubS_TrackPoint(Vec3f* target, Vec3f* focusPos, Vec3s* shapeRot, Vec3s* trac
s32 SubS_AngleDiffLessEqual(s16 angleA, s16 threshold, s16 angleB);
Path* SubS_GetPathByIndex(struct PlayState* play, s16 pathIndex, s16 max);
Path* SubS_GetPathByIndex(struct PlayState* play, s16 pathIndex, s16 pathIndexNone);
s32 SubS_CopyPointFromPath(Path* path, s32 pointIndex, Vec3f* dst);
s16 SubS_GetDistSqAndOrientPoints(Vec3f* vecA, Vec3f* vecB, f32* distSq);
s32 SubS_MoveActorToPoint(Actor* actor, Vec3f* point, s16 rotStep);