diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-03-28 20:31:04 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-03-28 20:31:04 -0400 |
| commit | b72d243f9b1ef4d107bb33df3d74cf0ecf488cda (patch) | |
| tree | ea6bd66aa4e38033036af1ebd67e816d7683bc9c /src/d/d_path.cpp | |
| parent | 8cfd2f7a1e93e7c9a256589f3997e67a02a60f9d (diff) | |
Cleanup the 3 path/point structs
Diffstat (limited to 'src/d/d_path.cpp')
| -rw-r--r-- | src/d/d_path.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/d/d_path.cpp b/src/d/d_path.cpp index 10596350..fd92df6d 100644 --- a/src/d/d_path.cpp +++ b/src/d/d_path.cpp @@ -8,14 +8,14 @@ #include "JSystem/JUtility/JUTAssert.h" /* 80080018-8008010C .text dPath_GetPnt__FP5dPathi */ -dPath__Point* dPath_GetPnt(dPath* path, int pnt_index) { +dPnt* dPath_GetPnt(dPath* path, int pnt_index) { JUT_ASSERT(30, path != NULL); JUT_ASSERT(31, 0 <= pnt_index && pnt_index < path->m_num); - if (path == NULL || path->mpPnt == NULL || 0 > pnt_index || pnt_index >= path->m_num) + if (path == NULL || path->m_points == NULL || 0 > pnt_index || pnt_index >= path->m_num) return NULL; else - return &path->mpPnt[pnt_index]; + return &path->m_points[pnt_index]; } /* 8008010C-80080218 .text dPath_GetRoomPath__Fii */ @@ -49,7 +49,7 @@ dPath* dPath_GetNextRoomPath(dPath* path, int room_no) { pd = pRoom->getPath2Inf(); } - s32 next_id = path->mNextPathId; + s32 next_id = path->m_nextID; if (pd == NULL || (next_id & 0xFFFF) == 0xFFFF) { return NULL; } else { @@ -85,16 +85,15 @@ bool dPath_GetPolyRoomPathVec(cBgS_PolyInfo& polyInfo, cXyz* pDstPos, int* pDstA if (pnt_no == 0xFF || pnt_no < 0 || pnt_no >= path->m_num) return FALSE; - dPath__Point *point = &path->mpPnt[pnt_no]; - dPath__Point *next_point; + dPnt *point = &path->m_points[pnt_no]; + dPnt *next_point; if (pnt_no == path->m_num - 1) - next_point = &path->mpPnt[0]; + next_point = &path->m_points[0]; else - next_point = &path->mpPnt[pnt_no + 1]; - pDstPos->x = next_point->mPos.x - point->mPos.x; - pDstPos->y = next_point->mPos.y - point->mPos.y; - pDstPos->z = next_point->mPos.z - point->mPos.z; + next_point = &path->m_points[pnt_no + 1]; + pDstPos->x = next_point->m_position.x - point->m_position.x; + pDstPos->y = next_point->m_position.y - point->m_position.y; + pDstPos->z = next_point->m_position.z - point->m_position.z; *pDstArg0 = path->mArg0; return TRUE; } - |
