diff options
| author | qwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com> | 2026-03-16 21:44:26 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-16 21:44:26 -0500 |
| commit | ce739f6045ec72127491286ea3f3f21e537c1b55 (patch) | |
| tree | f33bd42a47c1b4a7b2153a7fb77127ee3b407db9 /Minecraft.Client/Common/UI/UIScene_EnchantingMenu.cpp | |
| parent | 255a18fe8e9b57377975f82e2b227afe2a12eda0 (diff) | |
| parent | 5a59f5d146b43811dde6a5a0245ee9875d7b5cd1 (diff) | |
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.Client/Common/UI/UIScene_EnchantingMenu.cpp')
| -rw-r--r-- | Minecraft.Client/Common/UI/UIScene_EnchantingMenu.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Minecraft.Client/Common/UI/UIScene_EnchantingMenu.cpp b/Minecraft.Client/Common/UI/UIScene_EnchantingMenu.cpp index 27459ccc..f90c4b12 100644 --- a/Minecraft.Client/Common/UI/UIScene_EnchantingMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_EnchantingMenu.cpp @@ -14,14 +14,14 @@ UIScene_EnchantingMenu::UIScene_EnchantingMenu(int iPad, void *_initData, UILaye m_enchantButton[1].init(1); m_enchantButton[2].init(2); - EnchantingScreenInput *initData = (EnchantingScreenInput *)_initData; + EnchantingScreenInput *initData = static_cast<EnchantingScreenInput *>(_initData); m_labelEnchant.init( initData->name.empty() ? app.GetString(IDS_ENCHANT) : initData->name ); Minecraft *pMinecraft = Minecraft::GetInstance(); - if( pMinecraft->localgameModes[initData->iPad] != NULL ) + if( pMinecraft->localgameModes[initData->iPad] != nullptr ) { - TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[initData->iPad]; + TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[initData->iPad]); m_previousTutorialState = gameMode->getTutorial()->getCurrentState(); gameMode->getTutorial()->changeTutorialState(e_Tutorial_State_Enchanting_Menu, this); } @@ -194,7 +194,7 @@ void UIScene_EnchantingMenu::setSectionSelectedSlot(ESceneSection eSection, int int index = (y * cols) + x; - UIControl_SlotList *slotList = NULL; + UIControl_SlotList *slotList = nullptr; switch( eSection ) { case eSectionEnchantSlot: @@ -216,7 +216,7 @@ void UIScene_EnchantingMenu::setSectionSelectedSlot(ESceneSection eSection, int UIControl *UIScene_EnchantingMenu::getSection(ESceneSection eSection) { - UIControl *control = NULL; + UIControl *control = nullptr; switch( eSection ) { case eSectionEnchantSlot: @@ -247,7 +247,7 @@ UIControl *UIScene_EnchantingMenu::getSection(ESceneSection eSection) void UIScene_EnchantingMenu::customDraw(IggyCustomDrawCallbackRegion *region) { Minecraft *pMinecraft = Minecraft::GetInstance(); - if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL) return; + if(pMinecraft->localplayers[m_iPad] == nullptr || pMinecraft->localgameModes[m_iPad] == nullptr) return; if(wcscmp((wchar_t *)region->name,L"EnchantmentBook")==0) @@ -264,7 +264,7 @@ void UIScene_EnchantingMenu::customDraw(IggyCustomDrawCallbackRegion *region) else { int slotId = -1; - swscanf((wchar_t*)region->name,L"slot_Button%d",&slotId); + swscanf(static_cast<wchar_t *>(region->name),L"slot_Button%d",&slotId); if(slotId >= 0) { // Setup GDraw, normal game render states and matrices |
