2015-07-02 03:17:14 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
|
|
|
class SaveStateManager
|
|
|
|
{
|
|
|
|
private:
|
2017-02-25 20:24:37 +00:00
|
|
|
static const uint32_t MaxIndex = 7;
|
2016-09-02 23:36:37 +00:00
|
|
|
static atomic<uint32_t> _lastIndex;
|
|
|
|
|
|
|
|
static string GetStateFilepath(int stateIndex);
|
2015-07-02 03:17:14 +00:00
|
|
|
|
|
|
|
public:
|
2017-11-20 04:08:23 +00:00
|
|
|
static const uint32_t FileFormatVersion = 7;
|
2016-02-14 23:36:08 +00:00
|
|
|
|
2015-07-11 12:27:22 +00:00
|
|
|
static uint64_t GetStateInfo(int stateIndex);
|
2016-09-02 23:36:37 +00:00
|
|
|
|
|
|
|
static void SaveState();
|
|
|
|
static bool LoadState();
|
|
|
|
|
2017-05-06 19:27:48 +00:00
|
|
|
static void SaveState(ostream &stream);
|
2017-09-01 22:45:53 +00:00
|
|
|
static bool SaveState(string filepath);
|
2016-09-01 00:54:38 +00:00
|
|
|
static void SaveState(int stateIndex, bool displayMessage = true);
|
2017-09-01 22:45:53 +00:00
|
|
|
static bool LoadState(istream &stream, bool hashCheckRequired = true);
|
|
|
|
static bool LoadState(string filepath, bool hashCheckRequired = true);
|
2015-07-11 12:27:22 +00:00
|
|
|
static bool LoadState(int stateIndex);
|
2016-09-02 23:36:37 +00:00
|
|
|
|
2017-07-30 13:03:54 +00:00
|
|
|
static void SaveRecentGame(string romName, string romPath, string patchPath);
|
2017-07-26 02:43:39 +00:00
|
|
|
static void LoadRecentGame(string filename, bool resetGame);
|
2017-05-06 19:27:48 +00:00
|
|
|
|
2016-09-02 23:36:37 +00:00
|
|
|
static void MoveToNextSlot();
|
|
|
|
static void MoveToPreviousSlot();
|
2015-07-02 03:17:14 +00:00
|
|
|
};
|