mirror of https://github.com/OpenTTD/OpenTTD
(svn r17142) -Fix [FS#3103] (r17139): MSVC didn't like some template stuff
parent
8e058c2d27
commit
40a8bd556e
|
@ -31,7 +31,7 @@ struct BaseSet {
|
||||||
static const size_t NUM_FILES = Tnum_files;
|
static const size_t NUM_FILES = Tnum_files;
|
||||||
|
|
||||||
/** Internal names of the files in this set. */
|
/** Internal names of the files in this set. */
|
||||||
static const char *file_names[Tnum_files];
|
static const char **file_names;
|
||||||
|
|
||||||
const char *name; ///< The name of the base set
|
const char *name; ///< The name of the base set
|
||||||
const char *description; ///< Description of the base set
|
const char *description; ///< Description of the base set
|
||||||
|
|
|
@ -106,7 +106,7 @@ void CheckExternalFiles()
|
||||||
char *add_pos = error_msg;
|
char *add_pos = error_msg;
|
||||||
const char *last = lastof(error_msg);
|
const char *last = lastof(error_msg);
|
||||||
|
|
||||||
for (uint i = 0; i < lengthof(used_set->files); i++) {
|
for (uint i = 0; i < MAX_GFT; i++) {
|
||||||
if (!used_set->files[i].CheckMD5()) {
|
if (!used_set->files[i].CheckMD5()) {
|
||||||
add_pos += seprintf(add_pos, last, "Your '%s' file is corrupted or missing! %s\n", used_set->files[i].filename, used_set->files[i].missing_warning);
|
add_pos += seprintf(add_pos, last, "Your '%s' file is corrupted or missing! %s\n", used_set->files[i].filename, used_set->files[i].missing_warning);
|
||||||
}
|
}
|
||||||
|
@ -231,8 +231,11 @@ bool MD5File::CheckMD5() const
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Names corresponding to the GraphicsFileType */
|
/** Names corresponding to the GraphicsFileType */
|
||||||
|
const char *_graphics_file_names[] = { "base", "logos", "arctic", "tropical", "toyland", "extra" };
|
||||||
|
|
||||||
|
/** Implementation */
|
||||||
template <class T, size_t Tnum_files>
|
template <class T, size_t Tnum_files>
|
||||||
/* static */ const char *BaseSet<T, Tnum_files>::file_names[Tnum_files] = { "base", "logos", "arctic", "tropical", "toyland", "extra" };
|
/* static */ const char **BaseSet<T, Tnum_files>::file_names = _graphics_file_names;
|
||||||
|
|
||||||
extern void UpdateNewGRFConfigPalette();
|
extern void UpdateNewGRFConfigPalette();
|
||||||
|
|
||||||
|
|
|
@ -260,8 +260,11 @@ void SndPlayFx(SoundID sound)
|
||||||
INSTANTIATE_BASE_MEDIA_METHODS(BaseMedia<SoundsSet>, SoundsSet)
|
INSTANTIATE_BASE_MEDIA_METHODS(BaseMedia<SoundsSet>, SoundsSet)
|
||||||
|
|
||||||
/** Names corresponding to the sound set's files */
|
/** Names corresponding to the sound set's files */
|
||||||
|
const char *_sound_file_names[] = { "samples" };
|
||||||
|
|
||||||
|
|
||||||
template <class T, size_t Tnum_files>
|
template <class T, size_t Tnum_files>
|
||||||
/* static */ const char *BaseSet<T, Tnum_files>::file_names[Tnum_files] = { "samples" };
|
/* static */ const char **BaseSet<T, Tnum_files>::file_names = _sound_file_names;
|
||||||
|
|
||||||
template <class Tbase_set>
|
template <class Tbase_set>
|
||||||
/* static */ const char *BaseMedia<Tbase_set>::GetExtension()
|
/* static */ const char *BaseMedia<Tbase_set>::GetExtension()
|
||||||
|
|
Loading…
Reference in New Issue