Rename sub_ and loc_ functions

This commit is contained in:
Gymnasiast committed 2023-01-17 19:05:14 +01:00
1 parent 31ea968480
commit 3cc2d94b1b
18 files changed
+178 -178

No files matched your search

@@ -264,7 +264,7 @@ public:
{
InitWidgets();
sub_6AB211();
Sub6AB211();
ResetSelectedObjectCountAndSize();
widgets[WIDX_FILTER_TEXT_BOX].string = _filter_string;
+1 -1
View File
@@ -1238,7 +1238,7 @@ private:
}
/**
* The call to GfxFillRect was originally wrapped in sub_68DABD which made sure that arguments were ordered correctly,
* The call to GfxFillRect was originally wrapped in Sub68DABD which made sure that arguments were ordered correctly,
* but it doesn't look like it's ever necessary here so the call was removed.
*/
void PaintHudRectangle(rct_drawpixelinfo* dpi)
+2 -2
View File
@@ -3284,10 +3284,10 @@ void RideConstructionToolupdateConstruct(const ScreenCoordsXY& screenCoords)
}
}
}
// loc_6CC8BF:
// Loc6CC8BF:
// z = MapGetHighestZ(x >> 5, y >> 5);
}
// loc_6CC91B:
// Loc6CC91B:
const auto& ted = GetTrackElementDescriptor(trackType);
trackBlock = ted.Block;
int32_t bx = 0;
@@ -278,7 +278,7 @@ void SetupInUseSelectionFlags()
*
* rct2: 0x006AB211
*/
void sub_6AB211()
void Sub6AB211()
{
int32_t numObjects = static_cast<int32_t>(object_repository_get_items_count());
_objectSelectionFlags = std::vector<uint8_t>(numObjects);
@@ -654,7 +654,7 @@ bool EditorCheckObjectGroupAtLeastOneSurfaceSelected(bool queue)
int32_t EditorRemoveUnusedObjects()
{
sub_6AB211();
Sub6AB211();
SetupInUseSelectionFlags();
int32_t numObjects = static_cast<int32_t>(object_repository_get_items_count());
+1 -1
View File
@@ -33,7 +33,7 @@ bool EditorCheckObjectGroupAtLeastOneSelected(ObjectType checkObjectType);
bool EditorCheckObjectGroupAtLeastOneSurfaceSelected(bool queue);
void EditorObjectFlagsFree();
void UnloadUnselectedObjects();
void sub_6AB211();
void Sub6AB211();
void ResetSelectedObjectCountAndSize();
void FinishObjectSelection();
ResultWithMessage WindowEditorObjectSelectionSelectObject(
+11 -11
View File
@@ -439,7 +439,7 @@ static void peep_update_hunger(Guest* peep);
static void peep_decide_whether_to_leave_park(Guest* peep);
static void peep_leave_park(Guest* peep);
static void PeepHeadForNearestRideWithFlags(Guest* peep, bool considerOnlyCloseRides, int64_t rideTypeFlags);
bool loc_690FD0(Peep* peep, RideId* rideToView, uint8_t* rideSeatToView, TileElement* tileElement);
bool Loc690FD0(Peep* peep, RideId* rideToView, uint8_t* rideSeatToView, TileElement* tileElement);
template<> bool EntityBase::Is<Guest>() const
{
@@ -733,7 +733,7 @@ int32_t Guest::CheckEasterEggName(int32_t index) const
return _stricmp(buffer, gPeepEasterEggNames[index]) == 0;
}
void Guest::loc_68F9F3()
void Guest::Loc68F9F3()
{
// Idle peep happiness tends towards 127 (50%).
if (HappinessTarget >= 128)
@@ -778,7 +778,7 @@ void Guest::loc_68F9F3()
}
}
void Guest::loc_68FA89()
void Guest::Loc68FA89()
{
// 68FA89
if (TimeToConsume == 0 && HasFoodOrDrink())
@@ -1015,8 +1015,8 @@ void Guest::Tick128UpdateGuest(int32_t index)
HappinessTarget = std::max(HappinessTarget - 128, 0);
peep_leave_park(this);
peep_update_hunger(this);
loc_68F9F3();
loc_68FA89();
Loc68F9F3();
Loc68FA89();
return;
}
}
@@ -1206,10 +1206,10 @@ void Guest::Tick128UpdateGuest(int32_t index)
break;
}
loc_68F9F3();
Loc68F9F3();
}
loc_68FA89();
Loc68FA89();
}
/**
@@ -6237,7 +6237,7 @@ static bool peep_should_watch_ride(TileElement* tileElement)
return true;
}
bool loc_690FD0(Peep* peep, RideId* rideToView, uint8_t* rideSeatToView, TileElement* tileElement)
bool Loc690FD0(Peep* peep, RideId* rideToView, uint8_t* rideSeatToView, TileElement* tileElement)
{
auto ride = GetRide(tileElement->AsTrack()->GetRideIndex());
if (ride == nullptr)
@@ -6381,7 +6381,7 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToVi
{
if (peep_should_watch_ride(tileElement))
{
return loc_690FD0(peep, rideToView, rideSeatToView, tileElement);
return Loc690FD0(peep, rideToView, rideSeatToView, tileElement);
}
}
@@ -6498,7 +6498,7 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToVi
{
if (peep_should_watch_ride(tileElement))
{
return loc_690FD0(peep, rideToView, rideSeatToView, tileElement);
return Loc690FD0(peep, rideToView, rideSeatToView, tileElement);
}
}
@@ -6614,7 +6614,7 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, RideId* rideToVi
{
if (peep_should_watch_ride(tileElement))
{
return loc_690FD0(peep, rideToView, rideSeatToView, tileElement);
return Loc690FD0(peep, rideToView, rideSeatToView, tileElement);
}
}
+2 -2
View File
@@ -414,8 +414,8 @@ private:
void UpdateRideShopInteract();
void UpdateRideShopLeave();
void UpdateRidePrepareForExit();
void loc_68F9F3();
void loc_68FA89();
void Loc68F9F3();
void Loc68FA89();
int32_t CheckEasterEggName(int32_t index) const;
void GivePassingPeepsPurpleClothes(Guest* passingPeep);
void GivePassingPeepsPizza(Guest* passingPeep);
+1 -1
View File
@@ -1004,7 +1004,7 @@ void Peep::Update()
}
else
{
// loc_68FD2F
// Loc68FD2F
switch (State)
{
case PeepState::Falling:
+1 -1
View File
@@ -2322,7 +2322,7 @@ bool Staff::UpdateFixingMoveToStationStart(bool firstRun, const Ride& ride)
break;
}
// loc_6C12ED:
// Loc6C12ED:
auto destination = CoordsXY{ input.x + 16, input.y + 16 };
auto offset = _StationFixingOffsets[stationDirection];
+5 -5
View File
@@ -77,7 +77,7 @@ static constexpr const uint8_t _97AF32[] = {
};
/** rct2: 0x0097B052, 0x0097B053 */
static constexpr const CoordsXY loc_97B052[] = {
static constexpr const CoordsXY Loc97B052[] = {
{ -15, -1 },
{ 0, -2 },
{ -2, -1 },
@@ -845,8 +845,8 @@ bool MetalASupportsPaintSetup(
int8_t xOffset = SupportBoundBoxes[segment].x;
int8_t yOffset = SupportBoundBoxes[segment].y;
xOffset += loc_97B052[ebp].x;
yOffset += loc_97B052[ebp].y;
xOffset += Loc97B052[ebp].x;
yOffset += Loc97B052[ebp].y;
int16_t boundBoxLengthX = _97B062[ebp].x;
int16_t boundBoxLengthY = _97B062[ebp].y;
@@ -1051,7 +1051,7 @@ bool MetalBSupportsPaintSetup(
PaintAddImageAsParent(
session, imageTemplate.WithIndex(_metalSupportTypeToCrossbeamImages[supportType][ebp]),
{ SupportBoundBoxes[originalSegment] + loc_97B052[ebp], baseHeight }, { _97B062[ebp], 1 });
{ SupportBoundBoxes[originalSegment] + Loc97B052[ebp], baseHeight }, { _97B062[ebp], 1 });
}
int32_t si = baseHeight;
@@ -1437,7 +1437,7 @@ bool PathBSupportsPaintSetup(
baseHeight += z;
}
// loc_6A34D8
// Loc6A34D8
supportSegments[segment].height = 0xFFFF;
supportSegments[segment].slope = 0x20;
@@ -709,7 +709,7 @@ static void PathPaintFencesAndQueueBanners(
* @param imageFlags (0x00F3EF70)
* @param sceneryImageFlags (0x00F3EF74)
*/
static void sub_6A3F61(
static void Sub6A3F61(
PaintSession& session, const PathElement& pathElement, uint16_t connectedEdges, uint16_t height,
const FootpathPaintInfo& pathPaintInfo, ImageId imageTemplate, ImageId sceneryImageTemplate, bool hasSupports)
{
@@ -1120,7 +1120,7 @@ void PathPaintBoxSupport(
}
}
sub_6A3F61(session, pathElement, edi, height, pathPaintInfo, imageTemplate, sceneryImageTemplate, hasSupports);
Sub6A3F61(session, pathElement, edi, height, pathPaintInfo, imageTemplate, sceneryImageTemplate, hasSupports);
uint16_t ax = 0;
if (pathElement.IsSloped())
@@ -1259,7 +1259,7 @@ void PathPaintPoleSupport(
}
}
sub_6A3F61(
Sub6A3F61(
session, pathElement, edi, height, pathPaintInfo, imageTemplate, sceneryImageTemplate,
hasSupports); // TODO: arguments
@@ -1166,7 +1166,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
if (session.ViewFlags & VIEWPORT_FLAG_LAND_OWNERSHIP)
{
// loc_660E9A:
// Loc660E9A:
if (tileElement.GetOwnership() & OWNERSHIP_OWNED)
{
assert(surfaceShape < std::size(byte_97B444));
@@ -1206,7 +1206,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
if (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)
{
// loc_660FB8:
// Loc660FB8:
const CoordsXY& pos = session.MapPosition;
if (pos.x >= gMapSelectPositionA.x && pos.x <= gMapSelectPositionB.x && pos.y >= gMapSelectPositionA.y
&& pos.y <= gMapSelectPositionB.y)
@@ -1215,14 +1215,14 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
if (mapSelectionType >= MAP_SELECT_TYPE_EDGE_0)
{
// Walls
// loc_661089:
// Loc661089:
const auto fpId = static_cast<FilterPaletteID>((((mapSelectionType - 9) + rotation) & 3) + 0x21);
const auto image_id = ImageId(SPR_TERRAIN_SELECTION_EDGE + byte_97B444[surfaceShape], fpId);
PaintAttachToPreviousPS(session, image_id, 0, 0);
}
else if (mapSelectionType >= MAP_SELECT_TYPE_QUARTER_0)
{
// loc_661051:(no jump)
// Loc661051:(no jump)
// Selection split into four quarter segments
const auto fpId = static_cast<FilterPaletteID>(
(((mapSelectionType - MAP_SELECT_TYPE_QUARTER_0) + rotation) & 3) + 0x27);
@@ -1316,7 +1316,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
if (waterHeight > 0 && !gTrackDesignSaveMode && !waterGetsClipped)
{
// loc_6615A9: (water height)
// Loc6615A9: (water height)
session.InteractionType = ViewportInteractionItem::Water;
const uint16_t localHeight = height + 16;
@@ -1383,7 +1383,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
}
}
else if (!(surfaceShape & fenceData.bit_8))
{ // loc_6619A2:
{ // Loc6619A2:
image_id = fenceData.image[1];
}
else
@@ -1391,15 +1391,15 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
local_height += 16;
if (!(surfaceShape & 0x10))
{ // loc_6619B5 (first)
{ // Loc6619B5 (first)
image_id = fenceData.image[0];
}
else if (surfaceShape & fenceData.bit_4)
{ // loc_6619B5 (second)
{ // Loc6619B5 (second)
image_id = fenceData.image[3];
}
else if (surfaceShape & fenceData.bit_2)
{ // loc_6619B5 (third)
{ // Loc6619B5 (third)
image_id = fenceData.image[4];
}
else
@@ -1419,7 +1419,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
switch (surfaceShape)
{
default:
// loc_661C2C
// Loc661C2C
// 00
// 00 00
// 00 00 00
@@ -1434,7 +1434,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 1:
// loc_661CB9
// Loc661CB9
// 00
// 00 00
// 01 01 01
@@ -1448,7 +1448,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 2:
// loc_661D4E
// Loc661D4E
// 02
// 17 00
// 17 02 00
@@ -1462,7 +1462,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 3:
// loc_661DE3
// Loc661DE3
// 03
// 03 03
// 03 03 03
@@ -1475,7 +1475,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 4:
// loc_661E7C
// Loc661E7C
// 1E
// 1E 1E
// 04 04 04
@@ -1489,7 +1489,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 5:
// loc_661F11
// Loc661F11
// 1E ▓▓
// 1E 1E ▒▒ ▒▒
// 05 05 05 ░░ ░░ ░░
@@ -1504,7 +1504,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 6:
// loc_661FA6
// Loc661FA6
// 06 ▓▓
// 06 06 ▓▓ ▒▒
// 06 06 06 ▓▓ ▒▒ ░░
@@ -1517,7 +1517,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 7:
// loc_66203F
// Loc66203F
// 07 ▓▓
// 00 17 ▓▓ ▒▒
// 00 07 17 ▓▓ ▓▓ ░░
@@ -1531,7 +1531,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 8:
// loc_6620D8
// Loc6620D8
PaintUtilSetSegmentSupportHeight(session, SEGMENT_B8 | SEGMENT_C8 | SEGMENT_D0, height, 0);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C0, height, 8);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_CC | SEGMENT_D4, height + 6, 0x1D);
@@ -1540,7 +1540,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 9:
// loc_66216D
// Loc66216D
PaintUtilForceSetGeneralSupportHeight(session, height, 9);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_B4 | SEGMENT_C8 | SEGMENT_B8, height + 2, 9);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, height + 2 + 6, 9);
@@ -1548,7 +1548,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 10:
// loc_662206
// Loc662206
PaintUtilForceSetGeneralSupportHeight(session, height, 0xA);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_B8, height + 6 + 6, 0x17);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_C8 | SEGMENT_D0, height + 6, 0x17);
@@ -1558,7 +1558,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 11:
// loc_66229B
// Loc66229B
PaintUtilForceSetGeneralSupportHeight(session, height, 0xB);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_B4, height + 4, 0x1B);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_C8 | SEGMENT_CC, height + 4 + 6, 0x1B);
@@ -1567,7 +1567,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 12:
// loc_662334
// Loc662334
PaintUtilForceSetGeneralSupportHeight(session, height, 0xC);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_B8 | SEGMENT_D0 | SEGMENT_C0, height + 2, 0xC);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D4, height + 2 + 6, 0xC);
@@ -1575,7 +1575,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 13:
// loc_6623CD
// Loc6623CD
PaintUtilForceSetGeneralSupportHeight(session, height, 0xD);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_B8, height + 4, 0x1D);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_C8 | SEGMENT_D0, height + 4 + 6, 0x1D);
@@ -1584,7 +1584,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 14:
// loc_662466
// Loc662466
PaintUtilForceSetGeneralSupportHeight(session, height, 0xE);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_C0, height + 4, 0x1E);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_D0 | SEGMENT_D4, height + 4 + 6, 0x1E);
@@ -1593,7 +1593,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 23:
// loc_6624FF
// Loc6624FF
PaintUtilForceSetGeneralSupportHeight(session, height, 0x17);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_BC, height + 4, 0x17);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_CC | SEGMENT_D4, height + 4 + 6, 0x17);
@@ -1603,7 +1603,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 27:
// loc_6625A0
// Loc6625A0
PaintUtilForceSetGeneralSupportHeight(session, height, 0x1B);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_B4, height + 4, 0x1B);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_C8 | SEGMENT_CC, height + 4 + 6, 0x1B);
@@ -1613,7 +1613,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 29:
// loc_662641
// Loc662641
PaintUtilForceSetGeneralSupportHeight(session, height, 0x1D);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_B8, height + 4, 0x1D);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_C8 | SEGMENT_D0, height + 4 + 6, 0x1D);
@@ -1623,7 +1623,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
break;
case 30:
// loc_6626E2
// Loc6626E2
PaintUtilForceSetGeneralSupportHeight(session, height, 0x1E);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_C0, height + 4, 0x1E);
PaintUtilSetSegmentSupportHeight(session, SEGMENT_D0 | SEGMENT_D4, height + 4 + 6, 0x1E);
+1 -1
View File
@@ -2059,7 +2059,7 @@ int32_t OriginalPathfinding::CalculateNextDestination(Guest& peep)
// Peep still has multiple edges to choose from.
// Peep is outside the park.
// loc_694F19:
// Loc694F19:
if (peep.OutsideOfPark)
{
#if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1
+4 -4
View File
@@ -3122,7 +3122,7 @@ static Vehicle* vehicle_create_car(
*remainingDistance -= edx;
}
// loc_6DD9A5:
// Loc6DD9A5:
vehicle->sprite_width = carEntry->sprite_width;
vehicle->sprite_height_negative = carEntry->sprite_height_negative;
vehicle->sprite_height_positive = carEntry->sprite_height_positive;
@@ -3157,7 +3157,7 @@ static Vehicle* vehicle_create_car(
if (carEntry->flags & CAR_ENTRY_FLAG_DODGEM_CAR_PLACEMENT)
{
// loc_6DDCA4:
// Loc6DDCA4:
vehicle->TrackSubposition = VehicleTrackSubposition::Default;
int32_t direction = trackElement->GetDirection();
auto dodgemPos = carPosition + CoordsXYZ{ word_9A3AB4[direction], 0 };
@@ -3174,7 +3174,7 @@ static Vehicle* vehicle_create_car(
CoordsXY chosenLoc;
auto numAttempts = 0;
// loc_6DDD26:
// Loc6DDD26:
do
{
numAttempts++;
@@ -3280,7 +3280,7 @@ static Vehicle* vehicle_create_car(
vehicle->SetState(Vehicle::Status::MovingToEndOfStation);
}
// loc_6DDD5E:
// Loc6DDD5E:
vehicle->num_peeps = 0;
vehicle->next_free_seat = 0;
vehicle->BoatLocation.SetNull();
+1 -1
View File
@@ -890,7 +890,7 @@ static void ride_ratings_calculate_value(Ride& ride)
/**
* I think this function computes ride upkeep? Though it is weird that the
* rct2: sub_65E621
* rct2: Sub65E621
* inputs
* - edi: ride ptr
*/
+97 -97
View File
@@ -1810,7 +1810,7 @@ struct SoundIdVolume
uint8_t volume;
};
static SoundIdVolume sub_6D7AC0(
static SoundIdVolume Sub6D7AC0(
OpenRCT2::Audio::SoundId currentSoundId, uint8_t currentVolume, OpenRCT2::Audio::SoundId targetSoundId,
uint8_t targetVolume)
{
@@ -4280,7 +4280,7 @@ void Vehicle::UpdateMotionBoatHire()
for (;;)
{
// loc_6DA7A5
// Loc6DA7A5
var_35++;
auto loc = BoatLocation.ToTileCentre();
CoordsXY loc2 = loc;
@@ -4292,7 +4292,7 @@ void Vehicle::UpdateMotionBoatHire()
loc2.y -= y;
if (loc2.y < 0)
{
// loc_6DA81A:
// Loc6DA81A:
loc2.y = -loc2.y;
bl = 24;
if (loc2.y <= loc2.x * 4)
@@ -4322,7 +4322,7 @@ void Vehicle::UpdateMotionBoatHire()
loc2.y -= y;
if (loc2.y < 0)
{
// loc_6DA83D:
// Loc6DA83D:
loc2.x = -loc2.x;
loc2.y = -loc2.y;
bl = 24;
@@ -4350,7 +4350,7 @@ void Vehicle::UpdateMotionBoatHire()
}
}
// loc_6DA861:
// Loc6DA861:
var_34 = bl;
loc2.x += loc2.y;
if (loc2.x <= 12)
@@ -4404,27 +4404,27 @@ void Vehicle::UpdateMotionBoatHire()
{
if (!vehicle_boat_is_location_accessible({ loc2, TrackLocation.z }))
{
// loc_6DA939:
// Loc6DA939:
auto curRide = GetRide();
if (curRide == nullptr)
return;
bool do_loc_6DAA97 = false;
bool do_Loc6DAA97 = false;
if (sub_state != 1)
{
do_loc_6DAA97 = true;
do_Loc6DAA97 = true;
}
else
{
auto flooredTileLoc = TileCoordsXY(flooredLocation);
if (curRide->boat_hire_return_position != flooredTileLoc)
{
do_loc_6DAA97 = true;
do_Loc6DAA97 = true;
}
}
// loc_6DAA97:
if (do_loc_6DAA97)
// Loc6DAA97:
if (do_Loc6DAA97)
{
remaining_distance = 0;
if (sprite_direction == var_34)
@@ -4454,7 +4454,7 @@ void Vehicle::UpdateMotionBoatHire()
}
else
{
// loc_6DA9A2:
// Loc6DA9A2:
uint16_t tilePart = loc2.x % COORDS_XY_STEP;
if (tilePart == COORDS_XY_HALF_TILE)
{
@@ -4472,7 +4472,7 @@ void Vehicle::UpdateMotionBoatHire()
}
}
// loc_6DA9D1:
// Loc6DA9D1:
remaining_distance = 0;
if (!UpdateMotionCollisionDetection({ loc2, z }, nullptr))
{
@@ -4497,7 +4497,7 @@ void Vehicle::UpdateMotionBoatHire()
MoveTo(_vehicleCurPosition);
}
// loc_6DAAC9:
// Loc6DAAC9:
{
int32_t edx = velocity >> 8;
edx = (edx * edx);
@@ -5541,12 +5541,12 @@ void Vehicle::UpdateSound()
}
// Friction sound
auto soundIdVolume = sub_6D7AC0(sound1_id, sound1_volume, frictionSound.id, frictionSound.volume);
auto soundIdVolume = Sub6D7AC0(sound1_id, sound1_volume, frictionSound.id, frictionSound.volume);
sound1_id = soundIdVolume.id;
sound1_volume = soundIdVolume.volume;
// Scream sound
soundIdVolume = sub_6D7AC0(sound2_id, sound2_volume, screamSound.id, screamSound.volume);
soundIdVolume = Sub6D7AC0(sound2_id, sound2_volume, screamSound.id, screamSound.volume);
sound2_id = soundIdVolume.id;
sound2_volume = soundIdVolume.volume;
@@ -6269,7 +6269,7 @@ int32_t Vehicle::GetSwingAmount() const
case TrackElemType::LeftQuarterHelixLargeDown:
case TrackElemType::LeftBankedQuarterTurn5TileUp25:
case TrackElemType::LeftBankedQuarterTurn5TileDown25:
// loc_6D67E1
// Loc6D67E1
return 14;
case TrackElemType::RightQuarterTurn5Tiles:
@@ -6285,12 +6285,12 @@ int32_t Vehicle::GetSwingAmount() const
case TrackElemType::RightQuarterHelixLargeDown:
case TrackElemType::RightBankedQuarterTurn5TileUp25:
case TrackElemType::RightBankedQuarterTurn5TileDown25:
// loc_6D6804
// Loc6D6804
return -14;
case TrackElemType::SBendLeft:
case TrackElemType::SBendLeftCovered:
// loc_6D67EF
// Loc6D67EF
if (track_progress < 48)
{
return 14;
@@ -6299,7 +6299,7 @@ int32_t Vehicle::GetSwingAmount() const
case TrackElemType::SBendRight:
case TrackElemType::SBendRightCovered:
// loc_6D67CC
// Loc6D67CC
if (track_progress < 48)
{
return -14;
@@ -6318,7 +6318,7 @@ int32_t Vehicle::GetSwingAmount() const
case TrackElemType::LeftCurvedLiftHill:
case TrackElemType::LeftBankedQuarterTurn3TileUp25:
case TrackElemType::LeftBankedQuarterTurn3TileDown25:
// loc_6D67BE
// Loc6D67BE
return 13;
case TrackElemType::RightQuarterTurn3Tiles:
@@ -6333,33 +6333,33 @@ int32_t Vehicle::GetSwingAmount() const
case TrackElemType::RightCurvedLiftHill:
case TrackElemType::RightBankedQuarterTurn3TileUp25:
case TrackElemType::RightBankedQuarterTurn3TileDown25:
// loc_6D67B0
// Loc6D67B0
return -13;
case TrackElemType::LeftQuarterTurn1Tile:
case TrackElemType::LeftQuarterTurn1TileUp60:
case TrackElemType::LeftQuarterTurn1TileDown60:
// loc_6D67A2
// Loc6D67A2
return 12;
case TrackElemType::RightQuarterTurn1Tile:
case TrackElemType::RightQuarterTurn1TileUp60:
case TrackElemType::RightQuarterTurn1TileDown60:
// loc_6D6794
// Loc6D6794
return -12;
case TrackElemType::LeftEighthToDiag:
case TrackElemType::LeftEighthToOrthogonal:
case TrackElemType::LeftEighthBankToDiag:
case TrackElemType::LeftEighthBankToOrthogonal:
// loc_6D67D3
// Loc6D67D3
return 15;
case TrackElemType::RightEighthToDiag:
case TrackElemType::RightEighthToOrthogonal:
case TrackElemType::RightEighthBankToDiag:
case TrackElemType::RightEighthBankToOrthogonal:
// loc_6D67F6
// Loc6D67F6
return -15;
}
return 0;
@@ -6655,7 +6655,7 @@ void Vehicle::UpdateAdditionalAnimation()
}
switch (carEntry->animation)
{
case CAR_ENTRY_ANIMATION_MINITURE_RAILWAY_LOCOMOTIVE: // loc_6D652B
case CAR_ENTRY_ANIMATION_MINITURE_RAILWAY_LOCOMOTIVE: // Loc6D652B
animationState += _vehicleVelocityF64E08;
targetFrame = (animationState >> 20) & 3;
if (animation_frame != targetFrame)
@@ -6694,7 +6694,7 @@ void Vehicle::UpdateAdditionalAnimation()
Invalidate();
}
break;
case CAR_ENTRY_ANIMATION_SWAN: // loc_6D6424
case CAR_ENTRY_ANIMATION_SWAN: // Loc6D6424
animationState += _vehicleVelocityF64E08;
targetFrame = (animationState >> 18) & 2;
if (animation_frame != targetFrame)
@@ -6703,7 +6703,7 @@ void Vehicle::UpdateAdditionalAnimation()
Invalidate();
}
break;
case CAR_ENTRY_ANIMATION_CANOES: // loc_6D6482
case CAR_ENTRY_ANIMATION_CANOES: // Loc6D6482
animationState += _vehicleVelocityF64E08;
eax = ((animationState >> 13) & 0xFF) * 6;
targetFrame = (eax >> 8) & 0xFF;
@@ -6713,7 +6713,7 @@ void Vehicle::UpdateAdditionalAnimation()
Invalidate();
}
break;
case CAR_ENTRY_ANIMATION_ROW_BOATS: // loc_6D64F7
case CAR_ENTRY_ANIMATION_ROW_BOATS: // Loc6D64F7
animationState += _vehicleVelocityF64E08;
eax = ((animationState >> 13) & 0xFF) * 7;
targetFrame = (eax >> 8) & 0xFF;
@@ -6723,7 +6723,7 @@ void Vehicle::UpdateAdditionalAnimation()
Invalidate();
}
break;
case CAR_ENTRY_ANIMATION_WATER_TRICYCLES: // loc_6D6453
case CAR_ENTRY_ANIMATION_WATER_TRICYCLES: // Loc6D6453
animationState += _vehicleVelocityF64E08;
targetFrame = (animationState >> 19) & 1;
if (animation_frame != targetFrame)
@@ -6732,7 +6732,7 @@ void Vehicle::UpdateAdditionalAnimation()
Invalidate();
}
break;
case CAR_ENTRY_ANIMATION_OBSERVATION_TOWER: // loc_6D65C3
case CAR_ENTRY_ANIMATION_OBSERVATION_TOWER: // Loc6D65C3
if (animationState <= 0xCCCC)
{
animationState += 0x3333;
@@ -6745,7 +6745,7 @@ void Vehicle::UpdateAdditionalAnimation()
Invalidate();
}
break;
case CAR_ENTRY_ANIMATION_HELICARS: // loc_6D63F5
case CAR_ENTRY_ANIMATION_HELICARS: // Loc6D63F5
animationState += _vehicleVelocityF64E08;
targetFrame = (animationState >> 18) & 3;
if (animation_frame != targetFrame)
@@ -6754,7 +6754,7 @@ void Vehicle::UpdateAdditionalAnimation()
Invalidate();
}
break;
case CAR_ENTRY_ANIMATION_MONORAIL_CYCLES: // loc_6D64B6
case CAR_ENTRY_ANIMATION_MONORAIL_CYCLES: // Loc6D64B6
if (num_peeps != 0)
{
animationState += _vehicleVelocityF64E08;
@@ -6767,7 +6767,7 @@ void Vehicle::UpdateAdditionalAnimation()
}
}
break;
case CAR_ENTRY_ANIMATION_MULTI_DIM_COASTER: // loc_6D65E1
case CAR_ENTRY_ANIMATION_MULTI_DIM_COASTER: // Loc6D65E1
if (seat_rotation != target_seat_rotation)
{
if (animationState <= 0xCCCC)
@@ -7538,7 +7538,7 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, const Rid
}
}
// loc_6DB500
// Loc6DB500
// Update VEHICLE_UPDATE_FLAG_ON_LIFT_HILL
ClearUpdateFlag(VEHICLE_UPDATE_FLAG_ON_LIFT_HILL);
if (tileElement->AsTrack()->HasChain())
@@ -7576,7 +7576,7 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack(uint16_t trackType, const Rid
bool Vehicle::UpdateTrackMotionForwards(CarEntry* carEntry, const Ride& curRide, const rct_ride_entry& rideEntry)
{
EntityId otherVehicleIndex = EntityId::GetNull();
loc_6DAEB9:
Loc6DAEB9:
auto trackType = GetTrackType();
if (trackType == TrackElemType::HeartLineTransferUp || trackType == TrackElemType::HeartLineTransferDown)
{
@@ -7689,7 +7689,7 @@ loc_6DAEB9:
track_progress = newTrackProgress;
UpdateHandleWaterSplash();
// loc_6DB706
// Loc6DB706
const auto moveInfo = GetMoveInfo();
trackType = GetTrackType();
uint8_t moveInfovehicleSpriteType;
@@ -7728,7 +7728,7 @@ loc_6DAEB9:
nextVehiclePosition.y = y + moveInfo2->y;
}
// loc_6DB8A5
// Loc6DB8A5
remaining_distance -= SubpositionTranslationDistances[remainingDistanceFlags];
_vehicleCurPosition = nextVehiclePosition;
sprite_direction = moveInfo->direction;
@@ -7794,7 +7794,7 @@ loc_6DAEB9:
}
}
// loc_6DB928
// Loc6DB928
if (remaining_distance < 0x368A)
{
return true;
@@ -7802,7 +7802,7 @@ loc_6DAEB9:
acceleration += AccelerationFromPitch[moveInfovehicleSpriteType];
_vehicleUnkF64E10++;
goto loc_6DAEB9;
goto Loc6DAEB9;
}
static PitchAndRoll PitchAndRollEnd(const Ride& curRide, bool useInvertedSprites, uint16_t trackType, TileElement* tileElement)
@@ -7826,7 +7826,7 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, const Ri
bool nextTileBackwards = true;
int32_t direction = 0;
// loc_6DBB08:;
// Loc6DBB08:;
auto trackPos = CoordsXYZ{ TrackLocation.x, TrackLocation.y, 0 };
switch (TrackSubposition)
@@ -7851,7 +7851,7 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, const Ri
if (nextTileBackwards)
{
// loc_6DBB7E:;
// Loc6DBB7E:;
track_begin_end trackBeginEnd;
if (!TrackBlockGetPrevious({ trackPos, tileElement }, &trackBeginEnd))
{
@@ -7886,7 +7886,7 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, const Ri
}
else
{
// loc_6DBB4F:;
// Loc6DBB4F:;
CoordsXYE input;
CoordsXYE output;
int32_t outputZ{};
@@ -7902,7 +7902,7 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(uint16_t trackType, const Ri
trackPos = { output, outputZ };
}
// loc_6DBC3B:
// Loc6DBC3B:
TrackLocation = trackPos;
if (TrackSubposition >= VehicleTrackSubposition::ChairliftGoingOut
@@ -8019,7 +8019,7 @@ bool Vehicle::UpdateTrackMotionBackwards(CarEntry* carEntry, const Ride& curRide
}
}
// loc_6DBD42
// Loc6DBD42
track_progress = newTrackProgress;
uint8_t moveInfoVehicleSpriteType;
{
@@ -8103,7 +8103,7 @@ bool Vehicle::UpdateTrackMotionBackwards(CarEntry* carEntry, const Ride& curRide
}
}
// loc_6DBE3F
// Loc6DBE3F
if (remaining_distance >= 0)
{
return true;
@@ -8143,24 +8143,24 @@ void Vehicle::UpdateTrackMotionMiniGolfVehicle(const Ride& curRide, const rct_ri
_vehicleCurPosition.z = z;
Invalidate();
if (remaining_distance < 0)
goto loc_6DCA9A;
goto Loc6DCA9A;
loc_6DC462:
Loc6DC462:
if (var_D3 == 0)
{
goto loc_6DC476;
goto Loc6DC476;
}
var_D3--;
goto loc_6DC985;
goto Loc6DC985;
loc_6DC476:
Loc6DC476:
if (mini_golf_flags & MiniGolfFlag::Flag2)
{
uint8_t nextFrame = animation_frame + 1;
if (nextFrame < MiniGolfPeepAnimationLengths[EnumValue(mini_golf_current_animation)])
{
animation_frame = nextFrame;
goto loc_6DC985;
goto Loc6DC985;
}
mini_golf_flags &= ~MiniGolfFlag::Flag2;
}
@@ -8175,11 +8175,11 @@ loc_6DC476:
}
if (!(vEDI->mini_golf_flags & MiniGolfFlag::Flag0) || (vEDI->mini_golf_flags & MiniGolfFlag::Flag2))
{
goto loc_6DC985;
goto Loc6DC985;
}
if (vEDI->var_D3 != 0)
{
goto loc_6DC985;
goto Loc6DC985;
}
vEDI->mini_golf_flags &= ~MiniGolfFlag::Flag0;
mini_golf_flags &= ~MiniGolfFlag::Flag0;
@@ -8195,11 +8195,11 @@ loc_6DC476:
}
if (!(vEDI->mini_golf_flags & MiniGolfFlag::Flag1) || (vEDI->mini_golf_flags & MiniGolfFlag::Flag2))
{
goto loc_6DC985;
goto Loc6DC985;
}
if (vEDI->var_D3 != 0)
{
goto loc_6DC985;
goto Loc6DC985;
}
vEDI->mini_golf_flags &= ~MiniGolfFlag::Flag1;
mini_golf_flags &= ~MiniGolfFlag::Flag1;
@@ -8222,7 +8222,7 @@ loc_6DC476:
continue;
if (vEDI->TrackLocation != TrackLocation)
continue;
goto loc_6DC985;
goto Loc6DC985;
}
mini_golf_flags |= MiniGolfFlag::Flag4;
@@ -8235,7 +8235,7 @@ loc_6DC476:
if (track_progress + 1 < trackTotalProgress)
{
track_progress += 1;
goto loc_6DC743;
goto Loc6DC743;
}
}
@@ -8247,7 +8247,7 @@ loc_6DC476:
CoordsXYE input = { TrackLocation, tileElement };
if (!TrackBlockGetNext(&input, &output, &outZ, &outDirection))
{
goto loc_6DC9BC;
goto Loc6DC9BC;
}
tileElement = output.element;
trackPos = { output.x, output.y, outZ };
@@ -8257,7 +8257,7 @@ loc_6DC476:
if (PitchAndRollStart(HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES), tileElement)
!= TrackPitchAndRollEnd(GetTrackType()))
{
goto loc_6DC9BC;
goto Loc6DC9BC;
}
{
@@ -8293,7 +8293,7 @@ loc_6DC476:
brake_speed = tileElement->AsTrack()->GetBrakeBoosterSpeed();
track_progress = 0;
loc_6DC743:
Loc6DC743:
if (!IsHead())
{
animation_frame++;
@@ -8312,7 +8312,7 @@ loc_6DC743:
}
switch (MiniGolfState(moveInfo->y))
{
case MiniGolfState::Unk0: // loc_6DC7B4
case MiniGolfState::Unk0: // Loc6DC7B4
if (!IsHead())
{
mini_golf_flags |= MiniGolfFlag::Flag3;
@@ -8333,21 +8333,21 @@ loc_6DC743:
}
track_progress++;
break;
case MiniGolfState::Unk1: // loc_6DC7ED
case MiniGolfState::Unk1: // Loc6DC7ED
LOG_ERROR("Unused move info...");
assert(false);
var_D3 = static_cast<uint8_t>(moveInfo->z);
track_progress++;
break;
case MiniGolfState::Unk2: // loc_6DC800
case MiniGolfState::Unk2: // Loc6DC800
mini_golf_flags |= MiniGolfFlag::Flag0;
track_progress++;
break;
case MiniGolfState::Unk3: // loc_6DC810
case MiniGolfState::Unk3: // Loc6DC810
mini_golf_flags |= MiniGolfFlag::Flag1;
track_progress++;
break;
case MiniGolfState::Unk4: // loc_6DC820
case MiniGolfState::Unk4: // Loc6DC820
{
auto animation = MiniGolfAnimation(moveInfo->z);
// When the ride is closed occasionally the peep is removed
@@ -8376,11 +8376,11 @@ loc_6DC743:
track_progress++;
break;
}
case MiniGolfState::Unk5: // loc_6DC87A
case MiniGolfState::Unk5: // Loc6DC87A
mini_golf_flags |= MiniGolfFlag::Flag2;
track_progress++;
break;
case MiniGolfState::Unk6: // loc_6DC88A
case MiniGolfState::Unk6: // Loc6DC88A
mini_golf_flags &= ~MiniGolfFlag::Flag4;
mini_golf_flags |= MiniGolfFlag::Flag5;
track_progress++;
@@ -8392,7 +8392,7 @@ loc_6DC743:
}
}
// loc_6DC8A1
// Loc6DC8A1
trackPos = { TrackLocation.x + moveInfo->x, TrackLocation.y + moveInfo->y,
TrackLocation.z + moveInfo->z + GetRideTypeDescriptor(curRide.type).Heights.VehicleZOffset };
@@ -8425,35 +8425,35 @@ loc_6DC743:
UpdateMotionCollisionDetection(trackPos, &otherVehicleIndex);
}
}
goto loc_6DC99A;
goto Loc6DC99A;
loc_6DC985:
Loc6DC985:
remaining_distance -= 0x368A;
if (remaining_distance < 0)
{
remaining_distance = 0;
}
loc_6DC99A:
Loc6DC99A:
if (remaining_distance < 0x368A)
{
goto loc_6DCDE4;
goto Loc6DCDE4;
}
acceleration = AccelerationFromPitch[Pitch];
_vehicleUnkF64E10++;
goto loc_6DC462;
goto Loc6DC462;
loc_6DC9BC:
Loc6DC9BC:
_vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_5;
_vehicleVelocityF64E0C -= remaining_distance + 1;
remaining_distance = -1;
goto loc_6DCD2B;
goto Loc6DCD2B;
loc_6DCA9A:
Loc6DCA9A:
if (track_progress != 0)
{
track_progress -= 1;
goto loc_6DCC2C;
goto Loc6DCC2C;
}
tileElement = MapGetTrackElementAtOfTypeSeq(TrackLocation, GetTrackType(), 0);
@@ -8461,7 +8461,7 @@ loc_6DCA9A:
track_begin_end trackBeginEnd;
if (!TrackBlockGetPrevious({ TrackLocation, tileElement }, &trackBeginEnd))
{
goto loc_6DC9BC;
goto Loc6DC9BC;
}
trackPos = { trackBeginEnd.begin_x, trackBeginEnd.begin_y, trackBeginEnd.begin_z };
direction = trackBeginEnd.begin_direction;
@@ -8471,7 +8471,7 @@ loc_6DCA9A:
if (PitchAndRollStart(HasUpdateFlag(VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES), tileElement)
!= TrackPitchAndRollEnd(GetTrackType()))
{
goto loc_6DCD4A;
goto Loc6DCD4A;
}
{
@@ -8507,7 +8507,7 @@ loc_6DCA9A:
// There are two bytes before the move info list
track_progress = GetTrackProgress();
loc_6DCC2C:
Loc6DCC2C:
moveInfo = GetMoveInfo();
trackPos = { TrackLocation.x + moveInfo->x, TrackLocation.y + moveInfo->y,
TrackLocation.z + moveInfo->z + GetRideTypeDescriptor(curRide.type).Heights.VehicleZOffset };
@@ -8540,27 +8540,27 @@ loc_6DCC2C:
otherVehicleIndex = EntityId::FromUnderlying(var_44); // Possibly wrong?.
if (UpdateMotionCollisionDetection(trackPos, &otherVehicleIndex))
{
goto loc_6DCD6B;
goto Loc6DCD6B;
}
}
}
loc_6DCD2B:
Loc6DCD2B:
if (remaining_distance >= 0)
{
goto loc_6DCDE4;
goto Loc6DCDE4;
}
acceleration += AccelerationFromPitch[Pitch];
_vehicleUnkF64E10++;
goto loc_6DCA9A;
goto Loc6DCA9A;
loc_6DCD4A:
Loc6DCD4A:
_vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_5;
_vehicleVelocityF64E0C -= remaining_distance - 0x368A;
remaining_distance = 0x368A;
goto loc_6DC99A;
goto Loc6DC99A;
loc_6DCD6B:
Loc6DCD6B:
_vehicleVelocityF64E0C -= remaining_distance - 0x368A;
remaining_distance = 0x368A;
{
@@ -8581,9 +8581,9 @@ loc_6DCD6B:
vEBP->velocity = vEDI->velocity >> 1;
}
_vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_2;
goto loc_6DC99A;
goto Loc6DC99A;
loc_6DCDE4:
Loc6DCDE4:
MoveTo(_vehicleCurPosition);
Loc6DCE02(curRide);
@@ -8946,7 +8946,7 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation)
carEntry = car->Entry();
if (carEntry == nullptr)
{
goto loc_6DBF3E;
goto Loc6DBF3E;
}
// Swinging cars
@@ -8999,7 +8999,7 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation)
if (car->remaining_distance < 0x368A)
{
// Location found
goto loc_6DBF3E;
goto Loc6DBF3E;
}
if (car->UpdateTrackMotionForwards(carEntry, *curRide, *rideEntry))
{
@@ -9014,13 +9014,13 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation)
_vehicleUnkF64E10++;
continue;
}
// loc_6DBF20
// Loc6DBF20
car->MoveTo(_vehicleCurPosition);
loc_6DBF3E:
Loc6DBF3E:
car->Sub6DBF3E();
// loc_6DC0F7
// Loc6DC0F7
if (car->HasUpdateFlag(VEHICLE_UPDATE_FLAG_ON_LIFT_HILL))
{
_vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_ON_LIFT_HILL;
@@ -9044,7 +9044,7 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation)
spriteId = car->prev_vehicle_on_ride;
}
}
// loc_6DC144
// Loc6DC144
vehicle = gCurrentVehicle;
carEntry = vehicle->Entry();
+1 -1
View File
@@ -206,7 +206,7 @@ GameActions::Result MapCanConstructWithClearAt(
{
if (tileElement->GetBaseZ() >= pos.clearanceZ)
{
// loc_68BA81
// Loc68BA81
groundFlags |= ELEMENT_IS_UNDERGROUND;
groundFlags &= ~ELEMENT_IS_ABOVE_GROUND;
}
+16 -16
View File
@@ -752,7 +752,7 @@ static bool FootpathDisconnectQueueFromPath(const CoordsXY& footpathPos, TileEle
* rct2: 0x006A6D7E
*/
static void loc_6A6FD2(const CoordsXYZ& initialTileElementPos, int32_t direction, TileElement* initialTileElement, bool query)
static void Loc6A6FD2(const CoordsXYZ& initialTileElementPos, int32_t direction, TileElement* initialTileElement, bool query)
{
if ((initialTileElement)->GetType() == TileElementType::Path)
{
@@ -764,7 +764,7 @@ static void loc_6A6FD2(const CoordsXYZ& initialTileElementPos, int32_t direction
}
}
static void loc_6A6F1F(
static void Loc6A6F1F(
const CoordsXYZ& initialTileElementPos, int32_t direction, TileElement* tileElement, TileElement* initialTileElement,
const CoordsXY& targetPos, int32_t flags, bool query, rct_neighbour_list* neighbourList)
{
@@ -814,10 +814,10 @@ static void loc_6A6F1F(
FootpathInterruptPeeps({ targetPos, tileElement->GetBaseZ() });
}
MapInvalidateElement(targetPos, tileElement);
loc_6A6FD2(initialTileElementPos, direction, initialTileElement, query);
Loc6A6FD2(initialTileElementPos, direction, initialTileElement, query);
}
static void loc_6A6D7E(
static void Loc6A6D7E(
const CoordsXYZ& initialTileElementPos, int32_t direction, TileElement* initialTileElement, int32_t flags, bool query,
rct_neighbour_list* neighbourList)
{
@@ -828,7 +828,7 @@ static void loc_6A6D7E(
{
FootpathNeighbourListPush(neighbourList, 7, direction, RideId::GetNull(), StationIndex::GetNull());
}
loc_6A6FD2(initialTileElementPos, direction, initialTileElement, query);
Loc6A6FD2(initialTileElementPos, direction, initialTileElement, query);
}
else
{
@@ -844,7 +844,7 @@ static void loc_6A6D7E(
{
if (!tileElement->AsPath()->IsSloped() || tileElement->AsPath()->GetSlopeDirection() == direction)
{
loc_6A6F1F(
Loc6A6F1F(
initialTileElementPos, direction, tileElement, initialTileElement, targetPos, flags, query,
neighbourList);
}
@@ -855,7 +855,7 @@ static void loc_6A6D7E(
if (tileElement->AsPath()->IsSloped()
&& tileElement->AsPath()->GetSlopeDirection() == DirectionReverse(direction))
{
loc_6A6F1F(
Loc6A6F1F(
initialTileElementPos, direction, tileElement, initialTileElement, targetPos, flags, query,
neighbourList);
}
@@ -894,7 +894,7 @@ static void loc_6A6D7E(
FootpathNeighbourListPush(
neighbourList, 1, direction, tileElement->AsTrack()->GetRideIndex(), StationIndex::GetNull());
}
loc_6A6FD2(initialTileElementPos, direction, initialTileElement, query);
Loc6A6FD2(initialTileElementPos, direction, initialTileElement, query);
return;
}
break;
@@ -917,7 +917,7 @@ static void loc_6A6D7E(
FootpathQueueChainPush(tileElement->AsEntrance()->GetRideIndex());
}
}
loc_6A6FD2(initialTileElementPos, direction, initialTileElement, query);
Loc6A6FD2(initialTileElementPos, direction, initialTileElement, query);
return;
}
}
@@ -930,9 +930,9 @@ static void loc_6A6D7E(
}
}
// TODO: Change this into a simple check that validates if the direction should be fully checked with loc_6A6D7E and move the
// calling of loc_6A6D7E into the parent function.
static void loc_6A6C85(
// TODO: Change this into a simple check that validates if the direction should be fully checked with Loc6A6D7E and move the
// calling of Loc6A6D7E into the parent function.
static void Loc6A6C85(
const CoordsXYE& tileElementPos, int32_t direction, int32_t flags, bool query, rct_neighbour_list* neighbourList)
{
if (query
@@ -992,7 +992,7 @@ static void loc_6A6C85(
}
}
loc_6A6D7E(pos, direction, tileElementPos.element, flags, query, neighbourList);
Loc6A6D7E(pos, direction, tileElementPos.element, flags, query, neighbourList);
}
/**
@@ -1011,7 +1011,7 @@ void FootpathConnectEdges(const CoordsXY& footpathPos, TileElement* tileElement,
FootpathUpdateQueueEntranceBanner(footpathPos, tileElement);
for (Direction direction : ALL_DIRECTIONS)
{
loc_6A6C85({ footpathPos, tileElement }, direction, flags, true, &neighbourList);
Loc6A6C85({ footpathPos, tileElement }, direction, flags, true, &neighbourList);
}
FoopathNeighbourListSort(&neighbourList);
@@ -1047,7 +1047,7 @@ void FootpathConnectEdges(const CoordsXY& footpathPos, TileElement* tileElement,
while (FootpathNeighbourListPop(&neighbourList, &neighbour))
{
loc_6A6C85({ footpathPos, tileElement }, neighbour.direction, flags, false, nullptr);
Loc6A6C85({ footpathPos, tileElement }, neighbour.direction, flags, false, nullptr);
}
if (tileElement->GetType() == TileElementType::Path)
@@ -1860,7 +1860,7 @@ void FootpathUpdatePathWideFlags(const CoordsXY& footpathPos)
auto height = tileElement->GetBaseZ();
// pathList is a list of elements, set by sub_6A8ACF adjacent to x,y
// pathList is a list of elements, set by Sub6A8ACF adjacent to x,y
// Spanned from 0x00F3EFA8 to 0x00F3EFC7 (8 elements) in the original
std::array<TileElement*, 8> pathList;
for (std::size_t direction = 0; direction < pathList.size(); ++direction)