fix: remove byte type alias

This commit is contained in:
Tropical
2026-03-06 05:03:37 -06:00
parent 09eae49d21
commit 15af35eef2
208 changed files with 700 additions and 701 deletions

View File

@@ -200,11 +200,11 @@ void RandomLevelSource::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 ((val += vala) > comp)
{
tileId = (byte) Tile::rock_Id;
tileId = (uint8_t) Tile::rock_Id;
}
else if (yc * CHUNK_HEIGHT + y < waterHeight)
{
tileId = (byte) Tile::calmWater_Id;
tileId = (uint8_t) 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 RandomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks, Bi
int run = -1;
byte top = b->topMaterial;
byte material = b->material;
uint8_t top = b->topMaterial;
uint8_t material = b->material;
LevelGenerationOptions *lgo = app.getLevelGenerationOptions();
if(lgo != NULL)
@@ -282,7 +282,7 @@ void RandomLevelSource::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] = (byte) Tile::unbreakable_Id;
blocks[offs] = (uint8_t) Tile::unbreakable_Id;
}
else
{
@@ -299,7 +299,7 @@ void RandomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks, Bi
if (runDepth <= 0)
{
top = 0;
material = (byte) Tile::rock_Id;
material = (uint8_t) Tile::rock_Id;
}
else if (y >= waterHeight - 4 && y <= waterHeight + 1)
{
@@ -313,8 +313,8 @@ void RandomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks, Bi
if (y < waterHeight && top == 0)
{
if (temp < 0.15f) top = (byte) Tile::ice_Id;
else top = (byte) Tile::calmWater_Id;
if (temp < 0.15f) top = (uint8_t) Tile::ice_Id;
else top = (uint8_t) Tile::calmWater_Id;
}
run = runDepth;
@@ -331,7 +331,7 @@ void RandomLevelSource::buildSurfaces(int xOffs, int zOffs, byteArray blocks, Bi
if (run == 0 && material == Tile::sand_Id)
{
run = random->nextInt(4);
material = (byte) Tile::sandStone_Id;
material = (uint8_t) Tile::sandStone_Id;
}
}
}
@@ -355,7 +355,7 @@ LevelChunk *RandomLevelSource::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);