diff --git a/OpenRCT2.xcodeproj/project.pbxproj b/OpenRCT2.xcodeproj/project.pbxproj index c91101e7f9..2831dc1f73 100644 --- a/OpenRCT2.xcodeproj/project.pbxproj +++ b/OpenRCT2.xcodeproj/project.pbxproj @@ -53,6 +53,7 @@ 4C729BC51FC2E5F3001DFF2F /* TileInspector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C729BC31FC2E5F3001DFF2F /* TileInspector.cpp */; }; 4C729BC71FC2E6AB001DFF2F /* Particle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C729BC61FC2E6AB001DFF2F /* Particle.cpp */; }; 4C729BC91FC2E6E9001DFF2F /* MoneyEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C729BC81FC2E6E9001DFF2F /* MoneyEffect.cpp */; }; + 4C7B53A51FFC180400A52E21 /* ObjectList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C7B53A31FFC180400A52E21 /* ObjectList.cpp */; }; 4C8667821EEFDCDF0024AAB8 /* RideGroupManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C8667801EEFDCDF0024AAB8 /* RideGroupManager.cpp */; }; 4C8B42701EEB1ABD00F015CA /* X8DrawingEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C8B426E1EEB1ABD00F015CA /* X8DrawingEngine.cpp */; }; 4C8B42721EEB1AE400F015CA /* HardwareDisplayDrawingEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C8B42711EEB1AE400F015CA /* HardwareDisplayDrawingEngine.cpp */; }; @@ -139,7 +140,6 @@ 4C93F1BE1F8E185600A9330D /* Research.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C93F1B81F8E185600A9330D /* Research.cpp */; }; 4CB832AB1EFFB8D100B88761 /* ttf_sdlport.c in Sources */ = {isa = PBXBuildFile; fileRef = 4CB832A81EFFB8D100B88761 /* ttf_sdlport.c */; }; 4CB832AC1EFFB8D100B88761 /* ttf.c in Sources */ = {isa = PBXBuildFile; fileRef = 4CB832A91EFFB8D100B88761 /* ttf.c */; }; - 4CC4B8E11FE00B4100660D62 /* ObjectList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CC4B8DF1FE00B4100660D62 /* ObjectList.cpp */; }; 4CC4B8E41FE00C4200660D62 /* CmdlineSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CC4B8E21FE00C4100660D62 /* CmdlineSprite.cpp */; }; 4CC4B8E71FE00C4E00660D62 /* Diagnostic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CC4B8E51FE00C4E00660D62 /* Diagnostic.cpp */; }; 4CC4B8ED1FE00C5D00660D62 /* Intro.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CC4B8EA1FE00C5D00660D62 /* Intro.cpp */; }; @@ -477,9 +477,9 @@ F775F5351EE35A89001F00E7 /* DummyUiContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F775F5331EE35A6B001F00E7 /* DummyUiContext.cpp */; }; F775F5371EE3724F001F00E7 /* DummyAudioContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F775F5361EE3724F001F00E7 /* DummyAudioContext.cpp */; }; F775F5381EE3725C001F00E7 /* DummyAudioContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F775F5361EE3724F001F00E7 /* DummyAudioContext.cpp */; }; - F79F428F1F3260F1009E42F8 /* changelog.txt in Resources */ = {isa = PBXBuildFile; fileRef = F79F428E1F3260F1009E42F8 /* changelog.txt */; }; F79F42881F2E07E1009E42F8 /* Park.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F79F42871F2E07E1009E42F8 /* Park.cpp */; }; F79F42891F2E0837009E42F8 /* Park.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F79F42871F2E07E1009E42F8 /* Park.cpp */; }; + F79F428F1F3260F1009E42F8 /* changelog.txt in Resources */ = {isa = PBXBuildFile; fileRef = F79F428E1F3260F1009E42F8 /* changelog.txt */; }; F7CB863F1EEDA0B50030C877 /* WindowManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F7CB863D1EEDA0B50030C877 /* WindowManager.cpp */; }; F7CB864A1EEDA1330030C877 /* KeyboardShortcuts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F7CB86471EEDA1330030C877 /* KeyboardShortcuts.cpp */; }; F7CB864D1EEDA1A80030C877 /* DummyWindowManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F7CB864B1EEDA1A80030C877 /* DummyWindowManager.cpp */; }; @@ -653,6 +653,9 @@ 4C729BC41FC2E5F3001DFF2F /* TileInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TileInspector.h; sourceTree = ""; }; 4C729BC61FC2E6AB001DFF2F /* Particle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Particle.cpp; sourceTree = ""; }; 4C729BC81FC2E6E9001DFF2F /* MoneyEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MoneyEffect.cpp; sourceTree = ""; }; + 4C7B53A21FFC15ED00A52E21 /* ObjectLimits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectLimits.h; sourceTree = ""; }; + 4C7B53A31FFC180400A52E21 /* ObjectList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectList.cpp; sourceTree = ""; }; + 4C7B53A41FFC180400A52E21 /* ObjectList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectList.h; sourceTree = ""; }; 4C8667801EEFDCDF0024AAB8 /* RideGroupManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RideGroupManager.cpp; sourceTree = ""; }; 4C8667811EEFDCDF0024AAB8 /* RideGroupManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RideGroupManager.h; sourceTree = ""; }; 4C8B426E1EEB1ABD00F015CA /* X8DrawingEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = X8DrawingEngine.cpp; sourceTree = ""; }; @@ -749,8 +752,6 @@ 4CB832A81EFFB8D100B88761 /* ttf_sdlport.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttf_sdlport.c; sourceTree = ""; }; 4CB832A91EFFB8D100B88761 /* ttf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ttf.c; sourceTree = ""; }; 4CB832AA1EFFB8D100B88761 /* ttf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ttf.h; sourceTree = ""; }; - 4CC4B8DF1FE00B4100660D62 /* ObjectList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectList.cpp; sourceTree = ""; }; - 4CC4B8E01FE00B4100660D62 /* ObjectList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectList.h; sourceTree = ""; }; 4CC4B8E21FE00C4100660D62 /* CmdlineSprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CmdlineSprite.cpp; sourceTree = ""; }; 4CC4B8E31FE00C4200660D62 /* CmdlineSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CmdlineSprite.h; sourceTree = ""; }; 4CC4B8E51FE00C4E00660D62 /* Diagnostic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Diagnostic.cpp; sourceTree = ""; }; @@ -1267,7 +1268,6 @@ F76C84321EC4E7CC00FA49E2 /* WallObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WallObject.h; sourceTree = ""; }; F76C84331EC4E7CC00FA49E2 /* WaterObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WaterObject.cpp; sourceTree = ""; }; F76C84341EC4E7CC00FA49E2 /* WaterObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WaterObject.h; sourceTree = ""; }; - F76C84351EC4E7CC00FA49E2 /* object.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = object.h; sourceTree = ""; }; F76C84381EC4E7CC00FA49E2 /* OpenRCT2.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = OpenRCT2.cpp; sourceTree = ""; }; F76C84391EC4E7CC00FA49E2 /* OpenRCT2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OpenRCT2.h; sourceTree = ""; }; F76C84511EC4E7CC00FA49E2 /* ParkImporter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ParkImporter.cpp; sourceTree = ""; }; @@ -1399,8 +1399,8 @@ F775F5321EE35A48001F00E7 /* Ui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Ui.h; sourceTree = ""; }; F775F5331EE35A6B001F00E7 /* DummyUiContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DummyUiContext.cpp; sourceTree = ""; }; F775F5361EE3724F001F00E7 /* DummyAudioContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DummyAudioContext.cpp; sourceTree = ""; }; - F79F428E1F3260F1009E42F8 /* changelog.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = changelog.txt; path = distribution/changelog.txt; sourceTree = SOURCE_ROOT; }; F79F42871F2E07E1009E42F8 /* Park.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Park.cpp; sourceTree = ""; }; + F79F428E1F3260F1009E42F8 /* changelog.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = changelog.txt; path = distribution/changelog.txt; sourceTree = SOURCE_ROOT; }; F7CB863D1EEDA0B50030C877 /* WindowManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WindowManager.cpp; sourceTree = ""; }; F7CB863E1EEDA0B50030C877 /* WindowManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowManager.h; sourceTree = ""; }; F7CB86471EEDA1330030C877 /* KeyboardShortcuts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeyboardShortcuts.cpp; sourceTree = ""; }; @@ -1869,9 +1869,6 @@ 4CC4B8EB1FE00C5D00660D62 /* Intro.h */, C68313C51FDB4EBA006DB3D8 /* input.cpp */, F76C83BA1EC4E7CC00FA49E2 /* input.h */, - F76C84351EC4E7CC00FA49E2 /* object.h */, - 4CC4B8DF1FE00B4100660D62 /* ObjectList.cpp */, - 4CC4B8E01FE00B4100660D62 /* ObjectList.h */, F76C84381EC4E7CC00FA49E2 /* OpenRCT2.cpp */, F76C84391EC4E7CC00FA49E2 /* OpenRCT2.h */, F76C84511EC4E7CC00FA49E2 /* ParkImporter.cpp */, @@ -2135,6 +2132,9 @@ F76C841F1EC4E7CC00FA49E2 /* Object.h */, F76C84201EC4E7CC00FA49E2 /* ObjectFactory.cpp */, F76C84211EC4E7CC00FA49E2 /* ObjectFactory.h */, + 4C7B53A21FFC15ED00A52E21 /* ObjectLimits.h */, + 4C7B53A31FFC180400A52E21 /* ObjectList.cpp */, + 4C7B53A41FFC180400A52E21 /* ObjectList.h */, F76C84221EC4E7CC00FA49E2 /* ObjectManager.cpp */, F76C84231EC4E7CC00FA49E2 /* ObjectManager.h */, F76C84241EC4E7CC00FA49E2 /* ObjectRepository.cpp */, @@ -3105,7 +3105,6 @@ C654DF361F69C0430040F43D /* Player.cpp in Sources */, 4C6A66BC1FED04EE00694CB6 /* SSE41Drawing.cpp in Sources */, 4C93F1A51F8B748900A9330D /* BoatHire.cpp in Sources */, - 4CC4B8E11FE00B4100660D62 /* ObjectList.cpp in Sources */, 4CFE4E821F90A3F1005243C2 /* Staff.cpp in Sources */, F76C88791EC5324E00FA49E2 /* AudioContext.cpp in Sources */, 4C93F1571F8B744400A9330D /* WildMouse.cpp in Sources */, @@ -3168,6 +3167,7 @@ 4C93F1751F8B745700A9330D /* MiniHelicopters.cpp in Sources */, 4CE462431FD1612C0001CD98 /* android.c in Sources */, 4CE4624B1FD1613D0001CD98 /* Platform.macOS.cpp in Sources */, + 4C7B53A51FFC180400A52E21 /* ObjectList.cpp in Sources */, 4C93F1501F8B744400A9330D /* SideFrictionRollerCoaster.cpp in Sources */, 4C93F13D1F8B744400A9330D /* CompactInvertedCoaster.cpp in Sources */, C67CCD681FBBD138004FAE4C /* EditorMain.cpp in Sources */, diff --git a/src/openrct2-ui/windows/EditorObjectSelection.cpp b/src/openrct2-ui/windows/EditorObjectSelection.cpp index c1ac308b0f..655650ab94 100644 --- a/src/openrct2-ui/windows/EditorObjectSelection.cpp +++ b/src/openrct2-ui/windows/EditorObjectSelection.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/openrct2-ui/windows/Footpath.cpp b/src/openrct2-ui/windows/Footpath.cpp index 227e8a69a7..c2baf622c2 100644 --- a/src/openrct2-ui/windows/Footpath.cpp +++ b/src/openrct2-ui/windows/Footpath.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/openrct2-ui/windows/NewRide.cpp b/src/openrct2-ui/windows/NewRide.cpp index 1af93579a4..ab3aaeed87 100644 --- a/src/openrct2-ui/windows/NewRide.cpp +++ b/src/openrct2-ui/windows/NewRide.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -339,16 +340,16 @@ static ride_list_item * window_new_ride_iterate_over_ride_group(uint8 rideType, bool allowDrawingOverLastButton = false; uint8 *rideEntryIndexPtr = get_ride_entry_indices_for_ride_type(rideType); - char preferredVehicleName[9]; + char preferredVehicleName[DAT_NAME_LENGTH + 1]; safe_strcpy(preferredVehicleName, " ", sizeof(preferredVehicleName)); // For each ride entry for this ride type while (*rideEntryIndexPtr != RIDE_ENTRY_INDEX_NULL) { uint8 rideEntryIndex = *rideEntryIndexPtr++; - char rideEntryName[9]; + char rideEntryName[DAT_NAME_LENGTH + 1]; memcpy(rideEntryName,object_entry_groups[OBJECT_TYPE_RIDE].entries[rideEntryIndex].name,8); - rideEntryName[8]=0; + rideEntryName[DAT_NAME_LENGTH] = 0; // Skip if vehicle type is not invented yet if (!ride_entry_is_invented(rideEntryIndex) && !gCheatsIgnoreResearchStatus) @@ -371,11 +372,11 @@ static ride_list_item * window_new_ride_iterate_over_ride_group(uint8 rideType, { if (strcmp(preferredVehicleName, " \0") == 0) { safe_strcpy(preferredVehicleName, rideEntryName, sizeof(preferredVehicleName)); - preferredVehicleName[8] = 0; + preferredVehicleName[DAT_NAME_LENGTH] = 0; } else { if (RideGroupManager::VehiclePreferenceCompare(rideType, preferredVehicleName, rideEntryName) == 1) { safe_strcpy(preferredVehicleName, rideEntryName, sizeof(preferredVehicleName)); - preferredVehicleName[8] = 0; + preferredVehicleName[DAT_NAME_LENGTH] = 0; } else { continue; } @@ -910,7 +911,7 @@ static ride_list_item window_new_ride_scroll_get_ride_list_item_at(rct_window *w static sint32 get_num_track_designs(ride_list_item item) { - char entry[9]; + char entry[DAT_NAME_LENGTH + 1]; const char * entryPtr = nullptr; rct_ride_entry * rideEntry = nullptr; diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index 426f4f14e7..9c18b3e507 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index e692012382..26cd6d9e8e 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -63,7 +63,7 @@ #include "network/http.h" #include "network/network.h" #include "network/twitch.h" -#include "ObjectList.h" +#include "object/ObjectList.h" #include "platform/platform.h" #include "rct1.h" #include "util/Util.h" diff --git a/src/openrct2/Editor.cpp b/src/openrct2/Editor.cpp index ac9897917d..fda2220ea5 100644 --- a/src/openrct2/Editor.cpp +++ b/src/openrct2/Editor.cpp @@ -28,7 +28,7 @@ #include "management/NewsItem.h" #include "object/ObjectManager.h" #include "object/ObjectRepository.h" -#include "ObjectList.h" +#include "object/ObjectList.h" #include "peep/Staff.h" #include "rct1.h" #include "util/Util.h" diff --git a/src/openrct2/Editor.h b/src/openrct2/Editor.h index 84c2930f0c..d3c8c9c940 100644 --- a/src/openrct2/Editor.h +++ b/src/openrct2/Editor.h @@ -18,10 +18,10 @@ #define _EDITOR_H_ #include "common.h" -#include "object.h" +#include "object/Object.h" #ifdef __cplusplus -#include "object.h" +#include "object/Object.h" namespace Editor { diff --git a/src/openrct2/EditorObjectSelectionSession.h b/src/openrct2/EditorObjectSelectionSession.h index b1c6d2c095..929e75890b 100644 --- a/src/openrct2/EditorObjectSelectionSession.h +++ b/src/openrct2/EditorObjectSelectionSession.h @@ -17,7 +17,7 @@ #pragma once #include "common.h" -#include "object.h" +#include "object/Object.h" #ifdef __cplusplus extern bool _maxObjectsWasHit; diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index 171285ab3e..bcc4b9b358 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -34,7 +34,7 @@ #include "management/NewsItem.h" #include "management/Research.h" #include "network/network.h" -#include "object.h" +#include "object/Object.h" #include "OpenRCT2.h" #include "ParkImporter.h" #include "peep/Peep.h" @@ -62,7 +62,7 @@ #include "world/scenery.h" #include "world/sprite.h" #include "world/water.h" -#include "ObjectList.h" +#include "object/ObjectList.h" #define NUMBER_OF_AUTOSAVES_TO_KEEP 9 diff --git a/src/openrct2/ParkImporter.h b/src/openrct2/ParkImporter.h index 1be8cd97e7..73e0a0bf47 100644 --- a/src/openrct2/ParkImporter.h +++ b/src/openrct2/ParkImporter.h @@ -18,7 +18,7 @@ #include "common.h" -#include "object.h" +#include "object/Object.h" typedef enum PARK_LOAD_ERROR { diff --git a/src/openrct2/drawing/drawing.c b/src/openrct2/drawing/drawing.c index 8a3771e9d6..f6c4a66812 100644 --- a/src/openrct2/drawing/drawing.c +++ b/src/openrct2/drawing/drawing.c @@ -19,7 +19,7 @@ #include "../core/Guard.hpp" #include "../interface/window.h" #include "../localisation/localisation.h" -#include "../object.h" +#include "../object/Object.h" #include "../OpenRCT2.h" #include "../platform/platform.h" #include "../util/Util.h" diff --git a/src/openrct2/interface/console.c b/src/openrct2/interface/console.c index 28ccb3239a..cb1d855c0a 100644 --- a/src/openrct2/interface/console.c +++ b/src/openrct2/interface/console.c @@ -30,7 +30,7 @@ #include "../management/Research.h" #include "../network/network.h" #include "../network/twitch.h" -#include "../object.h" +#include "../object/Object.h" #include "../object/ObjectManager.h" #include "../object/ObjectRepository.h" #include "../OpenRCT2.h" diff --git a/src/openrct2/management/Research.cpp b/src/openrct2/management/Research.cpp index 423830136d..e9fc0e3fc4 100644 --- a/src/openrct2/management/Research.cpp +++ b/src/openrct2/management/Research.cpp @@ -22,7 +22,7 @@ #include "../localisation/date.h" #include "../localisation/localisation.h" #include "../localisation/string_ids.h" -#include "../ObjectList.h" +#include "../object/ObjectList.h" #include "../OpenRCT2.h" #include "../scenario/scenario.h" #include "../rct1.h" diff --git a/src/openrct2/object.h b/src/openrct2/object.h deleted file mode 100644 index a347957ffb..0000000000 --- a/src/openrct2/object.h +++ /dev/null @@ -1,144 +0,0 @@ -#pragma region Copyright (c) 2014-2017 OpenRCT2 Developers -/***************************************************************************** - * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * - * OpenRCT2 is the work of many authors, a full list can be found in contributors.md - * For more information, visit https://github.com/OpenRCT2/OpenRCT2 - * - * OpenRCT2 is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * A full copy of the GNU General Public License can be found in licence.txt - *****************************************************************************/ -#pragma endregion - -#ifndef _OBJECT_H_ -#define _OBJECT_H_ - -#include "common.h" - -// First 0xF of rct_object_entry->flags -typedef enum -{ - OBJECT_TYPE_RIDE, - OBJECT_TYPE_SMALL_SCENERY, - OBJECT_TYPE_LARGE_SCENERY, - OBJECT_TYPE_WALLS, - OBJECT_TYPE_BANNERS, - OBJECT_TYPE_PATHS, - OBJECT_TYPE_PATH_BITS, - OBJECT_TYPE_SCENERY_GROUP, - OBJECT_TYPE_PARK_ENTRANCE, - OBJECT_TYPE_WATER, - OBJECT_TYPE_SCENARIO_TEXT, - - OBJECT_TYPE_COUNT -} OBJECT_TYPE; - -typedef enum -{ - OBJECT_SELECTION_FLAG_SELECTED = (1 << 0), - OBJECT_SELECTION_FLAG_2 = (1 << 1), - OBJECT_SELECTION_FLAG_IN_USE = (1 << 2), - // OBJECT_SELECTION_FLAG_REQUIRED = (1 << 3), // Unused feature - OBJECT_SELECTION_FLAG_ALWAYS_REQUIRED = (1 << 4), - OBJECT_SELECTION_FLAG_6 = (1 << 5), - OBJECT_SELECTION_FLAG_7 = (1 << 6), - OBJECT_SELECTION_FLAG_8 = (1 << 7), -} OBJECT_SELECTION_FLAGS; - -#define OBJECT_SELECTION_NOT_SELECTED_OR_REQUIRED 0 - -typedef enum -{ - OBJECT_SOURCE_CUSTOM, - OBJECT_SOURCE_WACKY_WORLDS, - OBJECT_SOURCE_TIME_TWISTER, - OBJECT_SOURCE_RCT2 = 8 -} OBJECT_SOURCE_GAME; - -#define OBJECT_ENTRY_COUNT 721 - -#pragma pack(push, 1) -/** - * Object entry structure. - * size: 0x10 - */ -typedef struct rct_object_entry { - union { - uint8 end_flag; // needed not to read past allocated buffer. - uint32 flags; - }; - char name[8]; - uint32 checksum; -} rct_object_entry; -assert_struct_size(rct_object_entry, 0x10); - -/** - * Object entry structure extended. - * size: 0x14 - */ -typedef struct rct_object_entry_extended { - union { - rct_object_entry entry; - struct { - uint32 flags; - char name[8]; - uint32 checksum; - uint32 chunk_size; - }; - }; -} rct_object_entry_extended; -assert_struct_size(rct_object_entry_extended, 0x14); - -typedef struct rct_object_entry_group { - void **chunks; - rct_object_entry_extended *entries; -} rct_object_entry_group; -#ifdef PLATFORM_32BIT -assert_struct_size(rct_object_entry_group, 8); -#endif - -typedef struct rct_ride_filters { - uint8 category[2]; - uint8 ride_type; -} rct_ride_filters; -assert_struct_size(rct_ride_filters, 3); - -typedef struct rct_object_filters { - union { - rct_ride_filters ride; - }; -} rct_object_filters; -assert_struct_size(rct_object_filters, 3); -#pragma pack(pop) - -#ifdef __cplusplus -extern "C" { -#endif - -extern sint32 object_entry_group_counts[]; -extern sint32 object_entry_group_encoding[]; - -extern const rct_object_entry_group object_entry_groups[]; - -void object_list_load(); - -bool object_entry_is_empty(const rct_object_entry *entry); -bool object_entry_compare(const rct_object_entry *a, const rct_object_entry *b); -sint32 object_calculate_checksum(const rct_object_entry * entry, const void * data, size_t dataLength); -sint32 find_object_in_entry_group(const rct_object_entry* entry, uint8* entry_type, uint8* entry_index); -void object_create_identifier_name(char* string_buffer, size_t size, const rct_object_entry* object); - -const rct_object_entry * object_list_find_by_name(const char *name); -const rct_object_entry * object_list_find(rct_object_entry *entry); - -void object_entry_get_name_fixed(utf8 * buffer, size_t bufferSize, const rct_object_entry * entry); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/openrct2/object/BannerObject.cpp b/src/openrct2/object/BannerObject.cpp index ec847f08f8..7acd0bb160 100644 --- a/src/openrct2/object/BannerObject.cpp +++ b/src/openrct2/object/BannerObject.cpp @@ -19,8 +19,8 @@ #include "../drawing/drawing.h" #include "../localisation/language.h" -#include "../object.h" -#include "../ObjectList.h" +#include "../object/Object.h" +#include "ObjectList.h" void BannerObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { diff --git a/src/openrct2/object/FootpathItemObject.cpp b/src/openrct2/object/FootpathItemObject.cpp index 34c4cbf41a..2bfb4f4f7e 100644 --- a/src/openrct2/object/FootpathItemObject.cpp +++ b/src/openrct2/object/FootpathItemObject.cpp @@ -19,8 +19,8 @@ #include "../drawing/drawing.h" #include "../localisation/localisation.h" -#include "../object.h" -#include "../ObjectList.h" +#include "../object/Object.h" +#include "ObjectList.h" void FootpathItemObject::ReadLegacy(IReadObjectContext * context, IStream * stream) { diff --git a/src/openrct2/object/Object.cpp b/src/openrct2/object/Object.cpp index aa94411adc..26ac4b28ac 100644 --- a/src/openrct2/object/Object.cpp +++ b/src/openrct2/object/Object.cpp @@ -19,14 +19,15 @@ #include "../localisation/language.h" #include "../localisation/string_ids.h" #include "Object.h" +#include "ObjectLimits.h" Object::Object(const rct_object_entry &entry) { _objectEntry = entry; - char name[9] = { 0 }; - Memory::Copy(name, entry.name, 8); + char name[DAT_NAME_LENGTH + 1] = { 0 }; + Memory::Copy(name, entry.name, DAT_NAME_LENGTH); _identifier = String::Duplicate(name); } @@ -68,11 +69,11 @@ rct_object_entry Object::GetScgPathXHeader() return Object::CreateHeader("SCGPATHX", 207140231, 890227440); } -rct_object_entry Object::CreateHeader(const char name[9], uint32 flags, uint32 checksum) +rct_object_entry Object::CreateHeader(const char name[DAT_NAME_LENGTH + 1], uint32 flags, uint32 checksum) { rct_object_entry header = { 0 }; header.flags = flags; - Memory::Copy(header.name, name, 8); + Memory::Copy(header.name, name, DAT_NAME_LENGTH); header.checksum = checksum; return header; } diff --git a/src/openrct2/object/Object.h b/src/openrct2/object/Object.h index 5db3b04f2f..e93c6d2f3a 100644 --- a/src/openrct2/object/Object.h +++ b/src/openrct2/object/Object.h @@ -16,13 +16,112 @@ #pragma once +#include "../common.h" + #ifdef __cplusplus -#include "../common.h" #include "ImageTable.h" #include "StringTable.h" -#include "../object.h" +#endif + +// First 0xF of rct_object_entry->flags +typedef enum +{ + OBJECT_TYPE_RIDE, + OBJECT_TYPE_SMALL_SCENERY, + OBJECT_TYPE_LARGE_SCENERY, + OBJECT_TYPE_WALLS, + OBJECT_TYPE_BANNERS, + OBJECT_TYPE_PATHS, + OBJECT_TYPE_PATH_BITS, + OBJECT_TYPE_SCENERY_GROUP, + OBJECT_TYPE_PARK_ENTRANCE, + OBJECT_TYPE_WATER, + OBJECT_TYPE_SCENARIO_TEXT, + + OBJECT_TYPE_COUNT +} OBJECT_TYPE; + +typedef enum +{ + OBJECT_SELECTION_FLAG_SELECTED = (1 << 0), + OBJECT_SELECTION_FLAG_2 = (1 << 1), + OBJECT_SELECTION_FLAG_IN_USE = (1 << 2), + // OBJECT_SELECTION_FLAG_REQUIRED = (1 << 3), // Unused feature + OBJECT_SELECTION_FLAG_ALWAYS_REQUIRED = (1 << 4), + OBJECT_SELECTION_FLAG_6 = (1 << 5), + OBJECT_SELECTION_FLAG_7 = (1 << 6), + OBJECT_SELECTION_FLAG_8 = (1 << 7), +} OBJECT_SELECTION_FLAGS; + +#define OBJECT_SELECTION_NOT_SELECTED_OR_REQUIRED 0 + +typedef enum +{ + OBJECT_SOURCE_CUSTOM, + OBJECT_SOURCE_WACKY_WORLDS, + OBJECT_SOURCE_TIME_TWISTER, + OBJECT_SOURCE_RCT2 = 8 +} OBJECT_SOURCE_GAME; + +#define OBJECT_ENTRY_COUNT 721 + +#pragma pack(push, 1) +/** + * Object entry structure. + * size: 0x10 + */ +typedef struct rct_object_entry { + union { + uint8 end_flag; // needed not to read past allocated buffer. + uint32 flags; + }; + char name[8]; + uint32 checksum; +} rct_object_entry; +assert_struct_size(rct_object_entry, 0x10); + +/** + * Object entry structure extended. + * size: 0x14 + */ +typedef struct rct_object_entry_extended { + union { + rct_object_entry entry; + struct { + uint32 flags; + char name[8]; + uint32 checksum; + uint32 chunk_size; + }; + }; +} rct_object_entry_extended; +assert_struct_size(rct_object_entry_extended, 0x14); + +typedef struct rct_object_entry_group { + void **chunks; + rct_object_entry_extended *entries; +} rct_object_entry_group; +#ifdef PLATFORM_32BIT +assert_struct_size(rct_object_entry_group, 8); +#endif + +typedef struct rct_ride_filters { + uint8 category[2]; + uint8 ride_type; +} rct_ride_filters; +assert_struct_size(rct_ride_filters, 3); + +typedef struct rct_object_filters { + union { + rct_ride_filters ride; + }; +} rct_object_filters; +assert_struct_size(rct_object_filters, 3); +#pragma pack(pop) + +#ifdef __cplusplus enum OBJ_STRING_ID { @@ -108,3 +207,30 @@ enum OBJECT_ERROR : uint32 }; #endif + +#ifdef __cplusplus +extern "C" { +#endif + + extern sint32 object_entry_group_counts[]; + extern sint32 object_entry_group_encoding[]; + + extern const rct_object_entry_group object_entry_groups[]; + + void object_list_load(); + + bool object_entry_is_empty(const rct_object_entry *entry); + bool object_entry_compare(const rct_object_entry *a, const rct_object_entry *b); + sint32 object_calculate_checksum(const rct_object_entry * entry, const void * data, size_t dataLength); + sint32 find_object_in_entry_group(const rct_object_entry* entry, uint8* entry_type, uint8* entry_index); + void object_create_identifier_name(char* string_buffer, size_t size, const rct_object_entry* object); + + const rct_object_entry * object_list_find_by_name(const char *name); + const rct_object_entry * object_list_find(rct_object_entry *entry); + + void object_entry_get_name_fixed(utf8 * buffer, size_t bufferSize, const rct_object_entry * entry); + +#ifdef __cplusplus +} +#endif + diff --git a/src/openrct2/object/ObjectFactory.cpp b/src/openrct2/object/ObjectFactory.cpp index ef3dbef7ce..d5ef899ad0 100644 --- a/src/openrct2/object/ObjectFactory.cpp +++ b/src/openrct2/object/ObjectFactory.cpp @@ -34,7 +34,8 @@ #include "WallObject.h" #include "WaterObject.h" -#include "../object.h" +#include "../object/Object.h" +#include "ObjectLimits.h" class ReadObjectContext : public IReadObjectContext { @@ -111,7 +112,7 @@ namespace ObjectFactory rct_object_entry entry = fs.ReadValue(); result = CreateObject(entry); - utf8 objectName[9] = { 0 }; + utf8 objectName[DAT_NAME_LENGTH + 1] = { 0 }; object_entry_get_name_fixed(objectName, sizeof(objectName), &entry); log_verbose(" entry: { 0x%08X, \"%s\", 0x%08X }", entry.flags, objectName, entry.checksum); @@ -144,7 +145,7 @@ namespace ObjectFactory Object * result = CreateObject(*entry); if (result != nullptr) { - utf8 objectName[9]; + utf8 objectName[DAT_NAME_LENGTH + 1]; object_entry_get_name_fixed(objectName, sizeof(objectName), entry); auto readContext = ReadObjectContext(objectName); diff --git a/src/openrct2/object/ObjectLimits.h b/src/openrct2/object/ObjectLimits.h new file mode 100644 index 0000000000..26f7e1cd63 --- /dev/null +++ b/src/openrct2/object/ObjectLimits.h @@ -0,0 +1,31 @@ +#pragma region Copyright (c) 2014-2018 OpenRCT2 Developers +/***************************************************************************** + * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. + * + * OpenRCT2 is the work of many authors, a full list can be found in contributors.md + * For more information, visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * A full copy of the GNU General Public License can be found in licence.txt + *****************************************************************************/ +#pragma endregion + +#pragma once + +#define MAX_RIDE_OBJECTS 128 +#define MAX_SMALL_SCENERY_OBJECTS 252 +#define MAX_LARGE_SCENERY_OBJECTS 128 +#define MAX_WALL_SCENERY_OBJECTS 128 +#define MAX_BANNER_OBJECTS 32 +#define MAX_PATH_OBJECTS 16 +#define MAX_PATH_ADDITION_OBJECTS 15 +#define MAX_SCENERY_GROUP_OBJECTS 19 +#define MAX_PARK_ENTRANCE_OBJECTS 1 +#define MAX_WATER_OBJECTS 1 +#define MAX_SCENARIO_TEXT_OBJECTS 1 + +#define DAT_NAME_LENGTH 8 diff --git a/src/openrct2/ObjectList.cpp b/src/openrct2/object/ObjectList.cpp similarity index 96% rename from src/openrct2/ObjectList.cpp rename to src/openrct2/object/ObjectList.cpp index 61e5935372..3239d1c916 100644 --- a/src/openrct2/ObjectList.cpp +++ b/src/openrct2/object/ObjectList.cpp @@ -14,14 +14,14 @@ *****************************************************************************/ #pragma endregion -#include "core/Math.hpp" -#include "core/Util.hpp" -#include "Game.h" -#include "object.h" +#include "../core/Math.hpp" +#include "../core/Util.hpp" +#include "../Game.h" +#include "../object/Object.h" #include "ObjectList.h" -#include "object/ObjectRepository.h" -#include "util/SawyerCoding.h" -#include "util/Util.h" +#include "ObjectRepository.h" +#include "../util/SawyerCoding.h" +#include "../util/Util.h" // 98DA00 sint32 object_entry_group_counts[] = { @@ -182,7 +182,7 @@ void * get_loaded_object_chunk(size_t index) void object_entry_get_name_fixed(utf8 * buffer, size_t bufferSize, const rct_object_entry * entry) { - bufferSize = Math::Min((size_t)9, bufferSize); + bufferSize = Math::Min((size_t)DAT_NAME_LENGTH + 1, bufferSize); memcpy(buffer, entry->name, bufferSize - 1); buffer[bufferSize - 1] = 0; } diff --git a/src/openrct2/ObjectList.h b/src/openrct2/object/ObjectList.h similarity index 67% rename from src/openrct2/ObjectList.h rename to src/openrct2/object/ObjectList.h index 69f778601c..c81c320eb2 100644 --- a/src/openrct2/ObjectList.h +++ b/src/openrct2/object/ObjectList.h @@ -1,28 +1,18 @@ #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 "../ride/Ride.h" +#include "../world/Banner.h" +#include "../world/Entrance.h" +#include "../world/footpath.h" +#include "../world/scenery.h" +#include "../world/water.h" +#include "ObjectLimits.h" #ifdef __cplusplus -extern "C" { +extern "C" +{ #endif -#define MAX_RIDE_OBJECTS 128 -#define MAX_SMALL_SCENERY_OBJECTS 252 -#define MAX_LARGE_SCENERY_OBJECTS 128 -#define MAX_WALL_SCENERY_OBJECTS 128 -#define MAX_BANNER_OBJECTS 32 -#define MAX_PATH_OBJECTS 16 -#define MAX_PATH_ADDITION_OBJECTS 15 -#define MAX_SCENERY_GROUP_OBJECTS 19 -#define MAX_PARK_ENTRANCE_OBJECTS 1 -#define MAX_WATER_OBJECTS 1 -#define MAX_SCENARIO_TEXT_OBJECTS 1 - extern rct_ride_entry *gRideEntries[MAX_RIDE_OBJECTS]; extern rct_small_scenery_entry *gSmallSceneryEntries[MAX_SMALL_SCENERY_OBJECTS]; extern rct_large_scenery_entry *gLargeSceneryEntries[MAX_LARGE_SCENERY_OBJECTS]; diff --git a/src/openrct2/object/ObjectManager.cpp b/src/openrct2/object/ObjectManager.cpp index 0375de26f1..2c434f75a3 100644 --- a/src/openrct2/object/ObjectManager.cpp +++ b/src/openrct2/object/ObjectManager.cpp @@ -29,7 +29,7 @@ #include "SmallSceneryObject.h" #include "WallObject.h" -#include "../ObjectList.h" +#include "ObjectList.h" class ObjectManager final : public IObjectManager { @@ -583,15 +583,15 @@ private: static void ReportMissingObject(const rct_object_entry * entry) { - utf8 objName[9] = { 0 }; - Memory::Copy(objName, entry->name, 8); + utf8 objName[DAT_NAME_LENGTH + 1] = { 0 }; + Memory::Copy(objName, entry->name, DAT_NAME_LENGTH); Console::Error::WriteLine("[%s] Object not found.", objName); } void ReportObjectLoadProblem(const rct_object_entry * entry) { - utf8 objName[9] = { 0 }; - Memory::Copy(objName, entry->name, 8); + utf8 objName[DAT_NAME_LENGTH + 1] = { 0 }; + Memory::Copy(objName, entry->name, DAT_NAME_LENGTH); Console::Error::WriteLine("[%s] Object could not be loaded.", objName); } diff --git a/src/openrct2/object/ObjectManager.h b/src/openrct2/object/ObjectManager.h index ad5c0d64bd..67b10afcba 100644 --- a/src/openrct2/object/ObjectManager.h +++ b/src/openrct2/object/ObjectManager.h @@ -21,7 +21,7 @@ #endif #include "../common.h" -#include "../object.h" +#include "../object/Object.h" #ifdef __cplusplus diff --git a/src/openrct2/object/ObjectRepository.cpp b/src/openrct2/object/ObjectRepository.cpp index 655cac8925..cd48d04942 100644 --- a/src/openrct2/object/ObjectRepository.cpp +++ b/src/openrct2/object/ObjectRepository.cpp @@ -42,8 +42,8 @@ #include "../config/Config.h" #include "../localisation/localisation.h" -#include "../object.h" -#include "../ObjectList.h" +#include "../object/Object.h" +#include "ObjectList.h" #include "../platform/platform.h" #include "../util/SawyerCoding.h" #include "../util/Util.h" diff --git a/src/openrct2/object/ObjectRepository.h b/src/openrct2/object/ObjectRepository.h index ac7b1a8957..5d47bad14e 100644 --- a/src/openrct2/object/ObjectRepository.h +++ b/src/openrct2/object/ObjectRepository.h @@ -22,7 +22,7 @@ #include "../common.h" -#include "../object.h" +#include "../object/Object.h" #include "../ride/Ride.h" #ifdef __cplusplus diff --git a/src/openrct2/paint/tile_element/Path.cpp b/src/openrct2/paint/tile_element/Path.cpp index b8bcd78a5f..18c40a4db2 100644 --- a/src/openrct2/paint/tile_element/Path.cpp +++ b/src/openrct2/paint/tile_element/Path.cpp @@ -18,7 +18,7 @@ #include "../../Game.h" #include "../../interface/viewport.h" #include "../../localisation/localisation.h" -#include "../../ObjectList.h" +#include "../../object/ObjectList.h" #include "../../peep/Staff.h" #include "../../ride/Track.h" #include "../../ride/track_paint.h" diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index 5cafcd3a11..df2a140f87 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -26,7 +26,7 @@ #include "../localisation/string_ids.h" #include "../management/Finance.h" #include "../network/network.h" -#include "../ObjectList.h" +#include "../object/ObjectList.h" #include "../paint/tile_element/TileElement.h" #include "../scenario/scenario.h" #include "../util/Util.h" diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index ada676cc16..b37e9ac478 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -33,7 +33,7 @@ #include "../ride/Station.h" #include "../scenario/ScenarioSources.h" #include "Tables.h" -#include "../ObjectList.h" +#include "../object/ObjectList.h" #include "../audio/audio.h" #include "../Cheats.h" @@ -44,7 +44,7 @@ #include "../localisation/localisation.h" #include "../management/Finance.h" #include "../management/Marketing.h" -#include "../object.h" +#include "../object/Object.h" #include "../object/ObjectManager.h" #include "../peep/Peep.h" #include "../peep/Staff.h" diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 768a295256..3d38f2c767 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -37,7 +37,7 @@ #include "../management/Marketing.h" #include "../management/NewsItem.h" #include "../management/Research.h" -#include "../object.h" +#include "../object/Object.h" #include "../OpenRCT2.h" #include "../peep/Staff.h" #include "../ride/Ride.h" diff --git a/src/openrct2/rct2/S6Exporter.h b/src/openrct2/rct2/S6Exporter.h index 3767f5f5d9..632f545f80 100644 --- a/src/openrct2/rct2/S6Exporter.h +++ b/src/openrct2/rct2/S6Exporter.h @@ -24,7 +24,7 @@ #include "../common.h" #include "../scenario/scenario.h" -#include "../ObjectList.h" +#include "../object/ObjectList.h" interface IStream; struct ObjectRepositoryItem; diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index f0417caefc..4b89e43e98 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -33,7 +33,7 @@ #include "../management/Marketing.h" #include "../management/NewsItem.h" #include "../network/network.h" -#include "../ObjectList.h" +#include "../object/ObjectList.h" #include "../OpenRCT2.h" #include "../peep/Peep.h" #include "../peep/Staff.h" diff --git a/src/openrct2/ride/Track.h b/src/openrct2/ride/Track.h index 7d588c8089..5df17d8a1f 100644 --- a/src/openrct2/ride/Track.h +++ b/src/openrct2/ride/Track.h @@ -17,7 +17,7 @@ #pragma once #include "../common.h" -#include "../object.h" +#include "../object/Object.h" #include "Ride.h" #pragma pack(push, 1) diff --git a/src/openrct2/ride/TrackDesign.h b/src/openrct2/ride/TrackDesign.h index 0a5e38723e..0739f7c8f3 100644 --- a/src/openrct2/ride/TrackDesign.h +++ b/src/openrct2/ride/TrackDesign.h @@ -18,7 +18,7 @@ #define _TRACK_DESIGN_H_ #include "../common.h" -#include "../object.h" +#include "../object/Object.h" #include "../rct12.h" #include "../rct2.h" #include "../world/map.h" diff --git a/src/openrct2/scenario/scenario.c b/src/openrct2/scenario/scenario.c index 6aacf5eae5..33b5f7914c 100644 --- a/src/openrct2/scenario/scenario.c +++ b/src/openrct2/scenario/scenario.c @@ -28,8 +28,8 @@ #include "../management/NewsItem.h" #include "../management/Research.h" #include "../network/network.h" -#include "../object.h" -#include "../ObjectList.h" +#include "../object/Object.h" +#include "../object/ObjectList.h" #include "../OpenRCT2.h" #include "../ParkImporter.h" #include "../peep/Staff.h" diff --git a/src/openrct2/scenario/scenario.h b/src/openrct2/scenario/scenario.h index 8d65cddeac..075a2977e3 100644 --- a/src/openrct2/scenario/scenario.h +++ b/src/openrct2/scenario/scenario.h @@ -20,7 +20,7 @@ #include "../common.h" #include "../management/Finance.h" #include "../management/Research.h" -#include "../object.h" +#include "../object/Object.h" #include "../rct12.h" #include "../rct2.h" #include "../ride/Ride.h" diff --git a/src/openrct2/windows/_legacy.h b/src/openrct2/windows/_legacy.h index 71f6edf94b..e375880d85 100644 --- a/src/openrct2/windows/_legacy.h +++ b/src/openrct2/windows/_legacy.h @@ -14,7 +14,7 @@ *****************************************************************************/ #pragma endregion -#include "../object.h" +#include "../object/Object.h" #ifndef _LEGACY_H #define _LEGACY_H diff --git a/src/openrct2/world/MapGen.cpp b/src/openrct2/world/MapGen.cpp index e96ab20639..648f021f9a 100644 --- a/src/openrct2/world/MapGen.cpp +++ b/src/openrct2/world/MapGen.cpp @@ -26,7 +26,7 @@ #include "../Game.h" #include "../Imaging.h" #include "../localisation/string_ids.h" -#include "../object.h" +#include "../object/Object.h" #include "../platform/platform.h" #include "../util/Util.h" #include "map.h" diff --git a/src/openrct2/world/footpath.c b/src/openrct2/world/footpath.c index c9d1e0ea1c..dd5f805db7 100644 --- a/src/openrct2/world/footpath.c +++ b/src/openrct2/world/footpath.c @@ -18,7 +18,7 @@ #include "../Game.h" #include "../localisation/localisation.h" #include "../network/network.h" -#include "../ObjectList.h" +#include "../object/ObjectList.h" #include "../OpenRCT2.h" #include "../ride/Station.h" #include "../ride/Track.h" diff --git a/src/openrct2/world/footpath.h b/src/openrct2/world/footpath.h index 9d446ba6a9..a7e08bc9ac 100644 --- a/src/openrct2/world/footpath.h +++ b/src/openrct2/world/footpath.h @@ -19,7 +19,7 @@ #include "../common.h" #include "../interface/viewport.h" -#include "../object.h" +#include "../object/Object.h" enum { PROVISIONAL_PATH_FLAG_SHOW_ARROW = (1 << 0), diff --git a/src/openrct2/world/scenery.c b/src/openrct2/world/scenery.c index 62c8975362..37f7409dff 100644 --- a/src/openrct2/world/scenery.c +++ b/src/openrct2/world/scenery.c @@ -19,7 +19,7 @@ #include "../Game.h" #include "../localisation/localisation.h" #include "../network/network.h" -#include "../ObjectList.h" +#include "../object/ObjectList.h" #include "../scenario/scenario.h" #include "Climate.h" #include "footpath.h" diff --git a/src/openrct2/world/scenery.h b/src/openrct2/world/scenery.h index c308a93c71..9d99288910 100644 --- a/src/openrct2/world/scenery.h +++ b/src/openrct2/world/scenery.h @@ -18,7 +18,7 @@ #define _SCENERY_H_ #include "../common.h" -#include "../object.h" +#include "../object/Object.h" #include "../world/map.h" #define SCENERY_SMALL_SCENERY_ID_MIN 0x0 diff --git a/test/testpaint/compat.c b/test/testpaint/compat.c index 674b19dfc1..d6c1cc9479 100644 --- a/test/testpaint/compat.c +++ b/test/testpaint/compat.c @@ -15,7 +15,7 @@ #pragma endregion #include -#include +#include #include #include #include