mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
Add some comments
This commit is contained in:
committed by
GitHub
parent
179b50358c
commit
94b6723f0d
@@ -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++)
|
for (size_t i = 0; i < MAX_TERRAIN_SURFACE_OBJECTS; i++)
|
||||||
{
|
{
|
||||||
const auto surfaceObj = static_cast<TerrainSurfaceObject*>(objManager.GetLoadedObject(ObjectType::TerrainSurface, 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)
|
if (surfaceObj != nullptr && surfaceObj->NumImagesLoaded > 1)
|
||||||
{
|
{
|
||||||
gDropdownItemsFormat[itemIndex] = Dropdown::FormatLandPicker;
|
gDropdownItemsFormat[itemIndex] = Dropdown::FormatLandPicker;
|
||||||
|
|||||||
@@ -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,
|
const paint_session* session, uint8_t index, int32_t offset, uint8_t rotation, int32_t grassLength, bool grid,
|
||||||
bool underground)
|
bool underground)
|
||||||
{
|
{
|
||||||
|
// Provide fallback for RCT1 surfaces if the user does have RCT1 linked.
|
||||||
if (!is_csg_loaded() && index >= TERRAIN_RCT2_COUNT)
|
if (!is_csg_loaded() && index >= TERRAIN_RCT2_COUNT)
|
||||||
{
|
{
|
||||||
if (index == TERRAIN_ROOF_GREY)
|
if (index == TERRAIN_ROOF_GREY)
|
||||||
|
|||||||
Reference in New Issue
Block a user