summaryrefslogtreecommitdiff
path: root/src/ini_type.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-08-24 13:38:26 +0000
committerrubidium <rubidium@openttd.org>2011-08-24 13:38:26 +0000
commit05300a00b1c82b1c411b38fb024a6decfefce4f8 (patch)
treef13b4b5eb198dac31d5de390bd0041f0fa8e4746 /src/ini_type.h
parent5f06d5067f861031dedd8de0ce0d21cd6f70a9a7 (diff)
downloadopenttd-05300a00b1c82b1c411b38fb024a6decfefce4f8.tar.xz
(svn r22824) -Codechange: pass sub directory to ini loading
Diffstat (limited to 'src/ini_type.h')
-rw-r--r--src/ini_type.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ini_type.h b/src/ini_type.h
index a011a798d..05133c77f 100644
--- a/src/ini_type.h
+++ b/src/ini_type.h
@@ -12,6 +12,8 @@
#ifndef INI_TYPE_H
#define INI_TYPE_H
+#include "fileio_type.h"
+
/** Types of groups */
enum IniGroupType {
IGT_VARIABLES = 0, ///< Values of the form "landscape = hilly".
@@ -62,15 +64,16 @@ struct IniLoadFile {
IniGroup *GetGroup(const char *name, size_t len = 0, bool create_new = true);
void RemoveGroup(const char *name);
- void LoadFromDisk(const char *filename);
+ void LoadFromDisk(const char *filename, Subdirectory subdir);
/**
* Open the INI file.
* @param filename Name of the INI file.
+ * @param subdir The subdir to load the file from.
* @param size [out] Size of the opened file.
* @return File handle of the opened file, or \c NULL.
*/
- virtual FILE *OpenFile(const char *filename, size_t *size) = 0;
+ virtual FILE *OpenFile(const char *filename, Subdirectory subdir, size_t *size) = 0;
/**
* Report an error about the file contents.
@@ -87,7 +90,7 @@ struct IniFile : IniLoadFile {
bool SaveToDisk(const char *filename);
- virtual FILE *OpenFile(const char *filename, size_t *size);
+ virtual FILE *OpenFile(const char *filename, Subdirectory subdir, size_t *size);
virtual void ReportFileError(const char * const pre, const char * const buffer, const char * const post);
};