summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-06-05 19:02:29 +0000
committerfrosch <frosch@openttd.org>2010-06-05 19:02:29 +0000
commit13d43b8dabc66ae5ca194d8f7cd6e66c2f268825 (patch)
treea376d445fa857e09c2e4b4fd12fea6517c1161ba
parent1d9a84a934f680094bddc18f730067d757d27444 (diff)
downloadopenttd-13d43b8dabc66ae5ca194d8f7cd6e66c2f268825.tar.xz
(svn r19937) -Codechange: Move some fios related prototypes to fios.h
-rw-r--r--src/console_cmds.cpp3
-rw-r--r--src/date.cpp4
-rw-r--r--src/fios.h7
-rw-r--r--src/fios_gui.cpp8
-rw-r--r--src/functions.h2
-rw-r--r--src/gui.h6
-rw-r--r--src/openttd.cpp2
7 files changed, 11 insertions, 21 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 769e45984..e0fc3b9f9 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -214,9 +214,6 @@ DEF_CONSOLE_CMD(ConScrollToTile)
return false;
}
-extern void BuildFileList();
-extern void SetFiosType(const byte fiostype);
-
/* Save the map to a file */
DEF_CONSOLE_CMD(ConSave)
{
diff --git a/src/date.cpp b/src/date.cpp
index fbb8c42bb..9a361d294 100644
--- a/src/date.cpp
+++ b/src/date.cpp
@@ -15,7 +15,7 @@
#include "network/network_func.h"
#include "currency.h"
#include "window_func.h"
-#include "functions.h"
+#include "settings_type.h"
#include "date_func.h"
#include "vehicle_base.h"
#include "debug.h"
@@ -220,7 +220,7 @@ static void OnNewMonth()
{
if (_settings_client.gui.autosave != 0 && (_cur_month % _autosave_months[_settings_client.gui.autosave]) == 0) {
_do_autosave = true;
- RedrawAutosave();
+ SetWindowDirty(WC_STATUS_BAR, 0);
}
SetWindowClassesDirty(WC_CHEATS);
diff --git a/src/fios.h b/src/fios.h
index c03ed9aab..c4fe4f836 100644
--- a/src/fios.h
+++ b/src/fios.h
@@ -15,6 +15,7 @@
#include "strings_type.h"
#include "core/smallvec_type.hpp"
#include "core/enum_type.hpp"
+#include "gfx_type.h"
enum FileSlots {
/**
@@ -119,4 +120,10 @@ FiosType FiosGetSavegameListCallback(SaveLoadDialogMode mode, const char *file,
int CDECL CompareFiosItems(const FiosItem *a, const FiosItem *b);
+/* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */
+extern const TextColour _fios_colours[];
+
+void BuildFileList();
+void SetFiosType(const byte fiostype);
+
#endif /* FIOS_H */
diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp
index 8ce7c704e..ed6d6bdfa 100644
--- a/src/fios_gui.cpp
+++ b/src/fios_gui.cpp
@@ -23,6 +23,7 @@
#include "window_func.h"
#include "tilehighlight_func.h"
#include "querystring_gui.h"
+#include "engine_func.h"
#include "table/sprites.h"
#include "table/strings.h"
@@ -152,8 +153,6 @@ static void MakeSortedSaveGameList()
QSortT(_fios_items.Get(sort_start), s_amount, CompareFiosItems);
}
-extern void StartupEngines();
-
struct SaveLoadWindow : public QueryStringBaseWindow {
private:
FiosItem o_dir;
@@ -493,11 +492,6 @@ void ShowSaveLoadDialog(SaveLoadDialogMode mode)
new SaveLoadWindow(sld, mode);
}
-void RedrawAutosave()
-{
- SetWindowDirty(WC_STATUS_BAR, 0);
-}
-
void SetFiosType(const byte fiostype)
{
switch (fiostype) {
diff --git a/src/functions.h b/src/functions.h
index a6743b2ac..882a23f12 100644
--- a/src/functions.h
+++ b/src/functions.h
@@ -41,8 +41,6 @@ void ShowFeederIncomeAnimation(int x, int y, int z, Money cost);
void AskExitGame();
void AskExitToGameMenu();
-void RedrawAutosave();
-
int ttd_main(int argc, char *argv[]);
void HandleExitGameRequest();
diff --git a/src/gui.h b/src/gui.h
index f6a0e14df..5caa110b2 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -65,12 +65,6 @@ void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, WarningLevel
void ShowExtraViewPortWindow(TileIndex tile = INVALID_TILE);
-void BuildFileList();
-void SetFiosType(const byte fiostype);
-
-/* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */
-extern const TextColour _fios_colours[];
-
/* bridge_gui.cpp */
void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transport_type, byte bridge_type);
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 1aa9348b9..b49e36c55 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1270,7 +1270,7 @@ void GameLoop()
if (_do_autosave) {
_do_autosave = false;
DoAutosave();
- RedrawAutosave();
+ SetWindowDirty(WC_STATUS_BAR, 0);
}
/* switch game mode? */