From b9f06f3f2998c6ae5474ef9de725fb34bf5511ec Mon Sep 17 00:00:00 2001 From: terkhen Date: Mon, 8 Feb 2010 21:19:41 +0000 Subject: [PATCH] (svn r19062) -Codechange: Move smallmap related functions to their own header. --- projects/openttd_vs80.vcproj | 4 ++++ projects/openttd_vs90.vcproj | 4 ++++ source.list | 1 + src/gui.h | 1 - src/industry.h | 2 -- src/newgrf.cpp | 1 + src/smallmap_gui.h | 18 ++++++++++++++++++ src/toolbar_gui.cpp | 1 + 8 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 src/smallmap_gui.h diff --git a/projects/openttd_vs80.vcproj b/projects/openttd_vs80.vcproj index 0b377f06e5..f840b5c051 100644 --- a/projects/openttd_vs80.vcproj +++ b/projects/openttd_vs80.vcproj @@ -1319,6 +1319,10 @@ RelativePath=".\..\src\sdl.h" > + + diff --git a/projects/openttd_vs90.vcproj b/projects/openttd_vs90.vcproj index da5a92293c..4545bfdbc5 100644 --- a/projects/openttd_vs90.vcproj +++ b/projects/openttd_vs90.vcproj @@ -1316,6 +1316,10 @@ RelativePath=".\..\src\sdl.h" > + + diff --git a/source.list b/source.list index 19af997069..26339cbf52 100644 --- a/source.list +++ b/source.list @@ -239,6 +239,7 @@ roadstop_base.h roadveh.h screenshot.h sdl.h +smallmap_gui.h sound/sdl_s.h video/sdl_v.h settings_func.h diff --git a/src/gui.h b/src/gui.h index 3a01edba14..0e689cd60f 100644 --- a/src/gui.h +++ b/src/gui.h @@ -64,7 +64,6 @@ void ShowSubsidiesList(); void ShowEstimatedCostOrIncome(Money cost, int x, int y); void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, int x, int y, bool no_timeout = false); -void ShowSmallMap(); void ShowExtraViewPortWindow(TileIndex tile = INVALID_TILE); void BuildFileList(); diff --git a/src/industry.h b/src/industry.h index 27d56af5be..99ba24924e 100644 --- a/src/industry.h +++ b/src/industry.h @@ -84,8 +84,6 @@ void PlantRandomFarmField(const Industry *i); void ReleaseDisastersTargetingIndustry(IndustryID); -/* smallmap_gui.cpp */ -void BuildIndustriesLegend(); /* industry_cmd.cpp */ void SetIndustryDailyChanges(); diff --git a/src/newgrf.cpp b/src/newgrf.cpp index d6db4c6f37..d0ae2d77dc 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -45,6 +45,7 @@ #include #include "core/alloc_type.hpp" #include "core/mem_func.hpp" +#include "smallmap_gui.h" #include "table/strings.h" #include "table/build_industry.h" diff --git a/src/smallmap_gui.h b/src/smallmap_gui.h new file mode 100644 index 0000000000..62ace32800 --- /dev/null +++ b/src/smallmap_gui.h @@ -0,0 +1,18 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file smallmap_gui.h Smallmap GUI functions, used at newgrf.cpp and toolbar_gui.cpp. */ + +#ifndef SMALLMAP_GUI_H +#define SMALLMAP_GUI_H + +void BuildIndustriesLegend(); +void ShowSmallMap(); + +#endif /* SMALLMAP_GUI_H */ diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 33deeca78c..6979df6816 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -41,6 +41,7 @@ #include "rail.h" #include "widgets/dropdown_type.h" #include "company_base.h" +#include "smallmap_gui.h" #include "network/network.h" #include "network/network_gui.h"