mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 14:24:33 +01:00
Name byte_9D8150
This commit is contained in:
committed by
GitHub
parent
37910414bc
commit
b4f3923162
@@ -121,7 +121,7 @@ GameActions::Result::Ptr SmallSceneryPlaceAction::Query() const
|
||||
return std::make_unique<SmallSceneryPlaceActionResult>(GameActions::Status::NoFreeElements);
|
||||
}
|
||||
|
||||
if (!byte_9D8150 && (_loc.x > gMapSizeMaxXY || _loc.y > gMapSizeMaxXY))
|
||||
if (!_trackDesignDrawingPreview && (_loc.x > gMapSizeMaxXY || _loc.y > gMapSizeMaxXY))
|
||||
{
|
||||
return std::make_unique<SmallSceneryPlaceActionResult>(GameActions::Status::InvalidParameters);
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ GameActions::Result::Ptr TrackPlaceAction::Query() const
|
||||
GameActions::Status::Disallowed, STR_RIDE_CANT_BUILD_THIS_UNDERWATER);
|
||||
}
|
||||
|
||||
if ((rideTypeFlags & RIDE_TYPE_FLAG_TRACK_MUST_BE_ON_WATER) && !byte_9D8150)
|
||||
if ((rideTypeFlags & RIDE_TYPE_FLAG_TRACK_MUST_BE_ON_WATER) && !_trackDesignDrawingPreview)
|
||||
{
|
||||
auto surfaceElement = map_get_surface_element_at(mapLoc);
|
||||
if (surfaceElement == nullptr)
|
||||
@@ -347,7 +347,7 @@ GameActions::Result::Ptr TrackPlaceAction::Query() const
|
||||
}
|
||||
|
||||
ride_height /= COORDS_Z_PER_TINY_Z;
|
||||
if (ride_height > maxHeight && !byte_9D8150)
|
||||
if (ride_height > maxHeight && !_trackDesignDrawingPreview)
|
||||
{
|
||||
return std::make_unique<TrackPlaceActionResult>(GameActions::Status::Disallowed, STR_TOO_HIGH_FOR_SUPPORTS);
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ GameActions::Result::Ptr WallPlaceAction::Query() const
|
||||
return std::make_unique<WallPlaceActionResult>(GameActions::Status::NotOwned);
|
||||
}
|
||||
}
|
||||
else if (!byte_9D8150 && (_loc.x > gMapSizeMaxXY || _loc.y > gMapSizeMaxXY))
|
||||
else if (!_trackDesignDrawingPreview && (_loc.x > gMapSizeMaxXY || _loc.y > gMapSizeMaxXY))
|
||||
{
|
||||
log_error("Invalid x/y coordinates. x = %d y = %d", _loc.x, _loc.y);
|
||||
return std::make_unique<WallPlaceActionResult>(GameActions::Status::InvalidParameters);
|
||||
|
||||
@@ -83,7 +83,7 @@ static CoordsXYZ _trackPreviewMin;
|
||||
static CoordsXYZ _trackPreviewMax;
|
||||
static CoordsXYZ _trackPreviewOrigin;
|
||||
|
||||
bool byte_9D8150;
|
||||
bool _trackDesignDrawingPreview;
|
||||
static uint8_t _trackDesignPlaceOperation;
|
||||
static money32 _trackDesignPlaceCost;
|
||||
static int16_t _trackDesignPlaceZ;
|
||||
@@ -1919,7 +1919,7 @@ static bool track_design_place_preview(TrackDesign* td6, money32* cost, Ride** o
|
||||
}
|
||||
}
|
||||
|
||||
byte_9D8150 = true;
|
||||
_trackDesignDrawingPreview = true;
|
||||
uint8_t backup_rotation = _currentTrackPieceDirection;
|
||||
uint32_t backup_park_flags = gParkFlags;
|
||||
gParkFlags &= ~PARK_FLAGS_FORBID_HIGH_CONSTRUCTION;
|
||||
@@ -1958,7 +1958,7 @@ static bool track_design_place_preview(TrackDesign* td6, money32* cost, Ride** o
|
||||
}
|
||||
|
||||
_currentTrackPieceDirection = backup_rotation;
|
||||
byte_9D8150 = false;
|
||||
_trackDesignDrawingPreview = false;
|
||||
*cost = resultCost;
|
||||
*outRide = ride;
|
||||
return true;
|
||||
@@ -1967,7 +1967,7 @@ static bool track_design_place_preview(TrackDesign* td6, money32* cost, Ride** o
|
||||
{
|
||||
_currentTrackPieceDirection = backup_rotation;
|
||||
ride->Delete();
|
||||
byte_9D8150 = false;
|
||||
_trackDesignDrawingPreview = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ enum
|
||||
extern TrackDesign* gActiveTrackDesign;
|
||||
extern bool gTrackDesignSceneryToggle;
|
||||
|
||||
extern bool byte_9D8150;
|
||||
extern bool _trackDesignDrawingPreview;
|
||||
|
||||
extern bool _trackDesignPlaceStateSceneryUnavailable;
|
||||
extern bool gTrackDesignSaveMode;
|
||||
|
||||
Reference in New Issue
Block a user