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

@@ -68,7 +68,7 @@ float XUI_FontData::SChar::getMinX()
float XUI_FontData::SChar::getMaxX()
{
return static_cast<float>(m_parent->m_fontData->getFontData()->m_uiGlyphWidth);
return (float) m_parent->m_fontData->getFontData()->m_uiGlyphWidth;
}
float XUI_FontData::SChar::getMinY()
@@ -83,7 +83,7 @@ float XUI_FontData::SChar::getMaxY()
float XUI_FontData::SChar::getAdvance()
{
return static_cast<float>(m_parent->m_fontData->getWidth(m_glyphId));
return (float) m_parent->m_fontData->getWidth(m_glyphId);
}
int XUI_FontData::SChar::getGlyphId()
@@ -157,11 +157,11 @@ XUI_FontData::SChar XUI_FontData::getChar(const wchar_t strChar)
//--------------------------------------------------------------------------------------
XUI_FontData::XUI_FontData()
{
m_pFontTexture = nullptr;
m_pFontTexture = NULL;
m_iFontTexture = -1;
m_dwNumGlyphs = 0L;
m_Glyphs = nullptr;
m_Glyphs = NULL;
m_cMaxGlyph = 0;
@@ -201,12 +201,12 @@ HRESULT XUI_FontData::Create( SFontData &sfontdata )
m_fontData = new CFontData( sfontdata, rawPixels.data );
if (rawPixels.data != nullptr) delete [] rawPixels.data;
if (rawPixels.data != NULL) delete [] rawPixels.data;
#if 0
{ // 4J-JEV: Load in FontData (ABC) file, and initialize member variables from it.
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(nullptr);
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
//wsprintfW(szResourceLocator,L"section://%X,%s#%s",c_ModuleHandle,L"media", L"media/font/Mojangles_10.abc");
wsprintfW(szResourceLocator,L"section://%X,%s#%s%s%s",c_ModuleHandle,L"media", L"media/font/",strFontFileName.c_str(),L".abc");
@@ -349,7 +349,7 @@ HRESULT XUI_FontData::Create( int iFontTexture, const VOID* pFontData )
//--------------------------------------------------------------------------------------
VOID XUI_FontData::Destroy()
{
if(m_pFontTexture!=nullptr)
if(m_pFontTexture!=NULL)
{
m_pFontTexture->Release();
delete m_pFontTexture;
@@ -357,7 +357,7 @@ VOID XUI_FontData::Destroy()
m_fontData->release();
m_pFontTexture = nullptr;
m_pFontTexture = NULL;
m_dwNumGlyphs = 0L;
m_cMaxGlyph = 0;