GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/settings.h Lines: 4 4 100.0 %
Date: 2019-10-15 Branches: 3 6 50.0 %

Line Branch Exec Source
1
/*
2
 *  The ManaPlus Client
3
 *  Copyright (C) 2014-2019  The ManaPlus Developers
4
 *
5
 *  This file is part of The ManaPlus Client.
6
 *
7
 *  This program is free software; you can redistribute it and/or modify
8
 *  it under the terms of the GNU General Public License as published by
9
 *  the Free Software Foundation; either version 2 of the License, or
10
 *  any later version.
11
 *
12
 *  This program is distributed in the hope that it will be useful,
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *  GNU General Public License for more details.
16
 *
17
 *  You should have received a copy of the GNU General Public License
18
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 */
20
21
#ifndef SETTINGS_H
22
#define SETTINGS_H
23
24
#include "options.h"
25
26
#include "enums/emotetype.h"
27
28
#include "enums/input/keyboardfocus.h"
29
30
#include "enums/resources/map/maptype.h"
31
32
#include "utils/vector.h"
33
34
#include "localconsts.h"
35
36
23
class Settings final
37
{
38
    public:
39
1
        Settings() :
40
            updateHost(),
41
            login(),
42
            oldUpdates(),
43
            updatesDir(),
44
            configDir(),
45
            localDataDir(),
46
            tempDir(),
47
            serverName(),
48
            screenshotDir(),
49
            onlineListUrl(),
50
            serverConfigDir(),
51
            usersDir(),
52
            usersIdDir(),
53
            npcsDir(),
54
            supportUrl(),
55
            logFileName(),
56
            rootDir(),
57
            windowCaption(),
58
            gmCommandSymbol("@"),
59
            gmCharCommandSymbol("#"),
60
            linkCommandSymbol("="),
61
            userAgent(),
62
            updateMirrors(),
63
            options(),
64
            guiAlpha(1.0F),
65
            textureSize(1024),
66
            moveType(0U),
67
            crazyMoveType(0U),
68
            moveToTargetType(0U),
69
            followMode(0U),
70
            attackWeaponType(0U),
71
            attackType(0U),
72
            quickDropCounter(0U),
73
            pickUpType(0U),
74
            magicAttackType(0U),
75
            pvpAttackType(0U),
76
            imitationMode(0U),
77
            cameraMode(0U),
78
            crazyMoveState(0U),
79
            targetingType(0U),
80
            overweightPercent(50U),
81
            fixedInventorySize(100U),
82
            playerNameOffset(64),
83
            playerBadgeAtRightOffset(32),
84
            mapDrawType(MapType::NORMAL),
85
            emoteType(EmoteType::Player),
86
            persistentIp(true),
87
            limitFps(false),
88
            inputFocused(KeyboardFocus::Focused),
89
            mouseFocused(true),
90
            disableGameModifiers(false),
91
            awayMode(false),
92
            pseudoAwayMode(false),
93
            fixDeadAnimation(true),
94
            disableLoggingInGame(false),
95
            enableRemoteCommands(true),
96
            uselonglivesprites(false),
97
            unknownSkillsAutoTab(true),
98
            enableNewMailSystem(true),
99

27
            showButtonIcons(false)
100
1
        { }
101
102
        A_DELETE_COPY(Settings)
103
104
        void init();
105
106
        std::string updateHost;
107
        std::string login;
108
        std::string oldUpdates;
109
        std::string updatesDir;
110
        std::string configDir;
111
        std::string localDataDir;
112
        std::string tempDir;
113
        std::string serverName;
114
        std::string screenshotDir;
115
        std::string onlineListUrl;
116
        std::string serverConfigDir;
117
        std::string usersDir;
118
        std::string usersIdDir;
119
        std::string npcsDir;
120
        std::string supportUrl;
121
        std::string logFileName;
122
        std::string rootDir;
123
        std::string windowCaption;
124
        std::string gmCommandSymbol;
125
        std::string gmCharCommandSymbol;
126
        std::string linkCommandSymbol;
127
        std::string userAgent;
128
        STD_VECTOR<std::string> updateMirrors;
129
        Options options;
130
        float guiAlpha;
131
        unsigned int textureSize;
132
        unsigned int moveType;
133
        unsigned int crazyMoveType;
134
        unsigned int moveToTargetType;
135
        unsigned int followMode;
136
        unsigned int attackWeaponType;
137
        unsigned int attackType;
138
        unsigned int quickDropCounter;
139
        unsigned int pickUpType;
140
        unsigned int magicAttackType;
141
        unsigned int pvpAttackType;
142
        unsigned int imitationMode;
143
        unsigned int cameraMode;
144
        unsigned int crazyMoveState;
145
        unsigned int targetingType;
146
        unsigned int overweightPercent;
147
        unsigned int fixedInventorySize;
148
        int playerNameOffset;
149
        int playerBadgeAtRightOffset;
150
        MapTypeT mapDrawType;
151
        EmoteTypeT emoteType;
152
        bool persistentIp;
153
        bool limitFps;
154
        KeyboardFocusT inputFocused;
155
        bool mouseFocused;
156
        bool disableGameModifiers;
157
        bool awayMode;
158
        bool pseudoAwayMode;
159
        bool fixDeadAnimation;
160
        bool disableLoggingInGame;
161
        bool enableRemoteCommands;
162
        bool uselonglivesprites;
163
        bool unknownSkillsAutoTab;
164
        bool enableNewMailSystem;
165
        bool showButtonIcons;
166
};
167
168
extern Settings settings;
169
170
#endif  // SETTINGS_H