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