summaryrefslogtreecommitdiff
path: root/src/base_media_base.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-04-19 09:34:56 +0000
committerrubidium <rubidium@openttd.org>2010-04-19 09:34:56 +0000
commit83e40b8cedce5172142961df86abfb002f0cb272 (patch)
treeeffccac42eb4fb323d1104f570628c15b910fabd /src/base_media_base.h
parent3442b8c3456b2fdbf50b3b05a2f8840ebd53218c (diff)
downloadopenttd-83e40b8cedce5172142961df86abfb002f0cb272.tar.xz
(svn r19674) -Fix [FS#3774]: crash when the music/graphics metadata files were unreadable
Diffstat (limited to 'src/base_media_base.h')
-rw-r--r--src/base_media_base.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/base_media_base.h b/src/base_media_base.h
index 88b78374b..4cf5ed8ed 100644
--- a/src/base_media_base.h
+++ b/src/base_media_base.h
@@ -108,10 +108,11 @@ struct BaseSet {
* Read the set information from a loaded ini.
* @param ini the ini to read from
* @param path the path to this ini file (for filenames)
+ * @param full_filename the full filename of the loaded file (for error reporting purposes)
* @param allow_empty_filename empty filenames are valid
* @return true if loading was successful.
*/
- bool FillSetDetails(IniFile *ini, const char *path, bool allow_empty_filename = true);
+ bool FillSetDetails(IniFile *ini, const char *path, const char *full_filename, bool allow_empty_filename = true);
/**
* Get the description for the given ISO code.
@@ -238,7 +239,7 @@ enum GraphicsFileType {
struct GraphicsSet : BaseSet<GraphicsSet, MAX_GFT, DATA_DIR> {
PaletteType palette; ///< Palette of this graphics set
- bool FillSetDetails(struct IniFile *ini, const char *path);
+ bool FillSetDetails(struct IniFile *ini, const char *path, const char *full_filename);
};
/** All data/functions related with replacing the base graphics. */
@@ -276,7 +277,7 @@ struct MusicSet : BaseSet<MusicSet, NUM_SONGS_AVAILABLE, GM_DIR> {
byte track_nr[NUM_SONGS_AVAILABLE];
byte num_available;
- bool FillSetDetails(struct IniFile *ini, const char *path);
+ bool FillSetDetails(struct IniFile *ini, const char *path, const char *full_filename);
};
/** All data/functions related with replacing the base music */