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

103 Commits

Author SHA1 Message Date
Łukasz Pękalski
7648feeba2 Close #12427: Refactor OBJECT_TYPE to use strong enum 2020-11-11 16:07:01 +01:00
Łukasz Pękalski
dc93cacbee bugHunt: correcting code to compile
code does not compile yet
2020-11-11 16:07:01 +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
Łukasz Pękalski
6e5105ab3b refactor: ObjectType to use strong enum
enum renaming complete
2020-11-11 16:07:01 +01:00
Hielke Morsink
f0c1ea1d37 Split declarations and definitions to improve compile times when editing (#13332)
* Split FileStream declarations and definitions

* Split JobPool declarations and definitions

* Split StringBuilder declarations and definitions

* Split StringReader declarations and definitions

* Split ZoomLevel declarations and definitions

* Fix missing include in FileClassifier.cpp

* Remove pragma once from source files

* Fix missing include in StringBuilder.h

* Update Xcode project

* Fix compilation of tests

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-11-07 12:42:04 +00:00
Gymnasiast
880a267252 Implement @ZehMatt's suggestions 2020-11-06 14:33:16 +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
Gymnasiast
656cdda399 Add JSON identifier to object repository 2020-11-05 20:56:58 +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
Tom Parsons
c4ae579a84 Feature #11817: Show authors field in object selection (#12591)
* Feature #11817: Show authors field in object selection

- authors field in JSON shows as last line in bottom right on object selection
- authors field added to Object class
- ObjectFileIndex version bump as authors is serialised

* fix sign comparison warning

* Start object selection corner text higher to avoid overlap

* Use references to reduce unneccessary copies

* make GetAuthors const

* Clip drawing of authors string so it doesn't cross widgets

At max length the leftmost aligns exactly with description left

* Add a changelog message

* make SetAuthors use an rvalue reference

* remove unnecessary nullptr check
2020-08-09 06:23:28 +01:00
Matt
83355e35cc Move IStream, MemoryStream, FileStream into OpenRCT2 namespace 2020-08-05 16:29:36 +02:00
Gymnasiast
cf664c8340 Close #11971: Replace ride groups with new ride types 2020-07-17 00:19:49 +02:00
Michael Steenbeek
9ef8d6da42 Convert most remaining C-style casts to C++-style ones (#11867) 2020-06-07 23:18:11 +02:00
Ted John
46d69126ea Split identifier and legacyIdentifier on Object 2020-05-08 15:28:48 +01:00
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
Michael Steenbeek
13a2f67400 Fix #11208: Cannot export parks with RCT2 DLC objects (#11212)
* Do not try to export official objects

* Do not override legacy object's source games

* Amend changelog
2020-04-04 07:06:34 +01:00
Michael Steenbeek
18ebe73dfa Replace object_entry_get_type() with method (#10937) 2020-03-15 12:07:04 +01:00
Ted John
9562f42d91 Convert object filenames to UTF-8 when exporting 2020-01-11 23:59:38 +00:00
Tom Lankhorst
027c09553b Reformat code with clang-format 8.0. 2019-11-04 15:11:06 +01:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Michał Janiszewski
70ef8151fc Fix types passed to printf-like functions 2019-02-10 00:04:52 +01:00
Ted John
27f70e3656 Get basic object downloading working 2019-02-07 21:58:34 +00:00
Michał Janiszewski
23dc14b286 Improve checks for object files (#8417) 2018-12-11 19:35:27 +01: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
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
Gymnasiast
b257619418 Use vector for source games 2018-07-30 21:41:12 +02:00
Michael Steenbeek
2a64ec7aff Use sourceGame parameter in JSON files instead of originalId 2018-07-30 21:39:27 +02:00
Ted John
ec0d35bac7 Add new source field to ORI struct 2018-07-30 21:32:07 +02:00
Michael Steenbeek
5ce76e1603 Attempt at showing secondary source game 2018-07-30 21:28:55 +02:00
clang-format
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
95ce592579 Enforce not breaking before assignments and function names
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:19 +02:00
Hielke Morsink
fdc6e52da1 Correct formatting in files from network to paint 2018-07-23 16:00:15 +02:00
clang-format
a6a12af1ec clang-format object 2018-07-23 16:00:06 +02:00
Øystein Dale
34cf068650 Fix memory leak when deserialising objects
Assigning a pointer to std::string appears to only perform a copy and
does not transfer ownership of the pointer, thus the allocated memory is
will never be freed. Use IStream::ReadStdString instead to return a
std::string directly, thus transferring ownership correctly.
2018-07-18 00:07:48 +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
204dd4439b Mark unused arguments in the libopenrct2 project
For dummy classes and functions with empty bodies I've only commented out the arguments, for all others I used C++17's [[maybe_unused]].
2018-06-06 21:03:11 +02:00
Hielke Morsink
5d0022a5cb Remove argument list from zero-initializers with zero/false/nullptr value 2018-06-04 19:50:46 +02:00
Michał Janiszewski
debb6cd46c Remove declarations of unimplemented functions (#7615) 2018-06-02 13:51:23 +02:00
Ted John
58241d33fc Use constant for max ride categories 2018-05-15 12:08:44 +01:00
Ted John
6f00e6aafe Make ObjectRepositoryItem C++ 2018-05-15 00:36:35 +01:00
Ted John
4e86d18dad Support loading images from zip 2018-05-13 12:04:45 +01:00
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