OpenRCT2/src/openrct2/GameState.h

50 lines
1.1 KiB
C
Raw Normal View History

/*****************************************************************************
2020-07-21 15:04:34 +02:00
* Copyright (c) 2014-2020 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
2017-07-23 17:10:09 +02:00
#include "Date.h"
2017-07-23 02:06:24 +02:00
2018-06-22 23:25:16 +02:00
#include <memory>
namespace OpenRCT2
{
2017-07-23 02:06:24 +02:00
class Park;
/**
* Class to update the state of the map and park.
*/
2017-07-23 02:06:24 +02:00
class GameState final
{
private:
2017-07-23 02:06:24 +02:00
std::unique_ptr<Park> _park;
2018-06-22 23:25:16 +02:00
Date _date;
public:
2017-07-23 02:06:24 +02:00
GameState();
GameState(const GameState&) = delete;
2017-07-23 02:06:24 +02:00
2018-06-22 23:25:16 +02:00
Date& GetDate()
{
return _date;
}
Park& GetPark()
{
return *_park;
}
2017-07-23 02:06:24 +02:00
void InitAll(int32_t mapSize);
void Update();
void UpdateLogic();
private:
void CreateStateSnapshot();
};
2018-06-22 23:25:16 +02:00
} // namespace OpenRCT2