src/fileio_type.h
author rubidium
Thu, 18 Dec 2008 12:23:08 +0000
changeset 10436 8d3a9fbe8f19
parent 10039 1f236afd6cd1
permissions -rw-r--r--
(svn r14689) -Change: make configure die on commonly made user mistakes, like not having SDL development files or zlib headers installed; you can still compile a dedicated server or a binary without zlib, but you have to explicitly force it.
2186
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 1198
diff changeset
     1
/* $Id$ */
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 1198
diff changeset
     2
10039
1f236afd6cd1 (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.
rubidium
parents: 10036
diff changeset
     3
/** @file fileio_type.h Types for Standard In/Out file operations */
6179
d19b0137d8e4 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents: 5475
diff changeset
     4
10039
1f236afd6cd1 (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.
rubidium
parents: 10036
diff changeset
     5
#ifndef FILEIO_TYPE_H
1f236afd6cd1 (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.
rubidium
parents: 10036
diff changeset
     6
#define FILEIO_TYPE_H
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     7
8263
2b3e64c5e680 (svn r11827) -Codechange: do not include enum_type.hpp unnecessary.
rubidium
parents: 8131
diff changeset
     8
#include "core/enum_type.hpp"
6929
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
     9
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    10
/**
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    11
 * The different kinds of subdirectories OpenTTD uses
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    12
 */
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    13
enum Subdirectory {
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    14
	BASE_DIR,      ///< Base directory for all subdirectories
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    15
	SAVE_DIR,      ///< Base directory for all savegames
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    16
	AUTOSAVE_DIR,  ///< Subdirectory of save for autosaves
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    17
	SCENARIO_DIR,  ///< Base directory for all scenarios
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    18
	HEIGHTMAP_DIR, ///< Subdirectory of scenario for heightmaps
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    19
	GM_DIR,        ///< Subdirectory for all music
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    20
	DATA_DIR,      ///< Subdirectory for all data (GRFs, sample.cat, intro game)
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    21
	LANG_DIR,      ///< Subdirectory for all translation files
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    22
	NUM_SUBDIRS,   ///< Number of subdirectories
6935
0a2a174d3f6a (svn r10188) -Codechange: make it a little easier to load a savegame from the console:
rubidium
parents: 6929
diff changeset
    23
	NO_DIRECTORY,  ///< A path without any base directory
6929
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    24
};
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    25
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    26
/**
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    27
 * Types of searchpaths OpenTTD might use
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    28
 */
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    29
enum Searchpath {
6944
53e2a7e57071 (svn r10198) -Fix (r10194): did not search all search paths.
rubidium
parents: 6941
diff changeset
    30
	SP_FIRST_DIR,
53e2a7e57071 (svn r10198) -Fix (r10194): did not search all search paths.
rubidium
parents: 6941
diff changeset
    31
	SP_WORKING_DIR = SP_FIRST_DIR, ///< Search in the working directory
53e2a7e57071 (svn r10198) -Fix (r10194): did not search all search paths.
rubidium
parents: 6941
diff changeset
    32
	SP_PERSONAL_DIR,               ///< Search in the personal directory
53e2a7e57071 (svn r10198) -Fix (r10194): did not search all search paths.
rubidium
parents: 6941
diff changeset
    33
	SP_SHARED_DIR,                 ///< Search in the shared directory, like 'Shared Files' under Windows
53e2a7e57071 (svn r10198) -Fix (r10194): did not search all search paths.
rubidium
parents: 6941
diff changeset
    34
	SP_BINARY_DIR,                 ///< Search in the directory where the binary resides
53e2a7e57071 (svn r10198) -Fix (r10194): did not search all search paths.
rubidium
parents: 6941
diff changeset
    35
	SP_INSTALLATION_DIR,           ///< Search in the installation directory
53e2a7e57071 (svn r10198) -Fix (r10194): did not search all search paths.
rubidium
parents: 6941
diff changeset
    36
	SP_APPLICATION_BUNDLE_DIR,     ///< Search within the application bundle
6929
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    37
	NUM_SEARCHPATHS
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    38
};
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    39
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    40
DECLARE_POSTFIX_INCREMENT(Searchpath);
56470c1b8a66 (svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
rubidium
parents: 6896
diff changeset
    41
10039
1f236afd6cd1 (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.
rubidium
parents: 10036
diff changeset
    42
#endif /* FILEIO_TYPE_H */