aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/FlatLevelSource.cpp
diff options
context:
space:
mode:
authorLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
committerLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
commit087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch)
tree69454763e73ca764af4e682d3573080b13138a0e /Minecraft.World/FlatLevelSource.cpp
parenta9be52c41a02d207233199e98898fe7483d7e817 (diff)
Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore functionality of the nightly. All in-game menus do not work and generating a world crashes. This reverts commit a9be52c41a02d207233199e98898fe7483d7e817.
Diffstat (limited to 'Minecraft.World/FlatLevelSource.cpp')
-rw-r--r--Minecraft.World/FlatLevelSource.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Minecraft.World/FlatLevelSource.cpp b/Minecraft.World/FlatLevelSource.cpp
index 9ea1ed36..ec2c0f96 100644
--- a/Minecraft.World/FlatLevelSource.cpp
+++ b/Minecraft.World/FlatLevelSource.cpp
@@ -55,7 +55,7 @@ void FlatLevelSource::prepareHeights(byteArray blocks)
{
block = Tile::grass_Id;
}
- blocks[xc << 11 | zc << 7 | yc] = static_cast<byte>(block);
+ blocks[xc << 11 | zc << 7 | yc] = (byte) block;
}
}
}
@@ -70,7 +70,7 @@ LevelChunk *FlatLevelSource::getChunk(int xOffs, int zOffs)
{
// 4J - now allocating this with a physical alloc & bypassing general memory management so that it will get cleanly freed
int chunksSize = Level::genDepth * 16 * 16;
- byte *tileData = static_cast<byte *>(XPhysicalAlloc(chunksSize, MAXULONG_PTR, 4096, PAGE_READWRITE));
+ byte *tileData = (byte *)XPhysicalAlloc(chunksSize, MAXULONG_PTR, 4096, PAGE_READWRITE);
XMemSet128(tileData,0,chunksSize);
byteArray blocks = byteArray(tileData,chunksSize);
// byteArray blocks = byteArray(16 * level->depth * 16);
@@ -141,15 +141,15 @@ vector<Biome::MobSpawnerData *> *FlatLevelSource::getMobsAt(MobCategory *mobCate
{
Biome *biome = level->getBiome(x, z);
if (biome == NULL)
- {
- return nullptr;
+ {
+ return NULL;
}
return biome->getMobs(mobCategory);
}
TilePos *FlatLevelSource::findNearestMapFeature(Level *level, const wstring& featureName, int x, int y, int z)
{
- return nullptr;
+ return NULL;
}
void FlatLevelSource::recreateLogicStructuresForChunk(int chunkX, int chunkZ)