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 a9be52c41a.
This commit is contained in:
Loki Rautio
2026-03-07 21:12:22 -06:00
parent a9be52c41a
commit 087b7e7abf
1373 changed files with 19449 additions and 19903 deletions

View File

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