summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-13 13:43:55 +0000
committertron <tron@openttd.org>2005-11-13 13:43:55 +0000
commitee15e3de13643b2d09abcc5424bf8e2d916cff75 (patch)
tree385ce09aff7cf19e072a627e83e91fe8a5f3fb3b /main_gui.c
parent59e885c2bff5b1af6d7f5473106e9aa1f562abfd (diff)
downloadopenttd-ee15e3de13643b2d09abcc5424bf8e2d916cff75.tar.xz
(svn r3172) static, const
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/main_gui.c b/main_gui.c
index e51fcc643..2a0b1bd08 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -566,9 +566,9 @@ static const Widget _player_menu_widgets[] = {
static int GetPlayerIndexFromMenu(int index)
{
- Player *p;
-
if (index >= 0) {
+ const Player* p;
+
FOR_ALL_PLAYERS(p) {
if (p->is_active) {
if (--index < 0)
@@ -582,7 +582,7 @@ static int GetPlayerIndexFromMenu(int index)
static void UpdatePlayerMenuHeight(Window *w)
{
int num = 0;
- Player *p;
+ const Player* p;
FOR_ALL_PLAYERS(p) {
if (p->is_active)
@@ -822,7 +822,7 @@ static void ToolbarIndustryClick(Window *w)
static void ToolbarTrainClick(Window *w)
{
- Vehicle *v;
+ const Vehicle* v;
int dis = -1;
FOR_ALL_VEHICLES(v)
if (v->type == VEH_Train && v->subtype == TS_Front_Engine) CLRBIT(dis, v->owner);
@@ -831,7 +831,7 @@ static void ToolbarTrainClick(Window *w)
static void ToolbarRoadClick(Window *w)
{
- Vehicle *v;
+ const Vehicle* v;
int dis = -1;
FOR_ALL_VEHICLES(v)
if (v->type == VEH_Road) CLRBIT(dis, v->owner);
@@ -840,7 +840,7 @@ static void ToolbarRoadClick(Window *w)
static void ToolbarShipClick(Window *w)
{
- Vehicle *v;
+ const Vehicle* v;
int dis = -1;
FOR_ALL_VEHICLES(v)
if (v->type == VEH_Ship) CLRBIT(dis, v->owner);
@@ -849,7 +849,7 @@ static void ToolbarShipClick(Window *w)
static void ToolbarAirClick(Window *w)
{
- Vehicle *v;
+ const Vehicle* v;
int dis = -1;
FOR_ALL_VEHICLES(v)
if (v->type == VEH_Aircraft) CLRBIT(dis, v->owner);
@@ -1651,11 +1651,11 @@ static const Widget _scenedit_industry_candy_widgets[] = {
{ WIDGETS_END},
};
-int _industry_type_to_place;
static bool AnyTownExists(void)
{
- Town *t;
+ const Town* t;
+
FOR_ALL_TOWNS(t) {
if (t->xy)
return true;
@@ -1697,6 +1697,7 @@ static const byte _industry_type_list[4][16] = {
{26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36},
};
+static int _industry_type_to_place;
bool _ignore_restrictions;
static void ScenEditIndustryWndProc(Window *w, WindowEvent *e)