____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"00001 // ____ _ __ 00002 // / __ )____ _____ | | / /___ ___________ 00003 // / __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/ 00004 // / /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ ) 00005 // /_____/\____/____/ |__/|__/\__,_/_/ /____/ 00006 // 00007 // A futuristic real-time strategy game. 00008 // This file is part of Bos Wars. 00009 // 00011 // 00012 // (c) Copyright 2000-2007 by Andreas Arens and Jimmy Salmon 00013 // 00014 // This program is free software; you can redistribute it and/or modify 00015 // it under the terms of the GNU General Public License as published by 00016 // the Free Software Foundation; only version 2 of the License. 00017 // 00018 // This program is distributed in the hope that it will be useful, 00019 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 // GNU General Public License for more details. 00022 // 00023 // You should have received a copy of the GNU General Public License 00024 // along with this program; if not, write to the Free Software 00025 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00026 // 02111-1307, USA. 00027 00028 #ifndef __SETTINGS_H__ 00029 #define __SETTINGS_H__ 00030 00032 00033 #include <vector> 00034 00035 /*---------------------------------------------------------------------------- 00036 -- Declarations 00037 ----------------------------------------------------------------------------*/ 00038 00039 class CFile; 00040 class CMap; 00041 00042 00043 /*---------------------------------------------------------------------------- 00044 -- Settings 00045 ----------------------------------------------------------------------------*/ 00046 00047 struct SettingsPresets { 00048 int Team; 00049 int Type; 00050 }; 00051 00061 struct Settings { 00062 int NetGameType; 00063 00064 // Individual presets: 00065 // For single-player game only Presets[0] will be used.. 00066 SettingsPresets Presets[PlayerMax]; 00067 00068 // Common settings: 00069 int Resources; 00070 int NumUnits; 00071 int Opponents; 00072 int Difficulty; 00073 int GameType; 00074 bool NoFogOfWar; 00075 int RevealMap; 00076 int MapRichness; 00077 }; 00078 00079 #define SettingsPresetMapDefault -1 00080 00081 00084 #define SettingsSinglePlayerGame 1 00085 #define SettingsMultiPlayerGame 2 00086 00090 enum GameTypes { 00091 SettingsGameTypeMapDefault = SettingsPresetMapDefault, 00092 SettingsGameTypeMelee = 0, 00093 SettingsGameTypeFreeForAll, 00094 SettingsGameTypeTopVsBottom, 00095 SettingsGameTypeLeftVsRight, 00096 SettingsGameTypeManVsMachine, 00097 SettingsGameTypeManTeamVsMachine, 00098 00099 // Future game type ideas 00100 #if 0 00101 SettingsGameTypeOneOnOne, 00102 SettingsGameTypeCaptureTheFlag, 00103 SettingsGameTypeGreed, 00104 SettingsGameTypeSlaughter, 00105 SettingsGameTypeSuddenDeath, 00106 SettingsGameTypeTeamMelee, 00107 SettingsGameTypeTeamCaptureTheFlag, 00108 #endif 00109 }; 00110 00111 /*---------------------------------------------------------------------------- 00112 -- Variables 00113 ----------------------------------------------------------------------------*/ 00114 00115 extern Settings GameSettings; 00116 00117 /*---------------------------------------------------------------------------- 00118 -- Functions 00119 ----------------------------------------------------------------------------*/ 00120 00122 extern void ShowStats(); 00124 extern void CreateGame(const std::string &filename, CMap *map); 00126 extern void InitSettings(void); 00127 00129 00130 #endif // !__SETTINGS_H__
1.5.6