Commit Graph

67 Commits

Author SHA1 Message Date
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
duncanspumpkin 93873c5e74 Make review changes. Fix formating
Reorder includes
2019-02-27 08:15:11 +00:00
duncanspumpkin 9d76c609f3 Provide conversion from gamecommand in replay manager 2019-02-27 08:15:11 +00:00
duncanspumpkin 4d3c594e47 Provide a translation for the replay manager 2019-02-19 12:31:22 +00:00
Matt a630c17e92 Fix ReplayManager testing checksums out of order. 2019-02-16 09:10:05 +01:00
Tom Lankhorst ddfbaac13f
Fix MSVC type conversion warning 2019-02-06 12:13:59 +01:00
Tom Lankhorst 72519d8bb8
do not use designated initializer 2019-02-06 11:28:39 +01:00
Tom Lankhorst e24314bb5a
Fix syntax error and add <memory> 2019-02-06 11:06:16 +01:00
Tom Lankhorst 706d1be865
Avoid illegal ptr conversions 2019-02-06 10:38:25 +01:00
Tom Lankhorst f48f347798
Internally compress (zlib lvl.9) replay files
This effort reduces the size of replays by a factor 2 to 10 depending on
the park complexity. ZLIB is used as the compression backend.

- The replay file version is bumped to 2.
- An `sv6r` file still starts with a magic number and a version.
- If version = 1, the file stream is consumed by the ReplayRecordData
serializer.
- If version > 1, the file stream is decompressed and the resulting
stream is consumed by the ReplayRecordData serializer.
- Introduced `Compatible` that indicates whether a file with a version
mismatch is compatible. E.g.: v1 is compatible with this `ReplayManager`
2019-02-06 10:12:21 +01:00
Matt 7955dba9ba Add warning for mismatching network version. 2019-01-02 06:58:36 +01:00
Matt 74668c6188 Use correct file path on replay info output. 2019-01-02 05:39:32 +01:00