1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 17:24:47 +01:00
Commit Graph

41 Commits

Author SHA1 Message Date
Duncan
c0255efeaa Create an enum class serializer (#12810)
* Create an enum class serializer

* Make visitor work again

* Make suggested changes
2020-09-03 21:55:46 +01:00
Matt
83355e35cc Move IStream, MemoryStream, FileStream into OpenRCT2 namespace 2020-08-05 16:29:36 +02:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Tulio Leao
f725fff2da Clarify CoordsRange-derived interface methods (#12127) 2020-07-06 14:42:11 +02:00
Michael Steenbeek
d7637cd70f Replace many C-style casts (#11720) 2020-05-11 14:32:56 +02:00
Michał Janiszewski
2323cc1596 Use named casts instead of old-style casts
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00
Gymnasiast
3ed7694495 Move tile element-specific flags 2020-03-04 22:01:09 +01:00
ζeh Matt
12ab1e9633 Fix #10713: Correctly encode network ride id over network (#10802)
It byte swapped uint16_t and then during decode byte swapped it as uint32_t, now it always uses uint32_t for ride/player id. I could use the underlying type but that would require to re-create all replays again.

Closes #10713
2020-02-21 18:11:26 +01:00
duncanspumpkin
cfb4bba721 Remove todo and clang format where required
Change array type to avoid additional code

Make CI's happier
2019-12-15 08:21:32 +00:00
duncanspumpkin
7dbf0353ff Serialise scenery, mazes, entrances 2019-12-15 08:21:32 +00:00
duncanspumpkin
83503f4c69 Serialise track design. Start work on making it work
Fix track designs issuing extra game actions
2019-12-15 08:21:32 +00:00
Gymnasiast
6e200459d3 Refactor some accessors to tile element type and flags fields 2019-08-24 22:42:47 +02:00
Ted John
6fff2079f9 Refactor ride name to dynamic args and std::string 2019-07-29 19:18:16 +01:00
duncanspumpkin
96ec0123ca Refactor and clean up for CI's. 2019-06-11 18:43:23 +01:00
duncanspumpkin
3162d4dc75 Implement TileModifyAction
Further work moving game commands into the game action framework
2019-06-11 18:42:52 +01:00
ζeh Matt
c8f822ea70 Gamestate snapshots (#8819)
* Add initial interface.

* Implement move operator in MemoryStream

* Add pod array serialisation traits.

* Add push_back with move semantics to CircularBuffer

* Initial implementation of GameStateSnapshots

* Add GameStateSnapshots to Context.

* Add mp_desync console command.

* Compare sprite data and fill change list.

* Minor changes.

* Proof of concept.

* Calculate offset instead of using offsetof

* Implement game state difference detection

* Update mp_desync console command.

* Fix identification of sprite remove/add.

* Fix crash when only one peep in park when using mp_desync

* Output state differences into user directory desync folder.

* Add desync debugging as an option.

* Add information to network status when a desync report was created.

* Cast to proper type for %llu.

* Update xcode project

* Add more information to the diffed data.

* Remove client-only relevant fields.

* Cleanup.

* Add better name output for misc sprites

* Add srand0 and tick information to the output

* Bump up network version

* Cleanup

* Set desync_debugging to false as default

* Apply suggestions
2019-05-11 21:31:34 +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
ef69c01da5 Create FootpathSceneryRemoveAction to split up footpath place 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
7f586f50e1 Move all callees to the game action framework. Fix CoordXY bug 2019-03-02 07:24:41 +00:00
duncanspumpkin
650e8291d0 Start moving track place into GameAction framework 2019-02-19 12:30:33 +00:00
duncanspumpkin
44cd8c3150 Refactor. Add CoordsXY to data serialiser 2019-02-08 14:08:26 +00:00
IntelOrca
b9fd90ffd3 Implement ClearAction. 2019-01-07 09:04:51 +01:00
Matt
fc4e45562d Use stringstream to log integral values. 2019-01-02 06:39:59 +01:00
Matt
a8254aa292 Add 64 bit serialisation support. 2019-01-02 05:18:36 +01:00
Matt
ccc3227113 Cleanup. 2018-12-29 19:23:27 +01:00
Matt
f6dbf5f1a2 Add std::array serialiser support. 2018-12-29 19:23:27 +01:00
Matt
000a9694f9 Fix DataSerialiser not accepting temporary values. 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
ζeh Matt
1abb31a159 Implement game action logging. (#8138) 2018-11-20 06:04:42 +01:00
clang-format
3a4a11f738 clang-format core 2018-07-23 16:00:03 +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
ZehMatt
49d8d37748 Add serialization traits for bool. 2018-03-05 00:17:34 +01:00
Mark van Renswoude
ce73d3a8a5 Fix #6390: Crash when renaming rides in multiplayer 2017-10-14 14:21:06 +02:00
Michał Janiszewski
9ff0e22aee Whitespace fixes 2017-10-05 10:42:44 +02:00
ZehMatt
995c0d0a6b Refactor SetParkEntranceFeeAction to use constructor for parameters.
Add RideSetNameAction.
Support of string serialisation.
2017-10-05 10:42:44 +02:00
Michał Janiszewski
6ddac382be Fix copyright dates 2017-10-05 10:42:44 +02:00
ZehM4tt
1b2a61c6ba Separated out byte swapping into its own header.
Simplified data serialisation of game actions.
Moved the flags away from parameters.
GameAction base now serialises mandatory data such as flags and player.
Split some functions from network in order to move command processing to the end of tick.
2017-10-05 10:42:43 +02:00