summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-12-27 17:29:27 +0000
committerbelugas <belugas@openttd.org>2007-12-27 17:29:27 +0000
commite67ed0a808a318b9819745a7f1042f7d8d7fd67b (patch)
treecc3c46ff6aec1a853eb966f058c7861c992eb97f
parent6196fa01aba63d03b7dbeafa6a67b271192599ce (diff)
downloadopenttd-e67ed0a808a318b9819745a7f1042f7d8d7fd67b.tar.xz
(svn r11711) -Codechange: Name the Save Load Dialog Mode enum
-rw-r--r--src/fios.h14
-rw-r--r--src/functions.h9
-rw-r--r--src/intro_gui.cpp2
-rw-r--r--src/main_gui.cpp1
-rw-r--r--src/misc_gui.cpp4
5 files changed, 17 insertions, 13 deletions
diff --git a/src/fios.h b/src/fios.h
index 8dd0656e4..30b435d0b 100644
--- a/src/fios.h
+++ b/src/fios.h
@@ -31,6 +31,15 @@ struct FiosItem {
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 @@ enum {
/* 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);
diff --git a/src/functions.h b/src/functions.h
index 474008903..1badf9dfc 100644
--- a/src/functions.h
+++ b/src/functions.h
@@ -77,15 +77,6 @@ StringID RemapOldStringID(StringID s);
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();
diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp
index 18e5350b0..15d1a7c5e 100644
--- 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},
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 8632b4ab8..4e7b14191 100644
--- 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"
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 8886af4cb..606ff4499 100644
--- 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 @@ static const WindowDesc _save_dialog_desc = {
SaveLoadDlgWndProc,
};
-void ShowSaveLoadDialog(int mode)
+void ShowSaveLoadDialog(SaveLoadDialogMode mode)
{
static const StringID saveload_captions[] = {
STR_4001_LOAD_GAME,