aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/UI/UIScene_EnchantingMenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.Client/Common/UI/UIScene_EnchantingMenu.cpp')
-rw-r--r--Minecraft.Client/Common/UI/UIScene_EnchantingMenu.cpp14
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