mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add DesignCreateMode field to the RTD (#16987)
This commit is contained in:
parent
faa5a41f5a
commit
9c796816a1
|
@ -77,6 +77,12 @@ enum class RideColourKey : uint8_t
|
|||
Toilets
|
||||
};
|
||||
|
||||
enum class TrackDesignCreateMode : uint_fast8_t
|
||||
{
|
||||
Default,
|
||||
Maze
|
||||
};
|
||||
|
||||
struct RideNameConvention
|
||||
{
|
||||
RideComponentType vehicle;
|
||||
|
@ -189,6 +195,7 @@ struct RideTypeDescriptor
|
|||
track_colour_preset_list ColourPresets;
|
||||
RideColourPreview ColourPreview;
|
||||
RideColourKey ColourKey;
|
||||
TrackDesignCreateMode DesignCreateMode = TrackDesignCreateMode::Default;
|
||||
|
||||
RideMusicUpdateFunction MusicUpdateFunction = DefaultMusicUpdate;
|
||||
RideClassification Classification = RideClassification::Ride;
|
||||
|
|
|
@ -149,12 +149,16 @@ rct_string_id TrackDesign::CreateTrackDesign(TrackDesignState& tds, const Ride&
|
|||
flags = 0;
|
||||
flags2 = 0;
|
||||
|
||||
if (type == RIDE_TYPE_MAZE)
|
||||
const auto& rtd = GetRideTypeDescriptor(type);
|
||||
|
||||
if (rtd.DesignCreateMode == TrackDesignCreateMode::Maze)
|
||||
{
|
||||
return CreateTrackDesignMaze(tds, ride);
|
||||
}
|
||||
|
||||
return CreateTrackDesignTrack(tds, ride);
|
||||
else
|
||||
{
|
||||
return CreateTrackDesignTrack(tds, ride);
|
||||
}
|
||||
}
|
||||
|
||||
rct_string_id TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, const Ride& ride)
|
||||
|
|
|
@ -48,7 +48,7 @@ constexpr const RideTypeDescriptor HybridCoasterRTD =
|
|||
{ COLOUR_BRIGHT_RED, COLOUR_BRIGHT_RED, COLOUR_SATURATED_BROWN},
|
||||
{ COLOUR_LIGHT_BLUE, COLOUR_LIGHT_BLUE, COLOUR_WHITE}
|
||||
)),
|
||||
SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_HYBRID_COASTER_TRACK, SPR_RIDE_DESIGN_PREVIEW_HYBRID_COASTER_SUPPORTS }),
|
||||
SET_FIELD(ColourKey, RideColourKey::Ride),
|
||||
SET_FIELD(ColourPreview, { SPR_RIDE_DESIGN_PREVIEW_HYBRID_COASTER_TRACK, SPR_RIDE_DESIGN_PREVIEW_HYBRID_COASTER_SUPPORTS }),
|
||||
SET_FIELD(ColourKey, RideColourKey::Ride),
|
||||
};
|
||||
// clang-format on
|
||||
|
|
|
@ -49,6 +49,7 @@ constexpr const RideTypeDescriptor CircusRTD =
|
|||
SET_FIELD(ColourPresets, DEFAULT_FLAT_RIDE_COLOUR_PRESET),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::Ride),
|
||||
SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default),
|
||||
SET_FIELD(MusicUpdateFunction, CircusMusicUpdate),
|
||||
};
|
||||
// clang-format on
|
||||
|
|
|
@ -50,5 +50,6 @@ constexpr const RideTypeDescriptor MazeRTD =
|
|||
)),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::Ride),
|
||||
SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Maze),
|
||||
};
|
||||
// clang-format on
|
||||
|
|
|
@ -46,6 +46,7 @@ constexpr const RideTypeDescriptor CashMachineRTD =
|
|||
SET_FIELD(ColourPresets, DEFAULT_FLAT_RIDE_COLOUR_PRESET),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::CashMachine),
|
||||
SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default),
|
||||
SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate),
|
||||
SET_FIELD(Classification, RideClassification::KioskOrFacility),
|
||||
};
|
||||
|
|
|
@ -47,6 +47,7 @@ constexpr const RideTypeDescriptor DrinkStallRTD =
|
|||
SET_FIELD(ColourPresets, DEFAULT_STALL_COLOUR_PRESET),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::Drink),
|
||||
SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default),
|
||||
SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate),
|
||||
SET_FIELD(Classification, RideClassification::ShopOrStall),
|
||||
};
|
||||
|
|
|
@ -47,6 +47,7 @@ constexpr const RideTypeDescriptor FirstAidRTD =
|
|||
SET_FIELD(ColourPresets, DEFAULT_FLAT_RIDE_COLOUR_PRESET),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::FirstAid),
|
||||
SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default),
|
||||
SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate),
|
||||
SET_FIELD(Classification, RideClassification::KioskOrFacility),
|
||||
};
|
||||
|
|
|
@ -47,6 +47,7 @@ constexpr const RideTypeDescriptor FoodStallRTD =
|
|||
SET_FIELD(ColourPresets, DEFAULT_STALL_COLOUR_PRESET),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::Food),
|
||||
SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default),
|
||||
SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate),
|
||||
SET_FIELD(Classification, RideClassification::ShopOrStall),
|
||||
};
|
||||
|
|
|
@ -47,6 +47,7 @@ constexpr const RideTypeDescriptor InformationKioskRTD =
|
|||
SET_FIELD(ColourPresets, DEFAULT_STALL_COLOUR_PRESET),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::InfoKiosk),
|
||||
SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default),
|
||||
SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate),
|
||||
SET_FIELD(Classification, RideClassification::KioskOrFacility),
|
||||
};
|
||||
|
|
|
@ -47,6 +47,7 @@ constexpr const RideTypeDescriptor ShopRTD =
|
|||
SET_FIELD(ColourPresets, DEFAULT_STALL_COLOUR_PRESET),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::Shop),
|
||||
SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default),
|
||||
SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate),
|
||||
SET_FIELD(Classification, RideClassification::ShopOrStall),
|
||||
};
|
||||
|
|
|
@ -47,6 +47,7 @@ constexpr const RideTypeDescriptor ToiletsRTD =
|
|||
SET_FIELD(ColourPresets, DEFAULT_FLAT_RIDE_COLOUR_PRESET),
|
||||
SET_FIELD(ColourPreview, { 0, 0 }),
|
||||
SET_FIELD(ColourKey, RideColourKey::Toilets),
|
||||
SET_FIELD(DesignCreateMode, TrackDesignCreateMode::Default),
|
||||
SET_FIELD(MusicUpdateFunction, DefaultMusicUpdate),
|
||||
SET_FIELD(Classification, RideClassification::KioskOrFacility),
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue