1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Add some comments

This commit is contained in:
Michael Steenbeek
2020-12-21 14:53:54 +01:00
committed by GitHub
parent 179b50358c
commit 94b6723f0d
2 changed files with 2 additions and 0 deletions

View File

@@ -65,6 +65,7 @@ void LandTool::ShowSurfaceStyleDropdown(rct_window* w, rct_widget* widget, uint8
for (size_t i = 0; i < MAX_TERRAIN_SURFACE_OBJECTS; i++)
{
const auto surfaceObj = static_cast<TerrainSurfaceObject*>(objManager.GetLoadedObject(ObjectType::TerrainSurface, i));
// NumImagesLoaded can be 1 for RCT1 surfaces if the user does not have RCT1 linked.
if (surfaceObj != nullptr && surfaceObj->NumImagesLoaded > 1)
{
gDropdownItemsFormat[itemIndex] = Dropdown::FormatLandPicker;

View File

@@ -307,6 +307,7 @@ static uint32_t get_surface_image(
const paint_session* session, uint8_t index, int32_t offset, uint8_t rotation, int32_t grassLength, bool grid,
bool underground)
{
// Provide fallback for RCT1 surfaces if the user does have RCT1 linked.
if (!is_csg_loaded() && index >= TERRAIN_RCT2_COUNT)
{
if (index == TERRAIN_ROOF_GREY)