-
-
Notifications
You must be signed in to change notification settings - Fork 113
/
Copy pathsaved_game_info.h
41 lines (36 loc) · 1.12 KB
/
saved_game_info.h
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
36
37
38
39
40
41
#pragma once
#include "util.h"
#include "view_id.h"
#include "enemy_id.h"
class ContentFactory;
struct SavedGameInfo {
struct MinionInfo {
ViewIdList SERIAL(viewId);
int SERIAL(level);
static MinionInfo get(const ContentFactory*, const Creature*);
SERIALIZE_ALL(viewId, level)
};
ViewIdList getViewId() const;
vector<MinionInfo> SERIAL(minions);
struct RetiredEnemyInfo {
EnemyId SERIAL(enemyId);
VillainType SERIAL(villainType);
SERIALIZE_ALL(enemyId, villainType)
};
optional<RetiredEnemyInfo> SERIAL(retiredEnemyInfo);
string SERIAL(name);
int SERIAL(progressCount);
vector<string> SERIAL(spriteMods);
SERIALIZE_ALL(minions, retiredEnemyInfo, name, progressCount, spriteMods)
};
struct OldSavedGameInfo {
ViewIdList getViewId() const;
vector<SavedGameInfo::MinionInfo> SERIAL(minions);
double SERIAL(dangerLevel);
string SERIAL(name);
int SERIAL(progressCount);
vector<string> SERIAL(spriteMods);
SERIALIZE_ALL(minions, dangerLevel, name, progressCount, spriteMods)
};
OldSavedGameInfo getOldInfo(const SavedGameInfo&);
SavedGameInfo fromOldInfo(const OldSavedGameInfo&);