Decompile chrGoposAdvanceWaypoint

This commit is contained in:
Ryan Dwyer
2020-06-17 21:54:27 +10:00
parent 2d4c6f6ed8
commit 7705cecf11
5 changed files with 57 additions and 77 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ f32 func0f0370a8(struct chrdata *chr);
s32 func0f037124(struct chrdata *chr);
void chrGoposConsiderRestart(struct chrdata *chr);
void func0f0372e8(struct chrdata *chr);
void func0f03733c(struct chrdata *chr);
void chrGoposAdvanceWaypoint(struct chrdata *chr);
u32 func0f0373dc(void);
u32 func0f0374a0(void);
s32 func0f0374e4(s32 arg0, s32 arg1, s32 arg2, s32 arg3);
+2 -2
View File
@@ -4,7 +4,7 @@
#include "types.h"
void waypointSetHashThing(s32 hash1, s32 hash2);
s32 *waypointFindClosestToPos(struct coord *pos, s16 *room);
struct waypoint *waypointFindClosestToPos(struct coord *pos, s16 *rooms);
u32 func0f114810(void);
u32 func0f114958(void);
u32 func0f1149b0(void);
@@ -17,7 +17,7 @@ u32 func0f114de0(void);
u32 func0f114ee4(void);
u32 func0f114f70(void);
u32 func0f11505c(void);
s32 waypointFindRoute(s32 *from, s32 *to, s32 **dst, s32 maxwaypoints);
s32 waypointFindRoute(struct waypoint *from, struct waypoint *to, struct waypoint **arr, s32 maxwaypoints);
u32 func0f115390(void);
u32 func0f1153c4(void);
u32 func0f1154cc(void);
+9 -7
View File
@@ -502,17 +502,19 @@ struct waydata {
};
struct act_gopos {
/*0x02c*/ struct coord pos; // Target pos
/*0x038*/ s16 rooms[8]; // Target rooms
/*0x048*/ s32 numwaypoints; // in practice, seems to be a pointer to the final waypoint?
/*0x02c*/ struct coord pos; // Target pos
/*0x038*/ s16 rooms[8]; // Target rooms
/*0x048*/ struct waypoint *target; // Target/final waypoint
// Array of pointers to the next couple of waypoints. Recalculated each time
// a waypoint is reached, and probably even more frequently than that.
/*0x04c*/ struct waypoint *waypoints[MAX_CHRWAYPOINTS];
// Index of the waypoint in the above array that the chr is running to. If
// the chr has line of sight (through doors) to a later waypoint then this
// index can be changed to that one and the chr will run straight to it.
// the chr has line of sight (through doors) to the next or next + 1 then
// the index can be changed to that one and the chr will run straight to it.
// This index will always be 0, 1 or 2. When it reaches 3 the pathfinding is
// recalculated, the array replaced with a new one and index set to 0.
/*0x064*/ u8 curindex;
// x....... = walking directly to pad due to PADFLAG_AIWALKDIRECT
@@ -896,8 +898,8 @@ struct obj48 {
/*0x0ec*/ u32 unk0ec;
/*0x0f0*/ u32 unk0f0;
/*0x0f4*/ u32 unk0f4;
/*0x0f8*/ s16 waypoints[6];
/*0x104*/ u8 unk104;
/*0x0f8*/ s16 waypads[6];
/*0x104*/ u8 numwaypads;
/*0x105*/ u8 unk105;
};