Mario Kart 64
Loading...
Searching...
No Matches
path.h
Go to the documentation of this file.
1#ifndef PATH_H
2#define PATH_H
3
4#include <common_structs.h>
5
6typedef struct {
7 /* 0x00 */ s16 posX;
8 /* 0x02 */ s16 posY;
9 /* 0x04 */ s16 posZ;
10 /* 0x06 */ u16 trackSectionId;
11} TrackPathPoint; // size = 0x08
12
13enum {
16 RIGHT_CURVE = 2, // strong curve
17 LEFT_CURVE = 3, // strong curve
18 STRAIGHT = 4
19};
20
30
35// PathPoint types?
36extern s16* gTrackSectionTypes[];
37// Based on analyse_angle_path this may be angles between path
38// gPathExpectedRotation[i] = atan2(pathPoint_i, pathPoint_i+1)?
40// No idea. Adjacency list?
42
48// Shadows values from gNearestPathPointByPlayerId
50// Shadows values from gPathIndexByPlayerId
52// Shadows values from gTrackLeftPaths
54// Shadows values from gCurrentTrackRightPath
56// Shadows values from gTrackSectionTypes
58// Shadows values from gPathExpectedRotation
60// Shadowd values from gPathCountByPathIndex
62// Shadows values from gTrackPaths
64// Shadows values from gTrackConsecutiveCurveCounts
66
67extern u16 gNearestPathPointByPlayerId[]; // D_80164438
68// Total path passed by playerId?
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
80// Tracks something on a per-player basis, no idea what though
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
85// Seems to be a per-path overcount of the pathPoint count
86extern s32 D_80163368[];
87// Seemingly the Z position of the 1st pathPoint 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
97
98#endif
f32 gTrackPositionFactor[]
Definition cpu_vehicles_camera_path.c:68
u16 gPlayersTrackSectionId[]
Definition cpu_vehicles_camera_path.c:100
TrackPathPoint * gTrackLeftPaths[]
Definition cpu_vehicles_camera_path.c:175
@ STRAIGHT
Definition path.h:18
@ RIGHT_LEANING_CURVE
Definition path.h:14
@ RIGHT_CURVE
Definition path.h:16
@ LEFT_LEANING_CURVE
Definition path.h:15
@ LEFT_CURVE
Definition path.h:17
TrackPathPoint * gTrackPaths[]
Definition cpu_vehicles_camera_path.c:174
s16 * gCurrentTrackSectionTypesPath
Definition cpu_vehicles_camera_path.c:84
s16 cpu_exitingPathIntersection[]
Definition cpu_vehicles_camera_path.c:131
TrackPathPoint * gCurrentTrackRightPath
Definition cpu_vehicles_camera_path.c:83
u16 gPathCountByPathIndex[]
Definition cpu_vehicles_camera_path.c:181
s32 gPlayerPathIndex
Definition cpu_vehicles_camera_path.c:119
s16 * gPathExpectedRotation[]
Definition cpu_vehicles_camera_path.c:178
TrackPathPoint * gCurrentTrackLeftPath
Definition cpu_vehicles_camera_path.c:82
s16 * gCurrentTrackConsecutiveCurveCountsPath
Definition cpu_vehicles_camera_path.c:183
s16 * gTrackConsecutiveCurveCounts[]
Definition cpu_vehicles_camera_path.c:179
u16 gPathIndexByPlayerId[]
Definition cpu_vehicles_camera_path.c:180
u16 gSelectedPathCount
Definition cpu_vehicles_camera_path.c:162
s32 gNumPathPointsTraversed[]
Definition cpu_vehicles_camera_path.c:164
u16 gNearestPathPointByPlayerId[]
Definition cpu_vehicles_camera_path.c:163
s32 D_80163368[]
s16 cpu_enteringPathIntersection[]
Definition cpu_vehicles_camera_path.c:130
s16 gNearestPathPointByCameraId[]
Definition cpu_vehicles_camera_path.c:192
s16 bInMultiPathSection[]
Definition cpu_vehicles_camera_path.c:171
f32 gPathStartZ
Definition cpu_vehicles_camera_path.c:120
s16 sSomeNearestPathPoint
Definition cpu_vehicles_camera_path.c:55
s16 * gTrackSectionTypes[]
Definition cpu_vehicles_camera_path.c:177
TrackPathPoint * gTrackRightPaths[]
Definition cpu_vehicles_camera_path.c:176
TrackPathPoint * gCurrentTrackPath
Definition cpu_vehicles_camera_path.c:167
s16 * gCurrentPathPointExpectedRotationPath
Definition cpu_vehicles_camera_path.c:85
Definition path.h:6
s16 posX
Definition path.h:7
u16 trackSectionId
Definition path.h:10
s16 posZ
Definition path.h:9
s16 posY
Definition path.h:8
signed int s32
Definition ultratypes.h:15
signed short int s16
Definition ultratypes.h:13
float f32
Definition ultratypes.h:34
unsigned short int u16
Definition ultratypes.h:14