1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 20:13:07 +01:00

Enhance the track designer with ability to add scenery and footpaths

This brings feature parity with Rollercoaster Tycoon Classic (RCTC)

Includes:
* Re-enabled buttons: Ride List, Map, Scenery, Path, Clear Scenery
* Add all standard footpaths and core scenery objects to the object selection

The max limit of 4 rides has not changed; other object types can have more than 4
Only a minimum set of scenery is enabled, as the full set cannot be included
This commit is contained in:
Richard Qian
2020-12-14 15:02:43 -06:00
parent 235afc4c62
commit 904af2cc4f
4 changed files with 49 additions and 6 deletions

View File

@@ -675,7 +675,7 @@ static void window_top_toolbar_invalidate(rct_window* w)
if (gScreenFlags & SCREEN_FLAGS_EDITOR)
{
window_top_toolbar_widgets[WIDX_RIDES].type = WindowWidgetType::Empty;
//window_top_toolbar_widgets[WIDX_RIDES].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_PARK].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_STAFF].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_GUESTS].type = WindowWidgetType::Empty;
@@ -686,22 +686,28 @@ static void window_top_toolbar_invalidate(rct_window* w)
if (gS6Info.editor_step != EDITOR_STEP_LANDSCAPE_EDITOR)
{
window_top_toolbar_widgets[WIDX_MAP].type = WindowWidgetType::Empty;
//window_top_toolbar_widgets[WIDX_MAP].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_LAND].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_WATER].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_SCENERY].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_PATH].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_CLEAR_SCENERY].type = WindowWidgetType::Empty;
//window_top_toolbar_widgets[WIDX_SCENERY].type = WindowWidgetType::Empty;
//window_top_toolbar_widgets[WIDX_PATH].type = WindowWidgetType::Empty;
//window_top_toolbar_widgets[WIDX_CLEAR_SCENERY].type = WindowWidgetType::Empty;
}
if (gS6Info.editor_step != EDITOR_STEP_ROLLERCOASTER_DESIGNER)
{
window_top_toolbar_widgets[WIDX_RIDES].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_CONSTRUCT_RIDE].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_FASTFORWARD].type = WindowWidgetType::Empty;
}
if (gS6Info.editor_step != EDITOR_STEP_LANDSCAPE_EDITOR && gS6Info.editor_step != EDITOR_STEP_ROLLERCOASTER_DESIGNER)
{
window_top_toolbar_widgets[WIDX_MAP].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_SCENERY].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_PATH].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_CLEAR_SCENERY].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_ZOOM_OUT].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_ZOOM_IN].type = WindowWidgetType::Empty;
window_top_toolbar_widgets[WIDX_ROTATE].type = WindowWidgetType::Empty;

View File

@@ -37,6 +37,7 @@ static void setup_in_use_selection_flags();
static void setup_track_designer_objects();
static void setup_track_manager_objects();
static void window_editor_object_selection_select_default_objects();
static void select_designer_objects();
/**
*
@@ -75,6 +76,7 @@ static void setup_track_designer_objects()
{
int32_t numObjects = static_cast<int32_t>(object_repository_get_items_count());
const ObjectRepositoryItem* items = object_repository_get_items();
select_designer_objects();
for (int32_t i = 0; i < numObjects; i++)
{
uint8_t* selectionFlags = &_objectSelectionFlags[i];
@@ -353,6 +355,21 @@ static void window_editor_object_selection_select_default_objects()
}
}
static void select_designer_objects()
{
if (_numSelectedObjectsForType[0] == 0)
{
for (auto designerSelectedObject : DesignerSelectedObjects)
{
window_editor_object_selection_select_object(
0,
INPUT_FLAG_EDITOR_OBJECT_SELECT | INPUT_FLAG_EDITOR_OBJECT_1
| INPUT_FLAG_EDITOR_OBJECT_SELECT_OBJECTS_IN_SCENERY_GROUP,
designerSelectedObject);
}
}
}
/**
*
* rct2: 0x006AA770
@@ -479,7 +496,7 @@ bool window_editor_object_selection_select_object(uint8_t isMasterObject, int32_
ObjectType objectType = item->ObjectEntry.GetType();
uint16_t maxObjects = object_entry_group_counts[EnumValue(objectType)];
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER && objectType == ObjectType::Ride)
{
maxObjects = 4;
}

View File

@@ -49,3 +49,22 @@ const std::string_view DefaultSelectedObjects[] = {
"rct2.scgsnow", // Snow and Ice Theming
"rct2.scgwater", // Water Feature Theming
};
const std::string_view DesignerSelectedObjects[] = {
// An initial default selection + all standard footpaths
"rct2.scgtrees", // Scenery: Trees
"rct2.scgshrub", // Scenery: Shrubs and Ornaments
"rct2.scggardn", // Scenery: Gardens
"rct2.scgfence", // Scenery: Fences and Walls
"rct2.scgwalls", // Scenery: Walls and Roofs
"rct2.scgpathx", // Scenery: Signs and Items for Footpaths
"rct2.wtrcyan", // Water: Natural Water
"rct2.pkent1", // Park Entrance: Traditional Park Entrance
"rct2.tarmac", // Footpath: Tarmac
"rct2.tarmacg", // Footpath: Green Tarmac Footpath
"rct2.tarmacb", // Footpath: Brown Tarmac Footpath
"rct2.pathspce", // Footpath: Space Style Footpath
"rct2.pathcrzy", // Footpath: Crazy Paving Footpath
"rct2.pathdirt", // Footpath: Dirt Footpath
"rct2.pathash", // Footpath: Ash Footpath
};

View File

@@ -12,3 +12,4 @@
#include "Object.h"
extern const std::string_view DefaultSelectedObjects[33];
extern const std::string_view DesignerSelectedObjects[15];