Commit Graph

78 Commits

Author SHA1 Message Date
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
Hielke Morsink a258008bef
Refactor window functions to take references 4 2022-07-31 17:23:16 +02:00
duncanspumpkin 7e7947fe8b Move legacy identifier interpreting to separate file from parkfile 2021-12-15 21:29:02 +00:00
ζeh Matt 56e78d5733
Merge pull request #15985 from ZehMatt/refactor/entities2
Refactor Sprite to Entity
2021-11-25 12:53:50 -08:00
ζeh Matt 03fb9b390f
Rename Sprite to EntityRegistry 2021-11-24 17:04:12 +02:00
ζeh Matt 7c726e2a0c
Fix includes 2021-11-24 16:48:33 +02:00
ζeh Matt c6242fd310
More renaming 2021-11-24 15:50:18 +02:00
ζeh Matt 83b911b193
#15634: Refactor passing GameActions::Result by copy (#15951)
* Refactor to result GameActions::Result as copy instead of unique_ptr

* Remove alias GameActions::Result::Ptr

* Remove MakeResult wrapper

* Remove type forwarder in TileInspector
2021-11-24 07:35:08 +00: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
Hielke Morsink 53c22c9b4b
Check for nullptr explicitly (#15458) 2021-09-24 20:05:50 +02:00
Gymnasiast bdab3219cb
Modify object loading for JSON-only objects 2021-09-15 11:28:39 +02:00
Michael Steenbeek 624a32e93b
Make Coords isNull/setNull functions TitleCase (#15382) 2021-09-08 20:48:53 -03:00
duncanspumpkin 3199029168 Split off EntityTweener into seperate file 2021-05-29 07:47:49 +01:00
Michał Janiszewski 8ee49ab615 Reduce inclusion of world/Sprite.h 2021-02-25 10:56:27 +01:00
Matt 6034cef358
Fix replay snapshots comparing states with different ticks 2021-01-22 15:35:16 +02:00
ζeh Matt 78f6e3e8e3
Fix replays not failing when last tick is the cause (#13834)
* Fix replays never failing

* Change replay dependency meta

* Stop replay when state mismatches
2021-01-14 13:48:12 +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
Matt c442ef6207
Improve performance of tweening entities between ticks 2021-01-05 00:26:58 +02:00
Mike Jones 4e991beb8d
Closes #12419: Merge MISC_COMMAND and GAME_COMMAND into strong enum (#13103)
Merge MISC_COMMAND and GAME_COMMAND enums

Cleanup
2020-12-22 20:53:37 -03:00
Adam f09b14ef2b
Split actions hpp files into separate h and cpp files (#13548)
* Split up SmallSceneryPlace/Remove

Added undo function for Remove Scenery

* Refactor: Balloon and Banner actions hpp=>h/cpp

* Refactor: rename all action *.hpp files to *.cpp

This is preparation for separation in later commits. Note that without
the complete set of commits in this branch, the code will not build.

* Refactor Clear, Climate, Custom, and Footpath actions hpp=>h/cpp

* VSCode: add src subdirectories to includePath

* Refactor Guest actions hpp=>h/cpp

* Refactor Land actions hpp=>h/cpp

* Refactor LargeScenery actions hpp=>h/cpp

* Refactor Load, Maze, Network actions hpp=>h/cpp

* Refactor Park actions hpp=>h/cpp

* Refactor/style: move private function declarations in actions *.h

Previous action .h files included private function declarations with
private member variables, before public function declarations. This
commit re-orders the header files to the following order:
- public member variables
- private member variables
- public functions
- private functions

* Refactor Pause action hpp=>h/cpp

* Refactor Peep, Place, Player actions hpp=>h/cpp

* Refactor Ride actions hpp=>h/cpp

* Refactor Scenario, Set*, Sign* actions hpp=>h/cpp

* Refactor SmallScenerySetColourAction hpp=>h/cpp

* Refactor Staff actions hpp=>h/cpp

* Refactor Surface, Tile, Track* actions hpp=>h/cpp

* Refactor Wall and Water actions hpp=>h/cpp

* Fix various includes and other compile errors

Update includes for tests.
Move static function declarations to .h files
Add explicit includes to various files that were previously implicit
(the required header was a nested include in an action hpp file, and the
action .h file does not include that header)
Move RideSetStatus string enum to the cpp file to avoid unused imports

* Xcode: modify project file for actions refactor

* Cleanup whitespace and end-of-file newlines

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-12-10 06:39:10 +00:00
ζeh Matt 645289f4ec
Rename GameActionResult and use GameActions namespace instead (#13184) 2020-10-14 22:04:39 -03:00
Michał Janiszewski 0c3de1fa00
Fix potential nullptr dereference (#13149)
This fixes optimised builds on ARM
2020-10-10 14:49:33 -03:00
Matt 83355e35cc Move IStream, MemoryStream, FileStream into OpenRCT2 namespace 2020-08-05 16:29:36 +02:00
pizza2004 d217dfa9b9
Refactor NewsItem into namespace and Pascal Case (#12511) 2020-08-02 23:14:00 -03:00
pizza2004 a3edeabb5c Refactor NEWS_FLAG_* to use strong enum 2020-07-28 12:54:31 -06:00
pizza2004 cee7f8d34c Close #12397: Refactor NEWS_ITEM_* to use strong enum 2020-07-28 12:54:18 -06:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
frutiemax 0fa0ca451e
Part of #12245: Use coords for window_scroll_to_location (#12282) 2020-07-15 23:26:27 -03:00
Tulio Leao c17127f65b
Use named casts on openrct2 root folder (#11139) 2020-04-17 21:36:25 +02:00
duncanspumpkin 9c5a4b8561 Add exception handler to prevent 32bit OS read problems 2020-04-12 10:56:19 +01:00
duncanspumpkin 501e5e2b34 Fix formatting 2020-04-12 10:54:17 +01:00
duncanspumpkin 59723cc7c3 Rework game state snapshots for variable amounts
Added a check that ensures that the log is not created unless there is a difference
2020-04-12 10:54:17 +01:00
duncanspumpkin e5d68cacc9 Make snapshots at start and end of replay 2020-04-12 10:54:17 +01:00
duncanspumpkin 4f0d9a6363 Remove SpriteSpatialData from replays 2020-04-12 10:54:17 +01:00
duncanspumpkin 53672c0519 Introduce a GameStateSnapshot to the replay file 2020-04-12 10:54:17 +01:00
duncanspumpkin 5b0015bbf3 Fix replay manager checksums 2020-04-12 10:54:17 +01:00
Michał Janiszewski e19eaa6a98 Upload park recording in case of crash 2020-04-02 23:44:59 +02:00
Duncan d486ac4d3b Reduce direct usage of LOCATION_NULL (#10480)
* Reduce direct usage of Location_Null

Ideally we want to refactor these out to use std::optional as much as possible but for now move to using the standard interfaces.

* Remove incorrect AND with LOCATION_NULL

In the original this was a simple comparison to check for negative. Unsure how it ended up as an AND with the negative bit.
2019-12-31 09:01:17 +01:00
Duncan 3be7d824ac
Merge pull request #10397 from duncanspumpkin/refactor_gcommand
Remove gCommandPosition. Use GameActionRes instead.
2019-12-19 20:48:20 +00:00
Matt 0ff9d3af12
Serialise cheats separately and preserve storage for future park parameters 2019-07-27 15:22:58 +02:00
Matt 73d7591f40
Serialise all cheats 2019-07-14 16:42:24 +02:00
Matt e267be785b
Remove obsolete code 2019-07-14 16:42:08 +02:00
duncanspumpkin 96ec0123ca Refactor and clean up for CI's. 2019-06-11 18:43:23 +01:00
duncanspumpkin afca838f17 Provide a game command translation 2019-06-11 18:43:06 +01:00
Filip Gawin 6833da77e3 Simplify boolean expresions 2019-05-10 22:00:38 +02:00
ζeh Matt cd8c67ddac
Implement SetCheatAction. (#8990)
* Implement SetCheatAction.

* Bump up network version
2019-05-04 15:28:38 +02:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
duncanspumpkin 540be7c7be Provide a conversion from old game command.
Note doesn't handle footpath scenery or clear direction mode
2019-03-04 16:57:21 +00:00
duncanspumpkin e128a78b91 Fix formating and other issues
Refactor as per comments.

Simplified some of the code as well

Use constants
2019-03-02 07:24:42 +00:00
duncanspumpkin c55ff1288d Add conversion from old command 2019-03-02 07:24:42 +00:00