From 41282ffd0311589653f5de8ec26a22103c073a13 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 22 Jun 2020 23:05:42 +1000 Subject: [PATCH] Fix build --- src/game/chr/chraction.c | 11 +++++------ src/include/game/chr/chraction.h | 2 +- src/include/types.h | 7 +------ 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/game/chr/chraction.c b/src/game/chr/chraction.c index e319faf2e..94f89c9ca 100644 --- a/src/game/chr/chraction.c +++ b/src/game/chr/chraction.c @@ -8823,15 +8823,14 @@ glabel func0f0373dc /* f03749c: 00601025 */ or $v0,$v1,$zero ); -s32 chrPatrolGetCurPadNum(struct chrdata *chr, bool arg1) +s16 chrPatrolGetCurPadNum(struct chrdata *chr, bool arg1) { - struct pathnode *node; + s32 *padnumptr; u32 sp32 = chr->act_patrol.unk034; s32 nodeindex = func0f0373dc(chr, &sp32, arg1); + padnumptr = &chr->act_patrol.path->pads[nodeindex]; - node = &chr->act_patrol.path->nodes[nodeindex]; - - return node->padnum; + return *padnumptr; } void chrPatrolGetCurWaypointInfoWithFlags(struct chrdata *chr, struct coord *pos, s16 *rooms, u32 *flags) @@ -9570,7 +9569,7 @@ struct path *pathFindById(u32 path_id) { s32 i = 0; - for (i = 0; g_StageSetup.paths[i].nodes; i++) { + for (i = 0; g_StageSetup.paths[i].pads; i++) { if (path_id == g_StageSetup.paths[i].id) { return &g_StageSetup.paths[i]; } diff --git a/src/include/game/chr/chraction.h b/src/include/game/chr/chraction.h index 74fcd7f72..2aa9690a1 100644 --- a/src/include/game/chr/chraction.h +++ b/src/include/game/chr/chraction.h @@ -73,7 +73,7 @@ void chrGoPosConsiderRestart(struct chrdata *chr); void chrGoPosInitExpensive(struct chrdata *chr); void chrGoPosAdvanceWaypoint(struct chrdata *chr); s32 func0f0373dc(struct chrdata *chr, u32 *arg1, bool arg2); -s32 chrPatrolGetCurPadNum(struct chrdata *chr, bool arg1); +s16 chrPatrolGetCurPadNum(struct chrdata *chr, bool arg1); void chrPatrolGetCurWaypointInfoWithFlags(struct chrdata *chr, struct coord *pos, s16 *rooms, u32 *flags); void func0f037580(struct chrdata *chr); void func0f0375b0(struct chrdata *chr); diff --git a/src/include/types.h b/src/include/types.h index f6992a500..b2ba91009 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -2702,13 +2702,8 @@ struct ailist { s32 id; }; -struct pathnode { - u16 unk00; - s16 padnum; -}; - struct path { - struct pathnode *nodes; + s32 *pads; u8 id; u8 type; };