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

57 Commits

Author SHA1 Message Date
Ted John
9aef466b9b Fix bugs with zip and object manager changes 2018-05-13 11: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
Ted John
302fe00805 Always pass shared_ptr by reference 2018-05-11 20:39:00 +01:00
Ted John
d1cbf998a0 Do not return shared_ptr for LocalisationService
GetLocalisationService is currently used a lot, so remove overhead of shared_ptr copy.
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
Ted John
edb9dc39ab Pass object repository as a dependency when loading objects 2018-04-19 23:51:05 +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
Ted John
dfa40ccd46 Read objects from OpenRCT2 data instead of RCT2 2018-03-26 21:38:09 +02:00
Ted John
f6a6169ca2 Don't report object conflicts 2018-03-26 21:37:23 +02:00
Ted John
5eba067aba Load images from OBJDATA DATs 2018-03-26 21:35:44 +02:00
Ted John
a1f360ab7d Spike 1: Add RCT1 toilets JSON 2018-03-26 21:35:43 +02:00
Michael Steenbeek
a408747c4c Use object_entry_get_type() throughout 2018-02-13 16:42:18 +01:00
Ted John
928ae3b4cd Fix mistake in ObjectRepository::Create
Objects that could not be loaded were being returned with a success status causing blanks in the index file.
2018-02-12 21:22:27 +00:00
Gymnasiast
b1ab852fb7 Add object_entry_get_type() 2018-02-09 13:47:15 +01:00
Gymnasiast
778ba466c5 Remove almost every extern C block 2018-02-05 16:20:15 +01:00
Ted John
0c71855769 Replace Memory::Copy with std::copy 2018-02-04 12:40:24 +00:00
Michael Steenbeek
b4018d398c Add more object source filters 2018-01-31 13:07:20 +01:00
Michael Steenbeek
755add6c9a Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Ted John
02c58a6c5a Remove custom base Exception class 2018-01-05 18:11:47 +00:00
Michał Janiszewski
4d0c88fb94 Mark constructors explicit (#6928) 2018-01-04 01:12:34 +00:00
Michael Steenbeek
347ff702d0 Refactor objects 2018-01-03 10:16:51 +01:00
Hielke Morsink
3770b46e46 Replace 1 and 0 constants with bool where applicable 2017-12-21 23:47:30 +01:00
Hielke Morsink
628039dd8a Use range-based for loops in libopenrct2 2017-12-21 23:47:30 +01:00
Ted John
31e112cf3b Use std::string for objects 2017-12-14 14:38:14 +01:00
Michael Steenbeek
1a9975d683 Compile util and cheats as C++ 2017-12-14 10:03:21 +01:00
Michael Steenbeek
6dc49d643a Compile files in base dir as C++ 2017-12-13 08:03:48 +01:00
Hielke Morsink
79aa4a99cf Use range-based for loops 2017-12-08 11:06:43 +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
Michael Steenbeek
bf69b2e682 Make terminology use more consistent 2017-11-20 11:20:04 +01:00
Ted John
8d1710d798 Fix #6460: Crash when reading corrupt object files
- Move sawyer coding functions to SawyerChunkReader.
- Replace assertions with exceptions to prevent crash on invalid chunks.
2017-10-22 16:21:13 +02:00
Gymnasiast
6c9e73bff2 Allow loading objects from RCTC
These are technically same as those from RCT2, but with a .POB extension, rather than .DAT
2017-09-28 21:42:58 +02:00
Michał Janiszewski
00fd18809c Move extern "C" {} blocks to headers (#6282) 2017-09-18 17:05:28 +02:00
Ted John
50735c0f68 Do not log 0 conflicts 2017-08-31 18:02:39 +01:00
Ted John
f371d5c65f Remove unnecessary fields in ObjectRepository 2017-08-30 22:05:12 +01:00
Ted John
f2cd0b2f3b Refactor ObjectRepository to use FileIndex 2017-08-30 21:58:43 +01: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
Ted John
f515314a2d Only warn if object export can not fix checksum 2017-06-30 22:25:27 +01:00
Ted John
b9e9ddfc1c Use more dependency injection 2017-06-24 09:56:51 +02:00
Gymnasiast
4059d9e8a7 Clean up boosters, ride_type_null, max rides per entry, formatting 2017-06-14 16:06:43 +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
Ted John
1e9f9790ae Fix #5496: Attempting to log into servers results in crash
Caused by the user not having the required 'official' objects. This was because the network was being closed during a network update. Disposed memory would then be accessed later in the update loop.

To fix this, a lock has been added to Close() so that it can be deferred to the end of Update(). This isn't particularly nice, but the whole of network will need redesigning to fix this properly for all potentical scenarios where Close() can be called.
2017-06-06 20:05:47 +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
0ad94f92e3 Replace Stopwatch with chrono 2017-05-04 17:28:37 +01:00
Ted John
fb2c835d52 Include new config header 2017-02-18 15:45:10 +00:00
Ted John
2518362112 Use streams for SV6 export 2017-02-05 15:45:23 +00:00
Ted John
5eee31f69a Use SawyerChunkReader instead of SawyerEncoding 2017-02-05 12:18:07 +00:00