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

This commit is contained in:
GabsPuNs
2026-05-10 21:03:03 -04:00
parent 20d395b88d
commit 3e7983ab3c
216 changed files with 798 additions and 800 deletions

View File

@@ -313,7 +313,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(BYTE r, BYTE g, BYTE b)
{
color(r & 0xff, g & 0xff, b & 0xff);
}
@@ -349,7 +349,7 @@ void Tesselator::vertexUV(float x, float y, float z, float u, float v)
// 4 - not axis aligned, use uv stored in the vertex data 4 on from this one
// ll is an 8-bit (4 bit per u/v) index into the current lighting texture
//
// For quads that don't have axis aligned UVs (ie have a code for 4 in i as described above) the 8 byte vertex
// For quads that don't have axis aligned UVs (ie have a code for 4 in i as described above) the 8 BYTE vertex
// is followed by a further 8 bytes which have explicit UVs defined for each vertex:
//
// 0000 0000 uuuu vvvv (vertex 0)
@@ -799,7 +799,7 @@ void Tesselator::vertex(float x, float y, float z)
int16_t u2 = ((int16_t*)&_tex2)[0];
int16_t v2 = ((int16_t*)&_tex2)[1];
#if defined _XBOX_ONE || defined __ORBIS__
// Optimisation - pack the second UVs into a single short (they could actually go in a byte), which frees up a short to store the x offset for this chunk in the vertex itself.
// Optimisation - pack the second UVs into a single short (they could actually go in a BYTE), which frees up a short to store the x offset for this chunk in the vertex itself.
// This means that when rendering chunks, we don't need to update the vertex constants that specify the location for a chunk, when only the x offset has changed.
pShortData[6] = ( u2 << 8 ) | v2;
pShortData[7] = -xoo;
@@ -1000,15 +1000,15 @@ void Tesselator::normal(float x, float y, float z)
#ifdef __PS3__
_normal = _ConvertF32toX11Y11Z10N(x,y,z);
#elif __PSVITA__
// AP - casting a negative value to 'byte' on Vita results in zero. changed to a signed 8 value
// AP - casting a negative value to 'BYTE' on Vita results in zero. changed to a signed 8 value
int8_t xx = (int8_t) (x * 127);
int8_t yy = (int8_t) (y * 127);
int8_t zz = (int8_t) (z * 127);
_normal = (xx & 0xff) | ((yy & 0xff) << 8) | ((zz & 0xff) << 16);
#else
byte xx = static_cast<byte>(x * 127);
byte yy = static_cast<byte>(y * 127);
byte zz = static_cast<byte>(z * 127);
BYTE xx = static_cast<BYTE>(x * 127);
BYTE yy = static_cast<BYTE>(y * 127);
BYTE zz = static_cast<BYTE>(z * 127);
_normal = (xx & 0xff) | ((yy & 0xff) << 8) | ((zz & 0xff) << 16);
#endif
}