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

Line Branch Exec Source
1
/*
2
 *  The ManaPlus Client
3
 *  Copyright (C) 2014-2017  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
46
class Settings final
37
{
38
    public:
39
2
        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
            playerNameOffset(64),
82
            playerBadgeAtRightOffset(32),
83
            mapDrawType(MapType::NORMAL),
84
            emoteType(EmoteType::Player),
85
            persistentIp(true),
86
            limitFps(false),
87
            inputFocused(KeyboardFocus::Focused),
88
            mouseFocused(true),
89
            disableGameModifiers(false),
90
            awayMode(false),
91
            pseudoAwayMode(false),
92
            fixDeadAnimation(true),
93
            disableLoggingInGame(false),
94
            legacyEffects(true),
95
            enableRemoteCommands(true),
96
            uselonglivesprites(false),
97
            unknownSkillsAutoTab(true),
98

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