2014-05-23 11:14:52 +02:00
|
|
|
/*****************************************************************************
|
2019-03-17 08:16:15 +01:00
|
|
|
* Copyright (c) 2014-2019 OpenRCT2 developers
|
2014-05-23 11:14:52 +02:00
|
|
|
*
|
2018-06-15 14:07:34 +02:00
|
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
2014-05-23 11:14:52 +02:00
|
|
|
*
|
2018-06-15 14:07:34 +02:00
|
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
2014-05-23 11:14:52 +02:00
|
|
|
*****************************************************************************/
|
|
|
|
|
2014-05-24 15:31:42 +02:00
|
|
|
#ifndef _RIDE_DATA_H_
|
|
|
|
#define _RIDE_DATA_H_
|
|
|
|
|
2014-10-06 18:36:58 +02:00
|
|
|
#include "../common.h"
|
2017-12-31 13:21:34 +01:00
|
|
|
#include "Ride.h"
|
2020-02-22 16:43:34 +01:00
|
|
|
#include "TrackPaint.h"
|
2014-09-01 13:04:34 +02:00
|
|
|
|
2018-06-22 23:14:18 +02:00
|
|
|
struct ride_component_name
|
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
rct_string_id singular;
|
|
|
|
rct_string_id plural;
|
|
|
|
rct_string_id capitalised;
|
|
|
|
rct_string_id capitalised_plural;
|
|
|
|
rct_string_id count;
|
|
|
|
rct_string_id count_plural;
|
|
|
|
rct_string_id number;
|
2018-02-14 09:42:26 +01:00
|
|
|
};
|
2016-07-14 14:07:49 +02:00
|
|
|
|
2018-06-22 23:14:18 +02:00
|
|
|
enum RIDE_COMPONENT_TYPE
|
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
RIDE_COMPONENT_TYPE_TRAIN,
|
|
|
|
RIDE_COMPONENT_TYPE_BOAT,
|
|
|
|
RIDE_COMPONENT_TYPE_TRACK,
|
|
|
|
RIDE_COMPONENT_TYPE_DOCKING_PLATFORM,
|
|
|
|
RIDE_COMPONENT_TYPE_STATION,
|
|
|
|
RIDE_COMPONENT_TYPE_CAR,
|
|
|
|
RIDE_COMPONENT_TYPE_BUILDING,
|
|
|
|
RIDE_COMPONENT_TYPE_STRUCTURE,
|
|
|
|
RIDE_COMPONENT_TYPE_SHIP,
|
|
|
|
RIDE_COMPONENT_TYPE_CABIN,
|
|
|
|
RIDE_COMPONENT_TYPE_WHEEL,
|
|
|
|
RIDE_COMPONENT_TYPE_RING,
|
|
|
|
RIDE_COMPONENT_TYPE_PLAYER,
|
|
|
|
RIDE_COMPONENT_TYPE_COURSE,
|
|
|
|
RIDE_COMPONENT_TYPE_COUNT
|
2018-02-14 09:42:26 +01:00
|
|
|
};
|
2016-07-14 14:07:49 +02:00
|
|
|
|
2018-06-22 23:14:18 +02:00
|
|
|
struct rct_ride_name_convention
|
|
|
|
{
|
2018-02-14 09:42:26 +01:00
|
|
|
RIDE_COMPONENT_TYPE vehicle;
|
|
|
|
RIDE_COMPONENT_TYPE structure;
|
|
|
|
RIDE_COMPONENT_TYPE station;
|
|
|
|
};
|
2014-05-23 14:18:58 +02:00
|
|
|
|
2018-06-22 23:14:18 +02:00
|
|
|
struct rct_ride_data_4
|
|
|
|
{
|
2018-06-20 17:28:51 +02:00
|
|
|
uint8_t price;
|
|
|
|
uint8_t price_secondary;
|
|
|
|
uint16_t flags;
|
|
|
|
uint8_t default_music;
|
|
|
|
uint8_t alternate_type;
|
|
|
|
uint8_t pad[2] = {};
|
2018-02-14 09:42:26 +01:00
|
|
|
};
|
2015-09-10 23:16:41 +02:00
|
|
|
|
2018-06-22 23:14:18 +02:00
|
|
|
struct ride_cost
|
|
|
|
{
|
2018-06-20 17:28:51 +02:00
|
|
|
uint16_t track_price;
|
|
|
|
uint16_t support_price;
|
2018-02-14 09:42:26 +01:00
|
|
|
};
|
2016-04-03 13:41:00 +02:00
|
|
|
|
2018-06-22 23:14:18 +02:00
|
|
|
struct rct_ride_data_5
|
|
|
|
{
|
2018-06-20 17:28:51 +02:00
|
|
|
uint8_t max_height;
|
|
|
|
uint8_t clearance_height;
|
|
|
|
int8_t z_offset;
|
|
|
|
uint8_t max_mass;
|
|
|
|
uint8_t z;
|
|
|
|
uint8_t price;
|
2018-06-22 23:14:18 +02:00
|
|
|
uint8_t bonus_value; // Deprecated. Use rideBonusValue instead
|
2018-06-20 17:28:51 +02:00
|
|
|
uint8_t pad = 0;
|
2018-02-14 09:42:26 +01:00
|
|
|
};
|
2016-04-03 14:53:17 +02:00
|
|
|
|
2018-06-22 23:14:18 +02:00
|
|
|
struct rct_ride_lift_data
|
|
|
|
{
|
2019-07-22 20:02:45 +02:00
|
|
|
SoundId sound_id;
|
2018-06-20 17:28:51 +02:00
|
|
|
uint8_t minimum_speed;
|
|
|
|
uint8_t maximum_speed;
|
2018-02-14 09:42:26 +01:00
|
|
|
};
|
2015-11-21 16:53:56 +01:00
|
|
|
|
2020-02-20 11:00:03 +01:00
|
|
|
struct RideTypeDescriptor
|
|
|
|
{
|
2020-02-22 20:13:44 +01:00
|
|
|
// rct2: 0x0097C468 (0 - 31) and 0x0097C5D4 (32 - 63)
|
|
|
|
uint64_t EnabledTrackPieces;
|
|
|
|
// Pieces that this ride type _can_ draw, but are disabled because their vehicles lack the relevant sprites,
|
|
|
|
// or because they are not realistic for the ride type (e.g. LIM boosters in Mini Roller Coasters).
|
2020-02-20 11:00:03 +01:00
|
|
|
uint64_t ExtraTrackPieces;
|
2020-02-22 16:43:34 +01:00
|
|
|
TRACK_PAINT_FUNCTION_GETTER TrackPaintFunction;
|
2020-02-20 11:00:03 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
# define SET_FIELD(fieldname, value) value
|
|
|
|
#else
|
|
|
|
# define SET_FIELD(fieldname, value) .fieldname = value
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern const RideTypeDescriptor RideTypeDescriptors[RIDE_TYPE_COUNT];
|
|
|
|
|
2018-06-22 23:14:18 +02:00
|
|
|
enum
|
|
|
|
{
|
2017-06-25 12:14:39 +02:00
|
|
|
RIDE_TYPE_FLAG4_ALLOW_DOORS_ON_TRACK = (1 << 0),
|
2017-06-06 23:24:18 +02:00
|
|
|
RIDE_TYPE_FLAG4_MUSIC_ON_DEFAULT = (1 << 1),
|
|
|
|
RIDE_TYPE_FLAG4_ALLOW_MUSIC = (1 << 2),
|
2018-06-22 23:14:18 +02:00
|
|
|
RIDE_TYPE_FLAG4_HAS_ALTERNATIVE_TRACK_TYPE = (1 << 3), // Used by the Flying RC, Lay-down RC, Multi-dimension RC
|
2017-06-06 23:24:18 +02:00
|
|
|
RIDE_TYPE_FLAG4_PEEP_CHECK_GFORCES = (1 << 4),
|
|
|
|
RIDE_TYPE_FLAG4_HAS_ENTRANCE_EXIT = (1 << 5),
|
|
|
|
RIDE_TYPE_FLAG4_ALLOW_MORE_VEHICLES_THAN_STATION_FITS = (1 << 6),
|
|
|
|
RIDE_TYPE_FLAG4_HAS_AIR_TIME = (1 << 7),
|
|
|
|
RIDE_TYPE_FLAG4_SINGLE_SESSION = (1 << 8),
|
|
|
|
RIDE_TYPE_FLAG4_ALLOW_MULTIPLE_CIRCUITS = (1 << 9),
|
|
|
|
RIDE_TYPE_FLAG4_ALLOW_CABLE_LIFT_HILL = (1 << 10),
|
|
|
|
RIDE_TYPE_FLAG4_SHOW_IN_TRACK_DESIGNER = (1 << 11),
|
|
|
|
RIDE_TYPE_FLAG4_TRANSPORT_RIDE = (1 << 12),
|
|
|
|
RIDE_TYPE_FLAG4_INTERESTING_TO_LOOK_AT = (1 << 13),
|
|
|
|
RIDE_TYPE_FLAG4_SLIGHTLY_INTERESTING_TO_LOOK_AT = (1 << 14),
|
|
|
|
RIDE_TYPE_FLAG4_START_CONSTRUCTION_INVERTED = (1 << 15), // This is only set on the Flying RC and its alternative type.
|
2015-09-10 23:16:41 +02:00
|
|
|
};
|
|
|
|
|
2018-06-22 23:14:18 +02:00
|
|
|
enum
|
|
|
|
{
|
2017-06-06 23:24:18 +02:00
|
|
|
RIDE_TYPE_NO_ALTERNATIVES = 0,
|
|
|
|
RIDE_TYPE_ALTERNATIVE_TRACK_PIECES = 1, // Dinghy slide and Water Coaster
|
|
|
|
RIDE_TYPE_ALTERNATIVE_TRACK_TYPE = 2, // Flying RC, Lay-down RC, Multi-dimension RC
|
2017-05-16 19:11:51 +02:00
|
|
|
};
|
|
|
|
|
2017-05-16 23:09:27 +02:00
|
|
|
extern const bool hasRunningTrack[RIDE_TYPE_COUNT];
|
2018-06-20 17:28:51 +02:00
|
|
|
extern const uint8_t initialUpkeepCosts[RIDE_TYPE_COUNT];
|
|
|
|
extern const uint8_t costPerTrackPiece[RIDE_TYPE_COUNT];
|
2014-05-23 13:57:50 +02:00
|
|
|
|
2018-06-20 17:28:51 +02:00
|
|
|
extern const uint8_t costPerVehicle[RIDE_TYPE_COUNT];
|
2017-05-16 23:09:27 +02:00
|
|
|
extern const bool chargeUpkeepForTrainLength[RIDE_TYPE_COUNT];
|
2018-06-20 17:28:51 +02:00
|
|
|
extern const uint8_t costPerStation[RIDE_TYPE_COUNT];
|
|
|
|
extern const uint8_t rideBonusValue[RIDE_TYPE_COUNT];
|
2014-05-24 15:31:42 +02:00
|
|
|
|
2016-07-14 14:07:49 +02:00
|
|
|
extern const ride_component_name RideComponentNames[RIDE_COMPONENT_TYPE_COUNT];
|
2017-05-16 23:09:27 +02:00
|
|
|
extern const rct_ride_name_convention RideNameConvention[RIDE_TYPE_COUNT];
|
2017-01-05 09:19:22 +01:00
|
|
|
extern const rct_ride_name RideNaming[RIDE_TYPE_COUNT];
|
2018-06-20 17:28:51 +02:00
|
|
|
extern const uint8_t RideAvailableModes[];
|
|
|
|
extern const uint8_t AllRideModesAvailable[];
|
|
|
|
extern const uint8_t RideAvailableBreakdowns[];
|
2014-09-01 13:04:34 +02:00
|
|
|
|
2017-01-05 09:19:22 +01:00
|
|
|
extern const rct_ride_lift_data RideLiftData[RIDE_TYPE_COUNT];
|
2015-03-18 20:52:27 +01:00
|
|
|
|
2017-01-05 09:19:22 +01:00
|
|
|
extern const rct_ride_data_4 RideData4[RIDE_TYPE_COUNT];
|
2018-06-20 17:28:51 +02:00
|
|
|
extern const int32_t RidePhotoItems[RIDE_TYPE_COUNT];
|
2017-01-05 09:19:22 +01:00
|
|
|
extern const ride_cost RideTrackCosts[RIDE_TYPE_COUNT];
|
|
|
|
extern const rct_ride_data_5 RideData5[RIDE_TYPE_COUNT];
|
2015-09-10 23:16:41 +02:00
|
|
|
|
2016-02-25 13:33:19 +01:00
|
|
|
extern const rct_ride_entry_vehicle CableLiftVehicle;
|
2015-10-18 15:01:16 +02:00
|
|
|
|
2018-06-20 17:28:51 +02:00
|
|
|
extern const uint16_t RideFilmLength[3];
|
|
|
|
extern const uint16_t RideCrookedHouseLength[1];
|
2015-11-19 21:28:07 +01:00
|
|
|
|
2017-01-05 09:19:22 +01:00
|
|
|
extern const rating_tuple RideRatings[RIDE_TYPE_COUNT];
|
2016-04-03 15:43:12 +02:00
|
|
|
|
2018-06-20 17:28:51 +02:00
|
|
|
extern const uint8_t RideConstructionDefaultTrackType[RIDE_TYPE_COUNT];
|
2016-08-05 14:11:25 +02:00
|
|
|
|
2017-01-05 09:19:22 +01:00
|
|
|
extern const track_colour_preset_list RideColourPresets[RIDE_TYPE_COUNT];
|
2016-08-05 11:33:04 +02:00
|
|
|
|
2017-05-28 19:49:32 +02:00
|
|
|
extern const rct_string_id RideModeNames[RIDE_MODE_COUNT];
|
|
|
|
|
2015-04-10 08:24:33 +02:00
|
|
|
#endif
|