_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
settings.h
Go to the documentation of this file.
1 // _________ __ __
2 // / _____// |_____________ _/ |______ ____ __ __ ______
3 // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
4 // / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ |
5 // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
6 // \/ \/ \//_____/ \/
7 // ______________________ ______________________
8 // T H E W A R B E G I N S
9 // Stratagus - A free fantasy real time strategy game engine
10 //
12 //
13 // (c) Copyright 2000-2006 by Andreas Arens and Jimmy Salmon
14 //
15 // This program is free software; you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation; only version 2 of the License.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 // 02111-1307, USA.
28 //
29 
30 #ifndef __SETTINGS_H__
31 #define __SETTINGS_H__
32 
34 
35 #include <string>
36 #include <vector>
37 
38 /*----------------------------------------------------------------------------
39 -- Declarations
40 ----------------------------------------------------------------------------*/
41 
42 class CFile;
43 class CMap;
44 
45 
46 /*----------------------------------------------------------------------------
47 -- Settings
48 ----------------------------------------------------------------------------*/
49 
52  std::string AIScript;
53  int Race;
54  int Team;
55  int Type;
56 };
57 
67 struct Settings {
69 
70  // Individual presets:
71  // For single-player game only Presets[0] will be used..
73 
74  // Common settings:
75  int Resources;
76  int NumUnits;
77  int Opponents;
78  int Difficulty;
79  int GameType;
80  bool NoFogOfWar;
81  bool Inside;
82  int RevealMap;
84 };
85 
86 #define SettingsPresetMapDefault -1
87 
88 
91 #define SettingsSinglePlayerGame 1
92 #define SettingsMultiPlayerGame 2
93 
97 enum GameTypes {
105 
106  // Future game type ideas
107 #if 0
108  SettingsGameTypeOneOnOne,
109  SettingsGameTypeCaptureTheFlag,
110  SettingsGameTypeGreed,
111  SettingsGameTypeSlaughter,
112  SettingsGameTypeSuddenDeath,
113  SettingsGameTypeTeamMelee,
114  SettingsGameTypeTeamCaptureTheFlag
115 #endif
116 };
117 
118 /*----------------------------------------------------------------------------
119 -- Variables
120 ----------------------------------------------------------------------------*/
121 
122 extern Settings GameSettings;
123 
124 /*----------------------------------------------------------------------------
125 -- Functions
126 ----------------------------------------------------------------------------*/
127 
129 extern void ShowStats();
131 extern void CreateGame(const std::string &filename, CMap *map);
133 extern void InitSettings();
134 
136 
137 #endif // !__SETTINGS_H__
Definition: settings.h:104
int Difficulty
Preset # of ai-opponents.
Definition: settings.h:78
void ShowStats()
Game settings.
Definition: settings.h:50
Definition: settings.h:98
int MapRichness
Reveal map.
Definition: settings.h:83
int Resources
Definition: settings.h:75
int Opponents
Preset # of units.
Definition: settings.h:77
Describes the world map.
Definition: map.h:149
#define PlayerMax
Definition: stratagus.h:157
int NumUnits
Preset resource factor.
Definition: settings.h:76
bool Inside
No fog of war.
Definition: settings.h:81
Definition: settings.h:99
int Type
Team of player.
Definition: settings.h:55
int NetGameType
Definition: settings.h:68
Definition: iolib.h:101
Settings GameSettings
Definition: game.cpp:86
int RevealMap
If game uses interior tileset.
Definition: settings.h:82
Definition: settings.h:67
std::string AIScript
Color of a player.
Definition: settings.h:52
void CreateGame(const std::string &filename, CMap *map)
Create a game.
Definition: game.cpp:870
int Race
AI script for computer to use.
Definition: settings.h:53
int GameType
Terrain type (summer,winter,...)
Definition: settings.h:79
Definition: settings.h:103
bool NoFogOfWar
Game type (melee, free for all,...)
Definition: settings.h:80
void InitSettings()
Init Setting to default values.
Definition: game.cpp:1092
int Team
Race of the player.
Definition: settings.h:54
Definition: settings.h:100
#define SettingsPresetMapDefault
Definition: settings.h:86
int PlayerColor
Definition: settings.h:51
SettingsPresets Presets[PlayerMax]
Multiplayer or single player.
Definition: settings.h:72
GameTypes
Definition: settings.h:97
Definition: settings.h:102
Definition: settings.h:101
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.