Remove Win32 byte types from game rule helpers

This commit is contained in:
notmatthewbeshay 2026-03-10 19:17:56 +11:00
parent 0437fb921f
commit 2bc55b838d
6 changed files with 14 additions and 14 deletions

View file

@ -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;
}

View file

@ -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);
};

View file

@ -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)
{

View file

@ -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);

View file

@ -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 ?
}
}

View file

@ -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);
};
};