Fixed Compile errors
c++11 introduces scoped enums, so the code didn't fail in clang
This commit is contained in:
parent
f8881622a4
commit
d9fb83300c
@ -78,7 +78,7 @@ bool cBiomeRenderer::Render(cPixmap & a_Pixmap)
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < ARRAYCOUNT(CurBiomes); i++)
|
for (int i = 0; i < ARRAYCOUNT(CurBiomes); i++)
|
||||||
{
|
{
|
||||||
CurBiomes[i] = EMCSBiome::biInvalidBiome;
|
CurBiomes[i] = biInvalidBiome;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -13,11 +13,11 @@ EMCSBiome StringToBiome(const AString & a_BiomeString)
|
|||||||
int res = atoi(a_BiomeString.c_str());
|
int res = atoi(a_BiomeString.c_str());
|
||||||
if ((res != 0) || (a_BiomeString.compare("0") == 0))
|
if ((res != 0) || (a_BiomeString.compare("0") == 0))
|
||||||
{
|
{
|
||||||
if(res >= biFirstBiome && res < biNumBiomes)
|
if ((res >= biFirstBiome) && (res < biNumBiomes))
|
||||||
{
|
{
|
||||||
return (EMCSBiome)res;
|
return (EMCSBiome)res;
|
||||||
}
|
}
|
||||||
else if(res >= biFirstVarientBiome && res < biNumVarientBiomes)
|
else if ((res >= biFirstVariantBiome) && (res < biNumVariantBiomes))
|
||||||
{
|
{
|
||||||
return (EMCSBiome)res;
|
return (EMCSBiome)res;
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ enum EMCSBiome
|
|||||||
biVariant = 128,
|
biVariant = 128,
|
||||||
|
|
||||||
// Release 1.7 biome variants:
|
// Release 1.7 biome variants:
|
||||||
biFirstVarientBiome = 129,
|
biFirstVariantBiome = 129,
|
||||||
biSunflowerPlains = 129,
|
biSunflowerPlains = 129,
|
||||||
biDesertM = 130,
|
biDesertM = 130,
|
||||||
biExtremeHillsM = 131,
|
biExtremeHillsM = 131,
|
||||||
@ -100,8 +100,8 @@ enum EMCSBiome
|
|||||||
biMesaPlateauFM = 166,
|
biMesaPlateauFM = 166,
|
||||||
biMesaPlateauM = 167,
|
biMesaPlateauM = 167,
|
||||||
// Automatically capture the maximum consecutive biome value into biVarientMaxBiome:
|
// Automatically capture the maximum consecutive biome value into biVarientMaxBiome:
|
||||||
biNumVarientBiomes, // True number of biomes, since they are zero-based
|
biNumVariantBiomes, // True number of biomes, since they are zero-based
|
||||||
biMaxVarientBiome = biNumVarientBiomes - 1, // The maximum biome value
|
biMaxVariantBiome = biNumVariantBiomes - 1, // The maximum biome value
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
/// Translates a biome string to biome enum. Takes either a number or a biome alias (built-in). Returns biInvalidBiome on failure.
|
/// Translates a biome string to biome enum. Takes either a number or a biome alias (built-in). Returns biInvalidBiome on failure.
|
||||||
|
@ -97,7 +97,7 @@ void cBioGenConstant::InitializeBiomeGen(cIniFile & a_IniFile)
|
|||||||
{
|
{
|
||||||
AString Biome = a_IniFile.GetValueSet("Generator", "ConstantBiome", "Plains");
|
AString Biome = a_IniFile.GetValueSet("Generator", "ConstantBiome", "Plains");
|
||||||
m_Biome = StringToBiome(Biome);
|
m_Biome = StringToBiome(Biome);
|
||||||
if (m_Biome == EMCSBiome::biInvalidBiome)
|
if (m_Biome == biInvalidBiome)
|
||||||
{
|
{
|
||||||
LOGWARN("[Generator]::ConstantBiome value \"%s\" not recognized, using \"Plains\".", Biome.c_str());
|
LOGWARN("[Generator]::ConstantBiome value \"%s\" not recognized, using \"Plains\".", Biome.c_str());
|
||||||
m_Biome = biPlains;
|
m_Biome = biPlains;
|
||||||
|
Loading…
Reference in New Issue
Block a user