mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-23 22:17:06 +00:00
fix: remove byte type alias
This commit is contained in:
@@ -104,7 +104,7 @@ void HellRandomLevelSource::prepareHeights(int xOffs, int zOffs, byteArray block
|
||||
tileId = Tile::hellRock_Id;
|
||||
}
|
||||
|
||||
blocks[offs] = (byte) tileId;
|
||||
blocks[offs] = (uint8_t) tileId;
|
||||
offs += step;
|
||||
val += vala;
|
||||
}
|
||||
@@ -147,8 +147,8 @@ void HellRandomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks
|
||||
|
||||
int run = -1;
|
||||
|
||||
byte top = (byte) Tile::hellRock_Id;
|
||||
byte material = (byte) Tile::hellRock_Id;
|
||||
uint8_t top = (uint8_t) Tile::hellRock_Id;
|
||||
uint8_t material = (uint8_t) Tile::hellRock_Id;
|
||||
|
||||
for (int y = Level::genDepthMinusOne; y >= 0; y--)
|
||||
{
|
||||
@@ -160,7 +160,7 @@ void HellRandomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks
|
||||
{
|
||||
if( z - random->nextInt( 4 ) <= 0 || xOffs < -(m_XZSize/2) )
|
||||
{
|
||||
blocks[offs] = (byte) Tile::unbreakable_Id;
|
||||
blocks[offs] = (uint8_t) Tile::unbreakable_Id;
|
||||
blockSet = true;
|
||||
}
|
||||
}
|
||||
@@ -168,7 +168,7 @@ void HellRandomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks
|
||||
{
|
||||
if( x - random->nextInt( 4 ) <= 0 || zOffs < -(m_XZSize/2))
|
||||
{
|
||||
blocks[offs] = (byte) Tile::unbreakable_Id;
|
||||
blocks[offs] = (uint8_t) Tile::unbreakable_Id;
|
||||
blockSet = true;
|
||||
}
|
||||
}
|
||||
@@ -176,7 +176,7 @@ void HellRandomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks
|
||||
{
|
||||
if( z + random->nextInt(4) >= 15 || xOffs > (m_XZSize/2))
|
||||
{
|
||||
blocks[offs] = (byte) Tile::unbreakable_Id;
|
||||
blocks[offs] = (uint8_t) Tile::unbreakable_Id;
|
||||
blockSet = true;
|
||||
}
|
||||
}
|
||||
@@ -184,7 +184,7 @@ void HellRandomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks
|
||||
{
|
||||
if( x + random->nextInt(4) >= 15 || zOffs > (m_XZSize/2) )
|
||||
{
|
||||
blocks[offs] = (byte) Tile::unbreakable_Id;
|
||||
blocks[offs] = (uint8_t) Tile::unbreakable_Id;
|
||||
blockSet = true;
|
||||
}
|
||||
}
|
||||
@@ -193,7 +193,7 @@ void HellRandomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks
|
||||
|
||||
if (y >= Level::genDepthMinusOne - random->nextInt(5) || y <= 0 + random->nextInt(5))
|
||||
{
|
||||
blocks[offs] = (byte) Tile::unbreakable_Id;
|
||||
blocks[offs] = (uint8_t) Tile::unbreakable_Id;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -210,20 +210,20 @@ void HellRandomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks
|
||||
if (runDepth <= 0)
|
||||
{
|
||||
top = 0;
|
||||
material = (byte) Tile::hellRock_Id;
|
||||
material = (uint8_t) Tile::hellRock_Id;
|
||||
}
|
||||
else if (y >= waterHeight - 4 && y <= waterHeight + 1)
|
||||
{
|
||||
top = (byte) Tile::hellRock_Id;
|
||||
material = (byte) Tile::hellRock_Id;
|
||||
if (gravel) top = (byte) Tile::gravel_Id;
|
||||
if (gravel) material = (byte) Tile::hellRock_Id;
|
||||
top = (uint8_t) Tile::hellRock_Id;
|
||||
material = (uint8_t) Tile::hellRock_Id;
|
||||
if (gravel) top = (uint8_t) Tile::gravel_Id;
|
||||
if (gravel) material = (uint8_t) Tile::hellRock_Id;
|
||||
if (sand)
|
||||
{
|
||||
// 4J Stu - Make some nether wart spawn outside of the nether fortresses
|
||||
if(random->nextInt(16) == 0)
|
||||
{
|
||||
top = (byte) Tile::netherStalk_Id;
|
||||
top = (uint8_t) Tile::netherStalk_Id;
|
||||
|
||||
// Place the nether wart on top of the soul sand
|
||||
y += 1;
|
||||
@@ -234,13 +234,13 @@ void HellRandomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks
|
||||
}
|
||||
else
|
||||
{
|
||||
top = (byte) Tile::hellSand_Id;
|
||||
top = (uint8_t) Tile::hellSand_Id;
|
||||
}
|
||||
}
|
||||
if (sand) material = (byte) Tile::hellSand_Id;
|
||||
if (sand) material = (uint8_t) Tile::hellSand_Id;
|
||||
}
|
||||
|
||||
if (y < waterHeight && top == 0) top = (byte) Tile::calmLava_Id;
|
||||
if (y < waterHeight && top == 0) top = (uint8_t) Tile::calmLava_Id;
|
||||
|
||||
run = runDepth;
|
||||
// 4J Stu - If sand, then allow adding nether wart at heights below the water level
|
||||
@@ -273,7 +273,7 @@ LevelChunk *HellRandomLevelSource::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::genDepth * 16 * 16;
|
||||
byte *tileData = (byte *)XPhysicalAlloc(blocksSize, MAXULONG_PTR, 4096, PAGE_READWRITE);
|
||||
uint8_t *tileData = (uint8_t *)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