initial commit, lordsawar source, slightly modified
[lordsawar] / src / defs.h
1 // Copyright (C) 2001, 2002, 2003 Michael Bartl
2 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Ulf Lorenz
3 // Copyright (C) 2003, 2004, 2005, 2006 Andrea Paternesi
4 // Copyright (C) 2004 David Sterba
5 // Copyright (C) 2005 Bryan Duff
6 // Copyright (C) 2006, 2007, 2008, 2009 Ben Asselstine
7 //
8 //  This program is free software; you can redistribute it and/or modify
9 //  it under the terms of the GNU General Public License as published by
10 //  the Free Software Foundation; either version 3 of the License, or
11 //  (at your option) any later version.
12 //
13 //  This program is distributed in the hope that it will be useful,
14 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 //  GNU Library General Public License for more details.
17 //
18 //  You should have received a copy of the GNU General Public License
19 //  along with this program; if not, write to the Free Software
20 //  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
21 //  02110-1301, USA.
22
23 //This file contains the various macros used within lordsawar.
24
25 #ifndef DEFINITIONS_H
26 #define DEFINITIONS_H
27
28 #include <string>
29 #include <libintl.h>
30
31 #define LORDSAWAR_SAVEGAME_VERSION "0.1.7"
32 #define LORDSAWAR_CONFIG_VERSION "0.1.7"
33 #define LORDSAWAR_RECENTLY_PLAYED_VERSION "0.1.7"
34 #define _(string) gettext(string) // Macro for the gettext
35 #define __(astring) std::string(gettext(astring.c_str()))
36
37
38 //-----------------------------------------------------------------------------
39 //some standard timers. They can easier be changed here than somewhere deep
40 //within the code, and sometimes you have to tweak them a little bit.
41 const unsigned int TIMER_BIGMAP_SELECTOR = 150; //milliseconds
42 const unsigned int TIMER_SMALLMAP_REFRESH = 8000; //microseconds
43 const unsigned int CITY_LEVELS = 4;
44 const unsigned int MAX_PLAYERS = 8;
45 const unsigned int TEMPLE_TYPES = 1;
46 const unsigned int RUIN_TYPES = 2;
47 const unsigned int DIPLOMACY_TYPES = 3;
48 const unsigned int ROAD_TYPES = 15;
49 const unsigned int FOG_TYPES = 15;
50 const unsigned int BRIDGE_TYPES = 4;
51 const unsigned int CURSOR_TYPES = 12;
52 const unsigned int MAX_CITIES_VECTORED_TO_ONE_CITY = 4;
53 const unsigned int MAX_TURNS_FOR_VECTORING = 2;
54 const unsigned int MAX_BOAT_MOVES = 18;
55 const unsigned int CUSP_OF_WAR_ROUND = 9;
56 const unsigned int DIPLOMACY_STARTING_SCORE = 8;
57 const unsigned int DIPLOMACY_MAX_SCORE = 15;
58 const unsigned int DIPLOMACY_MIN_SCORE = 0;
59 const unsigned int MAX_STACK_SIZE = 8;
60 const unsigned int FLAG_TYPES = MAX_STACK_SIZE;
61 const unsigned int MAX_ARMIES_ON_A_SINGLE_TILE = 8;
62 const unsigned int MAX_PRODUCTION_SLOTS_IN_A_CITY = 4;
63 const unsigned int MAX_ARMIES_PRODUCED_IN_NEUTRAL_CITY = 5;
64
65 const unsigned int MAP_SIZE_TINY_WIDTH = 50;
66 const unsigned int MAP_SIZE_TINY_HEIGHT = 75;
67 const unsigned int MAP_SIZE_SMALL_WIDTH = 70;
68 const unsigned int MAP_SIZE_SMALL_HEIGHT = 105;
69 const unsigned int MAP_SIZE_NORMAL_WIDTH = 112;
70 const unsigned int MAP_SIZE_NORMAL_HEIGHT = 156;
71
72 const unsigned int PRODUCTION_SHIELD_WIDTH = 10;
73 const unsigned int PRODUCTION_SHIELD_HEIGHT = 10;
74 const unsigned int PRODUCTION_SHIELD_TYPES = 8;
75 const unsigned int MOVE_BONUS_WIDTH = 32;
76 const unsigned int MOVE_BONUS_HEIGHT = 20;
77 const unsigned int MOVE_BONUS_TYPES = 6;
78 const unsigned int MEDAL_TYPES = 3;
79
80 const int MAX_GOLD_TO_CARRY_OVER_TO_NEXT_SCENARIO = 5000;
81 const unsigned int MAX_ARMY_STRENGTH = 9;
82
83 const unsigned short LORDSAWAR_PORT = 14998;
84 #define HUMAN_PLAYER_TYPE _("Human")
85 #define EASY_PLAYER_TYPE _("Easy")
86 #define HARD_PLAYER_TYPE _("Hard")
87 #define NO_PLAYER_TYPE _("Off")
88 #define NETWORKED_PLAYER_TYPE _("Network")
89
90 const std::string ARMYSETDIR = "army";
91 const std::string TILESETDIR = "tilesets";
92 const std::string CITYSETDIR = "citysets";
93 const std::string SHIELDSETDIR = "shield";
94 const std::string MAPDIR = "map";
95 const std::string ARMYSET_EXT = ".lwa";
96 const std::string TILESET_EXT = ".lwt";
97 const std::string CITYSET_EXT = ".lwc";
98 const std::string SHIELDSET_EXT = ".lws";
99
100 const unsigned int MIN_PRODUCTION_TURNS_FOR_ARMY_UNITS = 1;
101 const unsigned int MAX_PRODUCTION_TURNS_FOR_ARMY_UNITS = 5;
102 const unsigned int MIN_UPKEEP_FOR_ARMY_UNITS = 0;
103 const unsigned int MAX_UPKEEP_FOR_ARMY_UNITS = 20;
104 const unsigned int MIN_MOVES_FOR_ARMY_UNITS = 6;
105 const unsigned int MAX_MOVES_FOR_ARMY_UNITS = 75;
106 const unsigned int MIN_STRENGTH_FOR_ARMY_UNITS = 1;
107 const unsigned int MAX_STRENGTH_FOR_ARMY_UNITS = 9;
108 const unsigned int MIN_COST_FOR_ARMY_UNITS = 0;
109 const unsigned int MAX_COST_FOR_ARMY_UNITS = 50;
110 const unsigned int MIN_NEW_COST_FOR_ARMY_UNITS = 0;
111 const unsigned int MAX_NEW_COST_FOR_ARMY_UNITS = 20000;
112 const unsigned int MIN_EXP_FOR_ARMY_UNITS = 0;
113 const unsigned int MAX_EXP_FOR_ARMY_UNITS = 50000;
114 const unsigned int MIN_SIGHT_FOR_ARMY_UNITS = 0;
115 const unsigned int MAX_SIGHT_FOR_ARMY_UNITS = 25;
116
117 const float SIGNPOST_FREQUENCY = 0.0030;
118
119 #endif // DEFINITIONS_H
120