mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 14:02:59 +01:00
* 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
50 lines
1.1 KiB
C++
50 lines
1.1 KiB
C++
/*****************************************************************************
|
|
* Copyright (c) 2014-2019 OpenRCT2 developers
|
|
*
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
|
*
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
|
*****************************************************************************/
|
|
|
|
#pragma once
|
|
|
|
#include "Date.h"
|
|
|
|
#include <memory>
|
|
|
|
namespace OpenRCT2
|
|
{
|
|
class Park;
|
|
|
|
/**
|
|
* Class to update the state of the map and park.
|
|
*/
|
|
class GameState final
|
|
{
|
|
private:
|
|
std::unique_ptr<Park> _park;
|
|
Date _date;
|
|
|
|
public:
|
|
GameState();
|
|
GameState(const GameState&) = delete;
|
|
|
|
Date& GetDate()
|
|
{
|
|
return _date;
|
|
}
|
|
Park& GetPark()
|
|
{
|
|
return *_park;
|
|
}
|
|
|
|
void InitAll(int32_t mapSize);
|
|
void Update();
|
|
void UpdateLogic();
|
|
|
|
private:
|
|
void CreateStateSnapshot();
|
|
};
|
|
} // namespace OpenRCT2
|