Skip to content

Commit

Permalink
fix a value and do a rename (#669)
Browse files Browse the repository at this point in the history
  • Loading branch information
coco875 authored Aug 23, 2024
1 parent 8ebae23 commit 368c276
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $(eval $(call validate-option,COMPILER,ido gcc))
DEBUG ?= 0

# Compile with GCC
GCC ?= 1
GCC ?= 0

# VERSION - selects the version of the game to build
# us - builds the 1997 North American version
Expand Down
10 changes: 5 additions & 5 deletions src/code_80005FD0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ s32 func_80008E58(s32 payerId, s32 pathIndex) {
stackPadding = pathIndex;
trackSectionId = get_track_section_id(player->collision.meshIndexZX);
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;
if(pathIndex) {};
gPathIndexByPlayerId[payerId] = pathIndex;
Expand Down Expand Up @@ -2270,7 +2270,7 @@ s16 func_8000BD94(f32 posX, f32 posY, f32 posZ, s32 pathIndex) {
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 *considerWaypoint;
f32 x_dist;
Expand Down Expand Up @@ -2488,7 +2488,7 @@ s16 func_8000CC88(f32 posX, f32 posY, f32 posZ, Player *player, s32 playerId, s3
trackSectionId = D_80163318[playerId];
}
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;
return ret;
}
Expand Down Expand Up @@ -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);
}
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];
player->pos[0] = (f32) temp_v1->posX;
player->pos[1] = (f32) temp_v1->posY;
Expand Down Expand Up @@ -2594,7 +2594,7 @@ s16 func_8000D24C(f32 posX, f32 posY, f32 posZ, s32 *pathIndex) {
Collision sp24;

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) {
Expand Down
2 changes: 1 addition & 1 deletion src/code_80005FD0.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void func_8000BA14(u16, f32, f32, s16);
void func_8000BBD8(u16, f32, s16);
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 find_closest_waypoint_with_previous_waypoint(f32, f32, f32, s16, s32);
void func_8000CBA4(f32, f32, f32, s16*, s32);
Expand Down

0 comments on commit 368c276

Please sign in to comment.