Commit Graph

52 Commits

Author SHA1 Message Date
Ted John 80e0f990ab Fix remaining merge conflicts 2021-09-17 22:16:47 +01:00
Gymnasiast c390e9f521
Merge remote-tracking branch 'upstream/develop' into new-save-format
Some conflicts intentionally unresolved
2021-09-17 10:15:09 +02:00
Gymnasiast bdab3219cb
Modify object loading for JSON-only objects 2021-09-15 11:28:39 +02:00
ζeh Matt 5868071fbc
Merge pull request #15335 from ZehMatt/refactor/object-load
Fix ownership of loaded object data
2021-09-04 09:13:45 -07:00
ζeh Matt cf0425d953
Fix building 2021-09-03 14:45:48 +03:00
ζeh Matt a118b16912
Remove unused functions 2021-09-03 14:45:47 +03:00
Ted John 3c451a4af4
Use music objects instead of IDs 2021-09-01 10:26:23 +02:00
Gymnasiast 93c656f91d
Merge remote-tracking branch 'upstream/develop' into new-save-format 2021-08-29 15:39:42 +02:00
Hielke Morsink 956e77f4c3
Use [[nodiscard]] for allocator and RAII functions (#15244) 2021-08-23 20:09:43 +02:00
Ted John 977a703534 Remove find_object_in_entry_group 2021-04-14 11:24:24 +01:00
Ted John 0376d48cdb Fix object entry stuff 2021-04-13 21:46:08 +01:00
Ted John 082c373d69 Fix defaulting of music and entrance 2021-04-11 02:02:05 +01:00
Ted John fce02c21c3 Implement handling of new object types 2021-04-03 00:23:15 +01:00
Ted John 638bbebe59 Write new object identifiers to park file 2021-04-03 00:23:13 +01:00
Gymnasiast b3bbdcbfd5
Remove hardcoded terrain style constants from RCT1 and MapGen 2021-03-27 17:34:10 +01:00
Michael Steenbeek f0dc28e9fc
Update objects to v1.0.21 2021-03-12 11:04:04 +01:00
Łukasz Pękalski 832fd69822 refactor: changed ObjectType enum to strong enum
code does not compile yet
2020-11-11 16:07:01 +01:00
Gymnasiast ce15e20c94
Use plain std::string_view instead of const & 2020-11-06 11:40:52 +01:00
Gymnasiast bafafa6805
Create functions to load objects by JSON id 2020-11-05 21:24:43 +01:00
Haven Kim 8a4df108ba
Close #12428: Refactor OBJECT_SOURCE_GAME to use strong enum 2020-10-17 22:27:02 +02:00
Vinicius Sa 711dd00cde
Close #13000: Refactor ObjectFactory to use unique_ptr
Employs the smart pointer unique_ptr for safer memory management.

Classes involved:
 - ObjectRepository
 - ObjectManager
2020-10-14 21:56:48 +02:00
Matt 0dc43d66e4 Remove the use of INTERFACE macro and macro its self 2020-08-05 16:30:44 +02:00
Matt 30376085cf Include missing headers 2020-08-05 16:29:29 +02:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
frutiemax 77d02c5e2b
Close #12290: Refactor of object_manager_unload_objects (#12291) 2020-07-17 05:25:35 +01:00
rdbaris a2493af9ce
Part of #11159 (purge malloc() & free()) (#11893)
* Used smart pointers

* Changed functions to take vector as input
2020-07-16 22:35:30 +01: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
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Matt 837c0a9e7f Use std::unique_ptr for ObjectManager and ObjectRepository 2018-08-31 07:18:49 +02:00
Michael Steenbeek 2a64ec7aff Use sourceGame parameter in JSON files instead of originalId 2018-07-30 21:39:27 +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
Ted John fbe0f5d04f Throw object load exception if unable to load any objects 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 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
Ted John 51321a71e7 Get entries directly from object manager 2018-02-12 12:48:41 +00:00
Gymnasiast 34a6b5ef92 Remove __cplusplus ifdefs 2018-02-05 16:20:15 +01:00
Gymnasiast 778ba466c5 Remove almost every extern C block 2018-02-05 16:20:15 +01:00
Michael Steenbeek 347ff702d0 Refactor objects 2018-01-03 10:16:51 +01:00
Michał Janiszewski 00fd18809c Move extern "C" {} blocks to headers (#6282) 2017-09-18 17:05:28 +02:00
Michał Janiszewski 32407868cc Fix C mangling 2017-08-10 13:42:27 +02:00
Richard Jenkins fab8efbe2a Implement #5855: Display source game in missing obj window 2017-07-19 11:04:00 +02:00
Ted John ddb96ec267 Refactor load park result
Use a C++ struct and pass that to C.
2017-07-01 01:29:35 +01:00
rwjuk 214bf3988b Implement 'missing objects' window
Implement 'missing objects' window

Basic implementation of 'bad objects' window

Add new object_load_error.c

Add object_load_error.c

Faffing about

String stuff

Stuff

Get window basically displaying

Proper col header for object

Display object types

Display file name and explanatory message

Probably about time I added myself to the dev list

Cleanup and comments

Make bad object window work with SC6

Fix whitespace, string IDs, flip core function sense

Fix spacing in string_ids.h

Fix string ID snafu

Fix HasNoInvalidObjects() sense

Attempt to refactor this to pass data properly

Move typedefs to separate header

Fix up signatures

Add park_load_result_types.h

Clean up includes and remnants of prev implementation

Split duplication into function, free invalid entries list on close

Use pointer for object_validity_result param

Fixup string IDs

Use LoadObject() directly

Use dependency injection, fix string termination

Xcode fix, make helper function static

Fix buffer overrun and memory leak

Use SDL for clipboard functionality

Fix function & variable declarations

Rework editor_read_s6() to use new park load result type

Update changelog for #5624

[ci skip]

Fix mem leak, function signature and whitespace
2017-07-01 01:28:51 +01:00
Ted John 3003393c87 Allow re-creation of object manager
Removing lazy initialisation of it.
2017-06-24 09:56:51 +02: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