Doc code 80005fd0 (#697)

* Document code_80005FD0.c
This commit is contained in:
coco875
2025-01-19 01:24:09 +01:00
committed by GitHub
parent 5e1ce53a4c
commit 731b24eabf
126 changed files with 10427 additions and 10050 deletions
+24 -21
View File
@@ -4,7 +4,7 @@
#include <ultra64.h>
#include <PR/gbi.h>
#include <macros.h>
#include "waypoints.h"
#include "path.h"
/**
* @file Include for course gfx.inc.c.
@@ -18,10 +18,10 @@ typedef struct {
} TrackSections;
struct _struct_gCoursePathSizes_0x10 {
/* 0x00 */ u16 unk0;
/* 0x02 */ u16 unk2;
/* 0x04 */ u16 unk4;
/* 0x06 */ u16 unk6;
/* 0x00 */ u16 firstPath;
/* 0x02 */ u16 secondPath;
/* 0x04 */ u16 thirdPath;
/* 0x06 */ u16 fourthPath;
/* 0x08 */ u16 unk8;
/* 0x0A */ char padA[6];
}; // size 0x10
@@ -83,20 +83,20 @@ typedef enum {
extern s16 gCurrentCourseId;
extern s16* D_800DCBB4[];
#define GET_COURSE_800DCBB4(n) D_800DCBB4[gCurrentCourseId][n]
extern f32 gKartAICourseMaximumSeparation[];
#define GET_COURSE_AIMaximumSeparation gKartAICourseMaximumSeparation[gCurrentCourseId]
extern f32 cpu_CourseMaximumSeparation[];
#define GET_COURSE_AIMaximumSeparation cpu_CourseMaximumSeparation[gCurrentCourseId]
extern struct _struct_gCoursePathSizes_0x10 gCoursePathSizes[];
#define GET_COURSE_PathSizes gCoursePathSizes[gCurrentCourseId]
extern s16 gKartAISteeringSensitivity[];
#define GET_COURSE_AISteeringSensitivity gKartAISteeringSensitivity[gCurrentCourseId]
extern f32 gKartAICourseMinimumSeparation[];
#define GET_COURSE_AIMinimumSeparation gKartAICourseMinimumSeparation[gCurrentCourseId]
extern TrackWaypoint* gCoursePathTable[][4];
extern s16 cpu_SteeringSensitivity[];
#define GET_COURSE_AISteeringSensitivity cpu_SteeringSensitivity[gCurrentCourseId]
extern f32 cpu_CourseMinimumSeparation[];
#define GET_COURSE_AIMinimumSeparation cpu_CourseMinimumSeparation[gCurrentCourseId]
extern TrackPathPoint* gCoursePathTable[][4];
#define GET_COURSE_PathTable(p) segmented_to_virtual_dupe_2(gCoursePathTable[gCurrentCourseId][p])
extern TrackWaypoint* gCoursePathTable2[][4];
extern TrackPathPoint* gCoursePathTable2[][4];
#define GET_COURSE_PathTable2(p) segmented_to_virtual_dupe_2(gCoursePathTable2[gCurrentCourseId][p])
extern KartAIBehaviour* gKartAIBehaviourLUT[];
#define GET_COURSE_AIBehaviour segmented_to_virtual_dupe_2(gKartAIBehaviourLUT[i])
extern CPUBehaviour* cpu_BehaviourLUT[];
#define GET_COURSE_AIBehaviour segmented_to_virtual_dupe_2(cpu_BehaviourLUT[i])
extern char* gCourseNames[];
#define GET_COURSE_Name gCourseNames[gCurrentCourseId]
extern char* gCourseNamesDup[];
@@ -108,9 +108,12 @@ extern f32 gCourseFarPersp;
extern f32 gCourseNearPersp;
#define gCourseNearPersp gCourseNearPersp
#define GET_COURSE_D_0D0096B8(cc) *(f32*) segmented_to_virtual_dupe_2(&D_0D0096B8[gCurrentCourseId][cc])
#define GET_COURSE_D_0D009808(cc) *(f32*) segmented_to_virtual_dupe_2(&D_0D009808[gCurrentCourseId][cc])
#define GET_COURSE_D_0D009418(cc) *(f32*) segmented_to_virtual_dupe_2(&D_0D009418[gCurrentCourseId][cc])
#define GET_COURSE_D_0D009568(cc) *(f32*) segmented_to_virtual_dupe_2(&D_0D009568[gCurrentCourseId][cc])
#define GET_COURSE_cpu_OffTrackTargetSpeed(cc) \
*(f32*) segmented_to_virtual_dupe_2(&cpu_OffTrackTargetSpeed[gCurrentCourseId][cc])
#define GET_COURSE_cpu_CurveTargetSpeed(cc) \
*(f32*) segmented_to_virtual_dupe_2(&cpu_CurveTargetSpeed[gCurrentCourseId][cc])
#define GET_COURSE_cpu_NormalTargetSpeed(cc) \
*(f32*) segmented_to_virtual_dupe_2(&cpu_NormalTargetSpeed[gCurrentCourseId][cc])
#else
#define gCurrentCourseId
#define GET_COURSE_800DCBB4(n)
@@ -127,9 +130,9 @@ extern f32 gCourseNearPersp;
#define gCourseFarPersp
#define gCourseNearPersp
#define GET_COURSE_D_0D0096B8(cc)
#define GET_COURSE_D_0D009808(cc)
#define GET_COURSE_D_0D009418(cc)
#define GET_COURSE_D_0D009568(cc)
#define GET_COURSE_cpu_OffTrackTargetSpeed(cc)
#define GET_COURSE_cpu_CurveTargetSpeed(cc)
#define GET_COURSE_cpu_NormalTargetSpeed(cc)
#endif
#endif // COURSE_H