mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-27 04:43:36 +00:00
Remove Win32 byte types from game rule helpers
This commit is contained in:
parent
0437fb921f
commit
2bc55b838d
|
|
@ -52,8 +52,8 @@ bool BiomeOverride::isBiome(int id)
|
|||
return m_biomeId == id;
|
||||
}
|
||||
|
||||
void BiomeOverride::getTileValues(BYTE &tile, BYTE &topTile)
|
||||
void BiomeOverride::getTileValues(std::uint8_t &tile, std::uint8_t &topTile)
|
||||
{
|
||||
if(m_tile != 0) tile = (BYTE)m_tile;
|
||||
if(m_topTile != 0) topTile = (BYTE)m_topTile;
|
||||
}
|
||||
if(m_tile != 0) tile = m_tile;
|
||||
if(m_topTile != 0) topTile = m_topTile;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
class BiomeOverride : public GameRuleDefinition
|
||||
{
|
||||
private:
|
||||
BYTE m_topTile;
|
||||
BYTE m_tile;
|
||||
std::uint8_t m_topTile;
|
||||
std::uint8_t m_tile;
|
||||
int m_biomeId;
|
||||
|
||||
public:
|
||||
|
|
@ -19,5 +19,5 @@ public:
|
|||
virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue);
|
||||
|
||||
bool isBiome(int id);
|
||||
void getTileValues(BYTE &tile, BYTE &topTile);
|
||||
};
|
||||
void getTileValues(std::uint8_t &tile, std::uint8_t &topTile);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -400,7 +400,7 @@ LPCWSTR LevelGenerationOptions::getString(const std::wstring &key)
|
|||
}
|
||||
}
|
||||
|
||||
void LevelGenerationOptions::getBiomeOverride(int biomeId, BYTE &tile, BYTE &topTile)
|
||||
void LevelGenerationOptions::getBiomeOverride(int biomeId, std::uint8_t &tile, std::uint8_t &topTile)
|
||||
{
|
||||
for(AUTO_VAR(it, m_biomeOverrides.begin()); it != m_biomeOverrides.end(); ++it)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ public:
|
|||
void setRequiredGameRules(LevelRuleset *rules);
|
||||
LevelRuleset *getRequiredGameRules();
|
||||
|
||||
void getBiomeOverride(int biomeId, BYTE &tile, BYTE &topTile);
|
||||
void getBiomeOverride(int biomeId, std::uint8_t &tile, std::uint8_t &topTile);
|
||||
bool isFeatureChunk(int chunkX, int chunkZ, StructureFeature::EFeatureTypes feature);
|
||||
|
||||
void loadStringTable(StringTable *table);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ LevelRules::LevelRules()
|
|||
{
|
||||
}
|
||||
|
||||
void LevelRules::addLevelRule(const std::wstring &displayName, PBYTE pbData, DWORD dwLen)
|
||||
void LevelRules::addLevelRule(const std::wstring &displayName, std::uint8_t *pbData, unsigned int dataLength)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -17,4 +17,4 @@ void LevelRules::addLevelRule(const std::wstring &displayName, LevelRuleset *roo
|
|||
void LevelRules::removeLevelRule(LevelRuleset *removing)
|
||||
{
|
||||
// TODO ?
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ class LevelRules
|
|||
public:
|
||||
LevelRules();
|
||||
|
||||
void addLevelRule(const std::wstring &displayName, PBYTE pbData, DWORD dwLen);
|
||||
void addLevelRule(const std::wstring &displayName, std::uint8_t *pbData, unsigned int dataLength);
|
||||
void addLevelRule(const std::wstring &displayName, LevelRuleset *rootRule);
|
||||
|
||||
void removeLevelRule(LevelRuleset *removing);
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue