changeset 15298:1028938fd078 draft

(svn r19937) -Codechange: Move some fios related prototypes to fios.h
author frosch <frosch@openttd.org>
date Sat, 05 Jun 2010 19:02:29 +0000
parents ece58c0a3946
children 7a84364c969d
files src/console_cmds.cpp src/date.cpp src/fios.h src/fios_gui.cpp src/functions.h src/gui.h src/openttd.cpp
diffstat 7 files changed, 11 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -214,9 +214,6 @@
 	return false;
 }
 
-extern void BuildFileList();
-extern void SetFiosType(const byte fiostype);
-
 /* Save the map to a file */
 DEF_CONSOLE_CMD(ConSave)
 {
--- 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 @@
 {
 	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);
--- 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 @@
 
 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 */
--- 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 @@
 	QSortT(_fios_items.Get(sort_start), s_amount, CompareFiosItems);
 }
 
-extern void StartupEngines();
-
 struct SaveLoadWindow : public QueryStringBaseWindow {
 private:
 	FiosItem o_dir;
@@ -493,11 +492,6 @@
 	new SaveLoadWindow(sld, mode);
 }
 
-void RedrawAutosave()
-{
-	SetWindowDirty(WC_STATUS_BAR, 0);
-}
-
 void SetFiosType(const byte fiostype)
 {
 	switch (fiostype) {
--- a/src/functions.h
+++ b/src/functions.h
@@ -41,8 +41,6 @@
 void AskExitGame();
 void AskExitToGameMenu();
 
-void RedrawAutosave();
-
 int ttd_main(int argc, char *argv[]);
 void HandleExitGameRequest();
 
--- a/src/gui.h
+++ b/src/gui.h
@@ -65,12 +65,6 @@
 
 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);
 
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1270,7 +1270,7 @@
 	if (_do_autosave) {
 		_do_autosave = false;
 		DoAutosave();
-		RedrawAutosave();
+		SetWindowDirty(WC_STATUS_BAR, 0);
 	}
 
 	/* switch game mode? */