From 7fcc79fc4d506693c0da71c4c8a4bbf00f8dfb33 Mon Sep 17 00:00:00 2001 From: Roman971 Date: Mon, 23 Mar 2020 21:20:30 +0100 Subject: Decompile Path_CopyLastPoint --- src/code/z_path.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/code') 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; + } +} -- cgit v1.2.3