summaryrefslogtreecommitdiff
path: root/src/gfxinit.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-08-09 19:50:44 +0000
committerrubidium <rubidium@openttd.org>2009-08-09 19:50:44 +0000
commit9ee2a66c8620d2f47c0d7792847c90146dfc4f8e (patch)
treedae5e6c7eac84bc443fc16ebb012bb7697923649 /src/gfxinit.cpp
parent35d5a197d6f93e05eb358ed0a30db9ab2645911b (diff)
downloadopenttd-9ee2a66c8620d2f47c0d7792847c90146dfc4f8e.tar.xz
(svn r17139) -Change: add the concept of sound sets
Diffstat (limited to 'src/gfxinit.cpp')
-rw-r--r--src/gfxinit.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp
index 32a9815ea..5ec306a4e 100644
--- a/src/gfxinit.cpp
+++ b/src/gfxinit.cpp
@@ -30,7 +30,6 @@ const byte *_palette_remap = NULL;
/** Palette map to go from the _use_palette to the !_use_palette */
const byte *_palette_reverse_remap = NULL;
-#include "table/files.h"
#include "table/landscape_sprite.h"
static const SpriteID * const _landscape_spriteindexes[] = {
@@ -94,6 +93,8 @@ static void LoadGrfIndexed(const char *filename, const SpriteID *index_tbl, int
*/
void CheckExternalFiles()
{
+ if (BaseGraphics::GetUsedSet() == NULL || BaseSounds::GetUsedSet() == NULL) return;
+
BaseGraphics::DeterminePalette();
const GraphicsSet *used_set = BaseGraphics::GetUsedSet();
@@ -111,13 +112,9 @@ void CheckExternalFiles()
}
}
- bool sound = false;
- for (uint i = 0; !sound && i < lengthof(_sound_sets); i++) {
- sound = _sound_sets[i].CheckMD5();
- }
-
- if (!sound) {
- add_pos += seprintf(add_pos, last, "Your 'sample.cat' file is corrupted or missing! You can find 'sample.cat' on your Transport Tycoon Deluxe CD-ROM.\n");
+ const SoundsSet *sounds_set = BaseSounds::GetUsedSet();
+ if (!sounds_set->files->CheckMD5()) {
+ add_pos += seprintf(add_pos, last, "Your '%s' file is corrupted or missing! %s\n", sounds_set->files->filename, sounds_set->files->missing_warning);
}
if (add_pos != error_msg) ShowInfoF("%s", error_msg);