Mercurial > hg > openttd
changeset 18623:e40d30c0d0c0 draft
(svn r23470) -Codechange: move declaration of SwitchToMode to a header instead of declaring it in 6 other files
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 10 Dec 2011 08:31:14 +0000 |
parents | d2339f4988df |
children | 10948a7b2ea6 |
files | src/console_cmds.cpp src/genworld.cpp src/genworld_gui.cpp src/gfx.cpp src/network/network_gui.cpp src/openttd.h src/video/dedicated_v.cpp |
diffstat | 7 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -1049,8 +1049,6 @@ return true; } -extern void SwitchToMode(SwitchMode new_mode); - DEF_CONSOLE_CMD(ConRestart) { if (argc == 0) {
--- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -262,7 +262,6 @@ if (_gw.thread != NULL) _gw.thread->Exit(); - extern void SwitchToMode(SwitchMode new_mode); SwitchToMode(_switch_mode); }
--- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -42,7 +42,6 @@ GLWM_SCENARIO, ///< Generate flat land }; -extern void SwitchToMode(SwitchMode new_mode); extern void MakeNewgameSettingsLive(); /**
--- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -1700,7 +1700,6 @@ _modal_progress_paint_mutex->BeginCritical(); _modal_progress_work_mutex->BeginCritical(); - extern void SwitchToMode(SwitchMode new_mode); if (_switch_mode != SM_NONE && !HasModalProgress()) { SwitchToMode(_switch_mode); _switch_mode = SM_NONE;
--- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -38,7 +38,6 @@ static void ShowNetworkStartServerWindow(); static void ShowNetworkLobbyWindow(NetworkGameList *ngl); -extern void SwitchToMode(SwitchMode new_mode); static const StringID _connection_types_dropdown[] = { STR_NETWORK_START_SERVER_LAN_INTERNET,
--- a/src/openttd.h +++ b/src/openttd.h @@ -77,4 +77,6 @@ int ttd_main(int argc, char *argv[]); void HandleExitGameRequest(); +void SwitchToMode(SwitchMode new_mode); + #endif /* OPENTTD_H */
--- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -138,7 +138,6 @@ bool _dedicated_forks; extern bool SafeLoad(const char *filename, int mode, GameMode newgm, Subdirectory subdir, struct LoadFilter *lf = NULL); -extern void SwitchToMode(SwitchMode new_mode); static FVideoDriver_Dedicated iFVideoDriver_Dedicated;