blob: 9a342ab62a93d7a9e3f849dfbc0527f537219f1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#pragma once
using namespace std;
class ConsoleSaveFile;
#include "SavedData.h"
class SavedDataStorage
{
private:
LevelStorage *levelStorage;
typedef unordered_map<wstring, shared_ptr<SavedData> > cacheMapType;
cacheMapType cache;
vector<shared_ptr<SavedData> > savedDatas;
typedef unordered_map<wstring, short> uaiMapType;
uaiMapType usedAuxIds;
public:
SavedDataStorage(LevelStorage *);
shared_ptr<SavedData> get(const type_info& clazz, const wstring& id);
void set(const wstring& id, shared_ptr<SavedData> data);
void save();
private:
void save(shared_ptr<SavedData> data);
void loadAuxValues();
public:
int getFreeAuxValueFor(const wstring& id);
// 4J Added
int getAuxValueForMap(PlayerUID xuid, int dimension, int centreXC, int centreZC, int scale);
};
|