diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 769e459847..e0fc3b9f9b 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 fbb8c42bb5..9a361d2949 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 c03ed9aab2..c4fe4f836a 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 8ce7c704ea..ed6d6bdfaa 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 a6743b2ac2..882a23f12a 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 f6a0e14df3..5caa110b2c 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 1aa9348b94..b49e36c555 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? */