1 |
|
|
/* |
2 |
|
|
* The ManaPlus Client |
3 |
|
|
* Copyright (C) 2014-2019 The ManaPlus Developers |
4 |
|
|
* Copyright (C) 2019-2021 Andrei Karas |
5 |
|
|
* |
6 |
|
|
* This file is part of The ManaPlus Client. |
7 |
|
|
* |
8 |
|
|
* This program is free software; you can redistribute it and/or modify |
9 |
|
|
* it under the terms of the GNU General Public License as published by |
10 |
|
|
* the Free Software Foundation; either version 2 of the License, or |
11 |
|
|
* any later version. |
12 |
|
|
* |
13 |
|
|
* This program is distributed in the hope that it will be useful, |
14 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 |
|
|
* GNU General Public License for more details. |
17 |
|
|
* |
18 |
|
|
* You should have received a copy of the GNU General Public License |
19 |
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
20 |
|
|
*/ |
21 |
|
|
|
22 |
|
|
#ifndef SETTINGS_H |
23 |
|
|
#define SETTINGS_H |
24 |
|
|
|
25 |
|
|
#include "options.h" |
26 |
|
|
|
27 |
|
|
#include "enums/emotetype.h" |
28 |
|
|
|
29 |
|
|
#include "enums/input/keyboardfocus.h" |
30 |
|
|
|
31 |
|
|
#include "enums/resources/map/maptype.h" |
32 |
|
|
|
33 |
|
|
#include "utils/vector.h" |
34 |
|
|
|
35 |
|
|
#include "localconsts.h" |
36 |
|
|
|
37 |
|
23 |
class Settings final |
38 |
|
|
{ |
39 |
|
|
public: |
40 |
|
1 |
Settings() : |
41 |
|
|
updateHost(), |
42 |
|
|
login(), |
43 |
|
|
oldUpdates(), |
44 |
|
|
updatesDir(), |
45 |
|
|
configDir(), |
46 |
|
|
localDataDir(), |
47 |
|
|
tempDir(), |
48 |
|
|
serverName(), |
49 |
|
|
screenshotDir(), |
50 |
|
|
onlineListUrl(), |
51 |
|
|
serverConfigDir(), |
52 |
|
|
usersDir(), |
53 |
|
|
usersIdDir(), |
54 |
|
|
npcsDir(), |
55 |
|
|
supportUrl(), |
56 |
|
|
logFileName(), |
57 |
|
|
rootDir(), |
58 |
|
|
windowCaption(), |
59 |
|
|
gmCommandSymbol("@"), |
60 |
|
|
gmCharCommandSymbol("#"), |
61 |
|
|
linkCommandSymbol("="), |
62 |
|
|
userAgent(), |
63 |
|
|
updateMirrors(), |
64 |
|
|
options(), |
65 |
|
|
guiAlpha(1.0F), |
66 |
|
|
textureSize(1024), |
67 |
|
|
moveType(0U), |
68 |
|
|
crazyMoveType(0U), |
69 |
|
|
moveToTargetType(0U), |
70 |
|
|
followMode(0U), |
71 |
|
|
attackWeaponType(0U), |
72 |
|
|
attackType(0U), |
73 |
|
|
quickDropCounter(0U), |
74 |
|
|
pickUpType(0U), |
75 |
|
|
magicAttackType(0U), |
76 |
|
|
pvpAttackType(0U), |
77 |
|
|
imitationMode(0U), |
78 |
|
|
cameraMode(0U), |
79 |
|
|
crazyMoveState(0U), |
80 |
|
|
targetingType(0U), |
81 |
|
|
overweightPercent(50U), |
82 |
|
|
fixedInventorySize(100U), |
83 |
|
|
playerNameOffset(64), |
84 |
|
|
playerBadgeAtRightOffset(32), |
85 |
|
|
mapDrawType(MapType::NORMAL), |
86 |
|
|
emoteType(EmoteType::Player), |
87 |
|
|
persistentIp(true), |
88 |
|
|
limitFps(false), |
89 |
|
|
inputFocused(KeyboardFocus::Focused), |
90 |
|
|
mouseFocused(true), |
91 |
|
|
disableGameModifiers(false), |
92 |
|
|
awayMode(false), |
93 |
|
|
pseudoAwayMode(false), |
94 |
|
|
fixDeadAnimation(true), |
95 |
|
|
disableLoggingInGame(false), |
96 |
|
|
enableRemoteCommands(true), |
97 |
|
|
uselonglivesprites(false), |
98 |
|
|
unknownSkillsAutoTab(true), |
99 |
|
|
enableNewMailSystem(true), |
100 |
✓✗✓✗ ✓✗ |
27 |
showButtonIcons(false) |
101 |
|
1 |
{ } |
102 |
|
|
|
103 |
|
|
A_DELETE_COPY(Settings) |
104 |
|
|
|
105 |
|
|
void init(); |
106 |
|
|
|
107 |
|
|
std::string updateHost; |
108 |
|
|
std::string login; |
109 |
|
|
std::string oldUpdates; |
110 |
|
|
std::string updatesDir; |
111 |
|
|
std::string configDir; |
112 |
|
|
std::string localDataDir; |
113 |
|
|
std::string tempDir; |
114 |
|
|
std::string serverName; |
115 |
|
|
std::string screenshotDir; |
116 |
|
|
std::string onlineListUrl; |
117 |
|
|
std::string serverConfigDir; |
118 |
|
|
std::string usersDir; |
119 |
|
|
std::string usersIdDir; |
120 |
|
|
std::string npcsDir; |
121 |
|
|
std::string supportUrl; |
122 |
|
|
std::string logFileName; |
123 |
|
|
std::string rootDir; |
124 |
|
|
std::string windowCaption; |
125 |
|
|
std::string gmCommandSymbol; |
126 |
|
|
std::string gmCharCommandSymbol; |
127 |
|
|
std::string linkCommandSymbol; |
128 |
|
|
std::string userAgent; |
129 |
|
|
STD_VECTOR<std::string> updateMirrors; |
130 |
|
|
Options options; |
131 |
|
|
float guiAlpha; |
132 |
|
|
unsigned int textureSize; |
133 |
|
|
unsigned int moveType; |
134 |
|
|
unsigned int crazyMoveType; |
135 |
|
|
unsigned int moveToTargetType; |
136 |
|
|
unsigned int followMode; |
137 |
|
|
unsigned int attackWeaponType; |
138 |
|
|
unsigned int attackType; |
139 |
|
|
unsigned int quickDropCounter; |
140 |
|
|
unsigned int pickUpType; |
141 |
|
|
unsigned int magicAttackType; |
142 |
|
|
unsigned int pvpAttackType; |
143 |
|
|
unsigned int imitationMode; |
144 |
|
|
unsigned int cameraMode; |
145 |
|
|
unsigned int crazyMoveState; |
146 |
|
|
unsigned int targetingType; |
147 |
|
|
unsigned int overweightPercent; |
148 |
|
|
unsigned int fixedInventorySize; |
149 |
|
|
int playerNameOffset; |
150 |
|
|
int playerBadgeAtRightOffset; |
151 |
|
|
MapTypeT mapDrawType; |
152 |
|
|
EmoteTypeT emoteType; |
153 |
|
|
bool persistentIp; |
154 |
|
|
bool limitFps; |
155 |
|
|
KeyboardFocusT inputFocused; |
156 |
|
|
bool mouseFocused; |
157 |
|
|
bool disableGameModifiers; |
158 |
|
|
bool awayMode; |
159 |
|
|
bool pseudoAwayMode; |
160 |
|
|
bool fixDeadAnimation; |
161 |
|
|
bool disableLoggingInGame; |
162 |
|
|
bool enableRemoteCommands; |
163 |
|
|
bool uselonglivesprites; |
164 |
|
|
bool unknownSkillsAutoTab; |
165 |
|
|
bool enableNewMailSystem; |
166 |
|
|
bool showButtonIcons; |
167 |
|
|
}; |
168 |
|
|
|
169 |
|
|
extern Settings settings; |
170 |
|
|
|
171 |
|
|
#endif // SETTINGS_H |