Merge pull request #149 from MatthewBeshay/issue/51-phase-1-portable-win32-cleanup

Draft: remove Win32 types from portable code
This commit is contained in:
Tropical
2026-03-13 11:58:09 -05:00
committed by GitHub
342 changed files with 4062 additions and 3336 deletions

View File

@@ -57,7 +57,7 @@ C4JThread* GameRenderer::m_updateThread;
C4JThread::EventArray* GameRenderer::m_updateEvents;
bool GameRenderer::nearThingsToDo = false;
bool GameRenderer::updateRunning = false;
std::vector<uint8_t *> GameRenderer::m_deleteStackByte;
std::vector<std::uint8_t *> GameRenderer::m_deleteStackByte;
std::vector<SparseLightStorage *> GameRenderer::m_deleteStackSparseLightStorage;
std::vector<CompressedTileStorage *> GameRenderer::m_deleteStackCompressedTileStorage;
std::vector<SparseDataStorage *> GameRenderer::m_deleteStackSparseDataStorage;
@@ -1134,7 +1134,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(uint8_t *deleteThis)
void GameRenderer::AddForDelete(std::uint8_t *deleteThis)
{
EnterCriticalSection(&m_csDeleteStack);
m_deleteStackByte.push_back(deleteThis);
@@ -1163,7 +1163,7 @@ void GameRenderer::FinishedReassigning()
LeaveCriticalSection(&m_csDeleteStack);
}
int GameRenderer::runUpdate(LPVOID lpParam)
int GameRenderer::runUpdate(void *lpParam)
{
Minecraft *minecraft = Minecraft::GetInstance();
Vec3::CreateNewThreadStorage();
@@ -1902,9 +1902,9 @@ void GameRenderer::setupClearColor(float a)
{
unsigned int colour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Under_Water_Clear_Colour );
uint8_t redComponent = ((colour>>16)&0xFF);
uint8_t greenComponent = ((colour>>8)&0xFF);
uint8_t blueComponent = ((colour)&0xFF);
std::uint8_t redComponent = ((colour>>16)&0xFF);
std::uint8_t greenComponent = ((colour>>8)&0xFF);
std::uint8_t blueComponent = ((colour)&0xFF);
fr = (float)redComponent/256;//0.02f;
fg = (float)greenComponent/256;//0.02f;
@@ -1914,9 +1914,9 @@ void GameRenderer::setupClearColor(float a)
{
unsigned int colour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Under_Lava_Clear_Colour );
uint8_t redComponent = ((colour>>16)&0xFF);
uint8_t greenComponent = ((colour>>8)&0xFF);
uint8_t blueComponent = ((colour)&0xFF);
std::uint8_t redComponent = ((colour>>16)&0xFF);
std::uint8_t greenComponent = ((colour>>8)&0xFF);
std::uint8_t blueComponent = ((colour)&0xFF);
fr = (float)redComponent/256;//0.6f;
fg = (float)greenComponent/256;//0.1f;
@@ -2058,9 +2058,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 );
uint8_t redComponent = ((colour>>16)&0xFF);
uint8_t greenComponent = ((colour>>8)&0xFF);
uint8_t blueComponent = ((colour)&0xFF);
std::uint8_t redComponent = ((colour>>16)&0xFF);
std::uint8_t greenComponent = ((colour>>8)&0xFF);
std::uint8_t blueComponent = ((colour)&0xFF);
float rr = (float)redComponent/256;//1.0f;
float gg = (float)greenComponent/256;//1.0f;
@@ -2090,9 +2090,9 @@ void GameRenderer::setupFog(int i, float alpha)
}
unsigned int colour = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Under_Water_Fog_Colour );
uint8_t redComponent = ((colour>>16)&0xFF);
uint8_t greenComponent = ((colour>>8)&0xFF);
uint8_t blueComponent = ((colour)&0xFF);
std::uint8_t redComponent = ((colour>>16)&0xFF);
std::uint8_t greenComponent = ((colour>>8)&0xFF);
std::uint8_t blueComponent = ((colour)&0xFF);
float rr = (float)redComponent/256;//0.4f;
float gg = (float)greenComponent/256;//0.4f;
@@ -2115,9 +2115,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 );
uint8_t redComponent = ((colour>>16)&0xFF);
uint8_t greenComponent = ((colour>>8)&0xFF);
uint8_t blueComponent = ((colour)&0xFF);
std::uint8_t redComponent = ((colour>>16)&0xFF);
std::uint8_t greenComponent = ((colour>>8)&0xFF);
std::uint8_t blueComponent = ((colour)&0xFF);
float rr = (float)redComponent/256;//0.4f;
float gg = (float)greenComponent/256;//0.3f;