Mario Kart 64
Loading...
Searching...
No Matches
waypoints.h
Go to the documentation of this file.
1#ifndef WAYPOINTS_H
2#define WAYPOINTS_H
3
4#include <common_structs.h>
5
6enum {
9 RIGHT_CURVE = 2, // strong curve
10 LEFT_CURVE = 3, // strong curve
12};
13
14typedef struct {
15 /* 0x00 */ s16 posX;
16 /* 0x02 */ s16 posY;
17 /* 0x04 */ s16 posZ;
18 /* 0x06 */ u16 trackSectionId;
19} TrackPathPoint; // size = 0x08
20
30
35// PathPoint types?
36extern s16* gTrackSectionTypes[];
37// Based on analyse_angle_path this may be angles between path point
38// gPathExpectedRotation[i] = atan2(path_point_i, path_point_i+1)?
39extern s16* gPathExpectedRotation[];
40// No idea. Adjacency list?
42
48// Shadows values from gNearestPathPointByPlayerId
49extern s16 sSomeNearestPathPoint;
50// Shadows values from gPathIndexByPlayerId
51extern s32 gPlayerPathIndex;
52// Shadows values from gTrackLeftPaths
54// Shadows values from gTrackRightPaths
56// Shadows values from gTrackSectionTypes
58// Shadows values from gPathExpectedRotation
60// Shadowd values from gPathCountByPathIndex
61extern u16 gSelectedPathCount;
62// Shadows values from gTrackPaths
64// Shadows values from gTrackConsecutiveCurveCounts
66
67extern u16 gNearestPathPointByPlayerId[]; // D_80164438
68// Total path point passed by playerId?
69extern s32 gNumPathPointsTraversed[];
70extern u16 gPathIndexByPlayerId[]; // D_801645B0
71extern u16 gPathCountByPathIndex[]; // D_801645C8
72// These values are only used when the camera is in "cinematic" mode
73extern s16 gNearestPathPointByCameraId[]; // D_80164668
74
79
80// Tracks something on a per-player basis, no idea what though
81extern f32 gTrackPositionFactor[];
82// Track segment by playerId, although it curiously does NOT track values for human players
83// So, in 2 Player Grand Prix, the first 2 entries are always 0
84extern u16 gPlayersTrackSectionId[];
85// Seems to be a per-path overcount of the path point count
86extern s32 D_80163368[];
87// Seemingly the Z position of the 1st path point in the 0th path?
88extern f32 gPathStartZ;
89// These seem to track whether a player has entered or exited the "unknown" zone in yoshi's valley
90// See yoshi_valley_cpu_path and update_cpu_path_completion
91// Is 1 when a player is in the "unknown" zone in yoshi's valley
93// Is 1 when a player leaves the "unknown" zone in yoshi's valley
95// Tracks whether a given player is in the "unknown" zone of yoshi's valley
96extern s16 bInMultiPathSection[];
97
98#endif
u16 gPathIndexByPlayerId[12]
Definition code_80005FD0.c:189
u16 gPathCountByPathIndex[4]
Definition code_80005FD0.c:190
s16 * gCurrentTrackSectionTypesPath
Definition code_80005FD0.c:93
s16 cpu_enteringPathIntersection[12]
Definition code_80005FD0.c:139
s32 gNumPathPointsTraversed[10]
Definition code_80005FD0.c:173
s32 D_80163368[4]
Definition code_80005FD0.c:115
TrackPathPoint * gCurrentTrackRightPath
Definition code_80005FD0.c:92
s32 gPlayerPathIndex
Definition code_80005FD0.c:128
s16 * gTrackSectionTypes[4]
Definition code_80005FD0.c:186
s16 gNearestPathPointByCameraId[4]
Definition code_80005FD0.c:201
s16 * gPathExpectedRotation[4]
Definition code_80005FD0.c:187
TrackPathPoint * gCurrentTrackLeftPath
Definition code_80005FD0.c:91
TrackPathPoint * gTrackPaths[4]
Definition code_80005FD0.c:183
s16 * gCurrentTrackConsecutiveCurveCountsPath
Definition code_80005FD0.c:192
TrackPathPoint * gTrackRightPaths[4]
Definition code_80005FD0.c:185
u16 gSelectedPathCount
Definition code_80005FD0.c:171
f32 gTrackPositionFactor[10]
Definition code_80005FD0.c:77
f32 gPathStartZ
Definition code_80005FD0.c:129
s16 sSomeNearestPathPoint
Definition code_80005FD0.c:64
s16 bInMultiPathSection[12]
Definition code_80005FD0.c:180
s16 * gTrackConsecutiveCurveCounts[4]
Definition code_80005FD0.c:188
u16 gPlayersTrackSectionId[12]
Definition code_80005FD0.c:109
TrackPathPoint * gTrackLeftPaths[4]
Definition code_80005FD0.c:184
TrackPathPoint * gCurrentTrackPath
Definition code_80005FD0.c:176
u16 gNearestPathPointByPlayerId[12]
Definition code_80005FD0.c:172
s16 * gCurrentPathPointExpectedRotationPath
Definition code_80005FD0.c:94
s16 cpu_exitingPathIntersection[12]
Definition code_80005FD0.c:140
Definition waypoints.h:14
s16 posX
Definition waypoints.h:15
u16 trackSectionId
Definition waypoints.h:18
s16 posZ
Definition waypoints.h:17
s16 posY
Definition waypoints.h:16
@ STRAIGHT
Definition waypoints.h:11
@ RIGHT_LEANING_CURVE
Definition waypoints.h:7
@ RIGHT_CURVE
Definition waypoints.h:9
@ LEFT_LEANING_CURVE
Definition waypoints.h:8
@ LEFT_CURVE
Definition waypoints.h:10