_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
#include <settings.h>
Public Member Functions | |
| bool | GetUserGameSetting (int i) |
| void | SetUserGameSetting (int i, bool v) |
| bool | operator== (const Settings &other) const |
| void | Save (const std::function< void(std::string)> &f, bool withPlayers=true) |
| bool | SetField (std::string field, int value) |
| void | Init () |
Public Attributes | |
| NetGameTypes | NetGameType |
| SettingsPresets | Presets [PlayerMax] |
| Multiplayer or single player. More... | |
| int8_t | Resources |
| int8_t | NumUnits |
| Preset resource factor. More... | |
| int8_t | Opponents |
| Preset # of units. More... | |
| int8_t | Difficulty |
| Preset # of ai-opponents. More... | |
| GameTypes | GameType |
| Terrain type (summer,winter,...) More... | |
| FieldOfViewTypes | FoV |
| Game type (melee, free for all,...) More... | |
| MapRevealModes | RevealMap |
| Which field of view is used - important to be shared for unit sight. More... | |
| RevealTypes | DefeatReveal |
| Reveal map kind. More... | |
| union { | |
| struct { | |
| unsigned NoFogOfWar:1 | |
| unsigned Inside:1 | |
| if dynamic fog of war is disabled More... | |
| unsigned AiExplores:1 | |
| if game uses interior tileset or is generally "inside" for the purpose of obstacles More... | |
| unsigned SimplifiedAutoTargeting:1 | |
| If true, AI sends explorers to search for resources (almost useless thing) More... | |
| unsigned AiChecksDependencies:1 | |
| Use alternate target choosing algorithm for auto attack mode (idle, attack-move, patrol, etc.) More... | |
| unsigned UserGameSettings:27 | |
| If false, the AI can do upgrades even if the dependencies are not met. This can be desirable to simplify AI scripting. More... | |
| } | |
| uint32_t _Bitfield | |
| }; | |
Settings structure
This structure one day should contain all common game settings, in-game, or pre-start, and the individual (per player) presets. This allows central maintenance, easy (network-)negotiation, simplifies load/save/reinitialization, etc...
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| union { ... } |
| uint32_t Settings::_Bitfield |
| unsigned Settings::AiChecksDependencies |
Use alternate target choosing algorithm for auto attack mode (idle, attack-move, patrol, etc.)
| unsigned Settings::AiExplores |
if game uses interior tileset or is generally "inside" for the purpose of obstacles
| RevealTypes Settings::DefeatReveal |
Reveal map kind.
| int8_t Settings::Difficulty |
Preset # of ai-opponents.
| FieldOfViewTypes Settings::FoV |
Game type (melee, free for all,...)
| GameTypes Settings::GameType |
Terrain type (summer,winter,...)
| unsigned Settings::Inside |
if dynamic fog of war is disabled
| NetGameTypes Settings::NetGameType |
| unsigned Settings::NoFogOfWar |
| int8_t Settings::NumUnits |
Preset resource factor.
| int8_t Settings::Opponents |
Preset # of units.
| SettingsPresets Settings::Presets[PlayerMax] |
Multiplayer or single player.
| int8_t Settings::Resources |
| MapRevealModes Settings::RevealMap |
Which field of view is used - important to be shared for unit sight.
| unsigned Settings::SimplifiedAutoTargeting |
If true, AI sends explorers to search for resources (almost useless thing)
| unsigned Settings::UserGameSettings |
If false, the AI can do upgrades even if the dependencies are not met. This can be desirable to simplify AI scripting.
1.8.17
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.