diff options
| author | Roman971 <romanlasnier@hotmail.com> | 2020-03-23 21:20:30 +0100 |
|---|---|---|
| committer | Roman971 <romanlasnier@hotmail.com> | 2020-03-23 21:20:30 +0100 |
| commit | 7fcc79fc4d506693c0da71c4c8a4bbf00f8dfb33 (patch) | |
| tree | 01ad065097da9ca3ea791c1ff7dcaed714ee6443 /src/code/z_path.c | |
| parent | e88ea64835d97a4ead14ec0b8028e1ecff211471 (diff) | |
Decompile Path_CopyLastPoint
Diffstat (limited to 'src/code/z_path.c')
| -rw-r--r-- | src/code/z_path.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/code/z_path.c b/src/code/z_path.c index d1d81286d..03dc6d6f6 100644 --- a/src/code/z_path.c +++ b/src/code/z_path.c @@ -33,4 +33,14 @@ f32 Path_OrientAndGetDistSq(Actor* actor, Path* path, s16 waypoint, s16* yaw) { return SQ(dx) + SQ(dz); } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_path/Path_CopyLastPoint.s") +void Path_CopyLastPoint(Path* path, Vec3f* dest) { + Vec3s* pointPos; + + if (path != NULL) { + pointPos = &((Vec3s*)SEGMENTED_TO_VIRTUAL(path->points))[path->count - 1]; + + dest->x = pointPos->x; + dest->y = pointPos->y; + dest->z = pointPos->z; + } +} |
