Commit Graph

13 Commits

Author SHA1 Message Date
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
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
Michał Janiszewski 9e1dfffee8 Remove unnecessary checks for __cplusplus 2018-03-14 22:11:30 +01:00
Hielke Morsink 55979a3fff Remove and replace C typedefs
`typedef struct/union/enum name { ... } name_again;` is not needed whe compiling C++, moving the name at the back to be in front of the object and removing `typedef` makes it usable the very same way.
This also replaces typedefs with the using keyword. They have better readability, especially for function pointer types, and would allow more flexibility when used with templates.
2018-02-14 09:42:26 +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 4224193d68 Clean up ride groups 2017-10-06 10:29:24 +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
Ted John 11477c5869 Refactor more of TrackDesignRepository to std::string 2017-01-05 17:51:31 +00:00
Ted John 25bc798ff8 Move contents of src into project sub directory 2017-01-04 17:44:12 +00:00
Renamed from src/ride/TrackDesignRepository.h (Browse further)