summaryrefslogtreecommitdiff
path: root/src/fileio_type.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-08-31 10:50:05 +0000
committerrubidium <rubidium@openttd.org>2008-08-31 10:50:05 +0000
commitea1f180a55f66ae02f95e63d387fa445061daa25 (patch)
treec32cbaf06fe071c31b5540a00a6a0e8317d4f1d4 /src/fileio_type.h
parent46e23b8f996f0e684d2447c637b10daa5abfb964 (diff)
downloadopenttd-ea1f180a55f66ae02f95e63d387fa445061daa25.tar.xz
(svn r14199) -Codechange: split fileio.h into fileio_type.h and fileio_func.h so not everything that includes saveload.h needs to include everything else too.
Diffstat (limited to 'src/fileio_type.h')
-rw-r--r--src/fileio_type.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/fileio_type.h b/src/fileio_type.h
new file mode 100644
index 000000000..baef9c70d
--- /dev/null
+++ b/src/fileio_type.h
@@ -0,0 +1,42 @@
+/* $Id$ */
+
+/** @file fileio_type.h Types for Standard In/Out file operations */
+
+#ifndef FILEIO_TYPE_H
+#define FILEIO_TYPE_H
+
+#include "core/enum_type.hpp"
+
+/**
+ * The different kinds of subdirectories OpenTTD uses
+ */
+enum Subdirectory {
+ BASE_DIR, ///< Base directory for all subdirectories
+ SAVE_DIR, ///< Base directory for all savegames
+ AUTOSAVE_DIR, ///< Subdirectory of save for autosaves
+ SCENARIO_DIR, ///< Base directory for all scenarios
+ HEIGHTMAP_DIR, ///< Subdirectory of scenario for heightmaps
+ GM_DIR, ///< Subdirectory for all music
+ DATA_DIR, ///< Subdirectory for all data (GRFs, sample.cat, intro game)
+ LANG_DIR, ///< Subdirectory for all translation files
+ NUM_SUBDIRS, ///< Number of subdirectories
+ NO_DIRECTORY, ///< A path without any base directory
+};
+
+/**
+ * Types of searchpaths OpenTTD might use
+ */
+enum Searchpath {
+ SP_FIRST_DIR,
+ SP_WORKING_DIR = SP_FIRST_DIR, ///< Search in the working directory
+ SP_PERSONAL_DIR, ///< Search in the personal directory
+ SP_SHARED_DIR, ///< Search in the shared directory, like 'Shared Files' under Windows
+ SP_BINARY_DIR, ///< Search in the directory where the binary resides
+ SP_INSTALLATION_DIR, ///< Search in the installation directory
+ SP_APPLICATION_BUNDLE_DIR, ///< Search within the application bundle
+ NUM_SEARCHPATHS
+};
+
+DECLARE_POSTFIX_INCREMENT(Searchpath);
+
+#endif /* FILEIO_TYPE_H */