From a9be52c41a02d207233199e98898fe7483d7e817 Mon Sep 17 00:00:00 2001 From: ModMaker101 <119018978+ModMaker101@users.noreply.github.com> Date: Sat, 7 Mar 2026 21:56:03 -0500 Subject: Project modernization (#630) * Fixed boats falling and a TP glitch #266 * Replaced every C-style cast with C++ ones * Replaced every C-style cast with C++ ones * Fixed boats falling and a TP glitch #266 * Updated NULL to nullptr and fixing some type issues * Modernized and fixed a few bugs - Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances. * Fixing more conflicts * Replace int loops with size_t and start work on overrides --- Minecraft.Client/Common/UI/UIComponent_Panorama.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Minecraft.Client/Common/UI/UIComponent_Panorama.cpp') diff --git a/Minecraft.Client/Common/UI/UIComponent_Panorama.cpp b/Minecraft.Client/Common/UI/UIComponent_Panorama.cpp index a52ebd72..a5b93118 100644 --- a/Minecraft.Client/Common/UI/UIComponent_Panorama.cpp +++ b/Minecraft.Client/Common/UI/UIComponent_Panorama.cpp @@ -45,7 +45,7 @@ void UIComponent_Panorama::tick() Minecraft *pMinecraft = Minecraft::GetInstance(); EnterCriticalSection(&pMinecraft->m_setLevelCS); - if(pMinecraft->level!=NULL) + if(pMinecraft->level!=nullptr) { int64_t i64TimeOfDay =0; // are we in the Nether? - Leave the time as 0 if we are, so we show daylight @@ -85,10 +85,10 @@ void UIComponent_Panorama::render(S32 width, S32 height, C4JRender::eViewportTyp switch( viewport ) { case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM: - yPos = (S32)(ui.getScreenHeight() / 2); + yPos = static_cast(ui.getScreenHeight() / 2); break; case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT: - xPos = (S32)(ui.getScreenWidth() / 2); + xPos = static_cast(ui.getScreenWidth() / 2); break; } ui.setupRenderPosition(xPos, yPos); @@ -99,7 +99,7 @@ void UIComponent_Panorama::render(S32 width, S32 height, C4JRender::eViewportTyp S32 tileXStart = 0; S32 tileYStart = 0; S32 tileWidth = width; - S32 tileHeight = (S32)(ui.getScreenHeight()); + S32 tileHeight = static_cast(ui.getScreenHeight()); IggyPlayerSetDisplaySize( getMovie(), m_movieWidth, m_movieHeight ); -- cgit v1.2.3