restructure codebase according to vcproj filters

This commit is contained in:
Tropical
2026-03-30 09:50:58 -05:00
parent d5cf90c713
commit 451682693e
3015 changed files with 46858 additions and 54635 deletions

View File

@@ -0,0 +1,49 @@
#include "../../../../../Minecraft.World/Header Files/stdafx.h"
#include "../../../../../Minecraft.World/ConsoleHelpers/StringHelpers.h"
#include "BiomeOverride.h"
BiomeOverride::BiomeOverride() {
m_tile = 0;
m_topTile = 0;
m_biomeId = 0;
}
void BiomeOverride::writeAttributes(DataOutputStream* dos,
unsigned int numAttrs) {
GameRuleDefinition::writeAttributes(dos, numAttrs + 3);
ConsoleGameRules::write(dos, ConsoleGameRules::eGameRuleAttr_biomeId);
dos->writeUTF(_toString(m_biomeId));
ConsoleGameRules::write(dos, ConsoleGameRules::eGameRuleAttr_tileId);
dos->writeUTF(_toString(m_tile));
ConsoleGameRules::write(dos, ConsoleGameRules::eGameRuleAttr_topTileId);
dos->writeUTF(_toString(m_topTile));
}
void BiomeOverride::addAttribute(const std::wstring& attributeName,
const std::wstring& attributeValue) {
if (attributeName.compare(L"tileId") == 0) {
int value = _fromString<int>(attributeValue);
m_tile = value;
app.DebugPrintf("BiomeOverride: Adding parameter tileId=%d\n", m_tile);
} else if (attributeName.compare(L"topTileId") == 0) {
int value = _fromString<int>(attributeValue);
m_topTile = value;
app.DebugPrintf("BiomeOverride: Adding parameter topTileId=%d\n",
m_topTile);
} else if (attributeName.compare(L"biomeId") == 0) {
int value = _fromString<int>(attributeValue);
m_biomeId = value;
app.DebugPrintf("BiomeOverride: Adding parameter biomeId=%d\n",
m_biomeId);
} else {
GameRuleDefinition::addAttribute(attributeName, attributeValue);
}
}
bool BiomeOverride::isBiome(int id) { return m_biomeId == id; }
void BiomeOverride::getTileValues(std::uint8_t& tile, std::uint8_t& topTile) {
if (m_tile != 0) tile = m_tile;
if (m_topTile != 0) topTile = m_topTile;
}