From 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a Mon Sep 17 00:00:00 2001 From: Loki Rautio Date: Sat, 7 Mar 2026 21:12:22 -0600 Subject: 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 a9be52c41a02d207233199e98898fe7483d7e817. --- Minecraft.Client/Xbox/Font/XUI_FontData.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Minecraft.Client/Xbox/Font/XUI_FontData.cpp') diff --git a/Minecraft.Client/Xbox/Font/XUI_FontData.cpp b/Minecraft.Client/Xbox/Font/XUI_FontData.cpp index 88d77d09..7a70cdfb 100644 --- a/Minecraft.Client/Xbox/Font/XUI_FontData.cpp +++ b/Minecraft.Client/Xbox/Font/XUI_FontData.cpp @@ -68,7 +68,7 @@ float XUI_FontData::SChar::getMinX() float XUI_FontData::SChar::getMaxX() { - return static_cast(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(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; -- cgit v1.2.3