mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename Peep::pathfind_goal to PathfindGoal
This commit is contained in:
parent
cad809275e
commit
53bff03a3f
|
@ -2115,7 +2115,7 @@ void window_guest_debug_paint(rct_window* w, rct_drawpixelinfo* dpi)
|
|||
}
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
{
|
||||
int32_t args[] = { peep->pathfind_goal.x, peep->pathfind_goal.y, peep->pathfind_goal.z, peep->pathfind_goal.direction };
|
||||
int32_t args[] = { peep->PathfindGoal.x, peep->PathfindGoal.y, peep->PathfindGoal.z, peep->PathfindGoal.direction };
|
||||
gfx_draw_string_left(dpi, STR_PEEP_DEBUG_PATHFIND_GOAL, args, 0, screenCoords.x, screenCoords.y);
|
||||
}
|
||||
screenCoords.y += LIST_ROW_HEIGHT;
|
||||
|
|
|
@ -285,7 +285,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots
|
|||
COMPARE_FIELD(Peep, staff_orders);
|
||||
COMPARE_FIELD(Peep, photo1_ride_ref);
|
||||
COMPARE_FIELD(Peep, peep_flags);
|
||||
COMPARE_FIELD(Peep, pathfind_goal);
|
||||
COMPARE_FIELD(Peep, PathfindGoal);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
COMPARE_FIELD(Peep, PathfindHistory[i]);
|
||||
|
|
|
@ -232,10 +232,10 @@ private:
|
|||
|
||||
// Staff uses this
|
||||
newPeep->time_in_park = gDateMonthsElapsed;
|
||||
newPeep->pathfind_goal.x = 0xFF;
|
||||
newPeep->pathfind_goal.y = 0xFF;
|
||||
newPeep->pathfind_goal.z = 0xFF;
|
||||
newPeep->pathfind_goal.direction = INVALID_DIRECTION;
|
||||
newPeep->PathfindGoal.x = 0xFF;
|
||||
newPeep->PathfindGoal.y = 0xFF;
|
||||
newPeep->PathfindGoal.z = 0xFF;
|
||||
newPeep->PathfindGoal.direction = INVALID_DIRECTION;
|
||||
|
||||
uint8_t colour = staff_get_colour(_staffType);
|
||||
newPeep->tshirt_colour = colour;
|
||||
|
|
|
@ -1237,7 +1237,7 @@ Direction peep_pathfind_choose_direction(const TileCoordsXYZ& loc, Peep* peep)
|
|||
|
||||
permitted_edges &= 0xF;
|
||||
uint8_t edges = permitted_edges;
|
||||
if (isThin && peep->pathfind_goal.x == goal.x && peep->pathfind_goal.y == goal.y && peep->pathfind_goal.z == goal.z)
|
||||
if (isThin && peep->PathfindGoal.x == goal.x && peep->PathfindGoal.y == goal.y && peep->PathfindGoal.z == goal.z)
|
||||
{
|
||||
/* Use of peep->PathfindHistory[]:
|
||||
* When walking to a goal, the peep PathfindHistory stores
|
||||
|
@ -1304,13 +1304,13 @@ Direction peep_pathfind_choose_direction(const TileCoordsXYZ& loc, Peep* peep)
|
|||
|
||||
/* If this is a new goal for the peep. Store it and reset the peep's
|
||||
* PathfindHistory. */
|
||||
if (!direction_valid(peep->pathfind_goal.direction) || peep->pathfind_goal.x != goal.x || peep->pathfind_goal.y != goal.y
|
||||
|| peep->pathfind_goal.z != goal.z)
|
||||
if (!direction_valid(peep->PathfindGoal.direction) || peep->PathfindGoal.x != goal.x || peep->PathfindGoal.y != goal.y
|
||||
|| peep->PathfindGoal.z != goal.z)
|
||||
{
|
||||
peep->pathfind_goal.x = goal.x;
|
||||
peep->pathfind_goal.y = goal.y;
|
||||
peep->pathfind_goal.z = goal.z;
|
||||
peep->pathfind_goal.direction = 0;
|
||||
peep->PathfindGoal.x = goal.x;
|
||||
peep->PathfindGoal.y = goal.y;
|
||||
peep->PathfindGoal.z = goal.z;
|
||||
peep->PathfindGoal.direction = 0;
|
||||
|
||||
// Clear pathfinding history
|
||||
std::fill_n(reinterpret_cast<uint8_t*>(peep->PathfindHistory), sizeof(peep->PathfindHistory), 0xFF);
|
||||
|
@ -1511,8 +1511,8 @@ Direction peep_pathfind_choose_direction(const TileCoordsXYZ& loc, Peep* peep)
|
|||
|
||||
/* Peep does not remember this junction, so forget a junction
|
||||
* and remember this junction. */
|
||||
int32_t i = peep->pathfind_goal.direction++;
|
||||
peep->pathfind_goal.direction &= 3;
|
||||
int32_t i = peep->PathfindGoal.direction++;
|
||||
peep->PathfindGoal.direction &= 3;
|
||||
peep->PathfindHistory[i].x = static_cast<uint8_t>(loc.x);
|
||||
peep->PathfindHistory[i].y = static_cast<uint8_t>(loc.y);
|
||||
peep->PathfindHistory[i].z = loc.z;
|
||||
|
@ -2147,7 +2147,7 @@ int32_t guest_path_finding(Guest* peep)
|
|||
if (direction == INVALID_DIRECTION)
|
||||
{
|
||||
/* Heuristic search failed for all directions.
|
||||
* Reset the pathfind_goal - this means that the PathfindHistory
|
||||
* Reset the PathfindGoal - this means that the PathfindHistory
|
||||
* will be reset in the next call to peep_pathfind_choose_direction().
|
||||
* This lets the heuristic search "try again" in case the player has
|
||||
* edited the path layout or the mechanic was already stuck in the
|
||||
|
|
|
@ -1754,10 +1754,10 @@ Peep* Peep::Generate(const CoordsXYZ& coords)
|
|||
peep->cash_in_pocket = cash;
|
||||
peep->cash_spent = 0;
|
||||
peep->time_in_park = -1;
|
||||
peep->pathfind_goal.x = 0xFF;
|
||||
peep->pathfind_goal.y = 0xFF;
|
||||
peep->pathfind_goal.z = 0xFF;
|
||||
peep->pathfind_goal.direction = INVALID_DIRECTION;
|
||||
peep->PathfindGoal.x = 0xFF;
|
||||
peep->PathfindGoal.y = 0xFF;
|
||||
peep->PathfindGoal.z = 0xFF;
|
||||
peep->PathfindGoal.direction = INVALID_DIRECTION;
|
||||
peep->ItemStandardFlags = 0;
|
||||
peep->item_extra_flags = 0;
|
||||
peep->guest_heading_to_ride_id = RIDE_ID_NULL;
|
||||
|
@ -3199,14 +3199,14 @@ void peep_reset_pathfind_goal(Peep* peep)
|
|||
#if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1
|
||||
if (gPathFindDebug)
|
||||
{
|
||||
log_info("Resetting pathfind_goal for %s", gPathFindDebugPeepName);
|
||||
log_info("Resetting PathfindGoal for %s", gPathFindDebugPeepName);
|
||||
}
|
||||
#endif // defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1
|
||||
|
||||
peep->pathfind_goal.x = 0xFF;
|
||||
peep->pathfind_goal.y = 0xFF;
|
||||
peep->pathfind_goal.z = 0xFF;
|
||||
peep->pathfind_goal.direction = INVALID_DIRECTION;
|
||||
peep->PathfindGoal.x = 0xFF;
|
||||
peep->PathfindGoal.y = 0xFF;
|
||||
peep->PathfindGoal.z = 0xFF;
|
||||
peep->PathfindGoal.direction = INVALID_DIRECTION;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -698,7 +698,7 @@ struct Peep : SpriteBase
|
|||
};
|
||||
uint8_t photo1_ride_ref;
|
||||
uint32_t peep_flags;
|
||||
rct12_xyzd8 pathfind_goal;
|
||||
rct12_xyzd8 PathfindGoal;
|
||||
rct12_xyzd8 PathfindHistory[4];
|
||||
uint8_t NoActionFrameNum;
|
||||
// 0x3F Litter Count split into lots of 3 with time, 0xC0 Time since last recalc
|
||||
|
|
|
@ -875,7 +875,7 @@ static uint8_t staff_mechanic_direction_path(Peep* peep, uint8_t validDirections
|
|||
if (pathfindDirection == INVALID_DIRECTION)
|
||||
{
|
||||
/* Heuristic search failed for all directions.
|
||||
* Reset the pathfind_goal - this means that the PathfindHistory
|
||||
* Reset the PathfindGoal - this means that the PathfindHistory
|
||||
* will be reset in the next call to peep_pathfind_choose_direction().
|
||||
* This lets the heuristic search "try again" in case the player has
|
||||
* edited the path layout or the mechanic was already stuck in the
|
||||
|
|
|
@ -1533,10 +1533,10 @@ private:
|
|||
dst->next_in_queue = src->next_in_queue;
|
||||
|
||||
dst->peep_flags = 0;
|
||||
dst->pathfind_goal.x = 0xFF;
|
||||
dst->pathfind_goal.y = 0xFF;
|
||||
dst->pathfind_goal.z = 0xFF;
|
||||
dst->pathfind_goal.direction = INVALID_DIRECTION;
|
||||
dst->PathfindGoal.x = 0xFF;
|
||||
dst->PathfindGoal.y = 0xFF;
|
||||
dst->PathfindGoal.z = 0xFF;
|
||||
dst->PathfindGoal.direction = INVALID_DIRECTION;
|
||||
|
||||
// Guests' favourite ride was only saved in LL.
|
||||
// Set it to N/A if the save comes from the original or AA.
|
||||
|
|
|
@ -1212,7 +1212,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src)
|
|||
dst->peep_is_lost_countdown = src->peep_is_lost_countdown;
|
||||
dst->photo1_ride_ref = src->photo1_ride_ref;
|
||||
dst->peep_flags = src->peep_flags;
|
||||
dst->pathfind_goal = src->pathfind_goal;
|
||||
dst->pathfind_goal = src->PathfindGoal;
|
||||
for (size_t i = 0; i < std::size(src->PathfindHistory); i++)
|
||||
{
|
||||
dst->pathfind_history[i] = src->PathfindHistory[i];
|
||||
|
|
|
@ -1477,7 +1477,7 @@ public:
|
|||
dst->peep_is_lost_countdown = src->peep_is_lost_countdown;
|
||||
dst->photo1_ride_ref = src->photo1_ride_ref;
|
||||
dst->peep_flags = src->peep_flags;
|
||||
dst->pathfind_goal = src->pathfind_goal;
|
||||
dst->PathfindGoal = src->pathfind_goal;
|
||||
for (size_t i = 0; i < std::size(src->pathfind_history); i++)
|
||||
{
|
||||
dst->PathfindHistory[i] = src->pathfind_history[i];
|
||||
|
|
|
@ -232,10 +232,10 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right)
|
|||
COMPARE_FIELD(staff_orders);
|
||||
COMPARE_FIELD(photo1_ride_ref);
|
||||
COMPARE_FIELD(peep_flags);
|
||||
COMPARE_FIELD(pathfind_goal.x);
|
||||
COMPARE_FIELD(pathfind_goal.y);
|
||||
COMPARE_FIELD(pathfind_goal.z);
|
||||
COMPARE_FIELD(pathfind_goal.direction);
|
||||
COMPARE_FIELD(PathfindGoal.x);
|
||||
COMPARE_FIELD(PathfindGoal.y);
|
||||
COMPARE_FIELD(PathfindGoal.z);
|
||||
COMPARE_FIELD(PathfindGoal.direction);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
COMPARE_FIELD(PathfindHistory[i].x);
|
||||
|
|
Loading…
Reference in New Issue