mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/GabsPuNs-MinecraftConsoles.git
synced 2026-07-06 14:58:30 +00:00
Use BYTE Win Typedef instead of byte typedef from Minecraft.World
"byte" wasnt working anymore for some reason
This commit is contained in:
@@ -204,11 +204,11 @@ void CustomLevelSource::prepareHeights(int xOffs, int zOffs, byteArray blocks)
|
||||
// 4J - this comparison used to just be with 0.0f but is now varied by block above
|
||||
if (yc * CHUNK_HEIGHT + y < mapHeight)
|
||||
{
|
||||
tileId = static_cast<byte>(Tile::stone_Id);
|
||||
tileId = static_cast<BYTE>(Tile::stone_Id);
|
||||
}
|
||||
else if (yc * CHUNK_HEIGHT + y < waterHeight)
|
||||
{
|
||||
tileId = static_cast<byte>(Tile::calmWater_Id);
|
||||
tileId = static_cast<BYTE>(Tile::calmWater_Id);
|
||||
}
|
||||
|
||||
// 4J - more extra code to make sure that the column at the edge of the world is just water & rock, to match the infinite sea that
|
||||
@@ -266,8 +266,8 @@ void CustomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks, Bi
|
||||
|
||||
int run = -1;
|
||||
|
||||
byte top = b->topMaterial;
|
||||
byte material = b->material;
|
||||
BYTE top = b->topMaterial;
|
||||
BYTE material = b->material;
|
||||
|
||||
LevelGenerationOptions *lgo = app.getLevelGenerationOptions();
|
||||
if(lgo != nullptr)
|
||||
@@ -290,7 +290,7 @@ void CustomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks, Bi
|
||||
if (y <= 1 + random->nextInt(2)) // 4J - changed to make the bedrock not have bits you can get stuck in
|
||||
// if (y <= 0 + random->nextInt(5))
|
||||
{
|
||||
blocks[offs] = static_cast<byte>(Tile::unbreakable_Id);
|
||||
blocks[offs] = static_cast<BYTE>(Tile::unbreakable_Id);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -307,7 +307,7 @@ void CustomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks, Bi
|
||||
if (runDepth <= 0)
|
||||
{
|
||||
top = 0;
|
||||
material = static_cast<byte>(Tile::stone_Id);
|
||||
material = static_cast<BYTE>(Tile::stone_Id);
|
||||
}
|
||||
else if (y >= waterHeight - 4 && y <= waterHeight + 1)
|
||||
{
|
||||
@@ -321,8 +321,8 @@ void CustomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks, Bi
|
||||
|
||||
if (y < waterHeight && top == 0)
|
||||
{
|
||||
if (temp < 0.15f) top = static_cast<byte>(Tile::ice_Id);
|
||||
else top = static_cast<byte>(Tile::calmWater_Id);
|
||||
if (temp < 0.15f) top = static_cast<BYTE>(Tile::ice_Id);
|
||||
else top = static_cast<BYTE>(Tile::calmWater_Id);
|
||||
}
|
||||
|
||||
run = runDepth;
|
||||
@@ -339,7 +339,7 @@ void CustomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks, Bi
|
||||
if (run == 0 && material == Tile::sand_Id)
|
||||
{
|
||||
run = random->nextInt(4);
|
||||
material = static_cast<byte>(Tile::sandStone_Id);
|
||||
material = static_cast<BYTE>(Tile::sandStone_Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -368,7 +368,7 @@ LevelChunk *CustomLevelSource::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 blocksSize = Level::maxBuildHeight * 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);
|
||||
|
||||
Reference in New Issue
Block a user