diff --git a/src/openrct2-ui/windows/NewRide.cpp b/src/openrct2-ui/windows/NewRide.cpp index 350e97126c..b81e3c218f 100644 --- a/src/openrct2-ui/windows/NewRide.cpp +++ b/src/openrct2-ui/windows/NewRide.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/src/openrct2/EditorObjectSelectionSession.cpp b/src/openrct2/EditorObjectSelectionSession.cpp index 4374c22c22..a9ff5f509e 100644 --- a/src/openrct2/EditorObjectSelectionSession.cpp +++ b/src/openrct2/EditorObjectSelectionSession.cpp @@ -27,6 +27,7 @@ #include "windows/Intent.h" #include "world/Footpath.h" #include "world/LargeScenery.h" +#include "world/Scenery.h" #include #include diff --git a/src/openrct2/ParkFile.cpp b/src/openrct2/ParkFile.cpp index 8f208fe132..656b20987a 100644 --- a/src/openrct2/ParkFile.cpp +++ b/src/openrct2/ParkFile.cpp @@ -51,6 +51,7 @@ #include "world/Entrance.h" #include "world/Map.h" #include "world/Park.h" +#include "world/Scenery.h" #include #include diff --git a/src/openrct2/core/DataSerialiserTraits.h b/src/openrct2/core/DataSerialiserTraits.h index f7cb6988d5..63100d5a9d 100644 --- a/src/openrct2/core/DataSerialiserTraits.h +++ b/src/openrct2/core/DataSerialiserTraits.h @@ -16,7 +16,7 @@ #include "../network/network.h" #include "../object/Object.h" #include "../peep/Guest.h" -#include "../ride/Ride.h" +#include "../ride/RideColour.h" #include "../ride/TrackDesign.h" #include "../world/Location.hpp" #include "../world/TileElement.h" diff --git a/src/openrct2/libopenrct2.vcxproj b/src/openrct2/libopenrct2.vcxproj index 766eeef138..b344c76c9d 100644 --- a/src/openrct2/libopenrct2.vcxproj +++ b/src/openrct2/libopenrct2.vcxproj @@ -383,7 +383,9 @@ + + diff --git a/src/openrct2/management/Research.cpp b/src/openrct2/management/Research.cpp index 77a39a8497..b5ae547ed7 100644 --- a/src/openrct2/management/Research.cpp +++ b/src/openrct2/management/Research.cpp @@ -20,9 +20,11 @@ #include "../localisation/Localisation.h" #include "../localisation/StringIds.h" #include "../object/ObjectList.h" +#include "../object/RideObject.h" #include "../rct1/RCT1.h" #include "../ride/Ride.h" #include "../ride/RideData.h" +#include "../ride/RideEntry.h" #include "../ride/TrackData.h" #include "../scenario/Scenario.h" #include "../util/Util.h" @@ -62,6 +64,35 @@ static bool _researchedSceneryItems[SCENERY_TYPE_COUNT][UINT16_MAX]; bool gSilentResearch = false; +// TODO: MOVE TO S4/6 IMPORT +ResearchItem::ResearchItem(const RCT12ResearchItem& oldResearchItem) +{ + if (oldResearchItem.IsInventedEndMarker() || oldResearchItem.IsUninventedEndMarker() || oldResearchItem.IsRandomEndMarker()) + { + rawValue = 0; + flags = 0; + category = ResearchCategory::Transport; + SetNull(); + } + else + { + type = Research::EntryType{ oldResearchItem.type }; + entryIndex = RCTEntryIndexToOpenRCT2EntryIndex(oldResearchItem.entryIndex); + flags = oldResearchItem.flags; + category = static_cast(oldResearchItem.category); + if (type == Research::EntryType::Ride) + { + auto* rideEntry = get_ride_entry(entryIndex); + baseRideType = rideEntry != nullptr ? RCT2RideTypeToOpenRCT2RideType(oldResearchItem.baseRideType, rideEntry) + : oldResearchItem.baseRideType; + } + else + { + baseRideType = 0; + } + } +} + /** * * rct2: 0x006671AD, part of 0x00667132 diff --git a/src/openrct2/management/Research.h b/src/openrct2/management/Research.h index 99a1d3c867..7fd9c444ad 100644 --- a/src/openrct2/management/Research.h +++ b/src/openrct2/management/Research.h @@ -11,12 +11,13 @@ #include "../common.h" #include "../object/ObjectLimits.h" -#include "../ride/Ride.h" +#include "../rct2/RCT2.h" #include "../util/Util.h" #include struct rct_ride_entry; +struct ScenerySelection; namespace Research { @@ -105,34 +106,7 @@ struct ResearchItem return retItem; } - ResearchItem(const RCT12ResearchItem& oldResearchItem) - { - if (oldResearchItem.IsInventedEndMarker() || oldResearchItem.IsUninventedEndMarker() - || oldResearchItem.IsRandomEndMarker()) - { - rawValue = 0; - flags = 0; - category = ResearchCategory::Transport; - SetNull(); - } - else - { - type = Research::EntryType{ oldResearchItem.type }; - entryIndex = RCTEntryIndexToOpenRCT2EntryIndex(oldResearchItem.entryIndex); - flags = oldResearchItem.flags; - category = static_cast(oldResearchItem.category); - if (type == Research::EntryType::Ride) - { - auto* rideEntry = get_ride_entry(entryIndex); - baseRideType = rideEntry != nullptr ? RCT2RideTypeToOpenRCT2RideType(oldResearchItem.baseRideType, rideEntry) - : oldResearchItem.baseRideType; - } - else - { - baseRideType = 0; - } - } - } + ResearchItem(const RCT12ResearchItem& oldResearchItem); bool operator==(const ResearchItem& rhs) const; }; diff --git a/src/openrct2/object/ObjectList.h b/src/openrct2/object/ObjectList.h index ceae5ec119..c886c22db6 100644 --- a/src/openrct2/object/ObjectList.h +++ b/src/openrct2/object/ObjectList.h @@ -9,12 +9,6 @@ #pragma once -#include "../ride/Ride.h" -#include "../world/Banner.h" -#include "../world/Entrance.h" -#include "../world/Footpath.h" -#include "../world/Scenery.h" -#include "../world/Water.h" #include "Object.h" #include "ObjectLimits.h" diff --git a/src/openrct2/object/ObjectManager.cpp b/src/openrct2/object/ObjectManager.cpp index a72a7cc60d..662c008197 100644 --- a/src/openrct2/object/ObjectManager.cpp +++ b/src/openrct2/object/ObjectManager.cpp @@ -14,6 +14,7 @@ #include "../core/Console.hpp" #include "../core/Memory.hpp" #include "../localisation/StringIds.h" +#include "../ride/Ride.h" #include "../util/Util.h" #include "FootpathItemObject.h" #include "LargeSceneryObject.h" diff --git a/src/openrct2/object/ObjectRepository.h b/src/openrct2/object/ObjectRepository.h index f967591db2..7ca5d1d132 100644 --- a/src/openrct2/object/ObjectRepository.h +++ b/src/openrct2/object/ObjectRepository.h @@ -11,7 +11,7 @@ #include "../common.h" #include "../object/Object.h" -#include "../ride/Ride.h" +#include "RideObject.h" #include #include diff --git a/src/openrct2/object/RideObject.h b/src/openrct2/object/RideObject.h index 4c14deb6b5..41d07f17ad 100644 --- a/src/openrct2/object/RideObject.h +++ b/src/openrct2/object/RideObject.h @@ -10,11 +10,15 @@ #pragma once #include "../core/IStream.hpp" -#include "../ride/Ride.h" +#include "../ride/RideEntry.h" #include "Object.h" #include +// TODO: MOVE TO COMMON LIMITS HEADER +#define MAX_RIDE_TYPES_PER_RIDE_ENTRY 3 +#define MAX_CATEGORIES_PER_RIDE 2 + class RideObject final : public Object { private: diff --git a/src/openrct2/paint/tile_element/Paint.Path.cpp b/src/openrct2/paint/tile_element/Paint.Path.cpp index 1a2b28b884..64533f83eb 100644 --- a/src/openrct2/paint/tile_element/Paint.Path.cpp +++ b/src/openrct2/paint/tile_element/Paint.Path.cpp @@ -22,6 +22,7 @@ #include "../../object/ObjectManager.h" #include "../../peep/Peep.h" #include "../../peep/Staff.h" +#include "../../ride/Ride.h" #include "../../ride/Track.h" #include "../../ride/TrackDesign.h" #include "../../ride/TrackPaint.h" diff --git a/src/openrct2/peep/Guest.h b/src/openrct2/peep/Guest.h index d1ad222d2f..2787cde1f1 100644 --- a/src/openrct2/peep/Guest.h +++ b/src/openrct2/peep/Guest.h @@ -10,6 +10,7 @@ #pragma once #include "../management/Finance.h" +#include "../ride/Ride.h" #include "../ride/ShopItem.h" #include "Peep.h" @@ -201,6 +202,7 @@ struct PeepThought struct Guest; struct Staff; +struct rct_ride_entry_vehicle; struct IntensityRange { diff --git a/src/openrct2/rct1/RCT1.h b/src/openrct2/rct1/RCT1.h index be2d75bcb8..467b92b2c6 100644 --- a/src/openrct2/rct1/RCT1.h +++ b/src/openrct2/rct1/RCT1.h @@ -12,7 +12,6 @@ #include "../management/Award.h" #include "../management/Research.h" #include "../rct12/RCT12.h" -#include "../ride/Ride.h" #include "../world/Banner.h" #include "../world/Climate.h" #include "../world/MapAnimation.h" @@ -32,6 +31,7 @@ namespace RCT1 constexpr const uint32_t RCT1_LL_CSG1_DAT_FILE_SIZE = 41402869; constexpr const uint32_t RCT1_NUM_TERRAIN_SURFACES = 16; constexpr const uint32_t RCT1_NUM_TERRAIN_EDGES = 15; + constexpr const uint32_t RCT1_CUSTOMER_HISTORY_SIZE = 10; enum class RideType : uint8_t { @@ -222,10 +222,10 @@ namespace RCT1 int16_t unk_D0; // 0x0D0 int16_t unk_D2; // 0x0D2 // Customer count in the last 10 * 960 game ticks (sliding window) - uint16_t num_customers[CUSTOMER_HISTORY_SIZE]; // 0xD4 - money16 price; // 0x0E8 - RCT12xy8 chairlift_bullwheel_location[2]; // 0x0EA - uint8_t chairlift_bullwheel_z[2]; // 0x0EE + uint16_t num_customers[RCT1_CUSTOMER_HISTORY_SIZE]; // 0xD4 + money16 price; // 0x0E8 + RCT12xy8 chairlift_bullwheel_location[2]; // 0x0EA + uint8_t chairlift_bullwheel_z[2]; // 0x0EE union { RatingTuple ratings; diff --git a/src/openrct2/ride/CableLift.h b/src/openrct2/ride/CableLift.h index 7660f052af..6dce063e28 100644 --- a/src/openrct2/ride/CableLift.h +++ b/src/openrct2/ride/CableLift.h @@ -9,10 +9,10 @@ #pragma once -#include "../common.h" -#include "Ride.h" +#include struct Vehicle; +struct Ride; Vehicle* cable_lift_segment_create( Ride& ride, int32_t x, int32_t y, int32_t z, int32_t direction, uint16_t var_44, int32_t remaining_distance, bool head); diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index 39467e0c83..a437d50866 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -36,6 +36,7 @@ #include "../object/MusicObject.h" #include "../object/ObjectList.h" #include "../object/ObjectManager.h" +#include "../object/RideObject.h" #include "../object/StationObject.h" #include "../paint/VirtualFloor.h" #include "../peep/Peep.h" @@ -48,6 +49,7 @@ #include "../windows/Intent.h" #include "../world/Banner.h" #include "../world/Climate.h" +#include "../world/Entrance.h" #include "../world/Footpath.h" #include "../world/Location.hpp" #include "../world/Map.h" @@ -57,6 +59,7 @@ #include "CableLift.h" #include "RideAudio.h" #include "RideData.h" +#include "RideEntry.h" #include "ShopItem.h" #include "Station.h" #include "Track.h" diff --git a/src/openrct2/ride/Ride.h b/src/openrct2/ride/Ride.h index a2770fdccf..1805a8acf4 100644 --- a/src/openrct2/ride/Ride.h +++ b/src/openrct2/ride/Ride.h @@ -14,10 +14,9 @@ #include "../rct12/RCT12.h" #include "../rct2/RCT2.h" #include "../world/Map.h" +#include "RideColour.h" #include "RideRatings.h" #include "RideTypes.h" -#include "ShopItem.h" -#include "VehicleEntry.h" #include #include @@ -31,16 +30,11 @@ struct Guest; struct Staff; struct Vehicle; -#define MAX_RIDE_TYPES_PER_RIDE_ENTRY 3 -// The max number of different types of vehicle. -// Examples of vehicles here are the locomotive, tender and carriage of the Miniature Railway. -#define MAX_VEHICLES_PER_RIDE_ENTRY 4 constexpr const uint8_t MAX_VEHICLES_PER_RIDE = 255; // Note: that 255 represents No Train (null) hence why this is not 256 constexpr const uint8_t MAX_CIRCUITS_PER_RIDE = 20; constexpr const uint8_t MAX_CARS_PER_TRAIN = 255; constexpr const uint8_t MAX_VEHICLE_COLOURS = std::max(MAX_CARS_PER_TRAIN, MAX_VEHICLES_PER_RIDE); #define NUM_COLOUR_SCHEMES 4 -#define MAX_CATEGORIES_PER_RIDE 2 #define DOWNTIME_HISTORY_SIZE 8 #define CUSTOMER_HISTORY_SIZE 10 #define MAX_CARS_PER_TRAIN 255 @@ -58,95 +52,6 @@ constexpr uint16_t const MAZE_CLEARANCE_HEIGHT = 4 * COORDS_Z_STEP; constexpr const uint8_t NUM_SHOP_ITEMS_PER_RIDE = 2; -#pragma pack(push, 1) -struct TrackColour -{ - uint8_t main; - uint8_t additional; - uint8_t supports; -}; -assert_struct_size(TrackColour, 3); - -struct vehicle_colour -{ - uint8_t main; - uint8_t additional_1; - uint8_t additional_2; -}; -assert_struct_size(vehicle_colour, 3); - -struct track_colour_preset_list -{ - uint8_t count; - TrackColour list[256]; -}; -assert_struct_size(track_colour_preset_list, (1 + 256 * 3)); - -struct vehicle_colour_preset_list -{ - uint8_t count; - vehicle_colour list[256]; -}; -assert_struct_size(vehicle_colour_preset_list, (1 + 256 * 3)); - -struct RideNaming -{ - rct_string_id Name; - rct_string_id Description; -}; -assert_struct_size(RideNaming, 4); - -#pragma pack(pop) - -/** - * Ride type structure. - */ -struct rct_ride_entry -{ - RideNaming naming; - // The first three images are previews. They correspond to the ride_type[] array. - uint32_t images_offset; - uint32_t flags; - uint8_t ride_type[RCT2_MAX_RIDE_TYPES_PER_RIDE_ENTRY]; - uint8_t min_cars_in_train; - uint8_t max_cars_in_train; - uint8_t cars_per_flat_ride; - // Number of cars that can't hold passengers - uint8_t zero_cars; - // The index to the vehicle type displayed in the vehicle tab. - uint8_t tab_vehicle; - uint8_t default_vehicle; - // Convert from first - fourth vehicle to vehicle structure - uint8_t front_vehicle; - uint8_t second_vehicle; - uint8_t rear_vehicle; - uint8_t third_vehicle; - uint8_t BuildMenuPriority; - rct_ride_entry_vehicle vehicles[RCT2_MAX_VEHICLES_PER_RIDE_ENTRY]; - vehicle_colour_preset_list* vehicle_preset_list; - int8_t excitement_multiplier; - int8_t intensity_multiplier; - int8_t nausea_multiplier; - uint8_t max_height; - ShopItem shop_item[NUM_SHOP_ITEMS_PER_RIDE]; - rct_string_id capacity; - void* obj; - - const rct_ride_entry_vehicle* GetVehicle(size_t id) const - { - if (id < std::size(vehicles)) - { - return &vehicles[id]; - } - return nullptr; - } - - const rct_ride_entry_vehicle* GetDefaultVehicle() const - { - return GetVehicle(default_vehicle); - } -}; - struct RideStation { CoordsXY Start; @@ -961,16 +866,6 @@ enum TRACK_ELEMENT_SET_SEAT_ROTATION = (1 << 5) }; -struct RideOperatingSettings -{ - uint8_t MinValue; - uint8_t MaxValue; - uint8_t MaxBrakesSpeed; - uint8_t PoweredLiftAcceleration; - uint8_t BoosterAcceleration; - int8_t BoosterSpeedFactor; // The factor to shift the raw booster speed with -}; - #define MAX_RIDE_MEASUREMENTS 8 #define RIDE_VALUE_UNDEFINED 0xFFFF #define RIDE_INITIAL_RELIABILITY ((100 << 8) | 0xFF) // Upper byte is percentage, lower byte is "decimal". @@ -1160,14 +1055,12 @@ void ride_set_name(Ride* ride, const char* name, uint32_t flags); int32_t ride_get_refund_price(const Ride* ride); int32_t ride_get_random_colour_preset_index(uint8_t ride_type); money32 ride_get_common_price(Ride* forRide); -RideNaming get_ride_naming(const uint8_t rideType, rct_ride_entry* rideEntry); void ride_clear_for_construction(Ride* ride); void ride_entrance_exit_place_provisional_ghost(); void ride_entrance_exit_remove_ghost(); void ride_restore_provisional_track_piece(); void ride_remove_provisional_track_piece(); -void set_vehicle_type_image_max_sizes(rct_ride_entry_vehicle* vehicle_type, int32_t num_images); void invalidate_test_results(Ride* ride); void ride_select_next_section(); diff --git a/src/openrct2/ride/RideColour.h b/src/openrct2/ride/RideColour.h new file mode 100644 index 0000000000..e64094d8eb --- /dev/null +++ b/src/openrct2/ride/RideColour.h @@ -0,0 +1,26 @@ +/***************************************************************************** + * Copyright (c) 2014-2021 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + +#pragma once + +#include + +struct TrackColour +{ + uint8_t main; + uint8_t additional; + uint8_t supports; +}; + +struct vehicle_colour +{ + uint8_t main; + uint8_t additional_1; + uint8_t additional_2; +}; diff --git a/src/openrct2/ride/RideData.h b/src/openrct2/ride/RideData.h index 76e92a533e..ad7e88d5e3 100644 --- a/src/openrct2/ride/RideData.h +++ b/src/openrct2/ride/RideData.h @@ -25,6 +25,7 @@ #include "../sprites.h" #include "../util/Util.h" #include "Ride.h" +#include "RideEntry.h" #include "ShopItem.h" #include "Track.h" #include "TrackPaint.h" @@ -110,6 +111,16 @@ struct RideColourPreview uint32_t Supports; }; +struct RideOperatingSettings +{ + uint8_t MinValue; + uint8_t MaxValue; + uint8_t MaxBrakesSpeed; + uint8_t PoweredLiftAcceleration; + uint8_t BoosterAcceleration; + int8_t BoosterSpeedFactor; // The factor to shift the raw booster speed with +}; + struct UpkeepCostsDescriptor { /** diff --git a/src/openrct2/ride/RideEntry.h b/src/openrct2/ride/RideEntry.h new file mode 100644 index 0000000000..724d7ae4b3 --- /dev/null +++ b/src/openrct2/ride/RideEntry.h @@ -0,0 +1,94 @@ +/***************************************************************************** + * Copyright (c) 2014-2021 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + +#pragma once + +#include "../rct2/RCT2.h" +#include "RideColour.h" +#include "ShopItem.h" +#include "VehicleEntry.h" + +#include + +// TODO: MOVE TO COMMON LIMITS HEADER DUPLICATED FROM RIDE.H +constexpr const uint8_t NUM_SHOP_ITEMS_PER_RIDE_2 = 2; + +// The max number of different types of vehicle. +// Examples of vehicles here are the locomotive, tender and carriage of the Miniature Railway. +#define MAX_VEHICLES_PER_RIDE_ENTRY 4 + +struct RideNaming +{ + rct_string_id Name; + rct_string_id Description; +}; + +struct track_colour_preset_list +{ + uint8_t count; + TrackColour list[256]; +}; + +struct vehicle_colour_preset_list +{ + uint8_t count; + vehicle_colour list[256]; +}; + +/** + * Ride type structure. + */ +struct rct_ride_entry +{ + RideNaming naming; + // The first three images are previews. They correspond to the ride_type[] array. + uint32_t images_offset; + uint32_t flags; + uint8_t ride_type[RCT2_MAX_RIDE_TYPES_PER_RIDE_ENTRY]; + uint8_t min_cars_in_train; + uint8_t max_cars_in_train; + uint8_t cars_per_flat_ride; + // Number of cars that can't hold passengers + uint8_t zero_cars; + // The index to the vehicle type displayed in the vehicle tab. + uint8_t tab_vehicle; + uint8_t default_vehicle; + // Convert from first - fourth vehicle to vehicle structure + uint8_t front_vehicle; + uint8_t second_vehicle; + uint8_t rear_vehicle; + uint8_t third_vehicle; + uint8_t BuildMenuPriority; + rct_ride_entry_vehicle vehicles[RCT2_MAX_VEHICLES_PER_RIDE_ENTRY]; + vehicle_colour_preset_list* vehicle_preset_list; + int8_t excitement_multiplier; + int8_t intensity_multiplier; + int8_t nausea_multiplier; + uint8_t max_height; + ShopItem shop_item[NUM_SHOP_ITEMS_PER_RIDE_2]; + rct_string_id capacity; + void* obj; + + const rct_ride_entry_vehicle* GetVehicle(size_t id) const + { + if (id < std::size(vehicles)) + { + return &vehicles[id]; + } + return nullptr; + } + + const rct_ride_entry_vehicle* GetDefaultVehicle() const + { + return GetVehicle(default_vehicle); + } +}; + +void set_vehicle_type_image_max_sizes(rct_ride_entry_vehicle* vehicle_type, int32_t num_images); +RideNaming get_ride_naming(const uint8_t rideType, rct_ride_entry* rideEntry); diff --git a/src/openrct2/ride/ShopItem.cpp b/src/openrct2/ride/ShopItem.cpp index 8cbfdce8e9..27fa5f9a9b 100644 --- a/src/openrct2/ride/ShopItem.cpp +++ b/src/openrct2/ride/ShopItem.cpp @@ -12,6 +12,7 @@ #include "../common.h" #include "../localisation/StringIds.h" #include "../peep/Guest.h" +#include "../ride/RideEntry.h" #include "../sprites.h" ShopItem& operator++(ShopItem& d, int) diff --git a/src/openrct2/ride/Station.cpp b/src/openrct2/ride/Station.cpp index 0da34620cd..99e521f102 100644 --- a/src/openrct2/ride/Station.cpp +++ b/src/openrct2/ride/Station.cpp @@ -13,6 +13,7 @@ #include "../peep/Guest.h" #include "../scenario/Scenario.h" #include "../world/Location.hpp" +#include "RideEntry.h" #include "Track.h" #include "Vehicle.h" diff --git a/src/openrct2/ride/Track.h b/src/openrct2/ride/Track.h index 4c65c732f9..d2256bc979 100644 --- a/src/openrct2/ride/Track.h +++ b/src/openrct2/ride/Track.h @@ -11,7 +11,8 @@ #include "../common.h" #include "../object/Object.h" -#include "Ride.h" +#include "../world/Map.h" +#include "../world/TileElement.h" constexpr const uint32_t RideConstructionSpecialPieceSelected = 0x10000; diff --git a/src/openrct2/ride/Vehicle.h b/src/openrct2/ride/Vehicle.h index 1fd340808e..db24bb073f 100644 --- a/src/openrct2/ride/Vehicle.h +++ b/src/openrct2/ride/Vehicle.h @@ -27,6 +27,7 @@ using track_type_t = uint16_t; struct Ride; struct rct_ride_entry; +struct rct_ride_entry_vehicle; class DataSerialiser; struct GForces diff --git a/src/openrct2/ride/VehicleEntry.h b/src/openrct2/ride/VehicleEntry.h index 1955fb5aac..507969b50a 100644 --- a/src/openrct2/ride/VehicleEntry.h +++ b/src/openrct2/ride/VehicleEntry.h @@ -15,9 +15,6 @@ #include #include -#ifdef __TESTPAINT__ -# pragma pack(push, 1) -#endif // __TESTPAINT__ /** * Ride type vehicle structure. * size: 0x65 @@ -76,11 +73,3 @@ struct rct_ride_entry_vehicle std::vector> peep_loading_waypoints = {}; std::vector peep_loading_positions = {}; }; -#ifdef __TESTPAINT__ -# pragma pack(pop) -#endif // __TESTPAINT__ -#ifdef PLATFORM_32BIT -static_assert(sizeof(rct_ride_entry_vehicle) % 4 == 0, "Invalid struct size"); -#else -static_assert(sizeof(rct_ride_entry_vehicle) % 8 == 0, "Invalid struct size"); -#endif diff --git a/src/openrct2/ride/gentle/Circus.cpp b/src/openrct2/ride/gentle/Circus.cpp index 781afaed2f..7512139adc 100644 --- a/src/openrct2/ride/gentle/Circus.cpp +++ b/src/openrct2/ride/gentle/Circus.cpp @@ -11,6 +11,8 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" +#include "../Ride.h" +#include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" diff --git a/src/openrct2/ride/gentle/CrookedHouse.cpp b/src/openrct2/ride/gentle/CrookedHouse.cpp index baa4f52efb..1c2b6ab2bf 100644 --- a/src/openrct2/ride/gentle/CrookedHouse.cpp +++ b/src/openrct2/ride/gentle/CrookedHouse.cpp @@ -11,6 +11,8 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" +#include "../Ride.h" +#include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" diff --git a/src/openrct2/ride/gentle/Dodgems.cpp b/src/openrct2/ride/gentle/Dodgems.cpp index 5bc9302976..c2a039e875 100644 --- a/src/openrct2/ride/gentle/Dodgems.cpp +++ b/src/openrct2/ride/gentle/Dodgems.cpp @@ -12,6 +12,7 @@ #include "../../paint/Paint.h" #include "../../paint/Supports.h" #include "../../util/Util.h" +#include "../Ride.h" #include "../Track.h" #include "../TrackPaint.h" diff --git a/src/openrct2/ride/gentle/FerrisWheel.cpp b/src/openrct2/ride/gentle/FerrisWheel.cpp index a1c44e6456..0abbf41026 100644 --- a/src/openrct2/ride/gentle/FerrisWheel.cpp +++ b/src/openrct2/ride/gentle/FerrisWheel.cpp @@ -12,6 +12,8 @@ #include "../../paint/Paint.h" #include "../../paint/Supports.h" #include "../../peep/Guest.h" +#include "../Ride.h" +#include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" diff --git a/src/openrct2/ride/gentle/FlyingSaucers.cpp b/src/openrct2/ride/gentle/FlyingSaucers.cpp index f19348b83b..96960eaafe 100644 --- a/src/openrct2/ride/gentle/FlyingSaucers.cpp +++ b/src/openrct2/ride/gentle/FlyingSaucers.cpp @@ -11,6 +11,7 @@ #include "../../object/StationObject.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" +#include "../Ride.h" #include "../Track.h" #include "../TrackPaint.h" diff --git a/src/openrct2/ride/gentle/HauntedHouse.cpp b/src/openrct2/ride/gentle/HauntedHouse.cpp index eec24a95d5..e4f3f32b91 100644 --- a/src/openrct2/ride/gentle/HauntedHouse.cpp +++ b/src/openrct2/ride/gentle/HauntedHouse.cpp @@ -11,6 +11,8 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" +#include "../Ride.h" +#include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" diff --git a/src/openrct2/ride/gentle/Maze.cpp b/src/openrct2/ride/gentle/Maze.cpp index b46e1e4268..1f9e3d3b07 100644 --- a/src/openrct2/ride/gentle/Maze.cpp +++ b/src/openrct2/ride/gentle/Maze.cpp @@ -14,6 +14,7 @@ #include "../../paint/tile_element/Paint.Surface.h" #include "../../sprites.h" #include "../../world/Map.h" +#include "../Ride.h" #include "../Track.h" #include "../TrackPaint.h" diff --git a/src/openrct2/ride/gentle/MerryGoRound.cpp b/src/openrct2/ride/gentle/MerryGoRound.cpp index e49dd47410..11f2c3b320 100644 --- a/src/openrct2/ride/gentle/MerryGoRound.cpp +++ b/src/openrct2/ride/gentle/MerryGoRound.cpp @@ -11,6 +11,8 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" +#include "../Ride.h" +#include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" diff --git a/src/openrct2/ride/gentle/ObservationTower.cpp b/src/openrct2/ride/gentle/ObservationTower.cpp index 375d460b17..aa3657e549 100644 --- a/src/openrct2/ride/gentle/ObservationTower.cpp +++ b/src/openrct2/ride/gentle/ObservationTower.cpp @@ -12,6 +12,7 @@ #include "../../paint/Paint.h" #include "../../paint/Supports.h" #include "../../world/Map.h" +#include "../Ride.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" diff --git a/src/openrct2/ride/gentle/SpaceRings.cpp b/src/openrct2/ride/gentle/SpaceRings.cpp index 19835d7db5..70ef448fa3 100644 --- a/src/openrct2/ride/gentle/SpaceRings.cpp +++ b/src/openrct2/ride/gentle/SpaceRings.cpp @@ -13,6 +13,7 @@ #include "../../paint/Paint.h" #include "../../paint/Supports.h" #include "../../peep/Guest.h" +#include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" diff --git a/src/openrct2/ride/gentle/SpiralSlide.cpp b/src/openrct2/ride/gentle/SpiralSlide.cpp index 6e98da0ee9..8c315fabd1 100644 --- a/src/openrct2/ride/gentle/SpiralSlide.cpp +++ b/src/openrct2/ride/gentle/SpiralSlide.cpp @@ -11,6 +11,7 @@ #include "../../object/StationObject.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" +#include "../Ride.h" #include "../Track.h" #include "../TrackPaint.h" diff --git a/src/openrct2/ride/shops/Facility.cpp b/src/openrct2/ride/shops/Facility.cpp index 60ab8b31f5..67d09235ef 100644 --- a/src/openrct2/ride/shops/Facility.cpp +++ b/src/openrct2/ride/shops/Facility.cpp @@ -12,6 +12,8 @@ #include "../../paint/Supports.h" #include "../../sprites.h" #include "../../world/Map.h" +#include "../Ride.h" +#include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" diff --git a/src/openrct2/ride/shops/Shop.cpp b/src/openrct2/ride/shops/Shop.cpp index d37e6f84fa..babc2696b8 100644 --- a/src/openrct2/ride/shops/Shop.cpp +++ b/src/openrct2/ride/shops/Shop.cpp @@ -12,6 +12,8 @@ #include "../../paint/Supports.h" #include "../../sprites.h" #include "../../world/Map.h" +#include "../Ride.h" +#include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" diff --git a/src/openrct2/ride/thrill/3dCinema.cpp b/src/openrct2/ride/thrill/3dCinema.cpp index 358cc0b41f..aecff7aa81 100644 --- a/src/openrct2/ride/thrill/3dCinema.cpp +++ b/src/openrct2/ride/thrill/3dCinema.cpp @@ -11,6 +11,8 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" +#include "../Ride.h" +#include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" diff --git a/src/openrct2/ride/thrill/Enterprise.cpp b/src/openrct2/ride/thrill/Enterprise.cpp index c4f09dc2b8..3c0469ec33 100644 --- a/src/openrct2/ride/thrill/Enterprise.cpp +++ b/src/openrct2/ride/thrill/Enterprise.cpp @@ -12,6 +12,8 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" +#include "../Ride.h" +#include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" diff --git a/src/openrct2/ride/thrill/GoKarts.cpp b/src/openrct2/ride/thrill/GoKarts.cpp index 965adb5826..61ff1a5042 100644 --- a/src/openrct2/ride/thrill/GoKarts.cpp +++ b/src/openrct2/ride/thrill/GoKarts.cpp @@ -12,6 +12,7 @@ #include "../../paint/Paint.h" #include "../../paint/Supports.h" #include "../../world/Map.h" +#include "../Ride.h" #include "../Track.h" #include "../TrackPaint.h" #include "../VehiclePaint.h" diff --git a/src/openrct2/ride/thrill/LaunchedFreefall.cpp b/src/openrct2/ride/thrill/LaunchedFreefall.cpp index d9dd4c7ae3..a01e479290 100644 --- a/src/openrct2/ride/thrill/LaunchedFreefall.cpp +++ b/src/openrct2/ride/thrill/LaunchedFreefall.cpp @@ -12,6 +12,7 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" +#include "../Ride.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" diff --git a/src/openrct2/ride/thrill/MagicCarpet.cpp b/src/openrct2/ride/thrill/MagicCarpet.cpp index f919c3b47f..7219784ffa 100644 --- a/src/openrct2/ride/thrill/MagicCarpet.cpp +++ b/src/openrct2/ride/thrill/MagicCarpet.cpp @@ -12,6 +12,8 @@ #include "../../object/StationObject.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" +#include "../Ride.h" +#include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" diff --git a/src/openrct2/ride/thrill/MotionSimulator.cpp b/src/openrct2/ride/thrill/MotionSimulator.cpp index f0ed28fcd2..e901ab0a66 100644 --- a/src/openrct2/ride/thrill/MotionSimulator.cpp +++ b/src/openrct2/ride/thrill/MotionSimulator.cpp @@ -11,6 +11,8 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" +#include "../Ride.h" +#include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" diff --git a/src/openrct2/ride/thrill/RotoDrop.cpp b/src/openrct2/ride/thrill/RotoDrop.cpp index e2a7f15dd3..5638adb120 100644 --- a/src/openrct2/ride/thrill/RotoDrop.cpp +++ b/src/openrct2/ride/thrill/RotoDrop.cpp @@ -11,6 +11,7 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" +#include "../Ride.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" diff --git a/src/openrct2/ride/thrill/SwingingInverterShip.cpp b/src/openrct2/ride/thrill/SwingingInverterShip.cpp index 76a22e985b..1339feebb2 100644 --- a/src/openrct2/ride/thrill/SwingingInverterShip.cpp +++ b/src/openrct2/ride/thrill/SwingingInverterShip.cpp @@ -12,6 +12,8 @@ #include "../../object/StationObject.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" +#include "../Ride.h" +#include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" diff --git a/src/openrct2/ride/thrill/SwingingShip.cpp b/src/openrct2/ride/thrill/SwingingShip.cpp index 83d22b212d..0ce551effa 100644 --- a/src/openrct2/ride/thrill/SwingingShip.cpp +++ b/src/openrct2/ride/thrill/SwingingShip.cpp @@ -12,6 +12,8 @@ #include "../../object/StationObject.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" +#include "../Ride.h" +#include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" diff --git a/src/openrct2/ride/thrill/Twist.cpp b/src/openrct2/ride/thrill/Twist.cpp index 0080f3cc49..510a624932 100644 --- a/src/openrct2/ride/thrill/Twist.cpp +++ b/src/openrct2/ride/thrill/Twist.cpp @@ -12,6 +12,8 @@ #include "../../interface/Viewport.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" +#include "../Ride.h" +#include "../RideEntry.h" #include "../Track.h" #include "../TrackPaint.h" #include "../Vehicle.h" diff --git a/src/openrct2/ride/water/BoatHire.cpp b/src/openrct2/ride/water/BoatHire.cpp index 2356167ad6..11cda3a256 100644 --- a/src/openrct2/ride/water/BoatHire.cpp +++ b/src/openrct2/ride/water/BoatHire.cpp @@ -10,6 +10,7 @@ #include "../../common.h" #include "../../interface/Viewport.h" #include "../../paint/Paint.h" +#include "../Ride.h" #include "../Track.h" #include "../TrackPaint.h" diff --git a/src/openrct2/ride/water/WaterCoaster.cpp b/src/openrct2/ride/water/WaterCoaster.cpp index 166de550c1..a3bea271f4 100644 --- a/src/openrct2/ride/water/WaterCoaster.cpp +++ b/src/openrct2/ride/water/WaterCoaster.cpp @@ -8,6 +8,7 @@ *****************************************************************************/ #include "../../common.h" +#include "../Ride.h" #include "../Track.h" #include "../TrackPaint.h" #include "../coaster/JuniorRollerCoaster.h" diff --git a/src/openrct2/scenario/Scenario.cpp b/src/openrct2/scenario/Scenario.cpp index a8582aa635..d2247e14da 100644 --- a/src/openrct2/scenario/Scenario.cpp +++ b/src/openrct2/scenario/Scenario.cpp @@ -44,6 +44,7 @@ #include "../util/Util.h" #include "../windows/Intent.h" #include "../world/Climate.h" +#include "../world/Entrance.h" #include "../world/Map.h" #include "../world/Park.h" #include "../world/Scenery.h" diff --git a/src/openrct2/scenario/Scenario.h b/src/openrct2/scenario/Scenario.h index 1a14621ae1..de060ff3ba 100644 --- a/src/openrct2/scenario/Scenario.h +++ b/src/openrct2/scenario/Scenario.h @@ -15,7 +15,6 @@ #include "../management/Finance.h" #include "../management/Research.h" #include "../object/Object.h" -#include "../ride/Ride.h" #include "../ride/RideRatings.h" #include "../world/Banner.h" #include "../world/Climate.h" diff --git a/src/openrct2/scripting/bindings/entity/ScLitter.cpp b/src/openrct2/scripting/bindings/entity/ScLitter.cpp index 0483f7d205..70f3118f7e 100644 --- a/src/openrct2/scripting/bindings/entity/ScLitter.cpp +++ b/src/openrct2/scripting/bindings/entity/ScLitter.cpp @@ -11,6 +11,8 @@ # include "ScLitter.hpp" +# include "../../../entity/Litter.h" + namespace OpenRCT2::Scripting { static const DukEnumMap LitterTypeMap({ diff --git a/src/openrct2/scripting/bindings/entity/ScLitter.hpp b/src/openrct2/scripting/bindings/entity/ScLitter.hpp index d2184b1075..41b8b9f1e4 100644 --- a/src/openrct2/scripting/bindings/entity/ScLitter.hpp +++ b/src/openrct2/scripting/bindings/entity/ScLitter.hpp @@ -13,6 +13,8 @@ # include "ScEntity.hpp" +struct Litter; + namespace OpenRCT2::Scripting { class ScLitter : public ScEntity diff --git a/src/openrct2/scripting/bindings/world/ScTileElement.cpp b/src/openrct2/scripting/bindings/world/ScTileElement.cpp index bc19abc6d3..6e5594454b 100644 --- a/src/openrct2/scripting/bindings/world/ScTileElement.cpp +++ b/src/openrct2/scripting/bindings/world/ScTileElement.cpp @@ -15,6 +15,7 @@ # include "../../../common.h" # include "../../../core/Guard.hpp" # include "../../../entity/EntityRegistry.h" +# include "../../../ride/Ride.h" # include "../../../ride/Track.h" # include "../../../world/Footpath.h" # include "../../../world/Scenery.h" diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index ada8ddb3d4..d29cac54c9 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -35,6 +35,7 @@ #include "Map.h" #include "MapAnimation.h" #include "Park.h" +#include "Scenery.h" #include "Surface.h" #include diff --git a/src/openrct2/world/Park.h b/src/openrct2/world/Park.h index 7f27f77076..c1701897f8 100644 --- a/src/openrct2/world/Park.h +++ b/src/openrct2/world/Park.h @@ -10,7 +10,6 @@ #pragma once #include "../common.h" -#include "../ride/Ride.h" #include "Map.h" #define MAX_ENTRANCE_FEE MONEY(200, 00) diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 3d81db9431..c59bcefb20 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include