mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Merge branch 'master' into wip/landscape
This commit is contained in:
commit
af31192f73
@ -4638,6 +4638,8 @@ CEvent::ReadInfo ()
|
||||
if (file == nullptr)
|
||||
goto error;
|
||||
|
||||
SDL_memset (&info, 0, sizeof (info));
|
||||
|
||||
nb = fread (&info, sizeof (DescInfo), 1, file);
|
||||
if (nb < 1)
|
||||
goto error;
|
||||
@ -4657,7 +4659,11 @@ CEvent::ReadInfo ()
|
||||
m_pSound->SetMidiVolume (info.midiVolume);
|
||||
|
||||
if ((info.majRev == 1 && info.minRev >= 1) || info.majRev >= 2)
|
||||
{
|
||||
if (info.language >= static_cast<int> (Language::end))
|
||||
info.language = 0;
|
||||
this->SetLanguage (static_cast<Language> (info.language));
|
||||
}
|
||||
|
||||
fclose (file);
|
||||
return true;
|
||||
|
@ -84,9 +84,8 @@ enum class Language {
|
||||
fr = 2,
|
||||
de = 3,
|
||||
it = 4,
|
||||
// Left some space for Korean and Hebrew as I think original translations
|
||||
// should be first, see issue #23
|
||||
pl = 7,
|
||||
pl = 5,
|
||||
end,
|
||||
};
|
||||
|
||||
class CEvent
|
||||
|
Loading…
x
Reference in New Issue
Block a user