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
@@ -2598,9 +2598,9 @@ bool TileRenderer::tesselateDustInWorld( Tile* tt, int x, int y, int z )
unsigned int minColour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Tile_RedstoneDustLitMin );
unsigned int maxColour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Tile_RedstoneDustLitMax );
byte redComponent = ((minColour>>16)&0xFF) + (( (maxColour>>16)&0xFF - (minColour>>16)&0xFF)*( (data-1)/14.0f));
byte greenComponent = ((minColour>>8)&0xFF) + (( (maxColour>>8)&0xFF - (minColour>>8)&0xFF)*( (data-1)/14.0f));
byte blueComponent = ((minColour)&0xFF) + (( (maxColour)&0xFF - (minColour)&0xFF)*( (data-1)/14.0f));
uint8_t redComponent = ((minColour>>16)&0xFF) + (( (maxColour>>16)&0xFF - (minColour>>16)&0xFF)*( (data-1)/14.0f));
uint8_t greenComponent = ((minColour>>8)&0xFF) + (( (maxColour>>8)&0xFF - (minColour>>8)&0xFF)*( (data-1)/14.0f));
uint8_t blueComponent = ((minColour)&0xFF) + (( (maxColour)&0xFF - (minColour)&0xFF)*( (data-1)/14.0f));
colour = redComponent<<16 | greenComponent<<8 | blueComponent;
}
+17 -17
View File
@@ -57,7 +57,7 @@ C4JThread* GameRenderer::m_updateThread;
C4JThread::EventArray* GameRenderer::m_updateEvents;
bool GameRenderer::nearThingsToDo = false;
bool GameRenderer::updateRunning = false;
vector<byte *> GameRenderer::m_deleteStackByte;
vector<uint8_t *> GameRenderer::m_deleteStackByte;
vector<SparseLightStorage *> GameRenderer::m_deleteStackSparseLightStorage;
vector<CompressedTileStorage *> GameRenderer::m_deleteStackCompressedTileStorage;
vector<SparseDataStorage *> GameRenderer::m_deleteStackSparseDataStorage;
@@ -1112,7 +1112,7 @@ void GameRenderer::renderLevel(float a)
#ifdef MULTITHREAD_ENABLE
// Request that an item be deleted, when it is safe to do so
void GameRenderer::AddForDelete(byte *deleteThis)
void GameRenderer::AddForDelete(uint8_t *deleteThis)
{
EnterCriticalSection(&m_csDeleteStack);
m_deleteStackByte.push_back(deleteThis);
@@ -1869,9 +1869,9 @@ void GameRenderer::setupClearColor(float a)
{
unsigned int colour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Under_Water_Clear_Colour );
byte redComponent = ((colour>>16)&0xFF);
byte greenComponent = ((colour>>8)&0xFF);
byte blueComponent = ((colour)&0xFF);
uint8_t redComponent = ((colour>>16)&0xFF);
uint8_t greenComponent = ((colour>>8)&0xFF);
uint8_t blueComponent = ((colour)&0xFF);
fr = (float)redComponent/256;//0.02f;
fg = (float)greenComponent/256;//0.02f;
@@ -1881,9 +1881,9 @@ void GameRenderer::setupClearColor(float a)
{
unsigned int colour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Under_Lava_Clear_Colour );
byte redComponent = ((colour>>16)&0xFF);
byte greenComponent = ((colour>>8)&0xFF);
byte blueComponent = ((colour)&0xFF);
uint8_t redComponent = ((colour>>16)&0xFF);
uint8_t greenComponent = ((colour>>8)&0xFF);
uint8_t blueComponent = ((colour)&0xFF);
fr = (float)redComponent/256;//0.6f;
fg = (float)greenComponent/256;//0.1f;
@@ -2025,9 +2025,9 @@ void GameRenderer::setupFog(int i, float alpha)
glFogf(GL_FOG_DENSITY, 0.1f); // was 0.06
unsigned int colour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_In_Cloud_Fog_Colour );
byte redComponent = ((colour>>16)&0xFF);
byte greenComponent = ((colour>>8)&0xFF);
byte blueComponent = ((colour)&0xFF);
uint8_t redComponent = ((colour>>16)&0xFF);
uint8_t greenComponent = ((colour>>8)&0xFF);
uint8_t blueComponent = ((colour)&0xFF);
float rr = (float)redComponent/256;//1.0f;
float gg = (float)greenComponent/256;//1.0f;
@@ -2057,9 +2057,9 @@ void GameRenderer::setupFog(int i, float alpha)
}
unsigned int colour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Under_Water_Fog_Colour );
byte redComponent = ((colour>>16)&0xFF);
byte greenComponent = ((colour>>8)&0xFF);
byte blueComponent = ((colour)&0xFF);
uint8_t redComponent = ((colour>>16)&0xFF);
uint8_t greenComponent = ((colour>>8)&0xFF);
uint8_t blueComponent = ((colour)&0xFF);
float rr = (float)redComponent/256;//0.4f;
float gg = (float)greenComponent/256;//0.4f;
@@ -2082,9 +2082,9 @@ void GameRenderer::setupFog(int i, float alpha)
glFogf(GL_FOG_DENSITY, 2.0f); // was 0.06
unsigned int colour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Under_Lava_Fog_Colour );
byte redComponent = ((colour>>16)&0xFF);
byte greenComponent = ((colour>>8)&0xFF);
byte blueComponent = ((colour)&0xFF);
uint8_t redComponent = ((colour>>16)&0xFF);
uint8_t greenComponent = ((colour>>8)&0xFF);
uint8_t blueComponent = ((colour)&0xFF);
float rr = (float)redComponent/256;//0.4f;
float gg = (float)greenComponent/256;//0.3f;
+2 -2
View File
@@ -156,12 +156,12 @@ public:
static bool nearThingsToDo;
static bool updateRunning;
#endif
static vector<byte *> m_deleteStackByte;
static vector<uint8_t *> m_deleteStackByte;
static vector<SparseLightStorage *> m_deleteStackSparseLightStorage;
static vector<CompressedTileStorage *> m_deleteStackCompressedTileStorage;
static vector<SparseDataStorage *> m_deleteStackSparseDataStorage;
static CRITICAL_SECTION m_csDeleteStack;
static void AddForDelete(byte *deleteThis);
static void AddForDelete(uint8_t *deleteThis);
static void AddForDelete(SparseLightStorage *deleteThis);
static void AddForDelete(CompressedTileStorage *deleteThis);
static void AddForDelete(SparseDataStorage *deleteThis);
+4 -4
View File
@@ -329,7 +329,7 @@ void Tesselator::color(int r, int g, int b, int a)
col = (r << 24) | (g << 16) | (b << 8) | (a);
}
void Tesselator::color(byte r, byte g, byte b)
void Tesselator::color(uint8_t r, uint8_t g, uint8_t b)
{
color(r & 0xff, g & 0xff, b & 0xff);
}
@@ -1043,9 +1043,9 @@ void Tesselator::normal(float x, float y, float z)
int8_t zz = (int8_t) (z * 127);
_normal = (xx & 0xff) | ((yy & 0xff) << 8) | ((zz & 0xff) << 16);
#else
byte xx = (byte) (x * 127);
byte yy = (byte) (y * 127);
byte zz = (byte) (z * 127);
uint8_t xx = (uint8_t) (x * 127);
uint8_t yy = (uint8_t) (y * 127);
uint8_t zz = (uint8_t) (z * 127);
_normal = (xx & 0xff) | ((yy & 0xff) << 8) | ((zz & 0xff) << 16);
#endif
}
+1 -1
View File
@@ -138,7 +138,7 @@ public:
void color(float r, float g, float b, float a);
void color(int r, int g, int b);
void color(int r, int g, int b, int a);
void color(byte r, byte g, byte b);
void color(uint8_t r, uint8_t g, uint8_t b);
void vertexUV(float x, float y, float z, float u, float v);
void vertex(float x, float y, float z);
void color(int c);