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
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