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:
@@ -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 = static_cast<EnchantingScreenInput *>(_initData);
|
||||
EnchantingScreenInput *initData = (EnchantingScreenInput *)_initData;
|
||||
|
||||
m_labelEnchant.init( initData->name.empty() ? app.GetString(IDS_ENCHANT) : initData->name );
|
||||
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
if( pMinecraft->localgameModes[initData->iPad] != nullptr )
|
||||
if( pMinecraft->localgameModes[initData->iPad] != NULL )
|
||||
{
|
||||
TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[initData->iPad]);
|
||||
TutorialMode *gameMode = (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 = nullptr;
|
||||
UIControl_SlotList *slotList = NULL;
|
||||
switch( eSection )
|
||||
{
|
||||
case eSectionEnchantSlot:
|
||||
@@ -216,7 +216,7 @@ void UIScene_EnchantingMenu::setSectionSelectedSlot(ESceneSection eSection, int
|
||||
|
||||
UIControl *UIScene_EnchantingMenu::getSection(ESceneSection eSection)
|
||||
{
|
||||
UIControl *control = nullptr;
|
||||
UIControl *control = NULL;
|
||||
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] == nullptr || pMinecraft->localgameModes[m_iPad] == nullptr) return;
|
||||
if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL) 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(static_cast<wchar_t *>(region->name),L"slot_Button%d",&slotId);
|
||||
swscanf((wchar_t*)region->name,L"slot_Button%d",&slotId);
|
||||
if(slotId >= 0)
|
||||
{
|
||||
// Setup GDraw, normal game render states and matrices
|
||||
|
||||
Reference in New Issue
Block a user