diff options
| author | Derek Hensley <hensley.derek58@gmail.com> | 2023-06-04 19:46:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-05 12:46:39 +1000 |
| commit | cd53dd317fa1ce2958f2c6af618059a31db59076 (patch) | |
| tree | 3a5049342741e202ea94e2df39d08f3001e4f742 /include | |
| parent | 47bc7c12e2d28b8d8ed1cff8df9c17395aefce80 (diff) | |
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
Diffstat (limited to 'include')
| -rw-r--r-- | include/functions.h | 2 | ||||
| -rw-r--r-- | include/z64scene.h | 9 | ||||
| -rw-r--r-- | include/z64subs.h | 4 |
3 files changed, 9 insertions, 6 deletions
diff --git a/include/functions.h b/include/functions.h index 5774ca3c6..ccf1877e0 100644 --- a/include/functions.h +++ b/include/functions.h @@ -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); diff --git a/include/z64scene.h b/include/z64scene.h index 387d584f5..7f48d8740 100644 --- a/include/z64scene.h +++ b/include/z64scene.h @@ -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 diff --git a/include/z64subs.h b/include/z64subs.h index ad2b7044f..768f81079 100644 --- a/include/z64subs.h +++ b/include/z64subs.h @@ -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); |
