From 2bc55b838debea4cbb1fc67e94bd1b583ca51929 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Tue, 10 Mar 2026 19:17:56 +1100 Subject: [PATCH] Remove Win32 byte types from game rule helpers --- .../Platform/Common/GameRules/BiomeOverride.cpp | 8 ++++---- .../Platform/Common/GameRules/BiomeOverride.h | 8 ++++---- .../Platform/Common/GameRules/LevelGenerationOptions.cpp | 2 +- .../Platform/Common/GameRules/LevelGenerationOptions.h | 2 +- Minecraft.Client/Platform/Common/GameRules/LevelRules.cpp | 4 ++-- Minecraft.Client/Platform/Common/GameRules/LevelRules.h | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Minecraft.Client/Platform/Common/GameRules/BiomeOverride.cpp b/Minecraft.Client/Platform/Common/GameRules/BiomeOverride.cpp index 9140ed526..d05f98098 100644 --- a/Minecraft.Client/Platform/Common/GameRules/BiomeOverride.cpp +++ b/Minecraft.Client/Platform/Common/GameRules/BiomeOverride.cpp @@ -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; -} \ No newline at end of file + if(m_tile != 0) tile = m_tile; + if(m_topTile != 0) topTile = m_topTile; +} diff --git a/Minecraft.Client/Platform/Common/GameRules/BiomeOverride.h b/Minecraft.Client/Platform/Common/GameRules/BiomeOverride.h index 6ce91bbd1..3259658ef 100644 --- a/Minecraft.Client/Platform/Common/GameRules/BiomeOverride.h +++ b/Minecraft.Client/Platform/Common/GameRules/BiomeOverride.h @@ -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); -}; \ No newline at end of file + void getTileValues(std::uint8_t &tile, std::uint8_t &topTile); +}; diff --git a/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.cpp b/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.cpp index 6839434ae..39de339cb 100644 --- a/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.cpp +++ b/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.cpp @@ -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) { diff --git a/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.h b/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.h index 135e509a0..07597c139 100644 --- a/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.h +++ b/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.h @@ -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); diff --git a/Minecraft.Client/Platform/Common/GameRules/LevelRules.cpp b/Minecraft.Client/Platform/Common/GameRules/LevelRules.cpp index a15749b34..94d2d55f7 100644 --- a/Minecraft.Client/Platform/Common/GameRules/LevelRules.cpp +++ b/Minecraft.Client/Platform/Common/GameRules/LevelRules.cpp @@ -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 ? -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/GameRules/LevelRules.h b/Minecraft.Client/Platform/Common/GameRules/LevelRules.h index e88cd5dac..d32577eef 100644 --- a/Minecraft.Client/Platform/Common/GameRules/LevelRules.h +++ b/Minecraft.Client/Platform/Common/GameRules/LevelRules.h @@ -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); -}; \ No newline at end of file +};