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

49 Commits

Author SHA1 Message Date
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
Ted John
0d8f9d6618 Refactor IPlatformEnvironment (#5590) 2017-06-11 12:53:37 +01:00
Michał Janiszewski
79d76759bb Fix #5516: Update copyrights for 2017
Not all files were necessarily _changed_, but all were touched, see
https://github.com/OpenRCT2/OpenRCT2/pull/4932
2017-06-01 21:55:10 +02:00
Gymnasiast
ab75b8db84 Properly check separate flags when scanning objects and building track list, fixes #3681 2017-05-21 12:19:42 +02:00
Raphael Setin
984ff6dc47 Read until first dot when converting track file name to in-game name, fixes #5077
This commit addresses the bug of Goliath.1 track. The track name will be everything that is written in the file name of that track, until the first dot.
2017-04-23 16:42:08 +02:00
Michał Janiszewski
0a36af19e4 Mark classes as final to help devirtualisation 2017-01-13 12:12:50 +01:00
Ted John
60cb84fd9d Handle nullptr for object when getting track designs 2017-01-05 18:19:20 +00:00
Ted John
e1ace9528d Use std::string for File and FileScanner 2017-01-05 18:19:01 +00:00
Ted John
11477c5869 Refactor more of TrackDesignRepository to std::string 2017-01-05 17:51:31 +00:00
Ted John
be035dcdb2 Refactor various methods to use std::string 2017-01-05 13:13:22 +00:00
Ted John
f201a8b43a Refactor TrackDesignRepository.cpp 2017-01-05 12:55:41 +00:00
Ted John
25bc798ff8 Move contents of src into project sub directory 2017-01-04 17:44:12 +00:00