Commit Graph

50 Commits

Author SHA1 Message Date
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
Matt 8615690891 Fix timestamp not being stored. 2019-01-02 05:36:31 +01:00
Matt 1f20fdf65b Log more replay information to console. 2019-01-02 05:20:10 +01:00
Matt 19ffc6208f Add version to replay file. 2018-12-30 00:03:20 +01:00
Matt c7ab757a86 Cleanup. 2018-12-29 23:06:15 +01:00
Matt b0ca9ff7c5 Prevent replay manager from recording nested commands. 2018-12-29 19:23:28 +01:00
Matt bf03de4755 Focus camera on last replay event. 2018-12-29 19:23:28 +01:00
Matt 5a8b611b83 Update. 2018-12-29 19:23:28 +01:00
Matt 5cfc06573e Ignore replay test when network is disabled. 2018-12-29 19:23:27 +01:00
Matt ccc3227113 Cleanup. 2018-12-29 19:23:27 +01:00
Matt 040522b708 Fix include. 2018-12-29 19:23:27 +01:00
Matt 017f190a52 Add basic regression tests via the replay system. 2018-12-29 19:23:27 +01:00
Matt 7fa9ce3054 Store state important park parameters in the replay. 2018-12-29 19:23:27 +01:00
Matt df0cc72887 Add normalisation support to remove gaps. 2018-12-29 19:23:27 +01:00
Matt 6e8216d7c7 Add GAME_COMMAND_FLAG_REPLAY 2018-12-29 19:23:27 +01:00
Matt 3ea8ab4bb3 Cleanup serialization. 2018-12-29 19:23:27 +01:00
Michał Janiszewski d9b91055ca Fix include 2018-12-29 19:23:27 +01:00
Matt a6efef1e81 Add support to record and replay game commands/actions. 2018-12-29 19:23:27 +01:00