-
Notifications
You must be signed in to change notification settings - Fork 9
/
TMM.h
86 lines (66 loc) · 1.7 KB
/
TMM.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#pragma once
#include <wx/wx.h>
#include <vector>
#include <filesystem>
#include "Model/Mod.h"
#define APP_VER_MAJOR 1
#define APP_VER_MINOR 20
class TMM : public wxApp {
public:
void LoadAppConfig();
void SaveAppConfig();
void LoadGameConfig();
void SaveGameConfig();
void ChangeRootDir(const std::filesystem::path& newRootDir);
void UpdateModsList(const std::vector<ModEntry> modData);
bool BackupCompositeMapperFile();
inline std::filesystem::path GetRootDir() const
{
return RootDir;
}
inline std::filesystem::path GetClientDir() const
{
return ClientDir;
}
inline std::filesystem::path GetModsDir() const
{
return ModsDir;
}
inline std::filesystem::path GetCompositeMapperPath() const
{
return CompositeMapperPath;
}
inline std::filesystem::path GetBackupCompositeMapperPath() const
{
return BackupCompositeMapperPath;
}
inline std::filesystem::path GetGameConfigPath() const
{
return GameConfigPath;
}
inline bool GetWaitForTera() const
{
return WaitForTera;
}
inline void SetWaitForTera(bool flag)
{
WaitForTera = flag;
SaveAppConfig();
}
protected:
int OnRun() override;
bool SetupPaths();
private:
std::filesystem::path RootDir; // S1Game
std::filesystem::path ClientDir; // S1Game/..
std::filesystem::path ModsDir; // S1Game/CookedPC
std::filesystem::path CompositeMapperPath; // S1Game/CookedPC/CompositePackageMapper.dat
std::filesystem::path BackupCompositeMapperPath; // S1Game/CookedPC/CompositePackageMapper.clean
std::filesystem::path GameConfigPath; // S1Game/CookedPC/Config.tmm
bool WaitForTera = false;
GameConfigFile GameConfig;
};
inline TMM* GetApp()
{
return (TMM*)wxTheApp;
}