Use BYTE Win Typedef instead of byte typedef from Minecraft.World

"byte" wasnt working anymore for some reason
This commit is contained in:
GabsPuNs
2026-04-13 17:54:28 -04:00
parent e90e585ef0
commit 40d48948ff
233 changed files with 4751 additions and 930 deletions

View File

@@ -90,7 +90,7 @@ void TheEndLevelRandomLevelSource::prepareHeights(int xOffs, int zOffs, byteArra
} else {
}
blocks[offs] = static_cast<byte>(tileId);
blocks[offs] = static_cast<BYTE>(tileId);
offs += step;
val += vala;
}
@@ -119,8 +119,8 @@ void TheEndLevelRandomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray
int runDepth = 1;
int run = -1;
byte top = (byte) Tile::endStone_Id;
byte material = (byte) Tile::endStone_Id;
BYTE top = (BYTE) Tile::endStone_Id;
BYTE material = (BYTE) Tile::endStone_Id;
for (int y = Level::genDepthMinusOne; y >= 0; y--)
{
@@ -139,7 +139,7 @@ void TheEndLevelRandomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray
if (runDepth <= 0)
{
top = 0;
material = static_cast<byte>(Tile::endStone_Id);
material = static_cast<BYTE>(Tile::endStone_Id);
}
run = runDepth;
@@ -169,7 +169,7 @@ LevelChunk *TheEndLevelRandomLevelSource::getChunk(int xOffs, int zOffs)
BiomeArray biomes;
// 4J - now allocating this with a physical alloc & bypassing general memory management so that it will get cleanly freed
unsigned int blocksSize = Level::genDepth * 16 * 16;
byte *tileData = static_cast<byte *>(XPhysicalAlloc(blocksSize, MAXULONG_PTR, 4096, PAGE_READWRITE));
BYTE *tileData = static_cast<BYTE *>(XPhysicalAlloc(blocksSize, MAXULONG_PTR, 4096, PAGE_READWRITE));
XMemSet128(tileData,0,blocksSize);
byteArray blocks = byteArray(tileData,blocksSize);
// byteArray blocks = byteArray(16 * level->depth * 16);