Revert "Project modernization (#630)"

This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.

This reverts commit a9be52c41a.
This commit is contained in:
Loki Rautio
2026-03-07 21:12:22 -06:00
parent a9be52c41a
commit 087b7e7abf
1373 changed files with 19449 additions and 19903 deletions

View File

@@ -31,7 +31,7 @@ BufferedImage::BufferedImage(int width,int height,int type)
for( int i = 1 ; i < 10; i++ )
{
data[i] = nullptr;
data[i] = NULL;
}
this->width = width;
this->height = height;
@@ -140,7 +140,7 @@ BufferedImage::BufferedImage(const wstring& File, bool filenameHasExtension /*=f
for( int l = 0 ; l < 10; l++ )
{
data[l] = nullptr;
data[l] = NULL;
}
for( int l = 0; l < 10; l++ )
@@ -193,12 +193,12 @@ BufferedImage::BufferedImage(DLCPack *dlcPack, const wstring& File, bool filenam
{
HRESULT hr;
wstring filePath = File;
BYTE *pbData = nullptr;
BYTE *pbData = NULL;
DWORD dwBytes = 0;
for( int l = 0 ; l < 10; l++ )
{
data[l] = nullptr;
data[l] = NULL;
}
for( int l = 0; l < 10; l++ )
@@ -230,7 +230,7 @@ BufferedImage::BufferedImage(DLCPack *dlcPack, const wstring& File, bool filenam
DLCFile *dlcFile = dlcPack->getFile(DLCManager::e_DLCType_All, name);
pbData = dlcFile->getData(dwBytes);
if(pbData == nullptr || dwBytes == 0)
if(pbData == NULL || dwBytes == 0)
{
// 4J - If we haven't loaded the non-mipmap version then exit the game
if( l == 0 )
@@ -269,7 +269,7 @@ BufferedImage::BufferedImage(BYTE *pbData, DWORD dwBytes)
int iCurrentByte=0;
for( int l = 0 ; l < 10; l++ )
{
data[l] = nullptr;
data[l] = NULL;
}
D3DXIMAGE_INFO ImageInfo;
@@ -329,7 +329,7 @@ int *BufferedImage::getData(int level)
Graphics *BufferedImage::getGraphics()
{
return nullptr;
return NULL;
}
//Returns the transparency. Returns either OPAQUE, BITMASK, or TRANSLUCENT.
@@ -359,7 +359,7 @@ BufferedImage *BufferedImage::getSubimage(int x ,int y, int w, int h)
this->getRGB(x, y, w, h, arrayWrapper,0,w);
int level = 1;
while(getData(level) != nullptr)
while(getData(level) != NULL)
{
int ww = w >> level;
int hh = h >> level;
@@ -391,9 +391,9 @@ void BufferedImage::preMultiplyAlpha()
{
cur = curData[i];
alpha = (cur >> 24) & 0xff;
r = ((cur >> 16) & 0xff) * static_cast<float>(alpha)/255;
g = ((cur >> 8) & 0xff) * static_cast<float>(alpha)/255;
b = (cur & 0xff) * static_cast<float>(alpha)/255;
r = ((cur >> 16) & 0xff) * (float)alpha/255;
g = ((cur >> 8) & 0xff) * (float)alpha/255;
b = (cur & 0xff) * (float)alpha/255;
curData[i] = (r << 16) | (g << 8) | (b ) | (alpha << 24);
}