1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00
Commit Graph

61 Commits

Author SHA1 Message Date
duncanspumpkin
60729113d9 Simplify Serialise for FileIndex 2020-12-07 07:52:12 +00:00
Hielke Morsink
f0c1ea1d37 Split declarations and definitions to improve compile times when editing (#13332)
* Split FileStream declarations and definitions

* Split JobPool declarations and definitions

* Split StringBuilder declarations and definitions

* Split StringReader declarations and definitions

* Split ZoomLevel declarations and definitions

* Fix missing include in FileClassifier.cpp

* Remove pragma once from source files

* Fix missing include in StringBuilder.h

* Update Xcode project

* Fix compilation of tests

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-11-07 12:42:04 +00:00
Gymnasiast
bafafa6805 Create functions to load objects by JSON id 2020-11-05 21:24:43 +01:00
Tulio Leao
e53cde1d5d Fix #6086: Cannot install existing track design with another name (#13082) 2020-10-06 08:27:38 -03:00
Michael Steenbeek
e5ec74feaf Fix #12918: Cannot place "Blue Hurricane" (hypercoaster) (#12982)
The track design was recognised as a Corkscrew RC, not as a Hypercoaster. Moved the conversion code from the track design repository to the TD6Importer (where it should have been, really).

This also fixes the issue that Hypercoasters, Monster Trucks, Classic Mini Roller Coasters, Spinning Wild Mouses and Hyper-Twisters placed from a track design have the wrong ride type.
2020-09-21 22:42:25 +02:00
Tulio Leao
bf0c4c4f0e Fix #12533: Track designs list does not use natural sorting (#12537) 2020-08-03 20:42:54 -03:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Gymnasiast
742ae947c7 Add null checks throughout 2020-07-17 00:32:47 +02:00
Gymnasiast
f596d8de58 Limit track design object lookup to ride types where it's needed 2020-07-17 00:19:49 +02:00
Gymnasiast
c6f0bb92a8 Add mutex during track design cache creation 2020-07-17 00:19:49 +02:00
Gymnasiast
cf664c8340 Close #11971: Replace ride groups with new ride types 2020-07-17 00:19:49 +02:00
Gymnasiast
5d3bf2be20 Move category to RTD; move RideTypeIsIndependent to a flag 2020-04-18 15:22:41 +02:00
Michael Steenbeek
86c7dbf1d5 Fix #7854: Cannot build custom Spiral RC; dummy entries in track designs list (#10814) 2020-02-22 19:06:57 +01:00
Tom Lankhorst
027c09553b Reformat code with clang-format 8.0. 2019-11-04 15:11:06 +01:00
duncanspumpkin
e3c63b762e Create new TrackDesign format 2019-08-09 20:39:53 +01:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Matt
04928d4b84 Refactor reference over std::shared_ptr. 2018-08-31 07:18:48 +02:00
clang-format
b02dfdbc93 Binpack function arguments together
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:22 +02:00
Hielke Morsink
7c6002cb26 Correct formatting in remaining files in libopenrct2 2018-07-23 16:00:17 +02:00
clang-format
e8310d079d clang-format ride 2018-07-23 16:00:09 +02:00
Michael Steenbeek
1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Hielke Morsink
0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Michał Janiszewski
1d28826b79 Fix -Wdocumentation and add it to default warnings 2018-06-11 09:52:54 +02:00
Aaron van Geffen
829ac11bec Merge pull request #7519 from IntelOrca/refactor/new-object-types-prep
Refactor code around object types
2018-05-15 15:10:16 +02:00
Hielke Morsink
6c65c3d64d Merge pull request #6774 from janisozaur/fixes
Various code improvements
2018-05-15 14:38:43 +02:00
Ted John
6f00e6aafe Make ObjectRepositoryItem C++ 2018-05-15 00:36:35 +01:00
Ted John
529c744276 Use unique_ptr and shared_ptr for services in Context 2018-05-13 00:43:50 +01:00
Hielke Morsink
f9dd981234 Further fixes
- Use `= 0` for initializing types
- Add default values to some structs, instead of zero-initializing their instances with `{}`
- Use `std::make_unique` in Network.cpp
- Remove trivial constructors and destructors
- Improve readability of expression in Vehicle.cpp
2018-05-12 16:58:08 +02:00
Ted John
302fe00805 Always pass shared_ptr by reference 2018-05-11 20:39:00 +01:00
Ted John
7075f6ca25 Use correct language for scan-objects 2018-05-11 20:39:00 +01:00
Ted John
35df72e61f Remove use of gCurrentLanguage 2018-05-11 20:39:00 +01:00
Ted John
7dc170ef85 Use shared_ptr for long-life objects
Use unique_ptr and shared_ptr for IContext, IPlatformEnvironment, IUiContext, and IAudioContext.
2018-05-11 20:37:48 +01:00
Michał Janiszewski
0a92e74ced Minor fixes 2018-05-11 15:38:30 +02:00
Michael Steenbeek
907d318e1c Make Ride Groups more C++-like 2018-05-07 20:18:06 +02:00
Hielke Morsink
dc673a64d8 Give context the ownership of repositories and the object manager (#7340)
This makes them no longer a singleton, which fixes annoying behaviour when launching multiple contexts in one game session.
2018-04-10 13:19:23 +01:00
Gymnasiast
778ba466c5 Remove almost every extern C block 2018-02-05 16:20:15 +01:00
Ted John
ba5bc415c7 Refactor memory handling in window sources 2018-01-21 11:17:40 +00:00
Michael Steenbeek
e3c52360db Remove most usages of separate flag
This removes most usages of the separate flag, instead relying on ride groups to do its job.
Research is more complicated and will follow in another commit.
2017-12-08 10:28:29 +01:00
Michael Steenbeek
d88c01de74 Split Steel Wild Mouse and Spinning Wild Mouse when using Ride Groups
Includes a little cleanup for the Ride Groups and a fix in the table with available pieces, which erroneously listed banked pieces as available.
2017-11-23 16:00:58 +01:00
Christian F. Coors
06afeeda9a Apply some refactoring 2017-11-02 12:22:28 +01:00
Michael Steenbeek
4224193d68 Clean up ride groups 2017-10-06 10:29:24 +02:00
Michał Janiszewski
00fd18809c Move extern "C" {} blocks to headers (#6282) 2017-09-18 17:05:28 +02:00
Michael Steenbeek
ddb557a0fe Fix TD4 vehicle colour import, move track_design to C++ 2017-09-01 13:38:21 +02:00
Ted John
f2cd0b2f3b Refactor ObjectRepository to use FileIndex 2017-08-30 21:58:43 +01:00
Ted John
8808444562 Refactor TrackDesignRepository to use FileIndex 2017-08-30 21:01:07 +01:00
Michał Janiszewski
d698ad1100 Convert NULL -> nullptr in C++ 2017-08-15 11:51:56 +02:00
Ted John
8b2eb8a13e Move screen variables to OpenRCT2.h 2017-07-29 20:29:29 +01:00
Ted John
2eb9657781 Fix premature deletion of dependencies (#5952)
In particular, the object repository can potentially be deleted before the object manager is deleted. This causes a crash when the object manager is deleted because it requires the object repository within the destructor.
2017-07-20 17:44:31 +01:00
Gymnasiast
c9b5ec4172 Guard against NULL ObjectRepositoryItem, fixes #5614 2017-06-24 17:45:04 +02:00
Michael Steenbeek
96a7a8ab50 Sort rides into ride groups when in select-by-track-type mode
* Add ride groups

* Convert ride groups to C++

* Fix linking and crashes in Xcode

* Comment out .field syntax to make Visual Studio happy

* Fix alignment, fix changelog, cleanup

* Properly save ride group index in the ride object repository and bump its version

* Fix fallback behaviour when the ride entry is not available or not invented

* Fix include

* Rename RideGroup to RideGroupManager, add const, cleanup

* Break after finding matching ride group
2017-06-14 13:31:27 +02:00