fix a value and do a rename (#669)

This commit is contained in:
coco875 2024-08-23 20:12:55 +02:00 committed by GitHub
parent 8ebae23080
commit 368c276e1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View File

@ -33,7 +33,7 @@ $(eval $(call validate-option,COMPILER,ido gcc))
DEBUG ?= 0 DEBUG ?= 0
# Compile with GCC # Compile with GCC
GCC ?= 1 GCC ?= 0
# VERSION - selects the version of the game to build # VERSION - selects the version of the game to build
# us - builds the 1997 North American version # us - builds the 1997 North American version

View File

@ -1319,7 +1319,7 @@ s32 func_80008E58(s32 payerId, s32 pathIndex) {
stackPadding = pathIndex; stackPadding = pathIndex;
trackSectionId = get_track_section_id(player->collision.meshIndexZX); trackSectionId = get_track_section_id(player->collision.meshIndexZX);
D_80163318[payerId] = trackSectionId; D_80163318[payerId] = trackSectionId;
sSomeNearestWaypoint = find_closest_waypoint_track_segment(posX, posY, posZ, trackSectionId, &pathIndex); sSomeNearestWaypoint = find_closest_waypoint_track_section(posX, posY, posZ, trackSectionId, &pathIndex);
gNearestWaypointByPlayerId[payerId] = sSomeNearestWaypoint; gNearestWaypointByPlayerId[payerId] = sSomeNearestWaypoint;
if(pathIndex) {}; if(pathIndex) {};
gPathIndexByPlayerId[payerId] = pathIndex; gPathIndexByPlayerId[payerId] = pathIndex;
@ -2270,7 +2270,7 @@ s16 func_8000BD94(f32 posX, f32 posY, f32 posZ, s32 pathIndex) {
return nearestWaypointIndex; return nearestWaypointIndex;
} }
s16 find_closest_waypoint_track_segment(f32 posX, f32 posY, f32 posZ, u16 trackSectionId, s32 *pathIndex) { s16 find_closest_waypoint_track_section(f32 posX, f32 posY, f32 posZ, u16 trackSectionId, s32 *pathIndex) {
TrackWaypoint *pathWaypoints; TrackWaypoint *pathWaypoints;
TrackWaypoint *considerWaypoint; TrackWaypoint *considerWaypoint;
f32 x_dist; f32 x_dist;
@ -2488,7 +2488,7 @@ s16 func_8000CC88(f32 posX, f32 posY, f32 posZ, Player *player, s32 playerId, s3
trackSectionId = D_80163318[playerId]; trackSectionId = D_80163318[playerId];
} }
D_80163318[playerId] = trackSectionId; D_80163318[playerId] = trackSectionId;
ret = find_closest_waypoint_track_segment(posX, posY, posZ, trackSectionId, pathIndex); ret = find_closest_waypoint_track_section(posX, posY, posZ, trackSectionId, pathIndex);
gPathIndexByPlayerId[playerId] = *pathIndex; gPathIndexByPlayerId[playerId] = *pathIndex;
return ret; return ret;
} }
@ -2523,7 +2523,7 @@ s16 func_8000CD24(f32 posX, f32 posY, f32 posZ, s16 waypointIndex, Player *playe
newWaypoint = find_closest_waypoint_with_previous_waypoint(posX, posY, posZ, waypointIndex, pathIndex); newWaypoint = find_closest_waypoint_with_previous_waypoint(posX, posY, posZ, waypointIndex, pathIndex);
} }
if (newWaypoint == -1) { if (newWaypoint == -1) {
newWaypoint = find_closest_waypoint_track_segment(posX, posY, posZ, D_80163318[playerId], &pathIndex); newWaypoint = find_closest_waypoint_track_section(posX, posY, posZ, D_80163318[playerId], &pathIndex);
temp_v1 = &D_80164550[pathIndex][newWaypoint]; temp_v1 = &D_80164550[pathIndex][newWaypoint];
player->pos[0] = (f32) temp_v1->posX; player->pos[0] = (f32) temp_v1->posX;
player->pos[1] = (f32) temp_v1->posY; player->pos[1] = (f32) temp_v1->posY;
@ -2594,7 +2594,7 @@ s16 func_8000D24C(f32 posX, f32 posY, f32 posZ, s32 *pathIndex) {
Collision sp24; Collision sp24;
check_bounding_collision(&sp24, 10.0f, posX, posY, posZ); check_bounding_collision(&sp24, 10.0f, posX, posY, posZ);
return find_closest_waypoint_track_segment(posX, posY, posZ, get_track_section_id(sp24.meshIndexZX), pathIndex); return find_closest_waypoint_track_section(posX, posY, posZ, get_track_section_id(sp24.meshIndexZX), pathIndex);
} }
s16 func_8000D2B4(f32 posX, f32 posY, f32 posZ, s16 waypointIndex, s32 pathIndex) { s16 func_8000D2B4(f32 posX, f32 posY, f32 posZ, s16 waypointIndex, s32 pathIndex) {

View File

@ -97,7 +97,7 @@ void func_8000BA14(u16, f32, f32, s16);
void func_8000BBD8(u16, f32, s16); void func_8000BBD8(u16, f32, s16);
s16 func_8000BD94(f32, f32, f32, s32); s16 func_8000BD94(f32, f32, f32, s32);
s16 find_closest_waypoint_track_segment(f32, f32, f32, u16, s32*); s16 find_closest_waypoint_track_section(f32, f32, f32, u16, s32*);
s16 func_8000C884(f32, f32, f32, s16, s32, u16); s16 func_8000C884(f32, f32, f32, s16, s32, u16);
s16 find_closest_waypoint_with_previous_waypoint(f32, f32, f32, s16, s32); s16 find_closest_waypoint_with_previous_waypoint(f32, f32, f32, s16, s32);
void func_8000CBA4(f32, f32, f32, s16*, s32); void func_8000CBA4(f32, f32, f32, s16*, s32);