Commit Graph

45 Commits

Author SHA1 Message Date
Matthias Moninger 7b61c6352a
Desnake some stuff, small string passing cleanup (#19388)
* Rename scenario_index_entry to ScenarioIndexEntry

* Desnake members of ScenarioIndexEntry

* Pass const u8string& instead of utf8 pointer
2023-02-13 20:30:16 +00:00
James103 73738bbdc8
Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
73 b9e677945d
Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Gymnasiast 624d6ee752
Remove UnsupportedRCTCFlagException 2022-08-31 22:44:12 +02:00
Ted John 65878dda81 Warn or error if incompatible park version is loaded 2022-04-23 14:45:40 +01:00
Hielke Morsink 2bb9dbe8c1
Fix: Title Sequence cannot load .park files 2022-01-09 21:48:11 +01:00
IntelOrca 34128dc262
Add new .park save format
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
Co-authored-by: duncanspumpkin <duncanspumpkin@users.noreply.github.com>
Co-authored-by: ZehMatt <Zehmatt@users.noreply.github.com>
Co-authored-by: Broxzier <Broxzier@users.noreply.github.com>
2021-11-21 22:43:22 +01:00
Gymnasiast bdab3219cb
Modify object loading for JSON-only objects 2021-09-15 11:28:39 +02:00
Hielke Morsink 956e77f4c3
Use [[nodiscard]] for allocator and RAII functions (#15244) 2021-08-23 20:09:43 +02: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
Duncan dcabc8451e
Fix #13250: Crash when opening parks with new ride types (#13256)
This only happens when a new ride type is added and the park is opened in the older version of the game where the ride type does not exist.

Reworked so that invalid rides are not loadable. Force reload of title if current scenario is corrupted.
2020-11-01 14:49:43 +01:00
Matt 0dc43d66e4 Remove the use of INTERFACE macro and macro its self 2020-08-05 16:30:44 +02:00
Matt 83355e35cc Move IStream, MemoryStream, FileStream into OpenRCT2 namespace 2020-08-05 16:29:36 +02:00
Matt 30376085cf Include missing headers 2020-08-05 16:29:29 +02:00
Tom Parsons 58240cf1ad
Close #12459: Remove unused enum PARK_LOAD_ERROR (#12590)
* Remove unused enum PARK_LOAD_ERROR

A refactoring a couple of years ago removed all uses so it
can safely be removed.

Closes #12459

* Also fix header order for clang-format
2020-08-04 23:26:59 -03:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Breno Rodrigues Guimarães 10ab9e4528
Make ParkLoadResult move friendly (#11297)
This patch changes the member of ParkLoadResult to not be const. Const members cannot be moved so trying to move ParkLoadResult actually causes a copy.
It also adds std::move to move the parameter to the member, otherwise a copy happens.

See: https://godbolt.org/z/L4Wakb
2020-04-16 13:13:13 +02:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Matt ccf12befd5 Formating. 2018-08-31 07:18:51 +02:00
Matt 8c6f6a18ab Remove unused passing of object manager. 2018-08-31 07:18:50 +02:00
Matt 04928d4b84 Refactor reference over std::shared_ptr. 2018-08-31 07:18:48 +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
clang-format c57bbca827 clang-format root 2018-07-23 16:00:14 +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 f5e77a9e15 Load objects for title editor and scenario editor 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 96a0a22cd1 Make start on loading objects only once 2018-05-29 18:39:12 +01:00
Ted John 529c744276 Use unique_ptr and shared_ptr for services in Context 2018-05-13 00:43:50 +01:00
Michał Janiszewski 764520076f
Reduce header inclusion
* Update includes in PlatformEnvironment.cpp

* Update includes in ParkImporter.h

* Update includes of OpenRCT2.h

* Update includes in Intro.h

* Remove unused include from Input.cpp

* Update includes of Imaging.h

* Update includes in Game.h

* Update includes in Editor.h

* Update includes of Context.cpp

* Update includes in Cheats.cpp, CmdlineSprite.cpp

* Update includes of some source files

* Update includes in some cpp files

* Update includes in some cpp files

* Update includes in TextureCache.h

* Fix tests

* Update includes in Font.cpp

* Update includes in LightFX files

* Update some includes

* Fix GCC builds

* Update some includes

* Update some includes

* Update includes in FontsFamilies.*

* Update includes of Console.h

* Improve includes in Window.h

* Improve headers in Viewport.h/Window.h

* Fix MSVC build

* Fix network-less builds

* Reduce inclusion of Map.h
2018-03-13 13:14:02 +01:00
Hielke Morsink 55979a3fff Remove and replace C typedefs
`typedef struct/union/enum name { ... } name_again;` is not needed whe compiling C++, moving the name at the back to be in front of the object and removing `typedef` makes it usable the very same way.
This also replaces typedefs with the using keyword. They have better readability, especially for function pointer types, and would allow more flexibility when used with templates.
2018-02-14 09:42:26 +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
Christian F. Coors 06afeeda9a Apply some refactoring 2017-11-02 12:22:28 +01:00
Michael Steenbeek 3d8ec4e393 Warn when loading incompatible RCTC saves 2017-11-01 20:23:06 +01:00
Martin Müller e38a77da2a Set gScenarioFileName when loading an RCT1 park
This fixes bugs when completing an RCT1 scenario, where the highscore
would be saved for the wrong park because gScenarioFileName hasn't been updated on load.
2017-09-26 15:53:06 +02:00
Michał Janiszewski 00fd18809c Move extern "C" {} blocks to headers (#6282) 2017-09-18 17:05:28 +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 ab38c07fb9 Make object window work with S4s and scenarios 2017-07-01 01:29:34 +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 b9e9ddfc1c Use more dependency injection 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
Ted John fed4c248e3 Remove use of SDL RWOps from title sequence player 2017-02-02 22:00:01 +00:00
Ted John 5d7a712672 Use new S6 importer for title screen and fix issues 2017-02-02 22:00:01 +00:00
Ted John 5c1f2f4c43 Replace IS4Importer with IParkImporter 2017-02-02 22:00:01 +00:00
Renamed from src/openrct2/rct1/S4Importer.h (Browse further)