1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 08:12:53 +01:00
Commit Graph

46 Commits

Author SHA1 Message Date
Ted John
28f4ec2b43 Implement code review suggestions 2021-01-27 18:45:28 +00:00
Ted John
d9b8413ec4 Use IStream for zip streaming 2021-01-27 18:45:27 +00:00
Ted John
2f39442d25 Implement ride music objects and refactor 2021-01-27 18:45:27 +00:00
skdltmxn
7ef4d7762f Refactor to avoid unnecessary copies (#13736)
* Refactor to avoid unnecessary copies

* Fix dangling references
2021-01-11 18:14:15 -03:00
skdltmxn
c093a50f3f Refactor to use string_view more properly 2021-01-07 01:52:10 +09:00
Łukasz Pękalski
fc4ad82ac1 resolve: integrated changes from comments 2020-11-11 16:08:39 +01:00
Łukasz Pękalski
6e5105ab3b refactor: ObjectType to use strong enum
enum renaming complete
2020-11-11 16:07:01 +01:00
Haven Kim
8a4df108ba Close #12428: Refactor OBJECT_SOURCE_GAME to use strong enum 2020-10-17 22:27:02 +02:00
Simon Jarrett
5f17554c25 Refactor ObjectJsonHelpers
Move functions in ObjectJsonHelpers to their relevant namespaces and classes
- Move ParseColour to Colour::FromString
- Move ParseCursor to Cursor::FromString
- Move LoadStrings to StringTable::ReadJson
- Move LoadImages to ImageTable::ReadJson
- Move ParseObjectEntry to Object::ParseObjectEntry
- Move GetString, etc. to Json::GetString, etc.
- Delete ObjectJsonHelpers .cpp and .h files
2020-09-16 20:18:53 +01:00
Łukasz Pękalski
bfdc1f6d2a Close #12430: Refactor OBJ_STRING_ID to use strong enum (#12796) 2020-08-28 23:36:58 -03: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
Ted John
46d69126ea Split identifier and legacyIdentifier on Object 2020-05-08 15:28:48 +01: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
Gymnasiast
459a0318cf Implement review requests 2020-03-18 16:22:08 +01:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Ted John
06f203a7e7 Implement surfaces, edges and stations as objects 2018-12-09 23:30:40 +00:00
Gymnasiast
c879bb5708 Modify SetSourceGames signature 2018-07-30 21:41: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
Michael Steenbeek
7f1960d375 Remove old source game tables 2018-07-30 21:22:32 +02:00
clang-format
d787872cbe Indent preprocessor directives 2018-07-23 16:00:23 +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
7075f6ca25 Use correct language for scan-objects 2018-05-11 20:39:00 +01:00
Ted John
ec446ac9d6 Return image and string table by reference 2018-03-26 21:37:23 +02:00
Gymnasiast
431c2a4e74 Temporarily fix #7173: cannot load saves into vanilla 2018-02-14 09:26:59 +01:00
Ted John
0c71855769 Replace Memory::Copy with std::copy 2018-02-04 12:40:24 +00:00
Gymnasiast
4f647c24da Fix mistake in RCT1 object list [ci skip] 2018-01-31 22:09:12 +01: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
2e79aaf54c Fold vehicle name into regular name 2017-12-22 15:28:41 +01:00
Ted John
31e112cf3b Use std::string for objects 2017-12-14 14:38:14 +01:00
Michael Steenbeek
57a2612365 Fix scenery group assignment race conditions
When adding entries to scenery groups by hand, like we do for a lot of ToonTowner's stuff, it currently tries to get the loaded scenery group. If this happens not to be loaded at that time, this will fail.
Instead, hardcode the headers - that's how object .DATs do this anyway.
2017-12-01 11:54:25 +01:00
Michał Janiszewski
65c21db2fc Make GCC aware Object class is not final (#6726)
* GCC suddenly decided `Object` should be marked as `final`, however it is
used as a base class for more specific types that inherit from it.

* Also ignore -Wsuggest-final-methods for Object class

* Guard Object::GetName from being final
2017-11-23 10:14:28 +01:00
Michael Steenbeek
430d95bd95 Fix vehicle name fallback 2017-11-22 18:15:07 +01:00
Michael Steenbeek
c1400a12eb Allow separate ride and vehicle names per ride entry 2017-11-21 18:55:42 +01:00
Michał Janiszewski
8fd2266bda Refactor includes (#6512)
* Refactor Intent.h inclusion

* Use forward declaration of ITcpSocket

* Remove unused include

* Forward declare rct_ride_entry

* Remove unused headers

* Forward-declare rct_drawpixelinfo

* Remove unused headers

* Lower header include from header to source file

* Reduce included headers

* Reduce includes
2017-10-19 10:01:05 +02:00
Michał Janiszewski
00fd18809c Move extern "C" {} blocks to headers (#6282) 2017-09-18 17:05:28 +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
Ted John
25bc798ff8 Move contents of src into project sub directory 2017-01-04 17:44:12 +00:00