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)
|
if (file == nullptr)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
SDL_memset (&info, 0, sizeof (info));
|
||||||
|
|
||||||
nb = fread (&info, sizeof (DescInfo), 1, file);
|
nb = fread (&info, sizeof (DescInfo), 1, file);
|
||||||
if (nb < 1)
|
if (nb < 1)
|
||||||
goto error;
|
goto error;
|
||||||
@ -4657,7 +4659,11 @@ CEvent::ReadInfo ()
|
|||||||
m_pSound->SetMidiVolume (info.midiVolume);
|
m_pSound->SetMidiVolume (info.midiVolume);
|
||||||
|
|
||||||
if ((info.majRev == 1 && info.minRev >= 1) || info.majRev >= 2)
|
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));
|
this->SetLanguage (static_cast<Language> (info.language));
|
||||||
|
}
|
||||||
|
|
||||||
fclose (file);
|
fclose (file);
|
||||||
return true;
|
return true;
|
||||||
|
@ -84,9 +84,8 @@ enum class Language {
|
|||||||
fr = 2,
|
fr = 2,
|
||||||
de = 3,
|
de = 3,
|
||||||
it = 4,
|
it = 4,
|
||||||
// Left some space for Korean and Hebrew as I think original translations
|
pl = 5,
|
||||||
// should be first, see issue #23
|
end,
|
||||||
pl = 7,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CEvent
|
class CEvent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user