Clarify vehicle ticking and fix some func spellings (#781)

* Update cpu_vehicles_camera_path.c

* fix spelling

* renames
This commit is contained in:
MegaMech
2026-08-11 21:18:46 -06:00
committed by GitHub
parent ae9178b781
commit 58cfcb022e
5 changed files with 16 additions and 14 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ extern TrackPathPoint* gTrackRightPaths[];
**/
// PathPoint types?
extern s16* gTrackSectionTypes[];
// Based on analyse_angle_path this may be angles between path point
// Based on analyze_path_angle this may be angles between path point
// gPathExpectedRotation[i] = atan2(path_point_i, path_point_i+1)?
extern s16* gPathExpectedRotation[];
// No idea. Adjacency list?
+7 -5
View File
@@ -1321,15 +1321,17 @@ void update_vehicles(void) {
if (gCurrentCourseId == COURSE_AWARD_CEREMONY) {
for (i = 0; i < 7; i++) {
func_8000DF8C(i);
update_bomb_karts(i);
}
return;
}
// update_vehicles is ran twice per frame.
// This makes vehicles only tick once per frame.
if (D_8016337C & 1) {
if (gModeSelection == VERSUS) {
for (i = 0; i < 7; i++) {
func_8000DF8C(i);
update_bomb_karts(i);
}
}
#if !ENABLE_CUSTOM_COURSE_ENGINE
@@ -2037,9 +2039,9 @@ void init_course_path_point(void) {
if (gSizePath[i] >= 2) {
load_track_path(i);
calculate_track_boundaries(i);
analize_track_section(i);
analyse_angle_path(i);
analisze_curved_path(i);
analyze_track_sections(i);
analyze_path_angle(i);
analyze_curved_path(i);
}
}
+4 -4
View File
@@ -149,7 +149,7 @@ s16 func_8000D6D0(Vec3f, s16*, f32, f32, s16, s16);
s16 func_8000D940(Vec3f, s16*, f32, f32, s16);
s16 update_vehicle_following_path(Vec3f, s16*, f32);
void set_bomb_kart_spawn_positions(void);
void func_8000DF8C(s32);
void update_bomb_karts(s32);
s32 add_actor_in_unexpired_actor_list(s32, s16);
s32 add_red_shell_in_unexpired_actor_list(s32);
@@ -168,10 +168,10 @@ void init_players(void);
void load_track_path(s32);
void calculate_track_boundaries(s32);
f32 calculate_track_curvature(s32, u16);
void analize_track_section(s32);
void analyze_track_sections(s32);
s16 calculate_angle_path(s32, s32);
void analyse_angle_path(s32);
void analisze_curved_path(s32);
void analyze_path_angle(s32);
void analyze_curved_path(s32);
f32 func_80010F40(f32, f32, f32, s32, s32);
f32 func_80010FA0(f32, f32, f32, s32, s32);
+1 -1
View File
@@ -56,7 +56,7 @@ void set_bomb_kart_spawn_positions(void) {
}
}
void func_8000DF8C(s32 bombKartId) {
void update_bomb_karts(s32 bombKartId) {
UNUSED s32 stackPadding0;
f32 sp118;
f32 var_f18;
+3 -3
View File
@@ -173,7 +173,7 @@ f32 calculate_track_curvature(s32 pathIndex, u16 pathPointIndex) {
return -((firstVectorZ * secondVectorX) - (firstVectorX * secondVectorZ)) / (secondLength * firstLength);
}
void analize_track_section(s32 pathIndex) {
void analyze_track_sections(s32 pathIndex) {
f64 sectionCurvature;
UNUSED s32 pad;
s32 k;
@@ -248,7 +248,7 @@ s16 calculate_angle_path(s32 pathIndex, s32 pathPointIndex) {
}
// Populates gPathExpectedRotation
void analyse_angle_path(s32 pathIndex) {
void analyze_path_angle(s32 pathIndex) {
s32 pathPointIndex;
u16* angle;
@@ -260,7 +260,7 @@ void analyse_angle_path(s32 pathIndex) {
}
}
void analisze_curved_path(s32 pathIndex) {
void analyze_curved_path(s32 pathIndex) {
s16* trackCurveCount;
s16 curveCount;
s16 temp_t0;