Mario Kart 64
Loading...
Searching...
No Matches
course.h
Go to the documentation of this file.
1#ifndef COURSE_H
2#define COURSE_H
3
4#include <ultra64.h>
5#include <PR/gbi.h>
6#include <macros.h>
7#include "path.h"
8
19
21 /* 0x00 */ u16 firstPath;
22 /* 0x02 */ u16 secondPath;
23 /* 0x04 */ u16 thirdPath;
24 /* 0x06 */ u16 fourthPath;
25 /* 0x08 */ u16 unk8;
26 /* 0x0A */ char padA[6];
27}; // size 0x10
28
29#if !ENABLE_CUSTOM_COURSE_ENGINE
54
55#else
56
57#define COURSE_MARIO_RACEWAY
58#define COURSE_CHOCO_MOUNTAIN
59#define COURSE_BOWSER_CASTLE
60#define COURSE_BANSHEE_BOARDWALK
61#define COURSE_YOSHI_VALLEY
62#define COURSE_FRAPPE_SNOWLAND
63#define COURSE_KOOPA_BEACH
64#define COURSE_ROYAL_RACEWAY
65#define COURSE_LUIGI_RACEWAY
66#define COURSE_MOO_MOO_FARM
67#define COURSE_TOADS_TURNPIKE
68#define COURSE_KALAMARI_DESERT
69#define COURSE_SHERBET_LAND
70#define COURSE_RAINBOW_ROAD
71#define COURSE_WARIO_STADIUM
72#define COURSE_BLOCK_FORT
73#define COURSE_SKYSCRAPER
74#define COURSE_DOUBLE_DECK
75#define COURSE_DK_JUNGLE
76#define COURSE_BIG_DONUT
77#define COURSE_AWARD_CEREMONY
78#define NUM_COURSES
79
80#endif
81
82#if !ENABLE_CUSTOM_COURSE_ENGINE
84extern s16* D_800DCBB4[];
85#define GET_COURSE_800DCBB4(n) D_800DCBB4[gCurrentCourseId][n]
87#define GET_COURSE_AIMaximumSeparation cpu_CourseMaximumSeparation[gCurrentCourseId]
89#define GET_COURSE_PathSizes gCoursePathSizes[gCurrentCourseId]
91#define GET_COURSE_AISteeringSensitivity cpu_SteeringSensitivity[gCurrentCourseId]
93#define GET_COURSE_AIMinimumSeparation cpu_CourseMinimumSeparation[gCurrentCourseId]
95#define GET_COURSE_PathTable(p) segmented_to_virtual_dupe_2(gCoursePathTable[gCurrentCourseId][p])
97#define GET_COURSE_PathTable2(p) segmented_to_virtual_dupe_2(gCoursePathTable2[gCurrentCourseId][p])
99#define GET_COURSE_AIBehaviour segmented_to_virtual_dupe_2(cpu_BehaviourLUT[i])
100extern char* gCourseNames[];
101#define GET_COURSE_Name gCourseNames[gCurrentCourseId]
102extern char* gCourseNamesDup[];
103#define GET_COURSE_NameDup gCourseNamesDup[gCupCourseOrder[gCupSelection][gCourseIndexInCup]]
104extern char* gDebugCourseNames[];
105#define GET_COURSE_debugName gDebugCourseNames[gCurrentCourseId]
106extern f32 gCourseFarPersp;
107#define gCourseFarPersp gCourseFarPersp
108extern f32 gCourseNearPersp;
109#define gCourseNearPersp gCourseNearPersp
110#define GET_COURSE_D_0D0096B8(cc) *(f32*) segmented_to_virtual_dupe_2(&D_0D0096B8[gCurrentCourseId][cc])
111#define GET_COURSE_cpu_OffTrackTargetSpeed(cc) \
112 *(f32*) segmented_to_virtual_dupe_2(&cpu_OffTrackTargetSpeed[gCurrentCourseId][cc])
113#define GET_COURSE_cpu_CurveTargetSpeed(cc) \
114 *(f32*) segmented_to_virtual_dupe_2(&cpu_CurveTargetSpeed[gCurrentCourseId][cc])
115#define GET_COURSE_cpu_NormalTargetSpeed(cc) \
116 *(f32*) segmented_to_virtual_dupe_2(&cpu_NormalTargetSpeed[gCurrentCourseId][cc])
117#else
118#define gCurrentCourseId
119#define GET_COURSE_800DCBB4(n)
120#define GET_COURSE_AIMaximumSeparation
121#define GET_COURSE_PathSizes
122#define GET_COURSE_AISteeringSensitivity
123#define GET_COURSE_AIMinimumSeparation
124#define GET_COURSE_PathTable(p)
125#define GET_COURSE_PathTable2(p)
126#define GET_COURSE_AIBehaviour
127#define GET_COURSE_Name
128#define GET_COURSE_NameDup
129#define GET_COURSE_debugName
130#define gCourseFarPersp
131#define gCourseNearPersp
132#define GET_COURSE_D_0D0096B8(cc)
133#define GET_COURSE_cpu_OffTrackTargetSpeed(cc)
134#define GET_COURSE_cpu_CurveTargetSpeed(cc)
135#define GET_COURSE_cpu_NormalTargetSpeed(cc)
136#endif
137
138#endif // COURSE_H
s16 gCurrentCourseId
Definition code_800029B0.c:30
CPUBehaviour * cpu_BehaviourLUT[]
Definition path_spawn_metadata.c:7
char * gDebugCourseNames[]
Definition menu_items.c:339
char * gCourseNames[]
Definition menu_items.c:322
char * gCourseNamesDup[]
Definition menu_items.c:326
s16 cpu_SteeringSensitivity[]
Definition path_spawn_metadata.c:27
f32 cpu_CourseMinimumSeparation[]
Definition path_spawn_metadata.c:37
TrackPathPoint * gCoursePathTable2[][4]
Definition path_spawn_metadata.c:22
TrackPathPoint * gCoursePathTable[][4]
Definition path_spawn_metadata.c:18
struct _struct_gCoursePathSizes_0x10 gCoursePathSizes[]
Definition path_spawn_metadata.c:72
s16 * D_800DCBB4[]
Definition path_spawn_metadata.c:63
f32 cpu_CourseMaximumSeparation[]
Definition path_spawn_metadata.c:32
#define gCourseFarPersp
Definition course.h:107
#define gCourseNearPersp
Definition course.h:109
COURSES
Definition course.h:30
@ COURSE_WARIO_STADIUM
Definition course.h:45
@ COURSE_MARIO_RACEWAY
Definition course.h:31
@ COURSE_BANSHEE_BOARDWALK
Definition course.h:34
@ COURSE_KALAMARI_DESERT
Definition course.h:42
@ COURSE_BIG_DONUT
Definition course.h:50
@ COURSE_ROYAL_RACEWAY
Definition course.h:38
@ COURSE_BLOCK_FORT
Definition course.h:46
@ COURSE_FRAPPE_SNOWLAND
Definition course.h:36
@ COURSE_LUIGI_RACEWAY
Definition course.h:39
@ COURSE_RAINBOW_ROAD
Definition course.h:44
@ COURSE_YOSHI_VALLEY
Definition course.h:35
@ COURSE_CHOCO_MOUNTAIN
Definition course.h:32
@ COURSE_TOADS_TURNPIKE
Definition course.h:41
@ COURSE_SKYSCRAPER
Definition course.h:47
@ COURSE_DOUBLE_DECK
Definition course.h:48
@ COURSE_BOWSER_CASTLE
Definition course.h:33
@ COURSE_KOOPA_BEACH
Definition course.h:37
@ NUM_COURSES
Definition course.h:52
@ COURSE_MOO_MOO_FARM
Definition course.h:40
@ COURSE_DK_JUNGLE
Definition course.h:49
@ COURSE_SHERBET_LAND
Definition course.h:43
@ COURSE_AWARD_CEREMONY
Definition course.h:51
Definition common_structs.h:29
Definition path.h:6
Definition course.h:13
Gfx * addr
Definition course.h:14
u8 sectionId
Definition course.h:16
u8 surfaceType
Definition course.h:15
u16 flags
Definition course.h:17
Definition course.h:20
u16 thirdPath
Definition course.h:23
u16 unk8
Definition course.h:25
char padA[6]
Definition course.h:26
u16 secondPath
Definition course.h:22
u16 fourthPath
Definition course.h:24
u16 firstPath
Definition course.h:21
signed short int s16
Definition ultratypes.h:13
float f32
Definition ultratypes.h:34
unsigned short int u16
Definition ultratypes.h:14
unsigned char u8
Definition ultratypes.h:12