Mercurial > hg > openttd
changeset 8149:ad7ddb6150dc draft
(svn r11711) -Codechange: Name the Save Load Dialog Mode enum
author | belugas <belugas@openttd.org> |
---|---|
date | Thu, 27 Dec 2007 17:29:27 +0000 |
parents | 20f4268aa1e4 |
children | e31c5899f5aa |
files | src/fios.h src/functions.h src/intro_gui.cpp src/main_gui.cpp src/misc_gui.cpp |
diffstat | 5 files changed, 17 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fios.h +++ b/src/fios.h @@ -31,6 +31,15 @@ char name[256 - 12 - 64]; }; +enum SaveLoadDialogMode{ + SLD_LOAD_GAME, + SLD_LOAD_SCENARIO, + SLD_SAVE_GAME, + SLD_SAVE_SCENARIO, + SLD_LOAD_HEIGHTMAP, + SLD_NEW_GAME, +}; + enum { FIOS_TYPE_DRIVE = 0, FIOS_TYPE_PARENT = 1, @@ -48,7 +57,10 @@ /* Variables to display file lists */ extern FiosItem *_fios_list; ///< defined in misc_gui.cpp extern int _fios_num; ///< defined in fios.cpp, read_only version of _fios_count -extern int _saveload_mode; ///< defined in misc_gui.cpp +extern SaveLoadDialogMode _saveload_mode; ///< defined in misc_gui.cpp + +/* Launch save/load dialog */ +void ShowSaveLoadDialog(SaveLoadDialogMode mode); /* Get a list of savegames */ FiosItem *FiosGetSavegameList(int mode);
--- a/src/functions.h +++ b/src/functions.h @@ -77,15 +77,6 @@ void UpdateViewportSignPos(ViewportSign *sign, int left, int top, StringID str); -enum { - SLD_LOAD_GAME, - SLD_LOAD_SCENARIO, - SLD_SAVE_GAME, - SLD_SAVE_SCENARIO, - SLD_LOAD_HEIGHTMAP, - SLD_NEW_GAME, -}; -void ShowSaveLoadDialog(int mode); /* callback from drivers that is called if the game size changes dynamically */ void GameSizeChanged();
--- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -18,8 +18,8 @@ #include "network/network_gui.h" #include "newgrf.h" #include "strings_func.h" -#include "functions.h" #include "window_func.h" +#include "fios.h" static const Widget _select_game_widgets[] = { { WWT_CAPTION, RESIZE_NONE, 13, 0, 335, 0, 13, STR_0307_OPENTTD, STR_NULL},
--- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -41,6 +41,7 @@ #include "date_func.h" #include "functions.h" #include "vehicle_func.h" +#include "fios.h" #include "network/network_data.h" #include "network/network_client.h"
--- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -43,7 +43,7 @@ /* Variables to display file lists */ FiosItem *_fios_list; -int _saveload_mode; +SaveLoadDialogMode _saveload_mode; static bool _fios_path_changed; @@ -1671,7 +1671,7 @@ SaveLoadDlgWndProc, }; -void ShowSaveLoadDialog(int mode) +void ShowSaveLoadDialog(SaveLoadDialogMode mode) { static const StringID saveload_captions[] = { STR_4001_LOAD_GAME,