Commit Graph
61 Commits
Author SHA1 Message Date
Michał Janiszewski 2323cc1596 Use named casts instead of old-style casts
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00
Ted John b9e85f6b90 Fix #11259: Custom JSON object breaks saves (#11356)
Do not attempt to pack JSON objects into S6 files.
2020-04-19 14:18:12 +02:00
Michael Steenbeek c519512cfe Create ObjectEntryIndex (#10980) 2020-03-20 19:28:39 +01:00
Ted John c89cecb2b5 Refactor the ride type to entry map (#10967)
Use C++ vectors and allow larger ride entry indices (> 256)
2020-03-20 18:07:31 +01:00
Michael Steenbeek d86dce17e8 Prepare object indices for uint16_t (part 2) (#10966) 2020-03-18 21:27:53 +01:00
Michael Steenbeek 18ebe73dfa Replace object_entry_get_type() with method (#10937) 2020-03-15 12:07:04 +01:00
Michael Steenbeek 42a1a8704d Use empty() for vectors; clean up bool comparisons (#9118) 2019-04-20 20:39:47 +02:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Ted John 85b443fc15 Fix #8411: Save game failed!
Do not try to pack our new object types (stations and surfaces) into saved games.
2018-12-10 15:14:50 +00:00
Ted John 06f203a7e7 Implement surfaces, edges and stations as objects 2018-12-09 23:30:40 +00:00
Matt 837c0a9e7f Use std::unique_ptr for ObjectManager and ObjectRepository 2018-08-31 07:18:49 +02:00
Matt 04928d4b84 Refactor reference over std::shared_ptr. 2018-08-31 07:18:48 +02:00
Michael Steenbeek 5cd4057c76 Remove remnants of STEX support 2018-08-29 23:29:45 +02:00
Michael Steenbeek 2a64ec7aff Use sourceGame parameter in JSON files instead of originalId 2018-07-30 21:39:27 +02:00
clang-formatandHielke Morsink 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
clang-format a6a12af1ec clang-format object 2018-07-23 16:00:06 +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
Hielke Morsink 5d0022a5cb Remove argument list from zero-initializers with zero/false/nullptr value 2018-06-04 19:50:46 +02:00
Ted John 376b6d04d8 Fix Linux builds 2018-05-29 18:39:13 +01:00
Ted John 3a708ea112 Refactor parallelism to re-usable method 2018-05-29 18:39:12 +01:00
Ted John 1766abde91 Multi-thread object loading 2018-05-29 18:39:12 +01:00
Ted John fbe0f5d04f Throw object load exception if unable to load any objects 2018-05-29 18:39:12 +01:00
Ted John 6af0cb2b88 Fix import of S4 and S6 2018-05-29 18:39:12 +01:00
Ted John f8271e93b0 Refactor code base to allow easy addition of new object types 2018-05-15 00:32:36 +01:00
Ted John d7e93cec27 Prevent use of Context during ~Context 2018-05-13 00:43:56 +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 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 8e37ee26c9 Avoid warning spam during park entrance drawing 2018-03-13 20:48:16 +01:00
Ted John 0433803ae1 Use std::vector for ObjectManager 2018-02-12 17:15:15 +00:00
Ted John 7e01dcdaaf Remove legacy object list 2018-02-12 12:48:41 +00:00
Ted John 51321a71e7 Get entries directly from object manager 2018-02-12 12:48:41 +00:00
Ted John d22572d0b9 Remove rct_object_entry_extended 2018-02-12 12:48:41 +00:00
Ted John 4d8fe051e8 Remove most usages of object_entry_groups 2018-02-12 12:48:41 +00:00
Gymnasiast 3261753510 Ignore missing STEX entries 2018-02-09 13:47:15 +01: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
Ted John 7851446a6f Replace Memory::Set with std::fill or similar 2018-02-04 12:35:02 +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
Michael Steenbeek 347ff702d0 Refactor objects 2018-01-03 10:16:51 +01:00
Michael Steenbeek 6dc49d643a Compile files in base dir as C++ 2017-12-13 08:03:48 +01:00
Michael Steenbeek bf69b2e682 Make terminology use more consistent 2017-11-20 11:20:04 +01:00
Christian F. Coors 06afeeda9a Apply some refactoring 2017-11-02 12:22:28 +01:00
Tomas Dittmann e393ff1f22 Stop using (void*)-1 for invalid pointers 2017-10-15 15:53:16 +02:00
Michał Janiszewski 00fd18809c Move extern "C" {} blocks to headers (#6282) 2017-09-18 17:05:28 +02:00
Ted John f2cd0b2f3b Refactor ObjectRepository to use FileIndex 2017-08-30 21:58:43 +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
Richard Jenkins fab8efbe2a Implement #5855: Display source game in missing obj window 2017-07-19 11:04:00 +02:00