mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Add RCT1 surface styles
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
- Feature: [#13512] [Plugin] Add item separators to list view.
|
||||
- Feature: [#13583] Add allowed_hosts to plugin section of config.
|
||||
- Feature: [#13587] Enhanced track designer with ability to add/remove scenery and footpaths.
|
||||
- Feature: [#13614] Add terrain surfaces from RollerCoaster Tycoon 1.
|
||||
- Change: [#13346] Change FootpathScenery to FootpathAddition in all occurrences.
|
||||
- Fix: [#12895] Mechanics are called to repair rides that have already been fixed.
|
||||
- Fix: [#13257] Rides that are exactly the minimum objective length are not counted.
|
||||
|
||||
@@ -65,7 +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));
|
||||
if (surfaceObj != nullptr)
|
||||
if (surfaceObj != nullptr && surfaceObj->NumImagesLoaded > 1)
|
||||
{
|
||||
gDropdownItemsFormat[itemIndex] = Dropdown::FormatLandPicker;
|
||||
gDropdownItemsArgs[itemIndex] = surfaceObj->IconImageId;
|
||||
|
||||
@@ -22,7 +22,7 @@ constexpr const uint16_t MAX_SCENERY_GROUP_OBJECTS = 19;
|
||||
constexpr const uint16_t MAX_PARK_ENTRANCE_OBJECTS = 1;
|
||||
constexpr const uint16_t MAX_WATER_OBJECTS = 1;
|
||||
constexpr const uint16_t MAX_SCENARIO_TEXT_OBJECTS = 1;
|
||||
constexpr const uint16_t MAX_TERRAIN_SURFACE_OBJECTS = 14;
|
||||
constexpr const uint16_t MAX_TERRAIN_SURFACE_OBJECTS = 18;
|
||||
constexpr const uint16_t MAX_TERRAIN_EDGE_OBJECTS = 255;
|
||||
constexpr const uint16_t MAX_STATION_OBJECTS = 255;
|
||||
constexpr const uint16_t MAX_MUSIC_OBJECTS = 0;
|
||||
|
||||
@@ -248,6 +248,10 @@ public:
|
||||
LoadObject("rct2.surface.gridgreen");
|
||||
LoadObject("rct2.surface.sandred");
|
||||
LoadObject("rct2.surface.sandbrown");
|
||||
LoadObject("rct1.aa.surface.roofred");
|
||||
LoadObject("rct1.ll.surface.roofgrey");
|
||||
LoadObject("rct1.ll.surface.rust");
|
||||
LoadObject("rct1.ll.surface.wood");
|
||||
|
||||
// Edges
|
||||
LoadObject("rct2.edge.rock");
|
||||
|
||||
@@ -122,6 +122,8 @@ void TerrainSurfaceObject::ReadJson(IReadObjectContext* context, json_t& root)
|
||||
}
|
||||
|
||||
PopulateTablesFromJson(context, root);
|
||||
|
||||
NumImagesLoaded = GetImageTable().GetCount();
|
||||
}
|
||||
|
||||
uint32_t TerrainSurfaceObject::GetImageId(
|
||||
|
||||
@@ -54,6 +54,8 @@ public:
|
||||
money32 Price{};
|
||||
TERRAIN_SURFACE_FLAGS Flags{};
|
||||
|
||||
uint32_t NumImagesLoaded;
|
||||
|
||||
explicit TerrainSurfaceObject(const rct_object_entry& entry)
|
||||
: Object(entry)
|
||||
{
|
||||
|
||||
@@ -307,6 +307,14 @@ 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)
|
||||
{
|
||||
if (!is_csg_loaded() && index >= TERRAIN_RCT2_COUNT)
|
||||
{
|
||||
if (index == TERRAIN_ROOF_GREY)
|
||||
index = TERRAIN_ROCK;
|
||||
else
|
||||
index = TERRAIN_DIRT;
|
||||
}
|
||||
|
||||
auto image = static_cast<uint32_t>(SPR_NONE);
|
||||
auto obj = get_surface_object(index);
|
||||
if (obj != nullptr)
|
||||
|
||||
@@ -125,11 +125,11 @@ namespace RCT1
|
||||
TERRAIN_MARTIAN,
|
||||
TERRAIN_CHECKERBOARD,
|
||||
TERRAIN_GRASS_CLUMPS,
|
||||
TERRAIN_DIRT, // Originally TERRAIN_ROOF_BROWN
|
||||
TERRAIN_ROOF_BROWN,
|
||||
TERRAIN_ICE,
|
||||
TERRAIN_DIRT, // Originally TERRAIN_ROOF_LOG
|
||||
TERRAIN_DIRT, // Originally TERRAIN_ROOF_IRON
|
||||
TERRAIN_ROCK, // Originally TERRAIN_ROOF_GREY
|
||||
TERRAIN_ROOF_LOG,
|
||||
TERRAIN_ROOF_IRON,
|
||||
TERRAIN_ROOF_GREY,
|
||||
TERRAIN_GRID_RED,
|
||||
TERRAIN_GRID_YELLOW,
|
||||
TERRAIN_GRID_BLUE,
|
||||
|
||||
@@ -28,8 +28,15 @@ enum
|
||||
TERRAIN_GRID_GREEN,
|
||||
TERRAIN_SAND_DARK,
|
||||
TERRAIN_SAND_LIGHT,
|
||||
TERRAIN_COUNT_REGULAR = 14, // The amount of surface types the user can actually select - what follows are technical types
|
||||
TERRAIN_CHECKERBOARD_INVERTED = 14,
|
||||
|
||||
TERRAIN_RCT2_COUNT,
|
||||
|
||||
TERRAIN_ROOF_BROWN = TERRAIN_RCT2_COUNT,
|
||||
TERRAIN_ROOF_GREY,
|
||||
TERRAIN_ROOF_IRON,
|
||||
TERRAIN_ROOF_LOG,
|
||||
TERRAIN_COUNT_REGULAR, // The amount of surface types the user can actually select - what follows are technical types
|
||||
TERRAIN_CHECKERBOARD_INVERTED = TERRAIN_COUNT_REGULAR,
|
||||
TERRAIN_UNDERGROUND_VIEW,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user