aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/UI
diff options
context:
space:
mode:
authorLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
committerLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
commit087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch)
tree69454763e73ca764af4e682d3573080b13138a0e /Minecraft.Client/Common/UI
parenta9be52c41a02d207233199e98898fe7483d7e817 (diff)
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.
Diffstat (limited to 'Minecraft.Client/Common/UI')
-rw-r--r--Minecraft.Client/Common/UI/IUIController.h2
-rw-r--r--Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp73
-rw-r--r--Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp12
-rw-r--r--Minecraft.Client/Common/UI/IUIScene_BeaconMenu.cpp12
-rw-r--r--Minecraft.Client/Common/UI/IUIScene_CommandBlockMenu.cpp2
-rw-r--r--Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp34
-rw-r--r--Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp58
-rw-r--r--Minecraft.Client/Common/UI/IUIScene_CreativeMenu.h2
-rw-r--r--Minecraft.Client/Common/UI/IUIScene_EnchantingMenu.cpp2
-rw-r--r--Minecraft.Client/Common/UI/IUIScene_HUD.cpp24
-rw-r--r--Minecraft.Client/Common/UI/IUIScene_PauseMenu.cpp30
-rw-r--r--Minecraft.Client/Common/UI/IUIScene_StartGame.cpp32
-rw-r--r--Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp38
-rw-r--r--Minecraft.Client/Common/UI/UI.h4
-rw-r--r--Minecraft.Client/Common/UI/UIBitmapFont.cpp20
-rw-r--r--Minecraft.Client/Common/UI/UIComponent_Chat.cpp16
-rw-r--r--Minecraft.Client/Common/UI/UIComponent_DebugUIMarketingGuide.cpp4
-rw-r--r--Minecraft.Client/Common/UI/UIComponent_MenuBackground.cpp14
-rw-r--r--Minecraft.Client/Common/UI/UIComponent_Panorama.cpp8
-rw-r--r--Minecraft.Client/Common/UI/UIComponent_Tooltips.cpp24
-rw-r--r--Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp86
-rw-r--r--Minecraft.Client/Common/UI/UIControl.cpp40
-rw-r--r--Minecraft.Client/Common/UI/UIControl_Base.cpp4
-rw-r--r--Minecraft.Client/Common/UI/UIControl_ButtonList.cpp4
-rw-r--r--Minecraft.Client/Common/UI/UIControl_CheckBox.cpp2
-rw-r--r--Minecraft.Client/Common/UI/UIControl_DLCList.cpp4
-rw-r--r--Minecraft.Client/Common/UI/UIControl_DynamicLabel.cpp8
-rw-r--r--Minecraft.Client/Common/UI/UIControl_EnchantmentBook.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIControl_EnchantmentButton.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIControl_HTMLLabel.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIControl_LeaderboardList.cpp2
-rw-r--r--Minecraft.Client/Common/UI/UIControl_MinecraftHorse.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIControl_MinecraftPlayer.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIControl_PlayerList.cpp2
-rw-r--r--Minecraft.Client/Common/UI/UIControl_PlayerSkinPreview.cpp36
-rw-r--r--Minecraft.Client/Common/UI/UIControl_Progress.cpp2
-rw-r--r--Minecraft.Client/Common/UI/UIControl_SaveList.cpp4
-rw-r--r--Minecraft.Client/Common/UI/UIControl_Slider.cpp4
-rw-r--r--Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.cpp6
-rw-r--r--Minecraft.Client/Common/UI/UIControl_TexturePackList.cpp8
-rw-r--r--Minecraft.Client/Common/UI/UIController.cpp386
-rw-r--r--Minecraft.Client/Common/UI/UIController.h12
-rw-r--r--Minecraft.Client/Common/UI/UIFontData.cpp6
-rw-r--r--Minecraft.Client/Common/UI/UIGroup.cpp38
-rw-r--r--Minecraft.Client/Common/UI/UILayer.cpp30
-rw-r--r--Minecraft.Client/Common/UI/UILayer.h2
-rw-r--r--Minecraft.Client/Common/UI/UIScene.cpp87
-rw-r--r--Minecraft.Client/Common/UI/UIScene.h2
-rw-r--r--Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp28
-rw-r--r--Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.h2
-rw-r--r--Minecraft.Client/Common/UI/UIScene_AnvilMenu.cpp18
-rw-r--r--Minecraft.Client/Common/UI/UIScene_BeaconMenu.cpp24
-rw-r--r--Minecraft.Client/Common/UI/UIScene_BrewingStandMenu.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIScene_ConnectingProgress.cpp6
-rw-r--r--Minecraft.Client/Common/UI/UIScene_ContainerMenu.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIScene_ControlsMenu.cpp14
-rw-r--r--Minecraft.Client/Common/UI/UIScene_CraftingMenu.cpp36
-rw-r--r--Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp59
-rw-r--r--Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp24
-rw-r--r--Minecraft.Client/Common/UI/UIScene_Credits.cpp8
-rw-r--r--Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp8
-rw-r--r--Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp30
-rw-r--r--Minecraft.Client/Common/UI/UIScene_DeathMenu.cpp14
-rw-r--r--Minecraft.Client/Common/UI/UIScene_DebugCreateSchematic.cpp150
-rw-r--r--Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp56
-rw-r--r--Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp14
-rw-r--r--Minecraft.Client/Common/UI/UIScene_DispenserMenu.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIScene_EULA.cpp6
-rw-r--r--Minecraft.Client/Common/UI/UIScene_EnchantingMenu.cpp14
-rw-r--r--Minecraft.Client/Common/UI/UIScene_EndPoem.cpp12
-rw-r--r--Minecraft.Client/Common/UI/UIScene_FireworksMenu.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIScene_FullscreenProgress.cpp11
-rw-r--r--Minecraft.Client/Common/UI/UIScene_FurnaceMenu.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIScene_HUD.cpp42
-rw-r--r--Minecraft.Client/Common/UI/UIScene_HelpAndOptionsMenu.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIScene_HopperMenu.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIScene_HorseInventoryMenu.cpp12
-rw-r--r--Minecraft.Client/Common/UI/UIScene_HowToPlay.cpp16
-rw-r--r--Minecraft.Client/Common/UI/UIScene_HowToPlayMenu.cpp6
-rw-r--r--Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp4
-rw-r--r--Minecraft.Client/Common/UI/UIScene_InGameInfoMenu.cpp36
-rw-r--r--Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp29
-rw-r--r--Minecraft.Client/Common/UI/UIScene_InGameSaveManagementMenu.cpp30
-rw-r--r--Minecraft.Client/Common/UI/UIScene_InventoryMenu.cpp16
-rw-r--r--Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp28
-rw-r--r--Minecraft.Client/Common/UI/UIScene_Keyboard.cpp28
-rw-r--r--Minecraft.Client/Common/UI/UIScene_LanguageSelector.cpp8
-rw-r--r--Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp26
-rw-r--r--Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp40
-rw-r--r--Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp74
-rw-r--r--Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp164
-rw-r--r--Minecraft.Client/Common/UI/UIScene_MainMenu.cpp84
-rw-r--r--Minecraft.Client/Common/UI/UIScene_MessageBox.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIScene_NewUpdateMessage.cpp6
-rw-r--r--Minecraft.Client/Common/UI/UIScene_PauseMenu.cpp48
-rw-r--r--Minecraft.Client/Common/UI/UIScene_QuadrantSignin.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIScene_ReinstallMenu.cpp2
-rw-r--r--Minecraft.Client/Common/UI/UIScene_SaveMessage.cpp4
-rw-r--r--Minecraft.Client/Common/UI/UIScene_SettingsAudioMenu.cpp6
-rw-r--r--Minecraft.Client/Common/UI/UIScene_SettingsControlMenu.cpp6
-rw-r--r--Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.cpp61
-rw-r--r--Minecraft.Client/Common/UI/UIScene_SettingsMenu.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIScene_SettingsOptionsMenu.cpp14
-rw-r--r--Minecraft.Client/Common/UI/UIScene_SettingsUIMenu.cpp10
-rw-r--r--Minecraft.Client/Common/UI/UIScene_SignEntryMenu.cpp16
-rw-r--r--Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp80
-rw-r--r--Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp22
-rw-r--r--Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp20
-rw-r--r--Minecraft.Client/Common/UI/UIScene_TrialExitUpsell.cpp2
-rw-r--r--Minecraft.Client/Common/UI/UIString.cpp8
-rw-r--r--Minecraft.Client/Common/UI/UIStructs.h24
-rw-r--r--Minecraft.Client/Common/UI/UITTFFont.cpp6
112 files changed, 1402 insertions, 1446 deletions
diff --git a/Minecraft.Client/Common/UI/IUIController.h b/Minecraft.Client/Common/UI/IUIController.h
index 35a808c5..3040c2cc 100644
--- a/Minecraft.Client/Common/UI/IUIController.h
+++ b/Minecraft.Client/Common/UI/IUIController.h
@@ -12,7 +12,7 @@ public:
virtual void StartReloadSkinThread() = 0;
virtual bool IsReloadingSkin() = 0;
virtual void CleanUpSkinReload() = 0;
- virtual bool NavigateToScene(int iPad, EUIScene scene, void *initData = nullptr, EUILayer layer = eUILayer_Scene, EUIGroup group = eUIGroup_PAD) = 0;
+ virtual bool NavigateToScene(int iPad, EUIScene scene, void *initData = NULL, EUILayer layer = eUILayer_Scene, EUIGroup group = eUIGroup_PAD) = 0;
virtual bool NavigateBack(int iPad, bool forceUsePad = false, EUIScene eScene = eUIScene_COUNT, EUILayer eLayer = eUILayer_COUNT) = 0;
virtual void CloseUIScenes(int iPad, bool forceIPad = false) = 0;
virtual void CloseAllPlayersScenes() = 0;
diff --git a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp
index 21f21627..e55f207d 100644
--- a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp
+++ b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp
@@ -2,7 +2,6 @@
#include "IUIScene_AbstractContainerMenu.h"
-#include "UI.h"
#include "..\..\..\Minecraft.World\net.minecraft.world.inventory.h"
#include "..\..\..\Minecraft.World\net.minecraft.world.item.h"
#include "..\..\..\Minecraft.World\net.minecraft.world.item.crafting.h"
@@ -22,9 +21,9 @@ SavedInventoryCursorPos g_savedInventoryCursorPos = { 0.0f, 0.0f, false };
IUIScene_AbstractContainerMenu::IUIScene_AbstractContainerMenu()
{
- m_menu = nullptr;
+ m_menu = NULL;
m_autoDeleteMenu = false;
- m_lastPointerLabelSlot = nullptr;
+ m_lastPointerLabelSlot = NULL;
m_pointerPos.x = 0.0f;
m_pointerPos.y = 0.0f;
@@ -42,7 +41,7 @@ IUIScene_AbstractContainerMenu::~IUIScene_AbstractContainerMenu()
void IUIScene_AbstractContainerMenu::Initialize(int iPad, AbstractContainerMenu* menu, bool autoDeleteMenu, int startIndex,ESceneSection firstSection,ESceneSection maxSection, bool bNavigateBack)
{
- assert( menu != nullptr );
+ assert( menu != NULL );
m_menu = menu;
m_autoDeleteMenu = autoDeleteMenu;
@@ -268,10 +267,10 @@ void IUIScene_AbstractContainerMenu::UpdateTooltips()
void IUIScene_AbstractContainerMenu::onMouseTick()
{
Minecraft *pMinecraft = Minecraft::GetInstance();
- if( pMinecraft->localgameModes[getPad()] != nullptr)
+ if( pMinecraft->localgameModes[getPad()] != NULL)
{
Tutorial *tutorial = pMinecraft->localgameModes[getPad()]->getTutorial();
- if(tutorial != nullptr)
+ if(tutorial != NULL)
{
if(ui.IsTutorialVisible(getPad()) && !tutorial->isInputAllowed(ACTION_MENU_UP))
{
@@ -297,8 +296,8 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
int iPad = getPad();
bool bStickInput = false;
- float fInputX = InputManager.GetJoypadStick_LX( iPad, false )*(static_cast<float>(app.GetGameSettings(iPad, eGameSetting_Sensitivity_InMenu))/100.0f); // apply the sensitivity
- float fInputY = InputManager.GetJoypadStick_LY( iPad, false )*(static_cast<float>(app.GetGameSettings(iPad, eGameSetting_Sensitivity_InMenu))/100.0f); // apply the sensitivity
+ float fInputX = InputManager.GetJoypadStick_LX( iPad, false )*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f); // apply the sensitivity
+ float fInputY = InputManager.GetJoypadStick_LY( iPad, false )*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f); // apply the sensitivity
#ifdef __ORBIS__
// should have sensitivity for the touchpad
@@ -407,7 +406,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
if ( m_iConsectiveInputTicks < MAX_INPUT_TICKS_FOR_SCALING )
{
++m_iConsectiveInputTicks;
- fInputScale = ( static_cast<float>(m_iConsectiveInputTicks) / static_cast<float>((MAX_INPUT_TICKS_FOR_SCALING)) );
+ fInputScale = ( (float)( m_iConsectiveInputTicks) / (float)(MAX_INPUT_TICKS_FOR_SCALING) );
}
#ifdef TAP_DETECTION
else if ( m_iConsectiveInputTicks < MAX_INPUT_TICKS_FOR_TAPPING )
@@ -495,11 +494,11 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
if (winW > 0 && winH > 0)
{
- float scaleX = static_cast<float>(getMovieWidth()) / static_cast<float>(winW);
- float scaleY = static_cast<float>(getMovieHeight()) / static_cast<float>(winH);
+ float scaleX = (float)getMovieWidth() / (float)winW;
+ float scaleY = (float)getMovieHeight() / (float)winH;
- vPointerPos.x += static_cast<float>(deltaX) * scaleX;
- vPointerPos.y += static_cast<float>(deltaY) * scaleY;
+ vPointerPos.x += (float)deltaX * scaleX;
+ vPointerPos.y += (float)deltaY * scaleY;
}
if (deltaX != 0 || deltaY != 0)
@@ -528,7 +527,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
}
else if ( eSectionUnderPointer == eSectionNone )
{
- ESceneSection eSection = static_cast<ESceneSection>(iSection);
+ ESceneSection eSection = ( ESceneSection )( iSection );
// Get position of this section.
UIVec2D sectionPos;
@@ -759,17 +758,17 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
// What are we carrying on pointer.
shared_ptr<LocalPlayer> player = Minecraft::GetInstance()->localplayers[getPad()];
shared_ptr<ItemInstance> carriedItem = nullptr;
- if(player != nullptr) carriedItem = player->inventory->getCarried();
+ if(player != NULL) carriedItem = player->inventory->getCarried();
shared_ptr<ItemInstance> slotItem = nullptr;
- Slot *slot = nullptr;
+ Slot *slot = NULL;
int slotIndex = 0;
if(bPointerIsOverSlot)
{
slotIndex = iNewSlotIndex + getSectionStartOffset( eSectionUnderPointer );
slot = m_menu->getSlot(slotIndex);
}
- bool bIsItemCarried = carriedItem != nullptr;
+ bool bIsItemCarried = carriedItem != NULL;
int iCarriedCount = 0;
bool bCarriedIsSameAsSlot = false; // Indicates if same item is carried on pointer as is in slot under pointer.
if ( bIsItemCarried )
@@ -789,7 +788,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
if ( bPointerIsOverSlot )
{
slotItem = slot->getItem();
- bSlotHasItem = slotItem != nullptr;
+ bSlotHasItem = slotItem != NULL;
if ( bSlotHasItem )
{
iSlotCount = slotItem->GetCount();
@@ -830,13 +829,13 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
{
vector<HtmlString> *desc = GetSectionHoverText(eSectionUnderPointer);
SetPointerText(desc, false);
- m_lastPointerLabelSlot = nullptr;
+ m_lastPointerLabelSlot = NULL;
delete desc;
}
else
{
- SetPointerText(nullptr, false);
- m_lastPointerLabelSlot = nullptr;
+ SetPointerText(NULL, false);
+ m_lastPointerLabelSlot = NULL;
}
EToolTipItem buttonA, buttonX, buttonY, buttonRT, buttonBack;
@@ -1022,7 +1021,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
// Get the info on this item.
shared_ptr<ItemInstance> item = getSlotItem(eSectionUnderPointer, iNewSlotIndex);
bool bValidFuel = FurnaceTileEntity::isFuel(item);
- bool bValidIngredient = FurnaceRecipes::getInstance()->getResult(item->getItem()->id) != nullptr;
+ bool bValidIngredient = FurnaceRecipes::getInstance()->getResult(item->getItem()->id) != NULL;
if(bValidIngredient)
{
@@ -1037,7 +1036,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
}
else
{
- if(FurnaceRecipes::getInstance()->getResult(item->id)==nullptr)
+ if(FurnaceRecipes::getInstance()->getResult(item->id)==NULL)
{
buttonY = eToolTipQuickMove;
}
@@ -1077,7 +1076,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
}
else
{
- if(FurnaceRecipes::getInstance()->getResult(item->id)==nullptr)
+ if(FurnaceRecipes::getInstance()->getResult(item->id)==NULL)
{
buttonY = eToolTipQuickMove;
}
@@ -1310,9 +1309,9 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
}
vPointerPos.x = floor(vPointerPos.x);
- vPointerPos.x += ( static_cast<int>(vPointerPos.x)%2);
+ vPointerPos.x += ( (int)vPointerPos.x%2);
vPointerPos.y = floor(vPointerPos.y);
- vPointerPos.y += ( static_cast<int>(vPointerPos.y)%2);
+ vPointerPos.y += ( (int)vPointerPos.y%2);
m_pointerPos = vPointerPos;
adjustPointerForSafeZone();
@@ -1323,10 +1322,10 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b
bool bHandled = false;
Minecraft *pMinecraft = Minecraft::GetInstance();
- if( pMinecraft->localgameModes[getPad()] != nullptr )
+ if( pMinecraft->localgameModes[getPad()] != NULL )
{
Tutorial *tutorial = pMinecraft->localgameModes[getPad()]->getTutorial();
- if(tutorial != nullptr)
+ if(tutorial != NULL)
{
tutorial->handleUIInput(iAction);
if(ui.IsTutorialVisible(getPad()) && !tutorial->isInputAllowed(iAction))
@@ -1528,20 +1527,20 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b
if ( bSlotHasItem )
{
shared_ptr<ItemInstance> item = getSlotItem(m_eCurrSection, currentIndex);
- if( Minecraft::GetInstance()->localgameModes[iPad] != nullptr )
+ if( Minecraft::GetInstance()->localgameModes[iPad] != NULL )
{
Tutorial::PopupMessageDetails *message = new Tutorial::PopupMessageDetails;
message->m_messageId = item->getUseDescriptionId();
- if(Item::items[item->id] != nullptr) message->m_titleString = Item::items[item->id]->getHoverName(item);
+ if(Item::items[item->id] != NULL) message->m_titleString = Item::items[item->id]->getHoverName(item);
message->m_titleId = item->getDescriptionId();
message->m_icon = item->id;
message->m_iAuxVal = item->getAuxValue();
message->m_forceDisplay = true;
- TutorialMode *gameMode = static_cast<TutorialMode *>(Minecraft::GetInstance()->localgameModes[iPad]);
- gameMode->getTutorial()->setMessage(nullptr, message);
+ TutorialMode *gameMode = (TutorialMode *)Minecraft::GetInstance()->localgameModes[iPad];
+ gameMode->getTutorial()->setMessage(NULL, message);
ui.PlayUISFX(eSFX_Press);
}
}
@@ -1643,7 +1642,7 @@ void IUIScene_AbstractContainerMenu::handleSlotListClicked(ESceneSection eSectio
void IUIScene_AbstractContainerMenu::slotClicked(int slotId, int buttonNum, bool quickKey)
{
// 4J Stu - Removed this line as unused
- //if (slot != nullptr) slotId = slot->index;
+ //if (slot != NULL) slotId = slot->index;
Minecraft *pMinecraft = Minecraft::GetInstance();
pMinecraft->localgameModes[getPad()]->handleInventoryMouseClick(m_menu->containerId, slotId, buttonNum, quickKey, pMinecraft->localplayers[getPad()] );
@@ -1660,7 +1659,7 @@ int IUIScene_AbstractContainerMenu::getCurrentIndex(ESceneSection eSection)
bool IUIScene_AbstractContainerMenu::IsSameItemAs(shared_ptr<ItemInstance> itemA, shared_ptr<ItemInstance> itemB)
{
- if(itemA == nullptr || itemB == nullptr) return false;
+ if(itemA == NULL || itemB == NULL) return false;
return (itemA->id == itemB->id && (!itemB->isStackedByData() || itemB->getAuxValue() == itemA->getAuxValue()) && ItemInstance::tagMatches(itemB, itemA) );
}
@@ -1669,7 +1668,7 @@ int IUIScene_AbstractContainerMenu::GetEmptyStackSpace(Slot *slot)
{
int iResult = 0;
- if(slot != nullptr && slot->hasItem())
+ if(slot != NULL && slot->hasItem())
{
shared_ptr<ItemInstance> item = slot->getItem();
if ( item->isStackable() )
@@ -1688,7 +1687,7 @@ int IUIScene_AbstractContainerMenu::GetEmptyStackSpace(Slot *slot)
vector<HtmlString> *IUIScene_AbstractContainerMenu::GetItemDescription(Slot *slot)
{
- if(slot == nullptr) return nullptr;
+ if(slot == NULL) return NULL;
vector<HtmlString> *lines = slot->getItem()->getHoverText(nullptr, false);
@@ -1708,5 +1707,5 @@ vector<HtmlString> *IUIScene_AbstractContainerMenu::GetItemDescription(Slot *slo
vector<HtmlString> *IUIScene_AbstractContainerMenu::GetSectionHoverText(ESceneSection eSection)
{
- return nullptr;
+ return NULL;
}
diff --git a/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp
index 1e6fa6fa..10d1bcc4 100644
--- a/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp
+++ b/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp
@@ -10,7 +10,7 @@
IUIScene_AnvilMenu::IUIScene_AnvilMenu()
{
m_inventory = nullptr;
- m_repairMenu = nullptr;
+ m_repairMenu = NULL;
m_itemName = L"";
}
@@ -231,7 +231,7 @@ void IUIScene_AnvilMenu::handleTick()
void IUIScene_AnvilMenu::updateItemName()
{
Slot *slot = m_repairMenu->getSlot(AnvilMenu::INPUT_SLOT);
- if (slot != nullptr && slot->hasItem())
+ if (slot != NULL && slot->hasItem())
{
if (!slot->getItem()->hasCustomHoverName() && m_itemName.compare(slot->getItem()->getHoverName())==0)
{
@@ -245,7 +245,7 @@ void IUIScene_AnvilMenu::updateItemName()
ByteArrayOutputStream baos;
DataOutputStream dos(&baos);
dos.writeUTF(m_itemName);
- Minecraft::GetInstance()->localplayers[getPad()]->connection->send(std::make_shared<CustomPayloadPacket>(CustomPayloadPacket::SET_ITEM_NAME_PACKET, baos.toByteArray()));
+ Minecraft::GetInstance()->localplayers[getPad()]->connection->send(shared_ptr<CustomPayloadPacket>(new CustomPayloadPacket(CustomPayloadPacket::SET_ITEM_NAME_PACKET, baos.toByteArray())));
}
void IUIScene_AnvilMenu::refreshContainer(AbstractContainerMenu *container, vector<shared_ptr<ItemInstance> > *items)
@@ -257,10 +257,10 @@ void IUIScene_AnvilMenu::slotChanged(AbstractContainerMenu *container, int slotI
{
if (slotIndex == AnvilMenu::INPUT_SLOT)
{
- m_itemName = item == nullptr ? L"" : item->getHoverName();
+ m_itemName = item == NULL ? L"" : item->getHoverName();
setEditNameValue(m_itemName);
- setEditNameEditable(item != nullptr);
- if (item != nullptr)
+ setEditNameEditable(item != NULL);
+ if (item != NULL)
{
updateItemName();
}
diff --git a/Minecraft.Client/Common/UI/IUIScene_BeaconMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_BeaconMenu.cpp
index 3dede3d9..bb13deb8 100644
--- a/Minecraft.Client/Common/UI/IUIScene_BeaconMenu.cpp
+++ b/Minecraft.Client/Common/UI/IUIScene_BeaconMenu.cpp
@@ -216,13 +216,13 @@ void IUIScene_BeaconMenu::handleOtherClicked(int iPad, ESceneSection eSection, i
{
case eSectionBeaconConfirm:
{
- if( (m_beacon->getItem(0) == nullptr) || (m_beacon->getPrimaryPower() <= 0) ) return;
+ if( (m_beacon->getItem(0) == NULL) || (m_beacon->getPrimaryPower() <= 0) ) return;
ByteArrayOutputStream baos;
DataOutputStream dos(&baos);
dos.writeInt(m_beacon->getPrimaryPower());
dos.writeInt(m_beacon->getSecondaryPower());
- Minecraft::GetInstance()->localplayers[getPad()]->connection->send(std::make_shared<CustomPayloadPacket>(CustomPayloadPacket::SET_BEACON_PACKET, baos.toByteArray()));
+ Minecraft::GetInstance()->localplayers[getPad()]->connection->send(shared_ptr<CustomPayloadPacket>(new CustomPayloadPacket(CustomPayloadPacket::SET_BEACON_PACKET, baos.toByteArray())));
if (m_beacon->getPrimaryPower() > 0)
{
@@ -286,7 +286,7 @@ void IUIScene_BeaconMenu::handleTick()
for (int c = 0; c < count; c++)
{
- if(BeaconTileEntity::BEACON_EFFECTS[tier][c] == nullptr) continue;
+ if(BeaconTileEntity::BEACON_EFFECTS[tier][c] == NULL) continue;
int effectId = BeaconTileEntity::BEACON_EFFECTS[tier][c]->id;
int icon = BeaconTileEntity::BEACON_EFFECTS[tier][c]->getIcon();
@@ -315,7 +315,7 @@ void IUIScene_BeaconMenu::handleTick()
for (int c = 0; c < count - 1; c++)
{
- if(BeaconTileEntity::BEACON_EFFECTS[tier][c] == nullptr) continue;
+ if(BeaconTileEntity::BEACON_EFFECTS[tier][c] == NULL) continue;
int effectId = BeaconTileEntity::BEACON_EFFECTS[tier][c]->id;
int icon = BeaconTileEntity::BEACON_EFFECTS[tier][c]->getIcon();
@@ -355,7 +355,7 @@ void IUIScene_BeaconMenu::handleTick()
}
}
- SetConfirmButtonEnabled( (m_beacon->getItem(0) != nullptr) && (m_beacon->getPrimaryPower() > 0) );
+ SetConfirmButtonEnabled( (m_beacon->getItem(0) != NULL) && (m_beacon->getPrimaryPower() > 0) );
}
int IUIScene_BeaconMenu::GetId(int tier, int effectId)
@@ -365,7 +365,7 @@ int IUIScene_BeaconMenu::GetId(int tier, int effectId)
vector<HtmlString> *IUIScene_BeaconMenu::GetSectionHoverText(ESceneSection eSection)
{
- vector<HtmlString> *desc = nullptr;
+ vector<HtmlString> *desc = NULL;
switch(eSection)
{
case eSectionBeaconSecondaryTwo:
diff --git a/Minecraft.Client/Common/UI/IUIScene_CommandBlockMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_CommandBlockMenu.cpp
index 3af01678..4371b4e5 100644
--- a/Minecraft.Client/Common/UI/IUIScene_CommandBlockMenu.cpp
+++ b/Minecraft.Client/Common/UI/IUIScene_CommandBlockMenu.cpp
@@ -20,6 +20,6 @@ void IUIScene_CommandBlockMenu::ConfirmButtonClicked()
dos.writeInt(m_commandBlock->z);
dos.writeUTF(GetCommand());
- Minecraft::GetInstance()->localplayers[GetPad()]->connection->send(std::make_shared<CustomPayloadPacket>(CustomPayloadPacket::SET_ADVENTURE_COMMAND_PACKET, baos.toByteArray()));
+ Minecraft::GetInstance()->localplayers[GetPad()]->connection->send(shared_ptr<CustomPayloadPacket>(new CustomPayloadPacket(CustomPayloadPacket::SET_ADVENTURE_COMMAND_PACKET, baos.toByteArray())));
}
diff --git a/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp
index 6fddece9..fc012be3 100644
--- a/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp
+++ b/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp
@@ -6,8 +6,6 @@
#include "..\..\LocalPlayer.h"
#include "IUIScene_CraftingMenu.h"
-#include "UI.h"
-
Recipy::_eGroupType IUIScene_CraftingMenu::m_GroupTypeMapping4GridA[IUIScene_CraftingMenu::m_iMaxGroup2x2]=
{
Recipy::eGroupType_Structure,
@@ -156,10 +154,10 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat)
Minecraft *pMinecraft = Minecraft::GetInstance();
- if( pMinecraft->localgameModes[getPad()] != nullptr )
+ if( pMinecraft->localgameModes[getPad()] != NULL )
{
Tutorial *tutorial = pMinecraft->localgameModes[getPad()]->getTutorial();
- if(tutorial != nullptr)
+ if(tutorial != NULL)
{
tutorial->handleUIInput(iAction);
if(ui.IsTutorialVisible(getPad()) && !tutorial->isInputAllowed(iAction))
@@ -213,10 +211,10 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat)
shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr);
//int iIcon=pTempItemInst->getItem()->getIcon(pTempItemInst->getAuxValue());
- if( pMinecraft->localgameModes[iPad] != nullptr)
+ if( pMinecraft->localgameModes[iPad] != NULL)
{
Tutorial *tutorial = pMinecraft->localgameModes[iPad]->getTutorial();
- if(tutorial != nullptr)
+ if(tutorial != NULL)
{
tutorial->onCrafted(pTempItemInst);
}
@@ -249,10 +247,10 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat)
shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr);
//int iIcon=pTempItemInst->getItem()->getIcon(pTempItemInst->getAuxValue());
- if( pMinecraft->localgameModes[iPad] != nullptr )
+ if( pMinecraft->localgameModes[iPad] != NULL )
{
Tutorial *tutorial = pMinecraft->localgameModes[iPad]->getTutorial();
- if(tutorial != nullptr)
+ if(tutorial != NULL)
{
tutorial->createItemSelected(pTempItemInst, pRecipeIngredientsRequired[iRecipe].bCanMake[iPad]);
}
@@ -290,12 +288,12 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat)
}
// 4J Stu - Fix for #13097 - Bug: Milk Buckets are removed when crafting Cake
- if (ingItemInst != nullptr)
+ if (ingItemInst != NULL)
{
if (ingItemInst->getItem()->hasCraftingRemainingItem())
{
// replace item with remaining result
- m_pPlayer->inventory->add(std::make_shared<ItemInstance>(ingItemInst->getItem()->getCraftingRemainingItem()));
+ m_pPlayer->inventory->add( shared_ptr<ItemInstance>( new ItemInstance(ingItemInst->getItem()->getCraftingRemainingItem()) ) );
}
}
@@ -610,7 +608,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable()
// dump out the inventory
/* for (unsigned int k = 0; k < m_pPlayer->inventory->items.length; k++)
{
- if (m_pPlayer->inventory->items[k] != nullptr)
+ if (m_pPlayer->inventory->items[k] != NULL)
{
wstring itemstring=m_pPlayer->inventory->items[k]->toString();
@@ -622,15 +620,15 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable()
*/
RecipyList *recipes = ((Recipes *)Recipes::getInstance())->getRecipies();
Recipy::INGREDIENTS_REQUIRED *pRecipeIngredientsRequired=Recipes::getInstance()->getRecipeIngredientsArray();
- int iRecipeC=static_cast<int>(recipes->size());
+ int iRecipeC=(int)recipes->size();
auto itRecipe = recipes->begin();
// dump out the recipe products
// for (int i = 0; i < iRecipeC; i++)
// {
- // shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[i].pRecipy->assemble(nullptr);
- // if (pTempItemInst != nullptr)
+ // shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[i].pRecipy->assemble(NULL);
+ // if (pTempItemInst != NULL)
// {
// wstring itemstring=pTempItemInst->toString();
//
@@ -685,7 +683,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable()
// Does the player have this ingredient?
for (unsigned int k = 0; k < m_pPlayer->inventory->items.length; k++)
{
- if (m_pPlayer->inventory->items[k] != nullptr)
+ if (m_pPlayer->inventory->items[k] != NULL)
{
// do they have the ingredient, and the aux value matches, and enough off it?
if((m_pPlayer->inventory->items[k]->id == pRecipeIngredientsRequired[i].iIngIDA[j]) &&
@@ -705,7 +703,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable()
for(unsigned int l=0;l<m_pPlayer->inventory->items.length;l++)
{
- if (m_pPlayer->inventory->items[l] != nullptr)
+ if (m_pPlayer->inventory->items[l] != NULL)
{
if(
(m_pPlayer->inventory->items[l]->id == pRecipeIngredientsRequired[i].iIngIDA[j]) &&
@@ -1073,7 +1071,7 @@ void IUIScene_CraftingMenu::DisplayIngredients()
int iAuxVal=pRecipeIngredientsRequired[iRecipe].iIngAuxValA[i];
Item *item = Item::items[id];
- shared_ptr<ItemInstance> itemInst= std::make_shared<ItemInstance>(item, pRecipeIngredientsRequired[iRecipe].iIngValA[i], iAuxVal);
+ shared_ptr<ItemInstance> itemInst= shared_ptr<ItemInstance>(new ItemInstance(item,pRecipeIngredientsRequired[iRecipe].iIngValA[i],iAuxVal));
// 4J-PB - a very special case - the bed can use any kind of wool, so we can't use the item description
// and the same goes for the painting
@@ -1158,7 +1156,7 @@ void IUIScene_CraftingMenu::DisplayIngredients()
{
iAuxVal = 1;
}
- shared_ptr<ItemInstance> itemInst= std::make_shared<ItemInstance>(id, 1, iAuxVal);
+ shared_ptr<ItemInstance> itemInst= shared_ptr<ItemInstance>(new ItemInstance(id,1,iAuxVal));
setIngredientSlotItem(getPad(),index,itemInst);
// show the ingredients we don't have if we can't make the recipe
if(app.DebugSettingsOn() && app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad())&(1L<<eDebugSetting_CraftAnything))
diff --git a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp
index a0c0ebdd..56aaf259 100644
--- a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp
+++ b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp
@@ -1,7 +1,6 @@
#include "stdafx.h"
#include "IUIScene_CreativeMenu.h"
-#include "UI.h"
#include "..\..\Minecraft.h"
#include "..\..\MultiplayerLocalPlayer.h"
#include "..\..\..\Minecraft.World\net.minecraft.world.inventory.h"
@@ -14,7 +13,7 @@
#include "..\..\..\Minecraft.World\JavaMath.h"
// 4J JEV - Images for each tab.
-IUIScene_CreativeMenu::TabSpec **IUIScene_CreativeMenu::specs = nullptr;
+IUIScene_CreativeMenu::TabSpec **IUIScene_CreativeMenu::specs = NULL;
vector< shared_ptr<ItemInstance> > IUIScene_CreativeMenu::categoryGroups[eCreativeInventoryGroupsCount];
@@ -22,6 +21,7 @@ vector< shared_ptr<ItemInstance> > IUIScene_CreativeMenu::categoryGroups[eCreati
#define ITEM_AUX(id, aux) list->push_back( shared_ptr<ItemInstance>(new ItemInstance(id, 1, aux)) );
#define DEF(index) list = &categoryGroups[index];
+
void IUIScene_CreativeMenu::staticCtor()
{
vector< shared_ptr<ItemInstance> > *list;
@@ -488,14 +488,14 @@ void IUIScene_CreativeMenu::staticCtor()
for(unsigned int i = 0; i < Enchantment::enchantments.length; ++i)
{
Enchantment *enchantment = Enchantment::enchantments[i];
- if (enchantment == nullptr || enchantment->category == nullptr) continue;
+ if (enchantment == NULL || enchantment->category == NULL) continue;
list->push_back(Item::enchantedBook->createForEnchantment(new EnchantmentInstance(enchantment, enchantment->getMaxLevel())));
}
#ifndef _CONTENT_PACKAGE
if(app.DebugSettingsOn())
{
- shared_ptr<ItemInstance> debugSword = std::make_shared<ItemInstance>(Item::sword_diamond_Id, 1, 0);
+ shared_ptr<ItemInstance> debugSword = shared_ptr<ItemInstance>(new ItemInstance(Item::sword_diamond_Id, 1, 0));
debugSword->enchant( Enchantment::damageBonus, 50 );
debugSword->setHoverName(L"Sword of Debug");
list->push_back(debugSword);
@@ -673,7 +673,7 @@ void IUIScene_CreativeMenu::staticCtor()
#ifndef _CONTENT_PACKAGE
ECreative_Inventory_Groups decorationsGroup[] = {eCreativeInventory_Decoration};
ECreative_Inventory_Groups debugDecorationsGroup[] = {eCreativeInventory_ArtToolsDecorations};
- specs[eCreativeInventoryTab_Decorations] = new TabSpec(L"Decoration", IDS_GROUPNAME_DECORATIONS, 1, decorationsGroup, 0, nullptr, 1, debugDecorationsGroup);
+ specs[eCreativeInventoryTab_Decorations] = new TabSpec(L"Decoration", IDS_GROUPNAME_DECORATIONS, 1, decorationsGroup, 0, NULL, 1, debugDecorationsGroup);
#else
ECreative_Inventory_Groups decorationsGroup[] = {eCreativeInventory_Decoration};
specs[eCreativeInventoryTab_Decorations] = new TabSpec(L"Decoration", IDS_GROUPNAME_DECORATIONS, 1, decorationsGroup);
@@ -707,7 +707,7 @@ void IUIScene_CreativeMenu::staticCtor()
#ifndef _CONTENT_PACKAGE
ECreative_Inventory_Groups miscGroup[] = {eCreativeInventory_Misc};
ECreative_Inventory_Groups debugMiscGroup[] = {eCreativeInventory_ArtToolsMisc};
- specs[eCreativeInventoryTab_Misc] = new TabSpec(L"Misc", IDS_GROUPNAME_MISCELLANEOUS, 1, miscGroup, 0, nullptr, 1, debugMiscGroup);
+ specs[eCreativeInventoryTab_Misc] = new TabSpec(L"Misc", IDS_GROUPNAME_MISCELLANEOUS, 1, miscGroup, 0, NULL, 1, debugMiscGroup);
#else
ECreative_Inventory_Groups miscGroup[] = {eCreativeInventory_Misc};
specs[eCreativeInventoryTab_Misc] = new TabSpec(L"Misc", IDS_GROUPNAME_MISCELLANEOUS, 1, miscGroup);
@@ -766,12 +766,12 @@ void IUIScene_CreativeMenu::ScrollBar(UIVec2D pointerPos)
// 4J JEV - Tab Spec Struct
-IUIScene_CreativeMenu::TabSpec::TabSpec(LPCWSTR icon, int descriptionId, int staticGroupsCount, ECreative_Inventory_Groups *staticGroups, int dynamicGroupsCount, ECreative_Inventory_Groups *dynamicGroups, int debugGroupsCount /*= 0*/, ECreative_Inventory_Groups *debugGroups /*= nullptr*/)
+IUIScene_CreativeMenu::TabSpec::TabSpec(LPCWSTR icon, int descriptionId, int staticGroupsCount, ECreative_Inventory_Groups *staticGroups, int dynamicGroupsCount, ECreative_Inventory_Groups *dynamicGroups, int debugGroupsCount /*= 0*/, ECreative_Inventory_Groups *debugGroups /*= NULL*/)
: m_icon(icon), m_descriptionId(descriptionId), m_staticGroupsCount(staticGroupsCount), m_dynamicGroupsCount(dynamicGroupsCount), m_debugGroupsCount(debugGroupsCount)
{
m_pages = 0;
- m_staticGroupsA = nullptr;
+ m_staticGroupsA = NULL;
unsigned int dynamicItems = 0;
m_staticItems = 0;
@@ -786,7 +786,7 @@ IUIScene_CreativeMenu::TabSpec::TabSpec(LPCWSTR icon, int descriptionId, int sta
}
}
- m_debugGroupsA = nullptr;
+ m_debugGroupsA = NULL;
m_debugItems = 0;
if(debugGroupsCount > 0)
{
@@ -798,8 +798,8 @@ IUIScene_CreativeMenu::TabSpec::TabSpec(LPCWSTR icon, int descriptionId, int sta
}
}
- m_dynamicGroupsA = nullptr;
- if(dynamicGroupsCount > 0 && dynamicGroups != nullptr)
+ m_dynamicGroupsA = NULL;
+ if(dynamicGroupsCount > 0 && dynamicGroups != NULL)
{
m_dynamicGroupsA = new ECreative_Inventory_Groups[dynamicGroupsCount];
for(int i = 0; i < dynamicGroupsCount; ++i)
@@ -816,9 +816,9 @@ IUIScene_CreativeMenu::TabSpec::TabSpec(LPCWSTR icon, int descriptionId, int sta
IUIScene_CreativeMenu::TabSpec::~TabSpec()
{
- if(m_staticGroupsA != nullptr) delete [] m_staticGroupsA;
- if(m_dynamicGroupsA != nullptr) delete [] m_dynamicGroupsA;
- if(m_debugGroupsA != nullptr) delete [] m_debugGroupsA;
+ if(m_staticGroupsA != NULL) delete [] m_staticGroupsA;
+ if(m_dynamicGroupsA != NULL) delete [] m_dynamicGroupsA;
+ if(m_debugGroupsA != NULL) delete [] m_debugGroupsA;
}
void IUIScene_CreativeMenu::TabSpec::populateMenu(AbstractContainerMenu *menu, int dynamicIndex, unsigned int page)
@@ -826,7 +826,7 @@ void IUIScene_CreativeMenu::TabSpec::populateMenu(AbstractContainerMenu *menu, i
int lastSlotIndex = 0;
// Fill the dynamic group
- if(m_dynamicGroupsCount > 0 && m_dynamicGroupsA != nullptr)
+ if(m_dynamicGroupsCount > 0 && m_dynamicGroupsA != NULL)
{
for (auto it = categoryGroups[m_dynamicGroupsA[dynamicIndex]].rbegin(); it != categoryGroups[m_dynamicGroupsA[dynamicIndex]].rend() && lastSlotIndex < MAX_SIZE; ++it)
{
@@ -957,7 +957,7 @@ IUIScene_CreativeMenu::ItemPickerMenu::ItemPickerMenu( shared_ptr<SimpleContaine
//int startLength = slots->size();
- Slot *slot = nullptr;
+ Slot *slot = NULL;
for (int i = 0; i < TabSpec::MAX_SIZE; i++)
{
// 4J JEV - These values get set by addSlot anyway.
@@ -1036,11 +1036,11 @@ bool IUIScene_CreativeMenu::handleValidKeyPress(int iPad, int buttonNum, BOOL qu
{
shared_ptr<ItemInstance> newItem = m_menu->getSlot(i)->getItem();
- if(newItem != nullptr)
+ if(newItem != NULL)
{
m_menu->getSlot(i)->set(nullptr);
// call this function to synchronize multiplayer item bar
- pMinecraft->localgameModes[iPad]->handleCreativeModeItemAdd(nullptr, i - static_cast<int>(m_menu->slots.size()) + 9 + InventoryMenu::USE_ROW_SLOT_START);
+ pMinecraft->localgameModes[iPad]->handleCreativeModeItemAdd(nullptr, i - (int)m_menu->slots.size() + 9 + InventoryMenu::USE_ROW_SLOT_START);
}
}
return true;
@@ -1054,7 +1054,7 @@ void IUIScene_CreativeMenu::handleOutsideClicked(int iPad, int buttonNum, BOOL q
Minecraft *pMinecraft = Minecraft::GetInstance();
shared_ptr<Inventory> playerInventory = pMinecraft->localplayers[iPad]->inventory;
- if (playerInventory->getCarried() != nullptr)
+ if (playerInventory->getCarried() != NULL)
{
if (buttonNum == 0)
{
@@ -1082,8 +1082,8 @@ void IUIScene_CreativeMenu::handleAdditionalKeyPress(int iAction)
// Fall through intentional
case ACTION_MENU_RIGHT_SCROLL:
{
- ECreativeInventoryTabs tab = static_cast<ECreativeInventoryTabs>(m_curTab + dir);
- if (tab < 0) tab = static_cast<ECreativeInventoryTabs>(eCreativeInventoryTab_COUNT - 1);
+ ECreativeInventoryTabs tab = (ECreativeInventoryTabs)(m_curTab + dir);
+ if (tab < 0) tab = (ECreativeInventoryTabs)(eCreativeInventoryTab_COUNT - 1);
if (tab >= eCreativeInventoryTab_COUNT) tab = eCreativeInventoryTab_BuildingBlocks;
switchTab(tab);
ui.PlayUISFX(eSFX_Focus);
@@ -1143,7 +1143,7 @@ void IUIScene_CreativeMenu::handleSlotListClicked(ESceneSection eSection, int bu
shared_ptr<Inventory> playerInventory = pMinecraft->localplayers[getPad()]->inventory;
shared_ptr<ItemInstance> carried = playerInventory->getCarried();
shared_ptr<ItemInstance> clicked = m_menu->getSlot(currentIndex)->getItem();
- if (clicked != nullptr)
+ if (clicked != NULL)
{
playerInventory->setCarried(ItemInstance::clone(clicked));
carried = playerInventory->getCarried();
@@ -1176,7 +1176,7 @@ void IUIScene_CreativeMenu::handleSlotListClicked(ESceneSection eSection, int bu
m_menu->clicked(currentIndex, buttonNum, quickKeyHeld?AbstractContainerMenu::CLICK_QUICK_MOVE:AbstractContainerMenu::CLICK_PICKUP, pMinecraft->localplayers[getPad()]);
shared_ptr<ItemInstance> newItem = m_menu->getSlot(currentIndex)->getItem();
// call this function to synchronize multiplayer item bar
- pMinecraft->localgameModes[getPad()]->handleCreativeModeItemAdd(newItem, currentIndex - static_cast<int>(m_menu->slots.size()) + 9 + InventoryMenu::USE_ROW_SLOT_START);
+ pMinecraft->localgameModes[getPad()]->handleCreativeModeItemAdd(newItem, currentIndex - (int)m_menu->slots.size() + 9 + InventoryMenu::USE_ROW_SLOT_START);
if(m_bCarryingCreativeItem)
{
@@ -1224,7 +1224,7 @@ bool IUIScene_CreativeMenu::getEmptyInventorySlot(shared_ptr<ItemInstance> item,
for(unsigned int i = TabSpec::MAX_SIZE; i < TabSpec::MAX_SIZE + 9; ++i)
{
shared_ptr<ItemInstance> slotItem = m_menu->getSlot(i)->getItem();
- if( slotItem != nullptr && slotItem->sameItemWithTags(item) && (slotItem->GetCount() + item->GetCount() <= item->getMaxStackSize() ))
+ if( slotItem != NULL && slotItem->sameItemWithTags(item) && (slotItem->GetCount() + item->GetCount() <= item->getMaxStackSize() ))
{
sameItemFound = true;
slotX = i - TabSpec::MAX_SIZE;
@@ -1237,7 +1237,7 @@ bool IUIScene_CreativeMenu::getEmptyInventorySlot(shared_ptr<ItemInstance> item,
// Find an empty slot
for(unsigned int i = TabSpec::MAX_SIZE; i < TabSpec::MAX_SIZE + 9; ++i)
{
- if( m_menu->getSlot(i)->getItem() == nullptr )
+ if( m_menu->getSlot(i)->getItem() == NULL )
{
slotX = i - TabSpec::MAX_SIZE;
emptySlotFound = true;
@@ -1316,7 +1316,7 @@ void IUIScene_CreativeMenu::BuildFirework(vector<shared_ptr<ItemInstance> > *lis
// diamonds give trails
if (trail) expTag->putBoolean(FireworksItem::TAG_E_TRAIL, true);
- intArray colorArray(static_cast<unsigned int>(colors.size()));
+ intArray colorArray(colors.size());
for (int i = 0; i < colorArray.length; i++)
{
colorArray[i] = colors.at(i);
@@ -1335,7 +1335,7 @@ void IUIScene_CreativeMenu::BuildFirework(vector<shared_ptr<ItemInstance> > *lis
vector<int> colors;
colors.push_back(DyePowderItem::COLOR_RGB[fadeColor]);
- intArray colorArray(static_cast<unsigned int>(colors.size()));
+ intArray colorArray(colors.size());
for (int i = 0; i < colorArray.length; i++)
{
colorArray[i] = colors.at(i);
@@ -1350,7 +1350,7 @@ void IUIScene_CreativeMenu::BuildFirework(vector<shared_ptr<ItemInstance> > *lis
shared_ptr<ItemInstance> firework;
{
- firework = std::make_shared<ItemInstance>(Item::fireworks);
+ firework = shared_ptr<ItemInstance>( new ItemInstance(Item::fireworks) );
CompoundTag *itemTag = new CompoundTag();
CompoundTag *fireTag = new CompoundTag(FireworksItem::TAG_FIREWORKS);
ListTag<CompoundTag> *expTags = new ListTag<CompoundTag>(FireworksItem::TAG_EXPLOSIONS);
@@ -1358,7 +1358,7 @@ void IUIScene_CreativeMenu::BuildFirework(vector<shared_ptr<ItemInstance> > *lis
expTags->add(expTag);
fireTag->put(FireworksItem::TAG_EXPLOSIONS, expTags);
- fireTag->putByte(FireworksItem::TAG_FLIGHT, static_cast<byte>(sulphur));
+ fireTag->putByte(FireworksItem::TAG_FLIGHT, (byte) sulphur);
itemTag->put(FireworksItem::TAG_FIREWORKS, fireTag);
diff --git a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.h b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.h
index 864fb560..64b78029 100644
--- a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.h
+++ b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.h
@@ -69,7 +69,7 @@ public:
unsigned int m_debugItems;
public:
- TabSpec( LPCWSTR icon, int descriptionId, int staticGroupsCount, ECreative_Inventory_Groups *staticGroups, int dynamicGroupsCount = 0, ECreative_Inventory_Groups *dynamicGroups = nullptr, int debugGroupsCount = 0, ECreative_Inventory_Groups *debugGroups = nullptr );
+ TabSpec( LPCWSTR icon, int descriptionId, int staticGroupsCount, ECreative_Inventory_Groups *staticGroups, int dynamicGroupsCount = 0, ECreative_Inventory_Groups *dynamicGroups = NULL, int debugGroupsCount = 0, ECreative_Inventory_Groups *debugGroups = NULL );
~TabSpec();
void populateMenu(AbstractContainerMenu *menu, int dynamicIndex, unsigned int page);
diff --git a/Minecraft.Client/Common/UI/IUIScene_EnchantingMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_EnchantingMenu.cpp
index fbbf7c24..c73f7dc5 100644
--- a/Minecraft.Client/Common/UI/IUIScene_EnchantingMenu.cpp
+++ b/Minecraft.Client/Common/UI/IUIScene_EnchantingMenu.cpp
@@ -181,5 +181,5 @@ bool IUIScene_EnchantingMenu::IsSectionSlotList( ESceneSection eSection )
EnchantmentMenu *IUIScene_EnchantingMenu::getMenu()
{
- return static_cast<EnchantmentMenu *>(m_menu);
+ return (EnchantmentMenu *)m_menu;
} \ No newline at end of file
diff --git a/Minecraft.Client/Common/UI/IUIScene_HUD.cpp b/Minecraft.Client/Common/UI/IUIScene_HUD.cpp
index fd977966..03adbd2c 100644
--- a/Minecraft.Client/Common/UI/IUIScene_HUD.cpp
+++ b/Minecraft.Client/Common/UI/IUIScene_HUD.cpp
@@ -7,8 +7,6 @@
#include "..\..\..\Minecraft.World\net.minecraft.world.entity.monster.h"
#include "IUIScene_HUD.h"
-#include "UI.h"
-
IUIScene_HUD::IUIScene_HUD()
{
m_lastActiveSlot = -1;
@@ -81,7 +79,7 @@ void IUIScene_HUD::updateFrameTick()
{
//SetRidingHorse(false, 0);
shared_ptr<Entity> riding = pMinecraft->localplayers[iPad]->riding;
- if(riding == nullptr)
+ if(riding == NULL)
{
SetRidingHorse(false, false, 0);
}
@@ -148,8 +146,8 @@ void IUIScene_HUD::updateFrameTick()
{
if(uiOpacityTimer<10)
{
- float fStep=(80.0f-static_cast<float>(ucAlpha))/10.0f;
- fVal=0.01f*(80.0f-((10.0f-static_cast<float>(uiOpacityTimer))*fStep));
+ float fStep=(80.0f-(float)ucAlpha)/10.0f;
+ fVal=0.01f*(80.0f-((10.0f-(float)uiOpacityTimer)*fStep));
}
else
{
@@ -158,7 +156,7 @@ void IUIScene_HUD::updateFrameTick()
}
else
{
- fVal=0.01f*static_cast<float>(ucAlpha);
+ fVal=0.01f*(float)ucAlpha;
}
}
else
@@ -168,12 +166,12 @@ void IUIScene_HUD::updateFrameTick()
{
ucAlpha=15;
}
- fVal=0.01f*static_cast<float>(ucAlpha);
+ fVal=0.01f*(float)ucAlpha;
}
SetOpacity(fVal);
bool bDisplayGui=app.GetGameStarted() && !ui.GetMenuDisplayed(iPad) && !(app.GetXuiAction(iPad)==eAppAction_AutosaveSaveGameCapturedThumbnail) && app.GetGameSettings(iPad,eGameSetting_DisplayHUD)!=0;
- if(bDisplayGui && pMinecraft->localplayers[iPad] != nullptr)
+ if(bDisplayGui && pMinecraft->localplayers[iPad] != NULL)
{
SetVisible(true);
}
@@ -200,7 +198,7 @@ void IUIScene_HUD::renderPlayerHealth()
bool bHasPoison = pMinecraft->localplayers[iPad]->hasEffect(MobEffect::poison);
bool bHasWither = pMinecraft->localplayers[iPad]->hasEffect(MobEffect::wither);
AttributeInstance *maxHealthAttribute = pMinecraft->localplayers[iPad]->getAttribute(SharedMonsterAttributes::MAX_HEALTH);
- float maxHealth = static_cast<float>(maxHealthAttribute->getValue());
+ float maxHealth = (float)maxHealthAttribute->getValue();
float totalAbsorption = pMinecraft->localplayers[iPad]->getAbsorptionAmount();
// Update armour
@@ -221,7 +219,7 @@ void IUIScene_HUD::renderPlayerHealth()
shared_ptr<Entity> riding = pMinecraft->localplayers[iPad]->riding;
- if(riding == nullptr || riding && !riding->instanceof(eTYPE_LIVINGENTITY))
+ if(riding == NULL || riding && !riding->instanceof(eTYPE_LIVINGENTITY))
{
SetRidingHorse(false, false, 0);
@@ -244,8 +242,8 @@ void IUIScene_HUD::renderPlayerHealth()
if (pMinecraft->localplayers[iPad]->isUnderLiquid(Material::water))
{
ShowAir(true);
- int count = static_cast<int>(ceil((pMinecraft->localplayers[iPad]->getAirSupply() - 2) * 10.0f / Player::TOTAL_AIR_SUPPLY));
- int extra = static_cast<int>(ceil((pMinecraft->localplayers[iPad]->getAirSupply()) * 10.0f / Player::TOTAL_AIR_SUPPLY)) - count;
+ int count = (int) ceil((pMinecraft->localplayers[iPad]->getAirSupply() - 2) * 10.0f / Player::TOTAL_AIR_SUPPLY);
+ int extra = (int) ceil((pMinecraft->localplayers[iPad]->getAirSupply()) * 10.0f / Player::TOTAL_AIR_SUPPLY) - count;
SetAir(count, extra);
}
else
@@ -256,7 +254,7 @@ void IUIScene_HUD::renderPlayerHealth()
else if(riding->instanceof(eTYPE_LIVINGENTITY) )
{
shared_ptr<LivingEntity> living = dynamic_pointer_cast<LivingEntity>(riding);
- int riderCurrentHealth = static_cast<int>(ceil(living->getHealth()));
+ int riderCurrentHealth = (int) ceil(living->getHealth());
float maxRiderHealth = living->getMaxHealth();
SetRidingHorse(true, pMinecraft->localplayers[iPad]->isRidingJumpable(), maxRiderHealth);
diff --git a/Minecraft.Client/Common/UI/IUIScene_PauseMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_PauseMenu.cpp
index e88ed08c..ab1767d4 100644
--- a/Minecraft.Client/Common/UI/IUIScene_PauseMenu.cpp
+++ b/Minecraft.Client/Common/UI/IUIScene_PauseMenu.cpp
@@ -52,7 +52,7 @@ int IUIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStor
if(!Minecraft::GetInstance()->skins->isUsingDefaultSkin())
{
TexturePack *tPack = Minecraft::GetInstance()->skins->getSelected();
- DLCTexturePack *pDLCTexPack=static_cast<DLCTexturePack *>(tPack);
+ DLCTexturePack *pDLCTexPack=(DLCTexturePack *)tPack;
DLCPack *pDLCPack=pDLCTexPack->getDLCInfoParentPack();//tPack->getDLCPack();
if(!pDLCPack->hasPurchasedFile( DLCManager::e_DLCType_Texture, L"" ))
@@ -229,7 +229,7 @@ int IUIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4
{
// 4J-PB - need to check this user can access the store
bool bContentRestricted;
- ProfileManager.GetChatAndContentRestrictions(iPad,true,nullptr,&bContentRestricted,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(iPad,true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
UINT uiIDA[1];
@@ -248,7 +248,7 @@ int IUIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4
app.DebugPrintf("Texture Pack - %s\n",pchPackName);
SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo((char *)pchPackName);
- if(pSONYDLCInfo!=nullptr)
+ if(pSONYDLCInfo!=NULL)
{
char chName[42];
char chSkuID[SCE_NP_COMMERCE2_SKU_ID_LEN];
@@ -300,7 +300,7 @@ int IUIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4
DLC_INFO *pDLCInfo=app.GetDLCInfoForProductName((WCHAR *)pDLCPack->getName().c_str());
- StorageManager.InstallOffer(1,(WCHAR *)pDLCInfo->wsProductId.c_str(),nullptr,nullptr);
+ StorageManager.InstallOffer(1,(WCHAR *)pDLCInfo->wsProductId.c_str(),NULL,NULL);
// the license change coming in when the offer has been installed will cause this scene to refresh
}
@@ -336,7 +336,7 @@ int IUIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4
// need to allow downloads here, or the player would need to quit the game to let the download of a texture pack happen. This might affect the network traffic, since the download could take all the bandwidth...
XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW);
- StorageManager.InstallOffer(1,ullIndexA,nullptr,nullptr);
+ StorageManager.InstallOffer(1,ullIndexA,NULL,NULL);
}
}
else
@@ -352,7 +352,7 @@ int IUIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4
int IUIScene_PauseMenu::SaveWorldThreadProc( LPVOID lpParameter )
{
- bool bAutosave=static_cast<bool>(lpParameter);
+ bool bAutosave=(bool)lpParameter;
if(bAutosave)
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_AutoSaveGame);
@@ -421,7 +421,7 @@ void IUIScene_PauseMenu::_ExitWorld(LPVOID lpParameter)
bool saveStats = true;
if (pMinecraft->isClientSide() || g_NetworkManager.IsInSession())
{
- if(lpParameter != nullptr )
+ if(lpParameter != NULL )
{
// 4J-PB - check if we have lost connection to Live
if(ProfileManager.GetLiveConnectionStatus()!=XONLINE_S_LOGON_CONNECTION_ESTABLISHED )
@@ -522,17 +522,17 @@ void IUIScene_PauseMenu::_ExitWorld(LPVOID lpParameter)
exitReasonStringId = -1;
// 4J - Force a disconnection, this handles the situation that the server has already disconnected
- if( pMinecraft->levels[0] != nullptr ) pMinecraft->levels[0]->disconnect(false);
- if( pMinecraft->levels[1] != nullptr ) pMinecraft->levels[1]->disconnect(false);
- if( pMinecraft->levels[2] != nullptr ) pMinecraft->levels[2]->disconnect(false);
+ if( pMinecraft->levels[0] != NULL ) pMinecraft->levels[0]->disconnect(false);
+ if( pMinecraft->levels[1] != NULL ) pMinecraft->levels[1]->disconnect(false);
+ if( pMinecraft->levels[2] != NULL ) pMinecraft->levels[2]->disconnect(false);
}
else
{
exitReasonStringId = IDS_EXITING_GAME;
pMinecraft->progressRenderer->progressStartNoAbort( IDS_EXITING_GAME );
- if( pMinecraft->levels[0] != nullptr ) pMinecraft->levels[0]->disconnect();
- if( pMinecraft->levels[1] != nullptr ) pMinecraft->levels[1]->disconnect();
- if( pMinecraft->levels[2] != nullptr ) pMinecraft->levels[2]->disconnect();
+ if( pMinecraft->levels[0] != NULL ) pMinecraft->levels[0]->disconnect();
+ if( pMinecraft->levels[1] != NULL ) pMinecraft->levels[1]->disconnect();
+ if( pMinecraft->levels[2] != NULL ) pMinecraft->levels[2]->disconnect();
}
// 4J Stu - This only does something if we actually have a server, so don't need to do any other checks
@@ -548,7 +548,7 @@ void IUIScene_PauseMenu::_ExitWorld(LPVOID lpParameter)
}
else
{
- if(lpParameter != nullptr && ProfileManager.IsSignedIn(ProfileManager.GetPrimaryPad()) )
+ if(lpParameter != NULL && ProfileManager.IsSignedIn(ProfileManager.GetPrimaryPad()) )
{
switch( app.GetDisconnectReason() )
{
@@ -625,7 +625,7 @@ void IUIScene_PauseMenu::_ExitWorld(LPVOID lpParameter)
{
Sleep(1);
}
- pMinecraft->setLevel(nullptr,exitReasonStringId,nullptr,saveStats);
+ pMinecraft->setLevel(NULL,exitReasonStringId,nullptr,saveStats);
TelemetryManager->Flush();
diff --git a/Minecraft.Client/Common/UI/IUIScene_StartGame.cpp b/Minecraft.Client/Common/UI/IUIScene_StartGame.cpp
index 735da438..d3a9e8f0 100644
--- a/Minecraft.Client/Common/UI/IUIScene_StartGame.cpp
+++ b/Minecraft.Client/Common/UI/IUIScene_StartGame.cpp
@@ -45,7 +45,7 @@ void IUIScene_StartGame::HandleDLCMountingComplete()
// 4J-PB - there may be texture packs we don't have, so use the info from TMS for this
// REMOVE UNTIL WORKING
- DLC_INFO *pDLCInfo=nullptr;
+ DLC_INFO *pDLCInfo=NULL;
// first pass - look to see if there are any that are not in the list
bool bTexturePackAlreadyListed;
@@ -86,7 +86,7 @@ void IUIScene_StartGame::HandleDLCMountingComplete()
// add a TMS request for them
app.DebugPrintf("+++ Adding TMSPP request for texture pack data\n");
app.AddTMSPPFileTypeRequest(e_DLC_TexturePackData);
- if(m_iConfigA!=nullptr)
+ if(m_iConfigA!=NULL)
{
delete m_iConfigA;
}
@@ -123,7 +123,7 @@ void IUIScene_StartGame::HandleDLCMountingComplete()
void IUIScene_StartGame::handleSelectionChanged(F64 selectedId)
{
- m_iSetTexturePackDescription = static_cast<int>(selectedId);
+ m_iSetTexturePackDescription = (int)selectedId;
if(!m_texturePackDescDisplayed)
{
@@ -135,13 +135,13 @@ void IUIScene_StartGame::UpdateTexturePackDescription(int index)
{
TexturePack *tp = Minecraft::GetInstance()->skins->getTexturePackByIndex(index);
- if(tp==nullptr)
+ if(tp==NULL)
{
#if TO_BE_IMPLEMENTED
// this is probably a texture pack icon added from TMS
DWORD dwBytes=0,dwFileBytes=0;
- PBYTE pbData=nullptr,pbFileData=nullptr;
+ PBYTE pbData=NULL,pbFileData=NULL;
CXuiCtrl4JList::LIST_ITEM_INFO ListItem;
// get the current index of the list, and then get the data
@@ -171,7 +171,7 @@ void IUIScene_StartGame::UpdateTexturePackDescription(int index)
}
else
{
- m_texturePackComparison->UseBrush(nullptr);
+ m_texturePackComparison->UseBrush(NULL);
}
#endif
}
@@ -214,7 +214,7 @@ void IUIScene_StartGame::UpdateCurrentTexturePack(int iSlot)
TexturePack *tp = Minecraft::GetInstance()->skins->getTexturePackByIndex(m_currentTexturePackIndex);
// if the texture pack is null, you don't have it yet
- if(tp==nullptr)
+ if(tp==NULL)
{
#if TO_BE_IMPLEMENTED
// Upsell
@@ -254,7 +254,7 @@ void IUIScene_StartGame::UpdateCurrentTexturePack(int iSlot)
int IUIScene_StartGame::TrialTexturePackWarningReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- IUIScene_StartGame* pScene = static_cast<IUIScene_StartGame *>(pParam);
+ IUIScene_StartGame* pScene = (IUIScene_StartGame*)pParam;
if(result==C4JStorage::EMessage_ResultAccept)
{
@@ -269,7 +269,7 @@ int IUIScene_StartGame::TrialTexturePackWarningReturned(void *pParam,int iPad,C4
int IUIScene_StartGame::UnlockTexturePackReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- IUIScene_StartGame* pScene = static_cast<IUIScene_StartGame *>(pParam);
+ IUIScene_StartGame* pScene = (IUIScene_StartGame*)pParam;
if(result==C4JStorage::EMessage_ResultAccept)
{
@@ -279,7 +279,7 @@ int IUIScene_StartGame::UnlockTexturePackReturned(void *pParam,int iPad,C4JStora
ULONGLONG ullIndexA[1];
DLC_INFO *pDLCInfo = app.GetDLCInfoForTrialOfferID(pScene->m_pDLCPack->getPurchaseOfferId());
- if(pDLCInfo!=nullptr)
+ if(pDLCInfo!=NULL)
{
ullIndexA[0]=pDLCInfo->ullOfferID_Full;
}
@@ -289,9 +289,9 @@ int IUIScene_StartGame::UnlockTexturePackReturned(void *pParam,int iPad,C4JStora
}
- StorageManager.InstallOffer(1,ullIndexA,nullptr,nullptr);
+ StorageManager.InstallOffer(1,ullIndexA,NULL,NULL);
#elif defined _XBOX_ONE
- //StorageManager.InstallOffer(1,StorageManager.GetOffer(iIndex).wszProductID,nullptr,nullptr);
+ //StorageManager.InstallOffer(1,StorageManager.GetOffer(iIndex).wszProductID,NULL,NULL);
#endif
// the license change coming in when the offer has been installed will cause this scene to refresh
@@ -311,7 +311,7 @@ int IUIScene_StartGame::UnlockTexturePackReturned(void *pParam,int iPad,C4JStora
int IUIScene_StartGame::TexturePackDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- IUIScene_StartGame *pClass = static_cast<IUIScene_StartGame *>(pParam);
+ IUIScene_StartGame *pClass = (IUIScene_StartGame *)pParam;
#ifdef _XBOX
@@ -332,7 +332,7 @@ int IUIScene_StartGame::TexturePackDialogReturned(void *pParam,int iPad,C4JStora
if( result==C4JStorage::EMessage_ResultAccept ) // Full version
{
ullIndexA[0]=ullOfferID_Full;
- StorageManager.InstallOffer(1,ullIndexA,nullptr,nullptr);
+ StorageManager.InstallOffer(1,ullIndexA,NULL,NULL);
}
else // trial version
@@ -343,7 +343,7 @@ int IUIScene_StartGame::TexturePackDialogReturned(void *pParam,int iPad,C4JStora
{
ullIndexA[0]=pDLCInfo->ullOfferID_Trial;
- StorageManager.InstallOffer(1,ullIndexA,nullptr,nullptr);
+ StorageManager.InstallOffer(1,ullIndexA,NULL,NULL);
}
}
}
@@ -360,7 +360,7 @@ int IUIScene_StartGame::TexturePackDialogReturned(void *pParam,int iPad,C4JStora
app.GetDLCFullOfferIDForPackID(pClass->m_MoreOptionsParams.dwTexturePack,ProductId);
- StorageManager.InstallOffer(1,(WCHAR *)ProductId.c_str(),nullptr,nullptr);
+ StorageManager.InstallOffer(1,(WCHAR *)ProductId.c_str(),NULL,NULL);
// the license change coming in when the offer has been installed will cause this scene to refresh
}
diff --git a/Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp
index 0b1e0df2..059f9b75 100644
--- a/Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp
+++ b/Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp
@@ -8,14 +8,12 @@
#include "..\..\ClientConnection.h"
#include "IUIScene_TradingMenu.h"
-#include "UI.h"
-
IUIScene_TradingMenu::IUIScene_TradingMenu()
{
m_validOffersCount = 0;
m_selectedSlot = 0;
m_offersStartIndex = 0;
- m_menu = nullptr;
+ m_menu = NULL;
m_bHasUpdatedOnce = false;
}
@@ -33,10 +31,10 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat)
Minecraft *pMinecraft = Minecraft::GetInstance();
- if( pMinecraft->localgameModes[getPad()] != nullptr )
+ if( pMinecraft->localgameModes[getPad()] != NULL )
{
Tutorial *tutorial = pMinecraft->localgameModes[getPad()]->getTutorial();
- if(tutorial != nullptr)
+ if(tutorial != NULL)
{
tutorial->handleUIInput(iAction);
if(ui.IsTutorialVisible(getPad()) && !tutorial->isInputAllowed(iAction))
@@ -78,7 +76,7 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat)
shared_ptr<MultiplayerLocalPlayer> player = Minecraft::GetInstance()->localplayers[getPad()];
int buyAMatches = player->inventory->countMatches(buyAItem);
int buyBMatches = player->inventory->countMatches(buyBItem);
- if( (buyAItem != nullptr && buyAMatches >= buyAItem->count) && (buyBItem == nullptr || buyBMatches >= buyBItem->count) )
+ if( (buyAItem != NULL && buyAMatches >= buyAItem->count) && (buyBItem == NULL || buyBMatches >= buyBItem->count) )
{
// 4J-JEV: Fix for PS4 #7111: [PATCH 1.12] Trading Librarian villagers for multiple �Enchanted Books� will cause the title to crash.
int actualShopItem = m_activeOffers.at(selectedShopItem).second;
@@ -97,7 +95,7 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat)
}
// Send a packet to the server
- player->connection->send(std::make_shared<TradeItemPacket>(m_menu->containerId, actualShopItem));
+ player->connection->send( shared_ptr<TradeItemPacket>( new TradeItemPacket(m_menu->containerId, actualShopItem) ) );
updateDisplay();
}
@@ -154,7 +152,7 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat)
ByteArrayOutputStream rawOutput;
DataOutputStream output(&rawOutput);
output.writeInt(actualShopItem);
- Minecraft::GetInstance()->getConnection(getPad())->send(std::make_shared<CustomPayloadPacket>(CustomPayloadPacket::TRADER_SELECTION_PACKET, rawOutput.toByteArray()));
+ Minecraft::GetInstance()->getConnection(getPad())->send(shared_ptr<CustomPayloadPacket>( new CustomPayloadPacket(CustomPayloadPacket::TRADER_SELECTION_PACKET, rawOutput.toByteArray())));
}
}
return handled;
@@ -164,7 +162,7 @@ void IUIScene_TradingMenu::handleTick()
{
int offerCount = 0;
MerchantRecipeList *offers = m_merchant->getOffers(Minecraft::GetInstance()->localplayers[getPad()]);
- if (offers != nullptr)
+ if (offers != NULL)
{
offerCount = offers->size();
@@ -183,7 +181,7 @@ void IUIScene_TradingMenu::updateDisplay()
int iA = -1;
MerchantRecipeList *unfilteredOffers = m_merchant->getOffers(Minecraft::GetInstance()->localplayers[getPad()]);
- if (unfilteredOffers != nullptr)
+ if (unfilteredOffers != NULL)
{
m_activeOffers.clear();
int unfilteredIndex = 0;
@@ -207,7 +205,7 @@ void IUIScene_TradingMenu::updateDisplay()
ByteArrayOutputStream rawOutput;
DataOutputStream output(&rawOutput);
output.writeInt(firstValidTrade);
- Minecraft::GetInstance()->getConnection(getPad())->send(std::make_shared<CustomPayloadPacket>(CustomPayloadPacket::TRADER_SELECTION_PACKET, rawOutput.toByteArray()));
+ Minecraft::GetInstance()->getConnection(getPad())->send(shared_ptr<CustomPayloadPacket>( new CustomPayloadPacket(CustomPayloadPacket::TRADER_SELECTION_PACKET, rawOutput.toByteArray())));
}
}
@@ -243,7 +241,7 @@ void IUIScene_TradingMenu::updateDisplay()
// 4J-PB - need to get the villager type here
wsTemp = app.GetString(IDS_VILLAGER_OFFERS_ITEM);
wsTemp = replaceAll(wsTemp,L"{*VILLAGER_TYPE*}",m_merchant->getDisplayName());
- size_t iPos=wsTemp.find(L"%s");
+ int iPos=wsTemp.find(L"%s");
wsTemp.replace(iPos,2,activeRecipe->getSellItem()->getHoverName());
setTitle(wsTemp.c_str());
@@ -257,10 +255,10 @@ void IUIScene_TradingMenu::updateDisplay()
setRequest1Item(buyAItem);
setRequest2Item(buyBItem);
- if(buyAItem != nullptr) setRequest1Name(buyAItem->getHoverName());
+ if(buyAItem != NULL) setRequest1Name(buyAItem->getHoverName());
else setRequest1Name(L"");
- if(buyBItem != nullptr) setRequest2Name(buyBItem->getHoverName());
+ if(buyBItem != NULL) setRequest2Name(buyBItem->getHoverName());
else setRequest2Name(L"");
bool canMake = true;
@@ -286,15 +284,15 @@ void IUIScene_TradingMenu::updateDisplay()
}
else
{
- if(buyBItem!=nullptr)
+ if(buyBItem!=NULL)
{
setRequest2RedBox(true);
canMake = false;
}
else
{
- setRequest2RedBox(buyBItem != nullptr);
- canMake = canMake && buyBItem == nullptr;
+ setRequest2RedBox(buyBItem != NULL);
+ canMake = canMake && buyBItem == NULL;
}
}
@@ -322,7 +320,7 @@ void IUIScene_TradingMenu::updateDisplay()
bool IUIScene_TradingMenu::canMake(MerchantRecipe *recipe)
{
bool canMake = false;
- if (recipe != nullptr)
+ if (recipe != NULL)
{
if(recipe->isDeprecated()) return false;
@@ -337,7 +335,7 @@ bool IUIScene_TradingMenu::canMake(MerchantRecipe *recipe)
}
else
{
- canMake = buyAItem == nullptr;
+ canMake = buyAItem == NULL;
}
int buyBMatches = player->inventory->countMatches(buyBItem);
@@ -347,7 +345,7 @@ bool IUIScene_TradingMenu::canMake(MerchantRecipe *recipe)
}
else
{
- canMake = canMake && buyBItem == nullptr;
+ canMake = canMake && buyBItem == NULL;
}
}
return canMake;
diff --git a/Minecraft.Client/Common/UI/UI.h b/Minecraft.Client/Common/UI/UI.h
index a7c416f8..428b3b90 100644
--- a/Minecraft.Client/Common/UI/UI.h
+++ b/Minecraft.Client/Common/UI/UI.h
@@ -123,6 +123,4 @@
#include "UIScene_TeleportMenu.h"
#include "UIScene_EndPoem.h"
#include "UIScene_EULA.h"
-#include "UIScene_NewUpdateMessage.h"
-
-extern ConsoleUIController ui; \ No newline at end of file
+#include "UIScene_NewUpdateMessage.h" \ No newline at end of file
diff --git a/Minecraft.Client/Common/UI/UIBitmapFont.cpp b/Minecraft.Client/Common/UI/UIBitmapFont.cpp
index e9d110b7..afc2b139 100644
--- a/Minecraft.Client/Common/UI/UIBitmapFont.cpp
+++ b/Minecraft.Client/Common/UI/UIBitmapFont.cpp
@@ -53,42 +53,42 @@ void UIAbstractBitmapFont::registerFont()
IggyFontMetrics * RADLINK UIAbstractBitmapFont::GetFontMetrics_Callback(void *user_context,IggyFontMetrics *metrics)
{
- return static_cast<UIAbstractBitmapFont *>(user_context)->GetFontMetrics(metrics);
+ return ((UIAbstractBitmapFont *) user_context)->GetFontMetrics(metrics);
}
S32 RADLINK UIAbstractBitmapFont::GetCodepointGlyph_Callback(void *user_context,U32 codepoint)
{
- return static_cast<UIAbstractBitmapFont *>(user_context)->GetCodepointGlyph(codepoint);
+ return ((UIAbstractBitmapFont *) user_context)->GetCodepointGlyph(codepoint);
}
IggyGlyphMetrics * RADLINK UIAbstractBitmapFont::GetGlyphMetrics_Callback(void *user_context,S32 glyph,IggyGlyphMetrics *metrics)
{
- return static_cast<UIAbstractBitmapFont *>(user_context)->GetGlyphMetrics(glyph,metrics);
+ return ((UIAbstractBitmapFont *) user_context)->GetGlyphMetrics(glyph,metrics);
}
rrbool RADLINK UIAbstractBitmapFont::IsGlyphEmpty_Callback(void *user_context,S32 glyph)
{
- return static_cast<UIAbstractBitmapFont *>(user_context)->IsGlyphEmpty(glyph);
+ return ((UIAbstractBitmapFont *) user_context)->IsGlyphEmpty(glyph);
}
F32 RADLINK UIAbstractBitmapFont::GetKerningForGlyphPair_Callback(void *user_context,S32 first_glyph,S32 second_glyph)
{
- return static_cast<UIAbstractBitmapFont *>(user_context)->GetKerningForGlyphPair(first_glyph,second_glyph);
+ return ((UIAbstractBitmapFont *) user_context)->GetKerningForGlyphPair(first_glyph,second_glyph);
}
rrbool RADLINK UIAbstractBitmapFont::CanProvideBitmap_Callback(void *user_context,S32 glyph,F32 pixel_scale)
{
- return static_cast<UIAbstractBitmapFont *>(user_context)->CanProvideBitmap(glyph,pixel_scale);
+ return ((UIAbstractBitmapFont *) user_context)->CanProvideBitmap(glyph,pixel_scale);
}
rrbool RADLINK UIAbstractBitmapFont::GetGlyphBitmap_Callback(void *user_context,S32 glyph,F32 pixel_scale,IggyBitmapCharacter *bitmap)
{
- return static_cast<UIAbstractBitmapFont *>(user_context)->GetGlyphBitmap(glyph,pixel_scale,bitmap);
+ return ((UIAbstractBitmapFont *) user_context)->GetGlyphBitmap(glyph,pixel_scale,bitmap);
}
void RADLINK UIAbstractBitmapFont::FreeGlyphBitmap_Callback(void *user_context,S32 glyph,F32 pixel_scale,IggyBitmapCharacter *bitmap)
{
- return static_cast<UIAbstractBitmapFont *>(user_context)->FreeGlyphBitmap(glyph,pixel_scale,bitmap);
+ return ((UIAbstractBitmapFont *) user_context)->FreeGlyphBitmap(glyph,pixel_scale,bitmap);
}
UIBitmapFont::UIBitmapFont( SFontData &sfontdata )
@@ -321,7 +321,7 @@ rrbool UIBitmapFont::GetGlyphBitmap(S32 glyph,F32 pixel_scale,IggyBitmapCharacte
// 4J-PB - this was chopping off the top of the characters, so accented ones were losing a couple of pixels at the top
// DaveK has reduced the height of the accented capitalised characters, and we've dropped this from 0.65 to 0.64
- bitmap->top_left_y = -static_cast<S32>(m_cFontData->getFontData()->m_uiGlyphHeight) * m_cFontData->getFontData()->m_fAscent;
+ bitmap->top_left_y = -((S32) m_cFontData->getFontData()->m_uiGlyphHeight) * m_cFontData->getFontData()->m_fAscent;
bitmap->oversample = 0;
bitmap->point_sample = true;
@@ -351,7 +351,7 @@ rrbool UIBitmapFont::GetGlyphBitmap(S32 glyph,F32 pixel_scale,IggyBitmapCharacte
bitmap->stride_in_bytes = m_cFontData->getFontData()->m_uiGlyphMapX;
// 4J-JEV: Additional information needed to release memory afterwards.
- bitmap->user_context_for_free = nullptr;
+ bitmap->user_context_for_free = NULL;
return true;
}
diff --git a/Minecraft.Client/Common/UI/UIComponent_Chat.cpp b/Minecraft.Client/Common/UI/UIComponent_Chat.cpp
index 555f36e4..901b5a77 100644
--- a/Minecraft.Client/Common/UI/UIComponent_Chat.cpp
+++ b/Minecraft.Client/Common/UI/UIComponent_Chat.cpp
@@ -46,7 +46,7 @@ void UIComponent_Chat::handleTimerComplete(int id)
Minecraft *pMinecraft = Minecraft::GetInstance();
bool anyVisible = false;
- if(pMinecraft->localplayers[m_iPad]!= nullptr)
+ if(pMinecraft->localplayers[m_iPad]!= NULL)
{
Gui *pGui = pMinecraft->gui;
//DWORD messagesToDisplay = min( CHAT_LINES_COUNT, pGui->getMessagesCount(m_iPad) );
@@ -102,15 +102,15 @@ void UIComponent_Chat::render(S32 width, S32 height, C4JRender::eViewportType vi
{
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_LEFT:
- yPos = static_cast<S32>(ui.getScreenHeight() / 2);
+ yPos = (S32)(ui.getScreenHeight() / 2);
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_RIGHT:
- xPos = static_cast<S32>(ui.getScreenWidth() / 2);
+ xPos = (S32)(ui.getScreenWidth() / 2);
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_RIGHT:
- xPos = static_cast<S32>(ui.getScreenWidth() / 2);
- yPos = static_cast<S32>(ui.getScreenHeight() / 2);
+ xPos = (S32)(ui.getScreenWidth() / 2);
+ yPos = (S32)(ui.getScreenHeight() / 2);
break;
}
ui.setupRenderPosition(xPos, yPos);
@@ -124,14 +124,14 @@ void UIComponent_Chat::render(S32 width, S32 height, C4JRender::eViewportType vi
{
case C4JRender::VIEWPORT_TYPE_SPLIT_LEFT:
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
- tileHeight = static_cast<S32>(ui.getScreenHeight());
+ tileHeight = (S32)(ui.getScreenHeight());
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_TOP:
- tileWidth = static_cast<S32>(ui.getScreenWidth());
+ tileWidth = (S32)(ui.getScreenWidth());
tileYStart = (S32)(m_movieHeight / 2);
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
- tileWidth = static_cast<S32>(ui.getScreenWidth());
+ tileWidth = (S32)(ui.getScreenWidth());
tileYStart = (S32)(m_movieHeight / 2);
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_LEFT:
diff --git a/Minecraft.Client/Common/UI/UIComponent_DebugUIMarketingGuide.cpp b/Minecraft.Client/Common/UI/UIComponent_DebugUIMarketingGuide.cpp
index 3aab5b98..240429bc 100644
--- a/Minecraft.Client/Common/UI/UIComponent_DebugUIMarketingGuide.cpp
+++ b/Minecraft.Client/Common/UI/UIComponent_DebugUIMarketingGuide.cpp
@@ -10,7 +10,7 @@ UIComponent_DebugUIMarketingGuide::UIComponent_DebugUIMarketingGuide(int iPad, v
IggyDataValue result;
IggyDataValue value[1];
value[0].type = IGGY_DATATYPE_number;
- value[0].number = static_cast<F64>(0); // WIN64
+ value[0].number = (F64)0; // WIN64
#if defined _XBOX
value[0].number = (F64)1;
#elif defined _DURANGO
@@ -22,7 +22,7 @@ UIComponent_DebugUIMarketingGuide::UIComponent_DebugUIMarketingGuide(int iPad, v
#elif defined __PSVITA__
value[0].number = (F64)5;
#elif defined _WINDOWS64
- value[0].number = static_cast<F64>(0);
+ value[0].number = (F64)0;
#endif
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSetPlatform , 1 , value );
}
diff --git a/Minecraft.Client/Common/UI/UIComponent_MenuBackground.cpp b/Minecraft.Client/Common/UI/UIComponent_MenuBackground.cpp
index 1718e8cb..d3a4c4c0 100644
--- a/Minecraft.Client/Common/UI/UIComponent_MenuBackground.cpp
+++ b/Minecraft.Client/Common/UI/UIComponent_MenuBackground.cpp
@@ -42,15 +42,15 @@ void UIComponent_MenuBackground::render(S32 width, S32 height, C4JRender::eViewp
{
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_LEFT:
- yPos = static_cast<S32>(ui.getScreenHeight() / 2);
+ yPos = (S32)(ui.getScreenHeight() / 2);
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_RIGHT:
- xPos = static_cast<S32>(ui.getScreenWidth() / 2);
+ xPos = (S32)(ui.getScreenWidth() / 2);
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_RIGHT:
- xPos = static_cast<S32>(ui.getScreenWidth() / 2);
- yPos = static_cast<S32>(ui.getScreenHeight() / 2);
+ xPos = (S32)(ui.getScreenWidth() / 2);
+ yPos = (S32)(ui.getScreenHeight() / 2);
break;
}
ui.setupRenderPosition(xPos, yPos);
@@ -64,14 +64,14 @@ void UIComponent_MenuBackground::render(S32 width, S32 height, C4JRender::eViewp
{
case C4JRender::VIEWPORT_TYPE_SPLIT_LEFT:
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
- tileHeight = static_cast<S32>(ui.getScreenHeight());
+ tileHeight = (S32)(ui.getScreenHeight());
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_TOP:
- tileWidth = static_cast<S32>(ui.getScreenWidth());
+ tileWidth = (S32)(ui.getScreenWidth());
tileYStart = (S32)(m_movieHeight / 2);
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
- tileWidth = static_cast<S32>(ui.getScreenWidth());
+ tileWidth = (S32)(ui.getScreenWidth());
tileYStart = (S32)(m_movieHeight / 2);
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_LEFT:
diff --git a/Minecraft.Client/Common/UI/UIComponent_Panorama.cpp b/Minecraft.Client/Common/UI/UIComponent_Panorama.cpp
index a5b93118..a52ebd72 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!=nullptr)
+ if(pMinecraft->level!=NULL)
{
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 = static_cast<S32>(ui.getScreenHeight() / 2);
+ yPos = (S32)(ui.getScreenHeight() / 2);
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
- xPos = static_cast<S32>(ui.getScreenWidth() / 2);
+ xPos = (S32)(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 = static_cast<S32>(ui.getScreenHeight());
+ S32 tileHeight = (S32)(ui.getScreenHeight());
IggyPlayerSetDisplaySize( getMovie(), m_movieWidth, m_movieHeight );
diff --git a/Minecraft.Client/Common/UI/UIComponent_Tooltips.cpp b/Minecraft.Client/Common/UI/UIComponent_Tooltips.cpp
index 85661125..255740c9 100644
--- a/Minecraft.Client/Common/UI/UIComponent_Tooltips.cpp
+++ b/Minecraft.Client/Common/UI/UIComponent_Tooltips.cpp
@@ -154,8 +154,8 @@ void UIComponent_Tooltips::tick()
{
if(uiOpacityTimer<10)
{
- float fStep=(80.0f-static_cast<float>(ucAlpha))/10.0f;
- fVal=0.01f*(80.0f-((10.0f-static_cast<float>(uiOpacityTimer))*fStep));
+ float fStep=(80.0f-(float)ucAlpha)/10.0f;
+ fVal=0.01f*(80.0f-((10.0f-(float)uiOpacityTimer)*fStep));
}
else
{
@@ -164,7 +164,7 @@ void UIComponent_Tooltips::tick()
}
else
{
- fVal=0.01f*static_cast<float>(ucAlpha);
+ fVal=0.01f*(float)ucAlpha;
}
}
else
@@ -174,7 +174,7 @@ void UIComponent_Tooltips::tick()
{
ucAlpha=15;
}
- fVal=0.01f*static_cast<float>(ucAlpha);
+ fVal=0.01f*(float)ucAlpha;
}
setOpacity(fVal);
@@ -206,15 +206,15 @@ void UIComponent_Tooltips::render(S32 width, S32 height, C4JRender::eViewportTyp
{
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_LEFT:
- yPos = static_cast<S32>(ui.getScreenHeight() / 2);
+ yPos = (S32)(ui.getScreenHeight() / 2);
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_RIGHT:
- xPos = static_cast<S32>(ui.getScreenWidth() / 2);
+ xPos = (S32)(ui.getScreenWidth() / 2);
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_RIGHT:
- xPos = static_cast<S32>(ui.getScreenWidth() / 2);
- yPos = static_cast<S32>(ui.getScreenHeight() / 2);
+ xPos = (S32)(ui.getScreenWidth() / 2);
+ yPos = (S32)(ui.getScreenHeight() / 2);
break;
}
ui.setupRenderPosition(xPos, yPos);
@@ -228,14 +228,14 @@ void UIComponent_Tooltips::render(S32 width, S32 height, C4JRender::eViewportTyp
{
case C4JRender::VIEWPORT_TYPE_SPLIT_LEFT:
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
- tileHeight = static_cast<S32>(ui.getScreenHeight());
+ tileHeight = (S32)(ui.getScreenHeight());
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_TOP:
- tileWidth = static_cast<S32>(ui.getScreenWidth());
+ tileWidth = (S32)(ui.getScreenWidth());
tileYStart = (S32)(m_movieHeight / 2);
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
- tileWidth = static_cast<S32>(ui.getScreenWidth());
+ tileWidth = (S32)(ui.getScreenWidth());
tileYStart = (S32)(m_movieHeight / 2);
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_LEFT:
@@ -351,7 +351,7 @@ void UIComponent_Tooltips::_SetTooltip(unsigned int iToolTipId, UIString label,
void UIComponent_Tooltips::_Relayout()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcUpdateLayout, 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcUpdateLayout, 0 , NULL );
#ifdef __PSVITA__
// rebuild touchboxes
diff --git a/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp b/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp
index fcbd17f3..3b4eb097 100644
--- a/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp
+++ b/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp
@@ -12,8 +12,8 @@ UIComponent_TutorialPopup::UIComponent_TutorialPopup(int iPad, void *initData, U
// Setup all the Iggy references we need for this scene
initialiseMovie();
- m_interactScene = nullptr;
- m_lastInteractSceneMoved = nullptr;
+ m_interactScene = NULL;
+ m_lastInteractSceneMoved = NULL;
m_lastSceneMovedLeft = false;
m_bAllowFade = false;
m_iconItem = nullptr;
@@ -90,7 +90,7 @@ void UIComponent_TutorialPopup::RemoveInteractSceneReference(UIScene *scene)
{
if( m_interactScene == scene )
{
- m_interactScene = nullptr;
+ m_interactScene = NULL;
}
}
@@ -132,7 +132,7 @@ void UIComponent_TutorialPopup::_SetDescription(UIScene *interactScene, const ws
{
m_interactScene = interactScene;
app.DebugPrintf("Setting m_interactScene to %08x\n", m_interactScene);
- if( interactScene != m_lastInteractSceneMoved ) m_lastInteractSceneMoved = nullptr;
+ if( interactScene != m_lastInteractSceneMoved ) m_lastInteractSceneMoved = NULL;
if(desc.empty())
{
SetVisible( false );
@@ -212,20 +212,20 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil,
if( icon != TUTORIAL_NO_ICON )
{
m_iconIsFoil = false;
- m_iconItem = std::make_shared<ItemInstance>(icon, 1, iAuxVal);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(icon,1,iAuxVal));
}
else
{
m_iconItem = nullptr;
wstring openTag(L"{*ICON*}");
wstring closeTag(L"{*/ICON*}");
- size_t iconTagStartPos = temp.find(openTag);
- size_t iconStartPos = iconTagStartPos + openTag.length();
- if( iconTagStartPos > 0 && iconStartPos < temp.length() )
+ int iconTagStartPos = (int)temp.find(openTag);
+ int iconStartPos = iconTagStartPos + (int)openTag.length();
+ if( iconTagStartPos > 0 && iconStartPos < (int)temp.length() )
{
- size_t iconEndPos = temp.find(closeTag, iconStartPos);
+ int iconEndPos = (int)temp.find( closeTag, iconStartPos );
- if(iconEndPos > iconStartPos && iconEndPos < temp.length() )
+ if(iconEndPos > iconStartPos && iconEndPos < (int)temp.length() )
{
wstring id = temp.substr(iconStartPos, iconEndPos - iconStartPos);
@@ -241,7 +241,7 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil,
{
iAuxVal = 0;
}
- m_iconItem = std::make_shared<ItemInstance>(iconId, 1, iAuxVal);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(iconId,1,iAuxVal));
temp.replace(iconTagStartPos, iconEndPos - iconTagStartPos + closeTag.length(), L"");
}
@@ -250,63 +250,63 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil,
// remove any icon text
else if(temp.find(L"{*CraftingTableIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Tile::workBench_Id, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Tile::workBench_Id,1,0));
}
else if(temp.find(L"{*SticksIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Item::stick_Id, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::stick_Id,1,0));
}
else if(temp.find(L"{*PlanksIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Tile::wood_Id, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Tile::wood_Id,1,0));
}
else if(temp.find(L"{*WoodenShovelIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Item::shovel_wood_Id, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::shovel_wood_Id,1,0));
}
else if(temp.find(L"{*WoodenHatchetIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Item::hatchet_wood_Id, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::hatchet_wood_Id,1,0));
}
else if(temp.find(L"{*WoodenPickaxeIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Item::pickAxe_wood_Id, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::pickAxe_wood_Id,1,0));
}
else if(temp.find(L"{*FurnaceIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Tile::furnace_Id, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Tile::furnace_Id,1,0));
}
else if(temp.find(L"{*WoodenDoorIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Item::door_wood, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::door_wood,1,0));
}
else if(temp.find(L"{*TorchIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Tile::torch_Id, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Tile::torch_Id,1,0));
}
else if(temp.find(L"{*BoatIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Item::boat_Id, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::boat_Id,1,0));
}
else if(temp.find(L"{*FishingRodIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Item::fishingRod_Id, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::fishingRod_Id,1,0));
}
else if(temp.find(L"{*FishIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Item::fish_raw_Id, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::fish_raw_Id,1,0));
}
else if(temp.find(L"{*MinecartIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Item::minecart_Id, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Item::minecart_Id,1,0));
}
else if(temp.find(L"{*RailIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Tile::rail_Id, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Tile::rail_Id,1,0));
}
else if(temp.find(L"{*PoweredRailIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Tile::goldenRail_Id, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Tile::goldenRail_Id,1,0));
}
else if(temp.find(L"{*StructuresIcon*}")!=wstring::npos)
{
@@ -320,15 +320,15 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil,
}
else if(temp.find(L"{*StoneIcon*}")!=wstring::npos)
{
- m_iconItem = std::make_shared<ItemInstance>(Tile::stone_Id, 1, 0);
+ m_iconItem = shared_ptr<ItemInstance>(new ItemInstance(Tile::stone_Id,1,0));
}
else
{
m_iconItem = nullptr;
}
}
- if(!isFixedIcon && m_iconItem != nullptr) setupIconHolder(e_ICON_TYPE_IGGY);
- m_controlIconHolder.setVisible( isFixedIcon || m_iconItem != nullptr);
+ if(!isFixedIcon && m_iconItem != NULL) setupIconHolder(e_ICON_TYPE_IGGY);
+ m_controlIconHolder.setVisible( isFixedIcon || m_iconItem != NULL);
return temp;
}
@@ -341,13 +341,13 @@ wstring UIComponent_TutorialPopup::_SetImage(wstring &desc)
wstring openTag(L"{*IMAGE*}");
wstring closeTag(L"{*/IMAGE*}");
- size_t imageTagStartPos = desc.find(openTag);
- size_t imageStartPos = imageTagStartPos + openTag.length();
- if( imageTagStartPos > 0 && imageStartPos < desc.length() )
+ int imageTagStartPos = (int)desc.find(openTag);
+ int imageStartPos = imageTagStartPos + (int)openTag.length();
+ if( imageTagStartPos > 0 && imageStartPos < (int)desc.length() )
{
- size_t imageEndPos = desc.find( closeTag, imageStartPos );
+ int imageEndPos = (int)desc.find( closeTag, imageStartPos );
- if(imageEndPos > imageStartPos && imageEndPos < desc.length() )
+ if(imageEndPos > imageStartPos && imageEndPos < (int)desc.length() )
{
wstring id = desc.substr(imageStartPos, imageEndPos - imageStartPos);
m_image.SetImagePath( id.c_str() );
@@ -425,7 +425,7 @@ wstring UIComponent_TutorialPopup::ParseDescription(int iPad, wstring &text)
void UIComponent_TutorialPopup::UpdateInteractScenePosition(bool visible)
{
- if( m_interactScene == nullptr ) return;
+ if( m_interactScene == NULL ) return;
// 4J-PB - check this players screen section to see if we should allow the animation
bool bAllowAnim=false;
@@ -479,20 +479,20 @@ void UIComponent_TutorialPopup::render(S32 width, S32 height, C4JRender::eViewpo
switch( viewport )
{
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
- xPos = static_cast<S32>(ui.getScreenWidth() / 2);
- yPos = static_cast<S32>(ui.getScreenHeight() / 2);
+ xPos = (S32)(ui.getScreenWidth() / 2);
+ yPos = (S32)(ui.getScreenHeight() / 2);
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_LEFT:
- yPos = static_cast<S32>(ui.getScreenHeight() / 2);
+ yPos = (S32)(ui.getScreenHeight() / 2);
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_TOP:
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_RIGHT:
- xPos = static_cast<S32>(ui.getScreenWidth() / 2);
+ xPos = (S32)(ui.getScreenWidth() / 2);
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_RIGHT:
- xPos = static_cast<S32>(ui.getScreenWidth() / 2);
- yPos = static_cast<S32>(ui.getScreenHeight() / 2);
+ xPos = (S32)(ui.getScreenWidth() / 2);
+ yPos = (S32)(ui.getScreenHeight() / 2);
break;
}
//Adjust for safezone
@@ -529,7 +529,7 @@ void UIComponent_TutorialPopup::render(S32 width, S32 height, C4JRender::eViewpo
void UIComponent_TutorialPopup::customDraw(IggyCustomDrawCallbackRegion *region)
{
- if(m_iconItem != nullptr) customDrawSlotControl(region,m_iPad,m_iconItem,1.0f,m_iconItem->isFoil() || m_iconIsFoil,false);
+ if(m_iconItem != NULL) customDrawSlotControl(region,m_iPad,m_iconItem,1.0f,m_iconItem->isFoil() || m_iconIsFoil,false);
}
void UIComponent_TutorialPopup::setupIconHolder(EIcons icon)
@@ -538,7 +538,7 @@ void UIComponent_TutorialPopup::setupIconHolder(EIcons icon)
IggyDataValue result;
IggyDataValue value[1];
value[0].type = IGGY_DATATYPE_number;
- value[0].number = static_cast<F64>(icon);
+ value[0].number = (F64)icon;
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSetupIconHolder , 1 , value );
m_iconType = icon;
diff --git a/Minecraft.Client/Common/UI/UIControl.cpp b/Minecraft.Client/Common/UI/UIControl.cpp
index 7582e82f..3d853ac4 100644
--- a/Minecraft.Client/Common/UI/UIControl.cpp
+++ b/Minecraft.Client/Common/UI/UIControl.cpp
@@ -6,7 +6,7 @@
UIControl::UIControl()
{
- m_parentScene = nullptr;
+ m_parentScene = NULL;
m_lastOpacity = 1.0f;
m_controlName = "";
m_isVisible = true;
@@ -31,15 +31,15 @@ bool UIControl::setupControl(UIScene *scene, IggyValuePath *parent, const string
m_nameVisible = registerFastName(L"visible");
F64 fx, fy, fwidth, fheight;
- IggyValueGetF64RS( getIggyValuePath() , m_nameXPos , nullptr , &fx );
- IggyValueGetF64RS( getIggyValuePath() , m_nameYPos , nullptr , &fy );
- IggyValueGetF64RS( getIggyValuePath() , m_nameWidth , nullptr , &fwidth );
- IggyValueGetF64RS( getIggyValuePath() , m_nameHeight , nullptr , &fheight );
+ IggyValueGetF64RS( getIggyValuePath() , m_nameXPos , NULL , &fx );
+ IggyValueGetF64RS( getIggyValuePath() , m_nameYPos , NULL , &fy );
+ IggyValueGetF64RS( getIggyValuePath() , m_nameWidth , NULL , &fwidth );
+ IggyValueGetF64RS( getIggyValuePath() , m_nameHeight , NULL , &fheight );
- m_x = static_cast<S32>(fx);
- m_y = static_cast<S32>(fy);
- m_width = static_cast<S32>(Math::round(fwidth));
- m_height = static_cast<S32>(Math::round(fheight));
+ m_x = (S32)fx;
+ m_y = (S32)fy;
+ m_width = (S32)Math::round(fwidth);
+ m_height = (S32)Math::round(fheight);
return res;
}
@@ -47,14 +47,14 @@ bool UIControl::setupControl(UIScene *scene, IggyValuePath *parent, const string
void UIControl::UpdateControl()
{
F64 fx, fy, fwidth, fheight;
- IggyValueGetF64RS( getIggyValuePath() , m_nameXPos , nullptr , &fx );
- IggyValueGetF64RS( getIggyValuePath() , m_nameYPos , nullptr , &fy );
- IggyValueGetF64RS( getIggyValuePath() , m_nameWidth , nullptr , &fwidth );
- IggyValueGetF64RS( getIggyValuePath() , m_nameHeight , nullptr , &fheight );
- m_x = static_cast<S32>(fx);
- m_y = static_cast<S32>(fy);
- m_width = static_cast<S32>(Math::round(fwidth));
- m_height = static_cast<S32>(Math::round(fheight));
+ IggyValueGetF64RS( getIggyValuePath() , m_nameXPos , NULL , &fx );
+ IggyValueGetF64RS( getIggyValuePath() , m_nameYPos , NULL , &fy );
+ IggyValueGetF64RS( getIggyValuePath() , m_nameWidth , NULL , &fwidth );
+ IggyValueGetF64RS( getIggyValuePath() , m_nameHeight , NULL , &fheight );
+ m_x = (S32)fx;
+ m_y = (S32)fy;
+ m_width = (S32)Math::round(fwidth);
+ m_height = (S32)Math::round(fheight);
}
void UIControl::ReInit()
@@ -76,7 +76,7 @@ void UIControl::ReInit()
IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, m_parentScene->m_rootPath , m_funcSetAlpha , 2 , value );
}
- IggyValueSetBooleanRS( getIggyValuePath(), m_nameVisible, nullptr, m_isVisible );
+ IggyValueSetBooleanRS( getIggyValuePath(), m_nameVisible, NULL, m_isVisible );
}
IggyValuePath *UIControl::getIggyValuePath()
@@ -130,7 +130,7 @@ void UIControl::setVisible(bool visible)
{
if(visible != m_isVisible)
{
- rrbool succ = IggyValueSetBooleanRS( getIggyValuePath(), m_nameVisible, nullptr, visible );
+ rrbool succ = IggyValueSetBooleanRS( getIggyValuePath(), m_nameVisible, NULL, visible );
if(succ) m_isVisible = visible;
else app.DebugPrintf("Failed to set visibility for control\n");
}
@@ -140,7 +140,7 @@ bool UIControl::getVisible()
{
rrbool bVisible = false;
- IggyResult result = IggyValueGetBooleanRS ( getIggyValuePath() , m_nameVisible, nullptr, &bVisible );
+ IggyResult result = IggyValueGetBooleanRS ( getIggyValuePath() , m_nameVisible, NULL, &bVisible );
m_isVisible = bVisible;
diff --git a/Minecraft.Client/Common/UI/UIControl_Base.cpp b/Minecraft.Client/Common/UI/UIControl_Base.cpp
index 87c2862f..7a4a24e5 100644
--- a/Minecraft.Client/Common/UI/UIControl_Base.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_Base.cpp
@@ -72,7 +72,7 @@ void UIControl_Base::setLabel(UIString label, bool instant, bool force)
const wchar_t* UIControl_Base::getLabel()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result, getIggyValuePath(), m_funcGetLabel, 0, nullptr);
+ IggyResult out = IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result, getIggyValuePath(), m_funcGetLabel, 0, NULL);
if(result.type == IGGY_DATATYPE_string_UTF16)
{
@@ -90,7 +90,7 @@ void UIControl_Base::setAllPossibleLabels(int labelCount, wchar_t labels[][256])
for(unsigned int i = 0; i < labelCount; ++i)
{
- stringVal[i].string = static_cast<IggyUTF16 *>(labels[i]);
+ stringVal[i].string = (IggyUTF16 *)labels[i];
stringVal[i].length = wcslen(labels[i]);
value[i].type = IGGY_DATATYPE_string_UTF16;
value[i].string16 = stringVal[i];
diff --git a/Minecraft.Client/Common/UI/UIControl_ButtonList.cpp b/Minecraft.Client/Common/UI/UIControl_ButtonList.cpp
index 4f0e5ca0..4d60a477 100644
--- a/Minecraft.Client/Common/UI/UIControl_ButtonList.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_ButtonList.cpp
@@ -60,7 +60,7 @@ void UIControl_ButtonList::ReInit()
void UIControl_ButtonList::clearList()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_removeAllItemsFunc , 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_removeAllItemsFunc , 0 , NULL );
m_itemCount = 0;
}
@@ -82,7 +82,7 @@ void UIControl_ButtonList::addItem(const string &label, int data)
IggyStringUTF8 stringVal;
stringVal.string = (char*)label.c_str();
- stringVal.length = static_cast<S32>(label.length());
+ stringVal.length = (S32)label.length();
value[0].type = IGGY_DATATYPE_string_UTF8;
value[0].string8 = stringVal;
diff --git a/Minecraft.Client/Common/UI/UIControl_CheckBox.cpp b/Minecraft.Client/Common/UI/UIControl_CheckBox.cpp
index e5f4da7a..1c3e8afe 100644
--- a/Minecraft.Client/Common/UI/UIControl_CheckBox.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_CheckBox.cpp
@@ -60,7 +60,7 @@ void UIControl_CheckBox::init(UIString label, int id, bool checked)
bool UIControl_CheckBox::IsChecked()
{
rrbool checked = false;
- IggyResult result = IggyValueGetBooleanRS ( &m_iggyPath , m_checkedProp, nullptr, &checked );
+ IggyResult result = IggyValueGetBooleanRS ( &m_iggyPath , m_checkedProp, NULL, &checked );
m_bChecked = checked;
return checked;
}
diff --git a/Minecraft.Client/Common/UI/UIControl_DLCList.cpp b/Minecraft.Client/Common/UI/UIControl_DLCList.cpp
index 39f8ff39..35e6b08a 100644
--- a/Minecraft.Client/Common/UI/UIControl_DLCList.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_DLCList.cpp
@@ -20,7 +20,7 @@ void UIControl_DLCList::addItem(const string &label, bool showTick, int iId)
IggyStringUTF8 stringVal;
stringVal.string = (char*)label.c_str();
- stringVal.length = static_cast<S32>(label.length());
+ stringVal.length = (S32)label.length();
value[0].type = IGGY_DATATYPE_string_UTF8;
value[0].string8 = stringVal;
@@ -41,7 +41,7 @@ void UIControl_DLCList::addItem(const wstring &label, bool showTick, int iId)
IggyStringUTF16 stringVal;
stringVal.string = (IggyUTF16 *)label.c_str();
- stringVal.length = static_cast<S32>(label.length());
+ stringVal.length = (S32)label.length();
value[0].type = IGGY_DATATYPE_string_UTF16;
value[0].string16 = stringVal;
diff --git a/Minecraft.Client/Common/UI/UIControl_DynamicLabel.cpp b/Minecraft.Client/Common/UI/UIControl_DynamicLabel.cpp
index 8c275893..fa29a137 100644
--- a/Minecraft.Client/Common/UI/UIControl_DynamicLabel.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_DynamicLabel.cpp
@@ -74,12 +74,12 @@ void UIControl_DynamicLabel::TouchScroll(S32 iY, bool bActive)
S32 UIControl_DynamicLabel::GetRealWidth()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_funcGetRealWidth, 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_funcGetRealWidth, 0 , NULL );
S32 iRealWidth = m_width;
if(result.type == IGGY_DATATYPE_number)
{
- iRealWidth = static_cast<S32>(result.number);
+ iRealWidth = (S32)result.number;
}
return iRealWidth;
}
@@ -87,12 +87,12 @@ S32 UIControl_DynamicLabel::GetRealWidth()
S32 UIControl_DynamicLabel::GetRealHeight()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_funcGetRealHeight, 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_funcGetRealHeight, 0 , NULL );
S32 iRealHeight = m_height;
if(result.type == IGGY_DATATYPE_number)
{
- iRealHeight = static_cast<S32>(result.number);
+ iRealHeight = (S32)result.number;
}
return iRealHeight;
} \ No newline at end of file
diff --git a/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.cpp b/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.cpp
index f091b0fc..9664dbf4 100644
--- a/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.cpp
@@ -12,7 +12,7 @@
UIControl_EnchantmentBook::UIControl_EnchantmentBook()
{
UIControl::setControlType(UIControl::eEnchantmentBook);
- model = nullptr;
+ model = NULL;
last = nullptr;
time = 0;
@@ -69,12 +69,12 @@ void UIControl_EnchantmentBook::render(IggyCustomDrawCallbackRegion *region)
glEnable(GL_CULL_FACE);
- if(model == nullptr)
+ if(model == NULL)
{
// Share the model the the EnchantTableRenderer
- EnchantTableRenderer *etr = static_cast<EnchantTableRenderer *>(TileEntityRenderDispatcher::instance->getRenderer(eTYPE_ENCHANTMENTTABLEENTITY));
- if(etr != nullptr)
+ EnchantTableRenderer *etr = (EnchantTableRenderer*)TileEntityRenderDispatcher::instance->getRenderer(eTYPE_ENCHANTMENTTABLEENTITY);
+ if(etr != NULL)
{
model = etr->bookModel;
}
@@ -96,7 +96,7 @@ void UIControl_EnchantmentBook::render(IggyCustomDrawCallbackRegion *region)
void UIControl_EnchantmentBook::tickBook()
{
- UIScene_EnchantingMenu *m_containerScene = static_cast<UIScene_EnchantingMenu *>(m_parentScene);
+ UIScene_EnchantingMenu *m_containerScene = (UIScene_EnchantingMenu *)m_parentScene;
EnchantmentMenu *menu = m_containerScene->getMenu();
shared_ptr<ItemInstance> current = menu->getSlot(0)->getItem();
if (!ItemInstance::matches(current, last))
diff --git a/Minecraft.Client/Common/UI/UIControl_EnchantmentButton.cpp b/Minecraft.Client/Common/UI/UIControl_EnchantmentButton.cpp
index 156f9815..f1e2735a 100644
--- a/Minecraft.Client/Common/UI/UIControl_EnchantmentButton.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_EnchantmentButton.cpp
@@ -55,7 +55,7 @@ void UIControl_EnchantmentButton::tick()
void UIControl_EnchantmentButton::render(IggyCustomDrawCallbackRegion *region)
{
- UIScene_EnchantingMenu *enchantingScene = static_cast<UIScene_EnchantingMenu *>(m_parentScene);
+ UIScene_EnchantingMenu *enchantingScene = (UIScene_EnchantingMenu *)m_parentScene;
EnchantmentMenu *menu = enchantingScene->getMenu();
float width = region->x1 - region->x0;
@@ -108,7 +108,7 @@ void UIControl_EnchantmentButton::render(IggyCustomDrawCallbackRegion *region)
if (pMinecraft->localplayers[enchantingScene->getPad()]->experienceLevel < cost && !pMinecraft->localplayers[enchantingScene->getPad()]->abilities.instabuild)
{
col = m_textDisabledColour;
- font->drawWordWrap(m_enchantmentString, 0, 0, static_cast<float>(m_width)/ss, col, static_cast<float>(m_height)/ss);
+ font->drawWordWrap(m_enchantmentString, 0, 0, (float)m_width/ss, col, (float)m_height/ss);
font = pMinecraft->font;
//col = (0x80ff20 & 0xfefefe) >> 1;
//font->drawShadow(line, (bwidth - font->width(line))/ss, 7, col);
@@ -120,7 +120,7 @@ void UIControl_EnchantmentButton::render(IggyCustomDrawCallbackRegion *region)
//col = 0xffff80;
col = m_textFocusColour;
}
- font->drawWordWrap(m_enchantmentString, 0, 0, static_cast<float>(m_width)/ss, col, static_cast<float>(m_height)/ss);
+ font->drawWordWrap(m_enchantmentString, 0, 0, (float)m_width/ss, col, (float)m_height/ss);
font = pMinecraft->font;
//col = 0x80ff20;
//font->drawShadow(line, (bwidth - font->width(line))/ss, 7, col);
@@ -137,7 +137,7 @@ void UIControl_EnchantmentButton::render(IggyCustomDrawCallbackRegion *region)
void UIControl_EnchantmentButton::updateState()
{
- UIScene_EnchantingMenu *enchantingScene = static_cast<UIScene_EnchantingMenu *>(m_parentScene);
+ UIScene_EnchantingMenu *enchantingScene = (UIScene_EnchantingMenu *)m_parentScene;
EnchantmentMenu *menu = enchantingScene->getMenu();
EState state = eState_Inactive;
@@ -182,7 +182,7 @@ void UIControl_EnchantmentButton::updateState()
IggyDataValue value[1];
value[0].type = IGGY_DATATYPE_number;
- value[0].number = static_cast<int>(state);
+ value[0].number = (int)state;
IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_funcChangeState , 1 , value );
if(out == IGGY_RESULT_SUCCESS) m_lastState = state;
diff --git a/Minecraft.Client/Common/UI/UIControl_HTMLLabel.cpp b/Minecraft.Client/Common/UI/UIControl_HTMLLabel.cpp
index b6bd3e47..8b7eb9a1 100644
--- a/Minecraft.Client/Common/UI/UIControl_HTMLLabel.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_HTMLLabel.cpp
@@ -23,7 +23,7 @@ bool UIControl_HTMLLabel::setupControl(UIScene *scene, IggyValuePath *parent, co
void UIControl_HTMLLabel::startAutoScroll()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_funcStartAutoScroll , 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_funcStartAutoScroll , 0 , NULL );
}
void UIControl_HTMLLabel::ReInit()
@@ -79,12 +79,12 @@ void UIControl_HTMLLabel::TouchScroll(S32 iY, bool bActive)
S32 UIControl_HTMLLabel::GetRealWidth()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_funcGetRealWidth, 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_funcGetRealWidth, 0 , NULL );
S32 iRealWidth = m_width;
if(result.type == IGGY_DATATYPE_number)
{
- iRealWidth = static_cast<S32>(result.number);
+ iRealWidth = (S32)result.number;
}
return iRealWidth;
}
@@ -92,12 +92,12 @@ S32 UIControl_HTMLLabel::GetRealWidth()
S32 UIControl_HTMLLabel::GetRealHeight()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_funcGetRealHeight, 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_funcGetRealHeight, 0 , NULL );
S32 iRealHeight = m_height;
if(result.type == IGGY_DATATYPE_number)
{
- iRealHeight = static_cast<S32>(result.number);
+ iRealHeight = (S32)result.number;
}
return iRealHeight;
} \ No newline at end of file
diff --git a/Minecraft.Client/Common/UI/UIControl_LeaderboardList.cpp b/Minecraft.Client/Common/UI/UIControl_LeaderboardList.cpp
index 3920e004..c34b5e87 100644
--- a/Minecraft.Client/Common/UI/UIControl_LeaderboardList.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_LeaderboardList.cpp
@@ -45,7 +45,7 @@ void UIControl_LeaderboardList::ReInit()
void UIControl_LeaderboardList::clearList()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_funcResetLeaderboard , 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_funcResetLeaderboard , 0 , NULL );
}
void UIControl_LeaderboardList::setupTitles(const wstring &rank, const wstring &gamertag)
diff --git a/Minecraft.Client/Common/UI/UIControl_MinecraftHorse.cpp b/Minecraft.Client/Common/UI/UIControl_MinecraftHorse.cpp
index 25fc0316..457e2028 100644
--- a/Minecraft.Client/Common/UI/UIControl_MinecraftHorse.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_MinecraftHorse.cpp
@@ -27,10 +27,10 @@ UIControl_MinecraftHorse::UIControl_MinecraftHorse()
Minecraft *pMinecraft=Minecraft::GetInstance();
ScreenSizeCalculator ssc(pMinecraft->options, pMinecraft->width_phys, pMinecraft->height_phys);
- m_fScreenWidth=static_cast<float>(pMinecraft->width_phys);
- m_fRawWidth=static_cast<float>(ssc.rawWidth);
- m_fScreenHeight=static_cast<float>(pMinecraft->height_phys);
- m_fRawHeight=static_cast<float>(ssc.rawHeight);
+ m_fScreenWidth=(float)pMinecraft->width_phys;
+ m_fRawWidth=(float)ssc.rawWidth;
+ m_fScreenHeight=(float)pMinecraft->height_phys;
+ m_fRawHeight=(float)ssc.rawHeight;
}
void UIControl_MinecraftHorse::render(IggyCustomDrawCallbackRegion *region)
@@ -49,7 +49,7 @@ void UIControl_MinecraftHorse::render(IggyCustomDrawCallbackRegion *region)
glTranslatef(xo, yo - (height / 7.5f), 50.0f);
//UIScene_InventoryMenu *containerMenu = (UIScene_InventoryMenu *)m_parentScene;
- UIScene_HorseInventoryMenu *containerMenu = static_cast<UIScene_HorseInventoryMenu *>(m_parentScene);
+ UIScene_HorseInventoryMenu *containerMenu = (UIScene_HorseInventoryMenu *)m_parentScene;
shared_ptr<LivingEntity> entityHorse = containerMenu->m_horse;
diff --git a/Minecraft.Client/Common/UI/UIControl_MinecraftPlayer.cpp b/Minecraft.Client/Common/UI/UIControl_MinecraftPlayer.cpp
index ae65ac2b..d0625bce 100644
--- a/Minecraft.Client/Common/UI/UIControl_MinecraftPlayer.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_MinecraftPlayer.cpp
@@ -19,10 +19,10 @@ UIControl_MinecraftPlayer::UIControl_MinecraftPlayer()
Minecraft *pMinecraft=Minecraft::GetInstance();
ScreenSizeCalculator ssc(pMinecraft->options, pMinecraft->width_phys, pMinecraft->height_phys);
- m_fScreenWidth=static_cast<float>(pMinecraft->width_phys);
- m_fRawWidth=static_cast<float>(ssc.rawWidth);
- m_fScreenHeight=static_cast<float>(pMinecraft->height_phys);
- m_fRawHeight=static_cast<float>(ssc.rawHeight);
+ m_fScreenWidth=(float)pMinecraft->width_phys;
+ m_fRawWidth=(float)ssc.rawWidth;
+ m_fScreenHeight=(float)pMinecraft->height_phys;
+ m_fRawHeight=(float)ssc.rawHeight;
}
void UIControl_MinecraftPlayer::render(IggyCustomDrawCallbackRegion *region)
@@ -49,7 +49,7 @@ void UIControl_MinecraftPlayer::render(IggyCustomDrawCallbackRegion *region)
glScalef(-ss, ss, ss);
glRotatef(180, 0, 0, 1);
- UIScene_InventoryMenu *containerMenu = static_cast<UIScene_InventoryMenu *>(m_parentScene);
+ UIScene_InventoryMenu *containerMenu = (UIScene_InventoryMenu *)m_parentScene;
float oybr = pMinecraft->localplayers[containerMenu->getPad()]->yBodyRot;
float oyr = pMinecraft->localplayers[containerMenu->getPad()]->yRot;
diff --git a/Minecraft.Client/Common/UI/UIControl_PlayerList.cpp b/Minecraft.Client/Common/UI/UIControl_PlayerList.cpp
index 0703919f..41534dc2 100644
--- a/Minecraft.Client/Common/UI/UIControl_PlayerList.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_PlayerList.cpp
@@ -21,7 +21,7 @@ void UIControl_PlayerList::addItem(const wstring &label, int iPlayerIcon, int iV
IggyStringUTF16 stringVal;
stringVal.string = (IggyUTF16*)label.c_str();
- stringVal.length = static_cast<S32>(label.length());
+ stringVal.length = (S32)label.length();
value[0].type = IGGY_DATATYPE_string_UTF16;
value[0].string16 = stringVal;
diff --git a/Minecraft.Client/Common/UI/UIControl_PlayerSkinPreview.cpp b/Minecraft.Client/Common/UI/UIControl_PlayerSkinPreview.cpp
index b8c439b1..d74bd185 100644
--- a/Minecraft.Client/Common/UI/UIControl_PlayerSkinPreview.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_PlayerSkinPreview.cpp
@@ -23,10 +23,10 @@ UIControl_PlayerSkinPreview::UIControl_PlayerSkinPreview()
Minecraft *pMinecraft=Minecraft::GetInstance();
ScreenSizeCalculator ssc(pMinecraft->options, pMinecraft->width_phys, pMinecraft->height_phys);
- m_fScreenWidth=static_cast<float>(pMinecraft->width_phys);
- m_fRawWidth=static_cast<float>(ssc.rawWidth);
- m_fScreenHeight=static_cast<float>(pMinecraft->height_phys);
- m_fRawHeight=static_cast<float>(ssc.rawHeight);
+ m_fScreenWidth=(float)pMinecraft->width_phys;
+ m_fRawWidth=(float)ssc.rawWidth;
+ m_fScreenHeight=(float)pMinecraft->height_phys;
+ m_fRawHeight=(float)ssc.rawHeight;
m_customTextureUrl = L"default";
m_backupTexture = TN_MOB_CHAR;
@@ -55,7 +55,7 @@ UIControl_PlayerSkinPreview::UIControl_PlayerSkinPreview()
m_fOriginalRotation = 0.0f;
m_framesAnimatingRotation = 0;
m_bAnimatingToFacing = false;
- m_pvAdditionalModelParts=nullptr;
+ m_pvAdditionalModelParts=NULL;
m_uiAnimOverrideBitmask=0L;
}
@@ -167,7 +167,7 @@ void UIControl_PlayerSkinPreview::SetFacing(ESkinPreviewFacing facing, bool bAni
void UIControl_PlayerSkinPreview::CycleNextAnimation()
{
- m_currentAnimation = static_cast<ESkinPreviewAnimations>(m_currentAnimation + 1);
+ m_currentAnimation = (ESkinPreviewAnimations)(m_currentAnimation + 1);
if(m_currentAnimation >= e_SkinPreviewAnimation_Count) m_currentAnimation = e_SkinPreviewAnimation_Walking;
m_swingTime = 0.0f;
@@ -175,8 +175,8 @@ void UIControl_PlayerSkinPreview::CycleNextAnimation()
void UIControl_PlayerSkinPreview::CyclePreviousAnimation()
{
- m_currentAnimation = static_cast<ESkinPreviewAnimations>(m_currentAnimation - 1);
- if(m_currentAnimation < e_SkinPreviewAnimation_Walking) m_currentAnimation = static_cast<ESkinPreviewAnimations>(e_SkinPreviewAnimation_Count - 1);
+ m_currentAnimation = (ESkinPreviewAnimations)(m_currentAnimation - 1);
+ if(m_currentAnimation < e_SkinPreviewAnimation_Walking) m_currentAnimation = (ESkinPreviewAnimations)(e_SkinPreviewAnimation_Count - 1);
m_swingTime = 0.0f;
}
@@ -210,7 +210,7 @@ void UIControl_PlayerSkinPreview::render(IggyCustomDrawCallbackRegion *region)
Lighting::turnOn();
//glRotatef(-45 - 90, 0, 1, 0);
- glRotatef(-static_cast<float>(m_xRot), 1, 0, 0);
+ glRotatef(-(float)m_xRot, 1, 0, 0);
// 4J Stu - Turning on hideGui while we do this stops the name rendering in split-screen
bool wasHidingGui = pMinecraft->options->hideGui;
@@ -218,7 +218,7 @@ void UIControl_PlayerSkinPreview::render(IggyCustomDrawCallbackRegion *region)
//EntityRenderDispatcher::instance->render(pMinecraft->localplayers[0], 0, 0, 0, 0, 1);
EntityRenderer *renderer = EntityRenderDispatcher::instance->getRenderer(eTYPE_LOCALPLAYER);
- if (renderer != nullptr)
+ if (renderer != NULL)
{
// 4J-PB - any additional parts to turn on for this player (skin dependent)
//vector<ModelPart *> *pAdditionalModelParts=mob->GetAdditionalModelParts();
@@ -257,12 +257,12 @@ void UIControl_PlayerSkinPreview::render(EntityRenderer *renderer, double x, dou
glPushMatrix();
glDisable(GL_CULL_FACE);
- HumanoidModel *model = static_cast<HumanoidModel *>(renderer->getModel());
+ HumanoidModel *model = (HumanoidModel *)renderer->getModel();
//getAttackAnim(mob, a);
- //if (armor != nullptr) armor->attackTime = model->attackTime;
+ //if (armor != NULL) armor->attackTime = model->attackTime;
//model->riding = mob->isRiding();
- //if (armor != nullptr) armor->riding = model->riding;
+ //if (armor != NULL) armor->riding = model->riding;
// 4J Stu - Remember to reset these values once the rendering is done if you add another one
model->attackTime = 0;
@@ -292,7 +292,7 @@ void UIControl_PlayerSkinPreview::render(EntityRenderer *renderer, double x, dou
{
m_swingTime = 0;
}
- model->attackTime = m_swingTime / static_cast<float>(Player::SWING_DURATION * 3);
+ model->attackTime = m_swingTime / (float) (Player::SWING_DURATION * 3);
break;
default:
break;
@@ -306,7 +306,7 @@ void UIControl_PlayerSkinPreview::render(EntityRenderer *renderer, double x, dou
//setupPosition(mob, x, y, z);
// is equivalent to
- glTranslatef(static_cast<float>(x), static_cast<float>(y), static_cast<float>(z));
+ glTranslatef((float) x, (float) y, (float) z);
//float bob = getBob(mob, a);
#ifdef SKIN_PREVIEW_BOB_ANIM
@@ -383,11 +383,11 @@ void UIControl_PlayerSkinPreview::render(EntityRenderer *renderer, double x, dou
double xa = sin(yr * PI / 180);
double za = -cos(yr * PI / 180);
- float flap = static_cast<float>(yd) * 10;
+ float flap = (float) yd * 10;
if (flap < -6) flap = -6;
if (flap > 32) flap = 32;
- float lean = static_cast<float>(xd * xa + zd * za) * 100;
- float lean2 = static_cast<float>(xd * za - zd * xa) * 100;
+ float lean = (float) (xd * xa + zd * za) * 100;
+ float lean2 = (float) (xd * za - zd * xa) * 100;
if (lean < 0) lean = 0;
//float pow = 1;//mob->oBob + (bob - mob->oBob) * a;
diff --git a/Minecraft.Client/Common/UI/UIControl_Progress.cpp b/Minecraft.Client/Common/UI/UIControl_Progress.cpp
index 20dc1ff7..78e7c1d0 100644
--- a/Minecraft.Client/Common/UI/UIControl_Progress.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_Progress.cpp
@@ -53,7 +53,7 @@ void UIControl_Progress::setProgress(int current)
{
m_current = current;
- float percent = static_cast<float>((m_current - m_min))/(m_max-m_min);
+ float percent = (float)((m_current-m_min))/(m_max-m_min);
if(percent != m_lastPercent)
{
diff --git a/Minecraft.Client/Common/UI/UIControl_SaveList.cpp b/Minecraft.Client/Common/UI/UIControl_SaveList.cpp
index 5ae9c8f0..f83454d7 100644
--- a/Minecraft.Client/Common/UI/UIControl_SaveList.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_SaveList.cpp
@@ -52,7 +52,7 @@ void UIControl_SaveList::addItem(const string &label, const wstring &iconName, i
IggyStringUTF8 stringVal;
stringVal.string = (char*)label.c_str();
- stringVal.length = static_cast<S32>(label.length());
+ stringVal.length = (S32)label.length();
value[0].type = IGGY_DATATYPE_string_UTF8;
value[0].string8 = stringVal;
@@ -74,7 +74,7 @@ void UIControl_SaveList::addItem(const wstring &label, const wstring &iconName,
IggyStringUTF16 stringVal;
stringVal.string = (IggyUTF16*)label.c_str();
- stringVal.length = static_cast<S32>(label.length());
+ stringVal.length = (S32)label.length();
value[0].type = IGGY_DATATYPE_string_UTF16;
value[0].string16 = stringVal;
diff --git a/Minecraft.Client/Common/UI/UIControl_Slider.cpp b/Minecraft.Client/Common/UI/UIControl_Slider.cpp
index 2d56a29c..c2168002 100644
--- a/Minecraft.Client/Common/UI/UIControl_Slider.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_Slider.cpp
@@ -92,12 +92,12 @@ void UIControl_Slider::SetSliderTouchPos(float fTouchPos)
S32 UIControl_Slider::GetRealWidth()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_funcGetRealWidth , 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_funcGetRealWidth , 0 , NULL );
S32 iRealWidth = m_width;
if(result.type == IGGY_DATATYPE_number)
{
- iRealWidth = static_cast<S32>(result.number);
+ iRealWidth = (S32)result.number;
}
return iRealWidth;
}
diff --git a/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.cpp b/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.cpp
index 75bbac29..653b0592 100644
--- a/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.cpp
@@ -63,7 +63,7 @@ void UIControl_SpaceIndicatorBar::reset()
void UIControl_SpaceIndicatorBar::addSave(int64_t size)
{
- float startPercent = static_cast<float>((m_currentTotal - m_min))/(m_max-m_min);
+ float startPercent = (float)((m_currentTotal-m_min))/(m_max-m_min);
m_sizeAndOffsets.push_back( pair<int64_t, float>(size, startPercent) );
@@ -90,7 +90,7 @@ void UIControl_SpaceIndicatorBar::setSaveSize(int64_t size)
{
m_currentSave = size;
- float percent = static_cast<float>((m_currentSave - m_min))/(m_max-m_min);
+ float percent = (float)((m_currentSave-m_min))/(m_max-m_min);
IggyDataValue result;
IggyDataValue value[1];
@@ -101,7 +101,7 @@ void UIControl_SpaceIndicatorBar::setSaveSize(int64_t size)
void UIControl_SpaceIndicatorBar::setTotalSize(int64_t size)
{
- float percent = static_cast<float>((m_currentTotal - m_min))/(m_max-m_min);
+ float percent = (float)((m_currentTotal-m_min))/(m_max-m_min);
IggyDataValue result;
IggyDataValue value[1];
diff --git a/Minecraft.Client/Common/UI/UIControl_TexturePackList.cpp b/Minecraft.Client/Common/UI/UIControl_TexturePackList.cpp
index 7f721493..02336e00 100644
--- a/Minecraft.Client/Common/UI/UIControl_TexturePackList.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_TexturePackList.cpp
@@ -83,7 +83,7 @@ void UIControl_TexturePackList::selectSlot(int id)
void UIControl_TexturePackList::clearSlots()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_clearSlotsFunc ,0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_clearSlotsFunc ,0 , NULL );
}
void UIControl_TexturePackList::setEnabled(bool enable)
@@ -125,7 +125,7 @@ bool UIControl_TexturePackList::CanTouchTrigger(S32 iX, S32 iY)
S32 bCanTouchTrigger = false;
if(result.type == IGGY_DATATYPE_boolean)
{
- bCanTouchTrigger = static_cast<bool>(result.boolval);
+ bCanTouchTrigger = (bool)result.boolval;
}
return bCanTouchTrigger;
}
@@ -133,12 +133,12 @@ bool UIControl_TexturePackList::CanTouchTrigger(S32 iX, S32 iY)
S32 UIControl_TexturePackList::GetRealHeight()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_funcGetRealHeight, 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_funcGetRealHeight, 0 , NULL );
S32 iRealHeight = m_height;
if(result.type == IGGY_DATATYPE_number)
{
- iRealHeight = static_cast<S32>(result.number);
+ iRealHeight = (S32)result.number;
}
return iRealHeight;
}
diff --git a/Minecraft.Client/Common/UI/UIController.cpp b/Minecraft.Client/Common/UI/UIController.cpp
index 3da1b11a..840ed389 100644
--- a/Minecraft.Client/Common/UI/UIController.cpp
+++ b/Minecraft.Client/Common/UI/UIController.cpp
@@ -61,14 +61,14 @@ DWORD UIController::m_dwTrialTimerLimitSecs=DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME;
static UIControl_Slider *FindSliderById(UIScene *pScene, int sliderId)
{
vector<UIControl *> *controls = pScene->GetControls();
- if (!controls) return nullptr;
+ if (!controls) return NULL;
for (size_t i = 0; i < controls->size(); ++i)
{
UIControl *ctrl = (*controls)[i];
if (ctrl && ctrl->getControlType() == UIControl::eSlider && ctrl->getId() == sliderId)
- return static_cast<UIControl_Slider *>(ctrl);
+ return (UIControl_Slider *)ctrl;
}
- return nullptr;
+ return NULL;
}
#endif
@@ -148,7 +148,7 @@ int64_t UIController::iggyAllocCount = 0;
static unordered_map<void *,size_t> allocations;
static void * RADLINK AllocateFunction ( void * alloc_callback_user_data , size_t size_requested , size_t * size_returned )
{
- UIController *controller = static_cast<UIController *>(alloc_callback_user_data);
+ UIController *controller = (UIController *)alloc_callback_user_data;
EnterCriticalSection(&controller->m_Allocatorlock);
#ifdef EXCLUDE_IGGY_ALLOCATIONS_FROM_HEAP_INSPECTOR
void *alloc = __real_malloc(size_requested);
@@ -165,7 +165,7 @@ static void * RADLINK AllocateFunction ( void * alloc_callback_user_data , size_
static void RADLINK DeallocateFunction ( void * alloc_callback_user_data , void * ptr )
{
- UIController *controller = static_cast<UIController *>(alloc_callback_user_data);
+ UIController *controller = (UIController *)alloc_callback_user_data;
EnterCriticalSection(&controller->m_Allocatorlock);
size_t size = allocations[ptr];
UIController::iggyAllocCount -= size;
@@ -181,15 +181,15 @@ static void RADLINK DeallocateFunction ( void * alloc_callback_user_data , void
UIController::UIController()
{
- m_uiDebugConsole = nullptr;
- m_reloadSkinThread = nullptr;
+ m_uiDebugConsole = NULL;
+ m_reloadSkinThread = NULL;
m_navigateToHomeOnReload = false;
m_bCleanupOnReload = false;
- m_mcTTFFont = nullptr;
- m_moj7 = nullptr;
- m_moj11 = nullptr;
+ m_mcTTFFont = NULL;
+ m_moj7 = NULL;
+ m_moj11 = NULL;
// 4J-JEV: It's important that these remain the same, unless updateCurrentLanguage is going to be called.
m_eCurrentFont = m_eTargetFont = eFont_NotLoaded;
@@ -270,7 +270,7 @@ void UIController::SetSysUIShowing(bool bVal)
void UIController::SetSystemUIShowing(LPVOID lpParam,bool bVal)
{
- UIController *pClass=static_cast<UIController *>(lpParam);
+ UIController *pClass=(UIController *)lpParam;
pClass->SetSysUIShowing(bVal);
}
@@ -310,13 +310,13 @@ void UIController::postInit()
for(unsigned int i = 0; i < eUIGroup_COUNT; ++i)
{
- m_groups[i] = new UIGroup(static_cast<EUIGroup>(i),i-1);
+ m_groups[i] = new UIGroup((EUIGroup)i,i-1);
}
#ifdef ENABLE_IGGY_EXPLORER
iggy_explorer = IggyExpCreate("127.0.0.1", 9190, malloc(IGGYEXP_MIN_STORAGE), IGGYEXP_MIN_STORAGE);
- if ( iggy_explorer == nullptr )
+ if ( iggy_explorer == NULL )
{
// not normally an error, just an error for this demo!
app.DebugPrintf( "Couldn't connect to Iggy Explorer, did you run it first?" );
@@ -329,7 +329,7 @@ void UIController::postInit()
#ifdef ENABLE_IGGY_PERFMON
m_iggyPerfmonEnabled = false;
- iggy_perfmon = IggyPerfmonCreate(perf_malloc, perf_free, nullptr);
+ iggy_perfmon = IggyPerfmonCreate(perf_malloc, perf_free, NULL);
IggyInstallPerfmon(iggy_perfmon);
#endif
@@ -370,7 +370,7 @@ UITTFFont *UIController::createFont(EFont fontLanguage)
#endif
// 4J-JEV, Cyrillic characters have been added to this font now, (4/July/14)
// XC_LANGUAGE_RUSSIAN and XC_LANGUAGE_GREEK:
- default: return nullptr;
+ default: return NULL;
}
}
@@ -397,17 +397,17 @@ void UIController::SetupFont()
if (m_eCurrentFont != eFont_NotLoaded) app.DebugPrintf("[UIController] Font switch required for language transition to %i.\n", nextLanguage);
else app.DebugPrintf("[UIController] Initialising font for language %i.\n", nextLanguage);
- if (m_mcTTFFont != nullptr)
+ if (m_mcTTFFont != NULL)
{
delete m_mcTTFFont;
- m_mcTTFFont = nullptr;
+ m_mcTTFFont = NULL;
}
if(m_eTargetFont == eFont_Bitmap)
{
// these may have been set up by a previous language being chosen
- if (m_moj7 == nullptr) m_moj7 = new UIBitmapFont(SFontData::Mojangles_7);
- if (m_moj11 == nullptr) m_moj11 = new UIBitmapFont(SFontData::Mojangles_11);
+ if (m_moj7 == NULL) m_moj7 = new UIBitmapFont(SFontData::Mojangles_7);
+ if (m_moj11 == NULL) m_moj11 = new UIBitmapFont(SFontData::Mojangles_11);
// 4J-JEV: Ensure we redirect to them correctly, even if the objects were previously initialised.
m_moj7->registerFont();
@@ -615,7 +615,7 @@ IggyLibrary UIController::loadSkin(const wstring &skinPath, const wstring &skinN
if(!skinPath.empty() && app.hasArchiveFile(skinPath))
{
byteArray baFile = app.getArchiveFile(skinPath);
- lib = IggyLibraryCreateFromMemoryUTF16( (IggyUTF16 *)skinName.c_str() , (void *)baFile.data, baFile.length, nullptr );
+ lib = IggyLibraryCreateFromMemoryUTF16( (IggyUTF16 *)skinName.c_str() , (void *)baFile.data, baFile.length, NULL );
delete[] baFile.data;
#ifdef _DEBUG
@@ -623,12 +623,12 @@ IggyLibrary UIController::loadSkin(const wstring &skinPath, const wstring &skinN
rrbool res;
int iteration = 0;
int64_t totalStatic = 0;
- while(res = IggyDebugGetMemoryUseInfo (nullptr,
- lib ,
- "" ,
- 0 ,
- iteration ,
- &memoryInfo ))
+ while(res = IggyDebugGetMemoryUseInfo ( NULL ,
+ lib ,
+ "" ,
+ 0 ,
+ iteration ,
+ &memoryInfo ))
{
totalStatic += memoryInfo.static_allocation_bytes;
app.DebugPrintf(app.USER_SR, "%ls - %.*s, static: %dB, dynamic: %dB\n", skinPath.c_str(), memoryInfo.subcategory_stringlen, memoryInfo.subcategory, memoryInfo.static_allocation_bytes, memoryInfo.dynamic_allocation_bytes);
@@ -692,7 +692,7 @@ void UIController::StartReloadSkinThread()
int UIController::reloadSkinThreadProc(void* lpParam)
{
EnterCriticalSection(&ms_reloadSkinCS); // MGH - added to prevent crash loading Iggy movies while the skins were being reloaded
- UIController *controller = static_cast<UIController *>(lpParam);
+ UIController *controller = (UIController *)lpParam;
// Load new skin
controller->loadSkins();
@@ -727,7 +727,7 @@ bool UIController::IsExpectingOrReloadingSkin()
void UIController::CleanUpSkinReload()
{
delete m_reloadSkinThread;
- m_reloadSkinThread = nullptr;
+ m_reloadSkinThread = NULL;
if(!Minecraft::GetInstance()->skins->isUsingDefaultSkin())
{
@@ -787,28 +787,26 @@ void UIController::tickInput()
#endif
{
#ifdef _WINDOWS64
- m_mouseClickConsumedByScene = false;
- if (!g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive())
- {
- UIScene *pScene = nullptr;
-
- // Search by layer priority across all groups (layer-first).
- // Tooltip layer is skipped because it holds non-interactive
- // overlays (button hints, timer) that should never capture mouse.
- // Old group-first order found those tooltips on eUIGroup_Fullscreen
- // before reaching in-game menus on eUIGroup_Player1.
- static const EUILayer mouseLayers[] = {
+ m_mouseClickConsumedByScene = false;
+ if (!g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive())
+ {
+ UIScene *pScene = NULL;
+ // Search by layer priority across all groups (layer-first).
+ // Tooltip layer is skipped because it holds non-interactive
+ // overlays (button hints, timer) that should never capture mouse.
+ // Old group-first order found those tooltips on eUIGroup_Fullscreen
+ // before reaching in-game menus on eUIGroup_Player1.
+ static const EUILayer mouseLayers[] = {
#ifndef _CONTENT_PACKAGE
- eUILayer_Debug,
+ eUILayer_Debug,
#endif
- eUILayer_Error,
- eUILayer_Alert,
- eUILayer_Popup,
- eUILayer_Fullscreen,
- eUILayer_Scene,
- };
-
- for (int l = 0; l < _countof(mouseLayers) && !pScene; ++l)
+ eUILayer_Error,
+ eUILayer_Alert,
+ eUILayer_Popup,
+ eUILayer_Fullscreen,
+ eUILayer_Scene,
+ };
+ for (int l = 0; l < _countof(mouseLayers) && !pScene; ++l)
{
for (int grp = 0; grp < eUIGroup_COUNT && !pScene; ++grp)
{
@@ -816,25 +814,9 @@ void UIController::tickInput()
}
}
if (pScene && pScene->getMovie())
- {
- int rawMouseX = g_KBMInput.GetMouseX();
- int rawMouseY = g_KBMInput.GetMouseY();
- F32 mouseX = static_cast<F32>(rawMouseX);
- F32 mouseY = static_cast<F32>(rawMouseY);
-
- extern HWND g_hWnd;
- if (g_hWnd)
- {
- RECT rc;
- GetClientRect(g_hWnd, &rc);
- int winW = rc.right - rc.left;
- int winH = rc.bottom - rc.top;
- if (winW > 0 && winH > 0)
- {
- mouseX = mouseX * (m_fScreenWidth / static_cast<F32>(winW));
- mouseY = mouseY * (m_fScreenHeight / static_cast<F32>(winH));
- }
- }
+ {
+ int rawMouseX = g_KBMInput.GetMouseX();
+ int rawMouseY = g_KBMInput.GetMouseY();
// Only update hover focus when the mouse has actually moved,
// so that mouse-wheel scrolling can change list selection
@@ -1034,7 +1016,7 @@ void UIController::tickInput()
if (pMainPanel && ctrl->getParentPanel() != pMainPanel)
continue;
- UIControl_Slider *pSlider = static_cast<UIControl_Slider *>(ctrl);
+ UIControl_Slider *pSlider = (UIControl_Slider *)ctrl;
pSlider->UpdateControl();
S32 cx = pSlider->getXPos() + panelOffsetX;
S32 cy = pSlider->getYPos() + panelOffsetY;
@@ -1063,7 +1045,7 @@ void UIController::tickInput()
S32 sliderWidth = pSlider->GetRealWidth();
if (sliderWidth > 0)
{
- float fNewSliderPos = (sceneMouseX - static_cast<float>(sliderX)) / static_cast<float>(sliderWidth);
+ float fNewSliderPos = (sceneMouseX - (float)sliderX) / (float)sliderWidth;
if (fNewSliderPos < 0.0f) fNewSliderPos = 0.0f;
if (fNewSliderPos > 1.0f) fNewSliderPos = 1.0f;
pSlider->SetSliderTouchPos(fNewSliderPos);
@@ -1150,7 +1132,7 @@ void UIController::handleInput()
if(ProfileManager.GetLockedProfile() >= 0 && !InputManager.IsPadLocked( ProfileManager.GetLockedProfile() ) && firstUnfocussedUnhandledPad >= 0)
{
- ProfileManager.RequestSignInUI(false, false, false, false, true, nullptr, nullptr, firstUnfocussedUnhandledPad );
+ ProfileManager.RequestSignInUI(false, false, false, false, true, NULL, NULL, firstUnfocussedUnhandledPad );
}
}
#endif
@@ -1177,8 +1159,8 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
if((m_bTouchscreenPressed==false) && pTouchData->reportNum==1)
{
// no active touch? clear active and highlighted touch UI elements
- m_ActiveUIElement = nullptr;
- m_HighlightedUIElement = nullptr;
+ m_ActiveUIElement = NULL;
+ m_HighlightedUIElement = NULL;
// fullscreen first
UIScene *pScene=m_groups[(int)eUIGroup_Fullscreen]->getCurrentScene();
@@ -1478,7 +1460,7 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
IggyMemoryUseInfo memoryInfo;
rrbool res;
int iteration = 0;
- while(res = IggyDebugGetMemoryUseInfo ( nullptr ,
+ while(res = IggyDebugGetMemoryUseInfo ( NULL ,
m_iggyLibraries[i] ,
"" ,
0 ,
@@ -1509,7 +1491,7 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
bool handled = false;
// Send the key to the fullscreen group first
- m_groups[static_cast<int>(eUIGroup_Fullscreen)]->handleInput(iPad, key, repeat, pressed, released, handled);
+ m_groups[(int)eUIGroup_Fullscreen]->handleInput(iPad, key, repeat, pressed, released, handled);
if(!handled)
{
// If it's not been handled yet, then pass the event onto the players specific group
@@ -1520,9 +1502,9 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
rrbool RADLINK UIController::ExternalFunctionCallback( void * user_callback_data , Iggy * player , IggyExternalFunctionCallUTF16 * call)
{
- UIScene *scene = static_cast<UIScene *>(IggyPlayerGetUserdata(player));
+ UIScene *scene = (UIScene *)IggyPlayerGetUserdata(player);
- if(scene != nullptr)
+ if(scene != NULL)
{
scene->externalCallback(call);
}
@@ -1587,25 +1569,25 @@ void UIController::getRenderDimensions(C4JRender::eViewportType viewport, S32 &w
switch( viewport )
{
case C4JRender::VIEWPORT_TYPE_FULLSCREEN:
- width = static_cast<S32>(getScreenWidth());
- height = static_cast<S32>(getScreenHeight());
+ width = (S32)(getScreenWidth());
+ height = (S32)(getScreenHeight());
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_TOP:
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
- width = static_cast<S32>(getScreenWidth() / 2);
- height = static_cast<S32>(getScreenHeight() / 2);
+ width = (S32)(getScreenWidth() / 2);
+ height = (S32)(getScreenHeight() / 2);
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_LEFT:
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
- width = static_cast<S32>(getScreenWidth() / 2);
- height = static_cast<S32>(getScreenHeight() / 2);
+ width = (S32)(getScreenWidth() / 2);
+ height = (S32)(getScreenHeight() / 2);
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_LEFT:
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_RIGHT:
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_LEFT:
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_RIGHT:
- width = static_cast<S32>(getScreenWidth() / 2);
- height = static_cast<S32>(getScreenHeight() / 2);
+ width = (S32)(getScreenWidth() / 2);
+ height = (S32)(getScreenHeight() / 2);
break;
}
}
@@ -1621,30 +1603,30 @@ void UIController::setupRenderPosition(C4JRender::eViewportType viewport)
switch( viewport )
{
case C4JRender::VIEWPORT_TYPE_SPLIT_TOP:
- xPos = static_cast<S32>(getScreenWidth() / 4);
+ xPos = (S32)(getScreenWidth() / 4);
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
- xPos = static_cast<S32>(getScreenWidth() / 4);
- yPos = static_cast<S32>(getScreenHeight() / 2);
+ xPos = (S32)(getScreenWidth() / 4);
+ yPos = (S32)(getScreenHeight() / 2);
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_LEFT:
- yPos = static_cast<S32>(getScreenHeight() / 4);
+ yPos = (S32)(getScreenHeight() / 4);
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
- xPos = static_cast<S32>(getScreenWidth() / 2);
- yPos = static_cast<S32>(getScreenHeight() / 4);
+ xPos = (S32)(getScreenWidth() / 2);
+ yPos = (S32)(getScreenHeight() / 4);
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_LEFT:
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_RIGHT:
- xPos = static_cast<S32>(getScreenWidth() / 2);
+ xPos = (S32)(getScreenWidth() / 2);
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_LEFT:
- yPos = static_cast<S32>(getScreenHeight() / 2);
+ yPos = (S32)(getScreenHeight() / 2);
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_RIGHT:
- xPos = static_cast<S32>(getScreenWidth() / 2);
- yPos = static_cast<S32>(getScreenHeight() / 2);
+ xPos = (S32)(getScreenWidth() / 2);
+ yPos = (S32)(getScreenHeight() / 2);
break;
}
m_tileOriginX = xPos;
@@ -1709,8 +1691,8 @@ void UIController::setupCustomDrawMatrices(UIScene *scene, CustomDrawData *custo
Minecraft *pMinecraft=Minecraft::GetInstance();
// Clear just the region required for this control.
- float sceneWidth = static_cast<float>(scene->getRenderWidth());
- float sceneHeight = static_cast<float>(scene->getRenderHeight());
+ float sceneWidth = (float)scene->getRenderWidth();
+ float sceneHeight = (float)scene->getRenderHeight();
LONG left, right, top, bottom;
#ifdef __PS3__
@@ -1738,10 +1720,10 @@ void UIController::setupCustomDrawMatrices(UIScene *scene, CustomDrawData *custo
if(!m_bScreenWidthSetup)
{
Minecraft *pMinecraft=Minecraft::GetInstance();
- if(pMinecraft != nullptr)
+ if(pMinecraft != NULL)
{
- m_fScreenWidth=static_cast<float>(pMinecraft->width_phys);
- m_fScreenHeight=static_cast<float>(pMinecraft->height_phys);
+ m_fScreenWidth=(float)pMinecraft->width_phys;
+ m_fScreenHeight=(float)pMinecraft->height_phys;
m_bScreenWidthSetup = true;
}
}
@@ -1785,9 +1767,9 @@ void UIController::endCustomDrawGameStateAndMatrices()
void RADLINK UIController::CustomDrawCallback(void *user_callback_data, Iggy *player, IggyCustomDrawCallbackRegion *region)
{
- UIScene *scene = static_cast<UIScene *>(IggyPlayerGetUserdata(player));
+ UIScene *scene = (UIScene *)IggyPlayerGetUserdata(player);
- if(scene != nullptr)
+ if(scene != NULL)
{
scene->customDraw(region);
}
@@ -1799,7 +1781,7 @@ void RADLINK UIController::CustomDrawCallback(void *user_callback_data, Iggy *pl
//width - Input value: optional number of pixels wide specified from AS3, or -1 if not defined. Output value: the number of pixels wide to pretend to Iggy that the bitmap is. SWF and AS3 scales bitmaps based on their pixel dimensions, so you can use this to substitute a texture that is higher or lower resolution that ActionScript thinks it is.
//height - Input value: optional number of pixels high specified from AS3, or -1 if not defined. Output value: the number of pixels high to pretend to Iggy that the bitmap is. SWF and AS3 scales bitmaps based on their pixel dimensions, so you can use this to substitute a texture that is higher or lower resolution that ActionScript thinks it is.
//destroy_callback_data - Optional additional output value you can set; the value will be passed along to the corresponding Iggy_TextureSubstitutionDestroyCallback (e.g. you can store the pointer to your own internal structure here).
-//return - A platform-independent wrapped texture handle provided by GDraw, or nullptr (nullptr with throw an ActionScript 3 ArgumentError that the Flash developer can catch) Use by calling IggySetTextureSubstitutionCallbacks.
+//return - A platform-independent wrapped texture handle provided by GDraw, or NULL (NULL with throw an ActionScript 3 ArgumentError that the Flash developer can catch) Use by calling IggySetTextureSubstitutionCallbacks.
//
//Discussion
//
@@ -1814,7 +1796,7 @@ GDrawTexture * RADLINK UIController::TextureSubstitutionCreateCallback ( void *
app.DebugPrintf("Found substitution texture %ls, with %d bytes\n", texture_name,it->second.length);
BufferedImage image(it->second.data, it->second.length);
- if( image.getData() != nullptr )
+ if( image.getData() != NULL )
{
image.preMultiplyAlpha();
Textures *t = Minecraft::GetInstance()->textures;
@@ -1832,18 +1814,18 @@ GDrawTexture * RADLINK UIController::TextureSubstitutionCreateCallback ( void *
#endif
*destroy_callback_data = (void *)id;
- app.DebugPrintf("Found substitution texture %ls (%d) - %dx%d\n", static_cast<wchar_t *>(texture_name), id, image.getWidth(), image.getHeight());
+ app.DebugPrintf("Found substitution texture %ls (%d) - %dx%d\n", (wchar_t *)texture_name, id, image.getWidth(), image.getHeight());
return ui.getSubstitutionTexture(id);
}
else
{
- return nullptr;
+ return NULL;
}
}
else
{
- app.DebugPrintf("Could not find substitution texture %ls\n", static_cast<wchar_t *>(texture_name));
- return nullptr;
+ app.DebugPrintf("Could not find substitution texture %ls\n", (wchar_t *)texture_name);
+ return NULL;
}
}
@@ -1853,7 +1835,7 @@ void RADLINK UIController::TextureSubstitutionDestroyCallback ( void * user_call
{
// Orbis complains about casting a pointer to an int
LONGLONG llVal=(LONGLONG)destroy_callback_data;
- int id=static_cast<int>(llVal);
+ int id=(int)llVal;
app.DebugPrintf("Destroying iggy texture %d\n", id);
ui.destroySubstitutionTexture(user_callback_data, handle);
@@ -1955,7 +1937,7 @@ bool UIController::NavigateToScene(int iPad, EUIScene scene, void *initData, EUI
if( ( iPad != 255 ) && ( iPad >= 0 ) )
{
menuDisplayedPad = iPad;
- group = static_cast<EUIGroup>(iPad + 1);
+ group = (EUIGroup)(iPad+1);
}
else group = eUIGroup_Fullscreen;
}
@@ -1970,7 +1952,7 @@ bool UIController::NavigateToScene(int iPad, EUIScene scene, void *initData, EUI
EnterCriticalSection(&m_navigationLock);
SetMenuDisplayed(menuDisplayedPad,true);
- bool success = m_groups[static_cast<int>(group)]->NavigateToScene(iPad, scene, initData, layer);
+ bool success = m_groups[(int)group]->NavigateToScene(iPad, scene, initData, layer);
if(success && group == eUIGroup_Fullscreen) setFullscreenMenuDisplayed(true);
LeaveCriticalSection(&m_navigationLock);
@@ -1985,18 +1967,18 @@ bool UIController::NavigateBack(int iPad, bool forceUsePad, EUIScene eScene, EUI
bool navComplete = false;
if( app.GetGameStarted() )
{
- bool navComplete = m_groups[static_cast<int>(eUIGroup_Fullscreen)]->NavigateBack(iPad, eScene, eLayer);
+ bool navComplete = m_groups[(int)eUIGroup_Fullscreen]->NavigateBack(iPad, eScene, eLayer);
if(!navComplete && ( iPad != 255 ) && ( iPad >= 0 ) )
{
- EUIGroup group = static_cast<EUIGroup>(iPad + 1);
- navComplete = m_groups[static_cast<int>(group)]->NavigateBack(iPad, eScene, eLayer);
- if(!m_groups[static_cast<int>(group)]->GetMenuDisplayed())SetMenuDisplayed(iPad,false);
+ EUIGroup group = (EUIGroup)(iPad+1);
+ navComplete = m_groups[(int)group]->NavigateBack(iPad, eScene, eLayer);
+ if(!m_groups[(int)group]->GetMenuDisplayed())SetMenuDisplayed(iPad,false);
}
// 4J-PB - autosave in fullscreen doesn't clear the menuDisplayed flag
else
{
- if(!m_groups[static_cast<int>(eUIGroup_Fullscreen)]->GetMenuDisplayed())
+ if(!m_groups[(int)eUIGroup_Fullscreen]->GetMenuDisplayed())
{
setFullscreenMenuDisplayed(false);
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
@@ -2008,8 +1990,8 @@ bool UIController::NavigateBack(int iPad, bool forceUsePad, EUIScene eScene, EUI
}
else
{
- navComplete = m_groups[static_cast<int>(eUIGroup_Fullscreen)]->NavigateBack(iPad, eScene, eLayer);
- if(!m_groups[static_cast<int>(eUIGroup_Fullscreen)]->GetMenuDisplayed()) SetMenuDisplayed(XUSER_INDEX_ANY,false);
+ navComplete = m_groups[(int)eUIGroup_Fullscreen]->NavigateBack(iPad, eScene, eLayer);
+ if(!m_groups[(int)eUIGroup_Fullscreen]->GetMenuDisplayed()) SetMenuDisplayed(XUSER_INDEX_ANY,false);
}
return navComplete;
}
@@ -2030,11 +2012,11 @@ void UIController::NavigateToHomeMenu()
TexturePack *pTexPack=Minecraft::GetInstance()->skins->getSelected();
- DLCTexturePack *pDLCTexPack=nullptr;
+ DLCTexturePack *pDLCTexPack=NULL;
if(pTexPack->hasAudio())
{
// get the dlc texture pack, and store it
- pDLCTexPack=static_cast<DLCTexturePack *>(pTexPack);
+ pDLCTexPack=(DLCTexturePack *)pTexPack;
}
// change to the default texture pack
@@ -2051,11 +2033,11 @@ void UIController::NavigateToHomeMenu()
eStream_CD_1);
pMinecraft->soundEngine->playStreaming(L"", 0, 0, 0, 1, 1);
- // if(pDLCTexPack->m_pStreamedWaveBank!=nullptr)
+ // if(pDLCTexPack->m_pStreamedWaveBank!=NULL)
// {
// pDLCTexPack->m_pStreamedWaveBank->Destroy();
// }
- // if(pDLCTexPack->m_pSoundBank!=nullptr)
+ // if(pDLCTexPack->m_pSoundBank!=NULL)
// {
// pDLCTexPack->m_pSoundBank->Destroy();
// }
@@ -2089,7 +2071,7 @@ UIScene *UIController::GetTopScene(int iPad, EUILayer layer, EUIGroup group)
// If the game isn't running treat as user 0, otherwise map index directly from pad
if( ( iPad != 255 ) && ( iPad >= 0 ) )
{
- group = static_cast<EUIGroup>(iPad + 1);
+ group = (EUIGroup)(iPad+1);
}
else group = eUIGroup_Fullscreen;
}
@@ -2099,7 +2081,7 @@ UIScene *UIController::GetTopScene(int iPad, EUILayer layer, EUIGroup group)
group = eUIGroup_Fullscreen;
}
}
- return m_groups[static_cast<int>(group)]->GetTopScene(layer);
+ return m_groups[(int)group]->GetTopScene(layer);
}
size_t UIController::RegisterForCallbackId(UIScene *scene)
@@ -2126,7 +2108,7 @@ void UIController::UnregisterCallbackId(size_t id)
UIScene *UIController::GetSceneFromCallbackId(size_t id)
{
- UIScene *scene = nullptr;
+ UIScene *scene = NULL;
auto it = m_registeredCallbackScenes.find(id);
if(it != m_registeredCallbackScenes.end() )
{
@@ -2147,7 +2129,7 @@ void UIController::LeaveCallbackIdCriticalSection()
void UIController::CloseAllPlayersScenes()
{
- m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getTooltips()->SetTooltips(-1);
+ m_groups[(int)eUIGroup_Fullscreen]->getTooltips()->SetTooltips(-1);
for(unsigned int i = 0; i < eUIGroup_COUNT; ++i)
{
//m_bCloseAllScenes[i] = true;
@@ -2170,7 +2152,7 @@ void UIController::CloseUIScenes(int iPad, bool forceIPad)
if( app.GetGameStarted() || forceIPad )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
@@ -2178,22 +2160,22 @@ void UIController::CloseUIScenes(int iPad, bool forceIPad)
group = eUIGroup_Fullscreen;
}
- m_groups[static_cast<int>(group)]->closeAllScenes();
- m_groups[static_cast<int>(group)]->getTooltips()->SetTooltips(-1);
+ m_groups[(int)group]->closeAllScenes();
+ m_groups[(int)group]->getTooltips()->SetTooltips(-1);
// This should cause the popup to dissappear
TutorialPopupInfo popupInfo;
- if(m_groups[static_cast<int>(group)]->getTutorialPopup()) m_groups[static_cast<int>(group)]->getTutorialPopup()->SetTutorialDescription(&popupInfo);
+ if(m_groups[(int)group]->getTutorialPopup()) m_groups[(int)group]->getTutorialPopup()->SetTutorialDescription(&popupInfo);
if(group==eUIGroup_Fullscreen) setFullscreenMenuDisplayed(false);
- SetMenuDisplayed((group == eUIGroup_Fullscreen ? XUSER_INDEX_ANY : iPad), m_groups[static_cast<int>(group)]->GetMenuDisplayed());
+ SetMenuDisplayed((group == eUIGroup_Fullscreen ? XUSER_INDEX_ANY : iPad), m_groups[(int)group]->GetMenuDisplayed());
}
void UIController::setFullscreenMenuDisplayed(bool displayed)
{
// Show/hide the tooltips for the fullscreen group
- m_groups[static_cast<int>(eUIGroup_Fullscreen)]->showComponent(ProfileManager.GetPrimaryPad(),eUIComponent_Tooltips,eUILayer_Tooltips,displayed);
+ m_groups[(int)eUIGroup_Fullscreen]->showComponent(ProfileManager.GetPrimaryPad(),eUIComponent_Tooltips,eUILayer_Tooltips,displayed);
// Show/hide tooltips for the other layers
for(unsigned int i = (eUIGroup_Fullscreen+1); i < eUIGroup_COUNT; ++i)
@@ -2208,14 +2190,14 @@ bool UIController::IsPauseMenuDisplayed(int iPad)
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
{
group = eUIGroup_Fullscreen;
}
- return m_groups[static_cast<int>(group)]->IsPauseMenuDisplayed();
+ return m_groups[(int)group]->IsPauseMenuDisplayed();
}
bool UIController::IsContainerMenuDisplayed(int iPad)
@@ -2224,14 +2206,14 @@ bool UIController::IsContainerMenuDisplayed(int iPad)
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
{
group = eUIGroup_Fullscreen;
}
- return m_groups[static_cast<int>(group)]->IsContainerMenuDisplayed();
+ return m_groups[(int)group]->IsContainerMenuDisplayed();
}
bool UIController::IsIgnorePlayerJoinMenuDisplayed(int iPad)
@@ -2240,14 +2222,14 @@ bool UIController::IsIgnorePlayerJoinMenuDisplayed(int iPad)
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
{
group = eUIGroup_Fullscreen;
}
- return m_groups[static_cast<int>(group)]->IsIgnorePlayerJoinMenuDisplayed();
+ return m_groups[(int)group]->IsIgnorePlayerJoinMenuDisplayed();
}
bool UIController::IsIgnoreAutosaveMenuDisplayed(int iPad)
@@ -2256,14 +2238,14 @@ bool UIController::IsIgnoreAutosaveMenuDisplayed(int iPad)
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
{
group = eUIGroup_Fullscreen;
}
- return m_groups[static_cast<int>(eUIGroup_Fullscreen)]->IsIgnoreAutosaveMenuDisplayed() || (group != eUIGroup_Fullscreen && m_groups[static_cast<int>(group)]->IsIgnoreAutosaveMenuDisplayed());
+ return m_groups[(int)eUIGroup_Fullscreen]->IsIgnoreAutosaveMenuDisplayed() || (group != eUIGroup_Fullscreen && m_groups[(int)group]->IsIgnoreAutosaveMenuDisplayed());
}
void UIController::SetIgnoreAutosaveMenuDisplayed(int iPad, bool displayed)
@@ -2277,14 +2259,14 @@ bool UIController::IsSceneInStack(int iPad, EUIScene eScene)
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
{
group = eUIGroup_Fullscreen;
}
- return m_groups[static_cast<int>(group)]->IsSceneInStack(eScene);
+ return m_groups[(int)group]->IsSceneInStack(eScene);
}
bool UIController::GetMenuDisplayed(int iPad)
@@ -2365,14 +2347,14 @@ void UIController::SetTooltipText( unsigned int iPad, unsigned int tooltip, int
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
{
group = eUIGroup_Fullscreen;
}
- if(m_groups[static_cast<int>(group)]->getTooltips()) m_groups[static_cast<int>(group)]->getTooltips()->SetTooltipText(tooltip, iTextID);
+ if(m_groups[(int)group]->getTooltips()) m_groups[(int)group]->getTooltips()->SetTooltipText(tooltip, iTextID);
}
void UIController::SetEnableTooltips( unsigned int iPad, BOOL bVal )
@@ -2381,14 +2363,14 @@ void UIController::SetEnableTooltips( unsigned int iPad, BOOL bVal )
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
{
group = eUIGroup_Fullscreen;
}
- if(m_groups[static_cast<int>(group)]->getTooltips()) m_groups[static_cast<int>(group)]->getTooltips()->SetEnableTooltips(bVal);
+ if(m_groups[(int)group]->getTooltips()) m_groups[(int)group]->getTooltips()->SetEnableTooltips(bVal);
}
void UIController::ShowTooltip( unsigned int iPad, unsigned int tooltip, bool show )
@@ -2397,14 +2379,14 @@ void UIController::ShowTooltip( unsigned int iPad, unsigned int tooltip, bool sh
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
{
group = eUIGroup_Fullscreen;
}
- if(m_groups[static_cast<int>(group)]->getTooltips()) m_groups[static_cast<int>(group)]->getTooltips()->ShowTooltip(tooltip,show);
+ if(m_groups[(int)group]->getTooltips()) m_groups[(int)group]->getTooltips()->ShowTooltip(tooltip,show);
}
void UIController::SetTooltips( unsigned int iPad, int iA, int iB, int iX, int iY, int iLT, int iRT, int iLB, int iRB, int iLS, int iRS, int iBack, bool forceUpdate)
@@ -2426,14 +2408,14 @@ void UIController::SetTooltips( unsigned int iPad, int iA, int iB, int iX, int i
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
{
group = eUIGroup_Fullscreen;
}
- if(m_groups[static_cast<int>(group)]->getTooltips()) m_groups[static_cast<int>(group)]->getTooltips()->SetTooltips(iA, iB, iX, iY, iLT, iRT, iLB, iRB, iLS, iRS, iBack, forceUpdate);
+ if(m_groups[(int)group]->getTooltips()) m_groups[(int)group]->getTooltips()->SetTooltips(iA, iB, iX, iY, iLT, iRT, iLB, iRB, iLS, iRS, iBack, forceUpdate);
}
void UIController::EnableTooltip( unsigned int iPad, unsigned int tooltip, bool enable )
@@ -2442,14 +2424,14 @@ void UIController::EnableTooltip( unsigned int iPad, unsigned int tooltip, bool
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
{
group = eUIGroup_Fullscreen;
}
- if(m_groups[static_cast<int>(group)]->getTooltips()) m_groups[static_cast<int>(group)]->getTooltips()->EnableTooltip(tooltip,enable);
+ if(m_groups[(int)group]->getTooltips()) m_groups[(int)group]->getTooltips()->EnableTooltip(tooltip,enable);
}
void UIController::RefreshTooltips(unsigned int iPad)
@@ -2468,7 +2450,7 @@ void UIController::AnimateKeyPress(int iPad, int iAction, bool bRepeat, bool bPr
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
@@ -2476,7 +2458,7 @@ void UIController::AnimateKeyPress(int iPad, int iAction, bool bRepeat, bool bPr
group = eUIGroup_Fullscreen;
}
bool handled = false;
- if(m_groups[static_cast<int>(group)]->getTooltips()) m_groups[static_cast<int>(group)]->getTooltips()->handleInput(iPad, iAction, bRepeat, bPressed, bReleased, handled);
+ if(m_groups[(int)group]->getTooltips()) m_groups[(int)group]->getTooltips()->handleInput(iPad, iAction, bRepeat, bPressed, bReleased, handled);
}
void UIController::OverrideSFX(int iPad, int iAction,bool bVal)
@@ -2486,7 +2468,7 @@ void UIController::OverrideSFX(int iPad, int iAction,bool bVal)
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
@@ -2494,7 +2476,7 @@ void UIController::OverrideSFX(int iPad, int iAction,bool bVal)
group = eUIGroup_Fullscreen;
}
bool handled = false;
- if(m_groups[static_cast<int>(group)]->getTooltips()) m_groups[static_cast<int>(group)]->getTooltips()->overrideSFX(iPad, iAction,bVal);
+ if(m_groups[(int)group]->getTooltips()) m_groups[(int)group]->getTooltips()->overrideSFX(iPad, iAction,bVal);
}
void UIController::PlayUISFX(ESoundEffect eSound)
@@ -2522,13 +2504,13 @@ void UIController::DisplayGamertag(unsigned int iPad, bool show)
{
show = false;
}
- EUIGroup group = static_cast<EUIGroup>(iPad + 1);
- if(m_groups[static_cast<int>(group)]->getHUD()) m_groups[static_cast<int>(group)]->getHUD()->ShowDisplayName(show);
+ EUIGroup group = (EUIGroup)(iPad+1);
+ if(m_groups[(int)group]->getHUD()) m_groups[(int)group]->getHUD()->ShowDisplayName(show);
// Update TutorialPopup in Splitscreen if no container is displayed (to make sure the Popup does not overlap with the Gamertag!)
- if(app.GetLocalPlayerCount() > 1 && m_groups[static_cast<int>(group)]->getTutorialPopup() && !m_groups[static_cast<int>(group)]->IsContainerMenuDisplayed())
+ if(app.GetLocalPlayerCount() > 1 && m_groups[(int)group]->getTutorialPopup() && !m_groups[(int)group]->IsContainerMenuDisplayed())
{
- m_groups[static_cast<int>(group)]->getTutorialPopup()->UpdateTutorialPopup();
+ m_groups[(int)group]->getTutorialPopup()->UpdateTutorialPopup();
}
}
@@ -2539,7 +2521,7 @@ void UIController::SetSelectedItem(unsigned int iPad, const wstring &name)
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
@@ -2547,7 +2529,7 @@ void UIController::SetSelectedItem(unsigned int iPad, const wstring &name)
group = eUIGroup_Fullscreen;
}
bool handled = false;
- if(m_groups[static_cast<int>(group)]->getHUD()) m_groups[static_cast<int>(group)]->getHUD()->SetSelectedLabel(name);
+ if(m_groups[(int)group]->getHUD()) m_groups[(int)group]->getHUD()->SetSelectedLabel(name);
}
void UIController::UpdateSelectedItemPos(unsigned int iPad)
@@ -2600,10 +2582,10 @@ void UIController::HandleInventoryUpdated(int iPad)
EUIGroup group = eUIGroup_Fullscreen;
if( app.GetGameStarted() && ( iPad != 255 ) && ( iPad >= 0 ) )
{
- group = static_cast<EUIGroup>(iPad + 1);
+ group = (EUIGroup)(iPad+1);
}
- m_groups[group]->HandleMessage(eUIMessage_InventoryUpdated, nullptr);
+ m_groups[group]->HandleMessage(eUIMessage_InventoryUpdated, NULL);
}
void UIController::HandleGameTick()
@@ -2622,14 +2604,14 @@ void UIController::SetTutorial(int iPad, Tutorial *tutorial)
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
{
group = eUIGroup_Fullscreen;
}
- if(m_groups[static_cast<int>(group)]->getTutorialPopup()) m_groups[static_cast<int>(group)]->getTutorialPopup()->SetTutorial(tutorial);
+ if(m_groups[(int)group]->getTutorialPopup()) m_groups[(int)group]->getTutorialPopup()->SetTutorial(tutorial);
}
void UIController::SetTutorialDescription(int iPad, TutorialPopupInfo *info)
@@ -2638,7 +2620,7 @@ void UIController::SetTutorialDescription(int iPad, TutorialPopupInfo *info)
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
@@ -2646,11 +2628,11 @@ void UIController::SetTutorialDescription(int iPad, TutorialPopupInfo *info)
group = eUIGroup_Fullscreen;
}
- if(m_groups[static_cast<int>(group)]->getTutorialPopup())
+ if(m_groups[(int)group]->getTutorialPopup())
{
// tutorial popup needs to know if a container menu is being displayed
- m_groups[static_cast<int>(group)]->getTutorialPopup()->SetContainerMenuVisible(m_groups[static_cast<int>(group)]->IsContainerMenuDisplayed());
- m_groups[static_cast<int>(group)]->getTutorialPopup()->SetTutorialDescription(info);
+ m_groups[(int)group]->getTutorialPopup()->SetContainerMenuVisible(m_groups[(int)group]->IsContainerMenuDisplayed());
+ m_groups[(int)group]->getTutorialPopup()->SetTutorialDescription(info);
}
}
@@ -2658,9 +2640,9 @@ void UIController::SetTutorialDescription(int iPad, TutorialPopupInfo *info)
void UIController::RemoveInteractSceneReference(int iPad, UIScene *scene)
{
EUIGroup group;
- if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
- if(m_groups[static_cast<int>(group)]->getTutorialPopup()) m_groups[static_cast<int>(group)]->getTutorialPopup()->RemoveInteractSceneReference(scene);
+ if(m_groups[(int)group]->getTutorialPopup()) m_groups[(int)group]->getTutorialPopup()->RemoveInteractSceneReference(scene);
}
#endif
@@ -2670,14 +2652,14 @@ void UIController::SetTutorialVisible(int iPad, bool visible)
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
{
group = eUIGroup_Fullscreen;
}
- if(m_groups[static_cast<int>(group)]->getTutorialPopup()) m_groups[static_cast<int>(group)]->getTutorialPopup()->SetVisible(visible);
+ if(m_groups[(int)group]->getTutorialPopup()) m_groups[(int)group]->getTutorialPopup()->SetVisible(visible);
}
bool UIController::IsTutorialVisible(int iPad)
@@ -2686,7 +2668,7 @@ bool UIController::IsTutorialVisible(int iPad)
if( app.GetGameStarted() )
{
// If the game isn't running treat as user 0, otherwise map index directly from pad
- if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = static_cast<EUIGroup>(iPad + 1);
+ if( ( iPad != 255 ) && ( iPad >= 0 ) ) group = (EUIGroup)(iPad+1);
else group = eUIGroup_Fullscreen;
}
else
@@ -2694,7 +2676,7 @@ bool UIController::IsTutorialVisible(int iPad)
group = eUIGroup_Fullscreen;
}
bool visible = false;
- if(m_groups[static_cast<int>(group)]->getTutorialPopup()) visible = m_groups[static_cast<int>(group)]->getTutorialPopup()->IsVisible();
+ if(m_groups[(int)group]->getTutorialPopup()) visible = m_groups[(int)group]->getTutorialPopup()->IsVisible();
return visible;
}
@@ -2704,7 +2686,7 @@ void UIController::UpdatePlayerBasePositions()
for( BYTE idx = 0; idx < XUSER_MAX_COUNT; ++idx)
{
- if(pMinecraft->localplayers[idx] != nullptr)
+ if(pMinecraft->localplayers[idx] != NULL)
{
if(pMinecraft->localplayers[idx]->m_iScreenSection==C4JRender::VIEWPORT_TYPE_FULLSCREEN)
{
@@ -2714,7 +2696,7 @@ void UIController::UpdatePlayerBasePositions()
{
DisplayGamertag(idx,true);
}
- m_groups[idx+1]->SetViewportType(static_cast<C4JRender::eViewportType>(pMinecraft->localplayers[idx]->m_iScreenSection));
+ m_groups[idx+1]->SetViewportType((C4JRender::eViewportType)pMinecraft->localplayers[idx]->m_iScreenSection);
}
else
{
@@ -2747,7 +2729,7 @@ void UIController::ShowOtherPlayersBaseScene(unsigned int iPad, bool show)
void UIController::ShowTrialTimer(bool show)
{
- if(m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()) m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()->showTrialTimer(show);
+ if(m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()) m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()->showTrialTimer(show);
}
void UIController::SetTrialTimerLimitSecs(unsigned int uiSeconds)
@@ -2759,7 +2741,7 @@ void UIController::UpdateTrialTimer(unsigned int iPad)
{
WCHAR wcTime[20];
- DWORD dwTimeTicks=static_cast<DWORD>(app.getTrialTimer());
+ DWORD dwTimeTicks=(DWORD)app.getTrialTimer();
if(dwTimeTicks>m_dwTrialTimerLimitSecs)
{
@@ -2778,11 +2760,11 @@ void UIController::UpdateTrialTimer(unsigned int iPad)
int iMins=dwTimeTicks/60;
int iSeconds=dwTimeTicks%60;
swprintf( wcTime, 20, L"%d:%02d",iMins,iSeconds);
- if(m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()) m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()->setTrialTimer(wcTime);
+ if(m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()) m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()->setTrialTimer(wcTime);
}
else
{
- if(m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()) m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()->setTrialTimer(L"");
+ if(m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()) m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()->setTrialTimer(L"");
}
// are we out of time?
@@ -2792,7 +2774,7 @@ void UIController::UpdateTrialTimer(unsigned int iPad)
// bring up the pause menu to stop the trial over message box being called again?
if(!ui.GetMenuDisplayed( iPad ) )
{
- ui.NavigateToScene(iPad, eUIScene_PauseMenu, nullptr, eUILayer_Scene);
+ ui.NavigateToScene(iPad, eUIScene_PauseMenu, NULL, eUILayer_Scene);
app.SetAction(iPad,eAppAction_TrialOver);
}
@@ -2801,7 +2783,7 @@ void UIController::UpdateTrialTimer(unsigned int iPad)
void UIController::ReduceTrialTimerValue()
{
- DWORD dwTimeTicks=static_cast<int>(app.getTrialTimer());
+ DWORD dwTimeTicks=(int)app.getTrialTimer();
if(dwTimeTicks>m_dwTrialTimerLimitSecs)
{
@@ -2813,7 +2795,7 @@ void UIController::ReduceTrialTimerValue()
void UIController::ShowAutosaveCountdownTimer(bool show)
{
- if(m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()) m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()->showTrialTimer(show);
+ if(m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()) m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()->showTrialTimer(show);
}
void UIController::UpdateAutosaveCountdownTimer(unsigned int uiSeconds)
@@ -2821,7 +2803,7 @@ void UIController::UpdateAutosaveCountdownTimer(unsigned int uiSeconds)
#if !(defined(_XBOX_ONE) || defined(__ORBIS__))
WCHAR wcAutosaveCountdown[100];
swprintf( wcAutosaveCountdown, 100, app.GetString(IDS_AUTOSAVE_COUNTDOWN),uiSeconds);
- if(m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()) m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()->setTrialTimer(wcAutosaveCountdown);
+ if(m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()) m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()->setTrialTimer(wcAutosaveCountdown);
#endif
}
@@ -2838,12 +2820,12 @@ void UIController::ShowSavingMessage(unsigned int iPad, C4JStorage::ESavingMessa
show = true;
break;
}
- if(m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()) m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()->showSaveIcon(show);
+ if(m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()) m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()->showSaveIcon(show);
}
void UIController::ShowPlayerDisplayname(bool show)
{
- if(m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()) m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()->showPlayerDisplayName(show);
+ if(m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()) m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()->showPlayerDisplayName(show);
}
void UIController::SetWinUserIndex(unsigned int iPad)
@@ -2862,12 +2844,12 @@ void UIController::ShowUIDebugConsole(bool show)
if(show)
{
- m_uiDebugConsole = static_cast<UIComponent_DebugUIConsole *>(m_groups[eUIGroup_Fullscreen]->addComponent(0, eUIComponent_DebugUIConsole, eUILayer_Debug));
+ m_uiDebugConsole = (UIComponent_DebugUIConsole *)m_groups[eUIGroup_Fullscreen]->addComponent(0, eUIComponent_DebugUIConsole, eUILayer_Debug);
}
else
{
m_groups[eUIGroup_Fullscreen]->removeComponent(eUIComponent_DebugUIConsole, eUILayer_Debug);
- m_uiDebugConsole = nullptr;
+ m_uiDebugConsole = NULL;
}
#endif
}
@@ -2878,12 +2860,12 @@ void UIController::ShowUIDebugMarketingGuide(bool show)
if(show)
{
- m_uiDebugMarketingGuide = static_cast<UIComponent_DebugUIMarketingGuide *>(m_groups[eUIGroup_Fullscreen]->addComponent(0, eUIComponent_DebugUIMarketingGuide, eUILayer_Debug));
+ m_uiDebugMarketingGuide = (UIComponent_DebugUIMarketingGuide *)m_groups[eUIGroup_Fullscreen]->addComponent(0, eUIComponent_DebugUIMarketingGuide, eUILayer_Debug);
}
else
{
m_groups[eUIGroup_Fullscreen]->removeComponent(eUIComponent_DebugUIMarketingGuide, eUILayer_Debug);
- m_uiDebugMarketingGuide = nullptr;
+ m_uiDebugMarketingGuide = NULL;
}
#endif
}
@@ -2901,13 +2883,13 @@ bool UIController::PressStartPlaying(unsigned int iPad)
void UIController::ShowPressStart(unsigned int iPad)
{
m_iPressStartQuadrantsMask|=1<<iPad;
- if(m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()) m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()->showPressStart(iPad, true);
+ if(m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()) m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()->showPressStart(iPad, true);
}
void UIController::HidePressStart()
{
ClearPressStart();
- if(m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()) m_groups[static_cast<int>(eUIGroup_Fullscreen)]->getPressStartToPlay()->showPressStart(0, false);
+ if(m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()) m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()->showPressStart(0, false);
}
void UIController::ClearPressStart()
@@ -2970,7 +2952,7 @@ C4JStorage::EMessageResult UIController::RequestMessageBox(UINT uiTitle, UINT ui
}
}
-C4JStorage::EMessageResult UIController::RequestUGCMessageBox(UINT title/* = -1 */, UINT message/* = -1 */, int iPad/* = -1*/, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)/* = nullptr*/, LPVOID lpParam/* = nullptr*/)
+C4JStorage::EMessageResult UIController::RequestUGCMessageBox(UINT title/* = -1 */, UINT message/* = -1 */, int iPad/* = -1*/, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)/* = NULL*/, LPVOID lpParam/* = NULL*/)
{
// Default title / messages
if (title == -1)
@@ -3002,7 +2984,7 @@ C4JStorage::EMessageResult UIController::RequestUGCMessageBox(UINT title/* = -1
#endif
}
-C4JStorage::EMessageResult UIController::RequestContentRestrictedMessageBox(UINT title/* = -1 */, UINT message/* = -1 */, int iPad/* = -1*/, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)/* = nullptr*/, LPVOID lpParam/* = nullptr*/)
+C4JStorage::EMessageResult UIController::RequestContentRestrictedMessageBox(UINT title/* = -1 */, UINT message/* = -1 */, int iPad/* = -1*/, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)/* = NULL*/, LPVOID lpParam/* = NULL*/)
{
// Default title / messages
if (title == -1)
@@ -3040,7 +3022,7 @@ C4JStorage::EMessageResult UIController::RequestContentRestrictedMessageBox(UINT
void UIController::setFontCachingCalculationBuffer(int length)
{
/* 4J-JEV: As described in an email from Sean.
- If your `optional_temp_buffer` is nullptr, Iggy will allocate the temp
+ If your `optional_temp_buffer` is NULL, Iggy will allocate the temp
buffer on the stack during Iggy draw calls. The size of the buffer it
will allocate is 16 bytes times `max_chars` in 32-bit, and 24 bytes
times `max_chars` in 64-bit. If the stack of the thread making the
@@ -3053,10 +3035,10 @@ void UIController::setFontCachingCalculationBuffer(int length)
static const int CHAR_SIZE = 16;
#endif
- if (m_tempBuffer != nullptr) delete [] m_tempBuffer;
+ if (m_tempBuffer != NULL) delete [] m_tempBuffer;
if (length<0)
{
- if (m_defaultBuffer == nullptr) m_defaultBuffer = new char[CHAR_SIZE*5000];
+ if (m_defaultBuffer == NULL) m_defaultBuffer = new char[CHAR_SIZE*5000];
IggySetFontCachingCalculationBuffer(5000, m_defaultBuffer, CHAR_SIZE*5000);
}
else
@@ -3066,16 +3048,16 @@ void UIController::setFontCachingCalculationBuffer(int length)
}
}
-// Returns the first scene of given type if it exists, nullptr otherwise
+// Returns the first scene of given type if it exists, NULL otherwise
UIScene *UIController::FindScene(EUIScene sceneType)
{
- UIScene *pScene = nullptr;
+ UIScene *pScene = NULL;
for (int i = 0; i < eUIGroup_COUNT; i++)
{
pScene = m_groups[i]->FindScene(sceneType);
#ifdef __PS3__
- if (pScene != nullptr) return pScene;
+ if (pScene != NULL) return pScene;
#else
if (pScene != nullptr) return pScene;
#endif
@@ -3241,7 +3223,7 @@ bool UIController::TouchBoxHit(UIScene *pUIScene,S32 x, S32 y)
}
//app.DebugPrintf("MISS at x = %i y = %i\n", (int)x, (int)y);
- m_HighlightedUIElement = nullptr;
+ m_HighlightedUIElement = NULL;
return false;
}
diff --git a/Minecraft.Client/Common/UI/UIController.h b/Minecraft.Client/Common/UI/UIController.h
index f6d0e87d..5b897b13 100644
--- a/Minecraft.Client/Common/UI/UIController.h
+++ b/Minecraft.Client/Common/UI/UIController.h
@@ -293,7 +293,7 @@ protected:
static GDrawTexture * RADLINK TextureSubstitutionCreateCallback( void * user_callback_data , IggyUTF16 * texture_name , S32 * width , S32 * height , void **destroy_callback_data );
static void RADLINK TextureSubstitutionDestroyCallback( void * user_callback_data , void * destroy_callback_data , GDrawTexture * handle );
- virtual GDrawTexture *getSubstitutionTexture(int textureId) { return nullptr; }
+ virtual GDrawTexture *getSubstitutionTexture(int textureId) { return NULL; }
virtual void destroySubstitutionTexture(void *destroyCallBackData, GDrawTexture *handle) {}
public:
@@ -302,7 +302,7 @@ public:
public:
// NAVIGATION
- bool NavigateToScene(int iPad, EUIScene scene, void *initData = nullptr, EUILayer layer = eUILayer_Scene, EUIGroup group = eUIGroup_PAD);
+ bool NavigateToScene(int iPad, EUIScene scene, void *initData = NULL, EUILayer layer = eUILayer_Scene, EUIGroup group = eUIGroup_PAD);
bool NavigateBack(int iPad, bool forceUsePad = false, EUIScene eScene = eUIScene_COUNT, EUILayer eLayer = eUILayer_COUNT);
void NavigateToHomeMenu();
UIScene *GetTopScene(int iPad, EUILayer layer = eUILayer_Scene, EUIGroup group = eUIGroup_PAD);
@@ -382,14 +382,14 @@ public:
virtual void HidePressStart();
void ClearPressStart();
- virtual C4JStorage::EMessageResult RequestAlertMessage(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad=XUSER_INDEX_ANY, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)=nullptr,LPVOID lpParam=nullptr, WCHAR *pwchFormatString=nullptr);
- virtual C4JStorage::EMessageResult RequestErrorMessage(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad=XUSER_INDEX_ANY, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)=nullptr,LPVOID lpParam=nullptr, WCHAR *pwchFormatString=nullptr);
+ virtual C4JStorage::EMessageResult RequestAlertMessage(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad=XUSER_INDEX_ANY, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)=NULL,LPVOID lpParam=NULL, WCHAR *pwchFormatString=NULL);
+ virtual C4JStorage::EMessageResult RequestErrorMessage(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad=XUSER_INDEX_ANY, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult)=NULL,LPVOID lpParam=NULL, WCHAR *pwchFormatString=NULL);
private:
virtual C4JStorage::EMessageResult RequestMessageBox(UINT uiTitle, UINT uiText, UINT *uiOptionA,UINT uiOptionC, DWORD dwPad,int( *Func)(LPVOID,int,const C4JStorage::EMessageResult),LPVOID lpParam, WCHAR *pwchFormatString,DWORD dwFocusButton, bool bIsError);
public:
- C4JStorage::EMessageResult RequestUGCMessageBox(UINT title = -1, UINT message = -1, int iPad = -1, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult) = nullptr, LPVOID lpParam = nullptr);
- C4JStorage::EMessageResult RequestContentRestrictedMessageBox(UINT title = -1, UINT message = -1, int iPad = -1, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult) = nullptr, LPVOID lpParam = nullptr);
+ C4JStorage::EMessageResult RequestUGCMessageBox(UINT title = -1, UINT message = -1, int iPad = -1, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult) = NULL, LPVOID lpParam = NULL);
+ C4JStorage::EMessageResult RequestContentRestrictedMessageBox(UINT title = -1, UINT message = -1, int iPad = -1, int( *Func)(LPVOID,int,const C4JStorage::EMessageResult) = NULL, LPVOID lpParam = NULL);
virtual void SetWinUserIndex(unsigned int iPad);
unsigned int GetWinUserIndex();
diff --git a/Minecraft.Client/Common/UI/UIFontData.cpp b/Minecraft.Client/Common/UI/UIFontData.cpp
index 715d08dd..c5ad46ef 100644
--- a/Minecraft.Client/Common/UI/UIFontData.cpp
+++ b/Minecraft.Client/Common/UI/UIFontData.cpp
@@ -145,9 +145,9 @@ CFontData::CFontData()
{
m_unicodeMap = unordered_map<unsigned int, unsigned short>();
- m_sFontData = nullptr;
- m_kerningTable = nullptr;
- m_pbRawImage = nullptr;
+ m_sFontData = NULL;
+ m_kerningTable = NULL;
+ m_pbRawImage = NULL;
}
CFontData::CFontData(SFontData &sFontData, int *pbRawImage)
diff --git a/Minecraft.Client/Common/UI/UIGroup.cpp b/Minecraft.Client/Common/UI/UIGroup.cpp
index baccc17f..79d3c38f 100644
--- a/Minecraft.Client/Common/UI/UIGroup.cpp
+++ b/Minecraft.Client/Common/UI/UIGroup.cpp
@@ -1,8 +1,6 @@
#include "stdafx.h"
#include "UIGroup.h"
-#include "UI.h"
-
UIGroup::UIGroup(EUIGroup group, int iPad)
{
m_group = group;
@@ -25,22 +23,22 @@ UIGroup::UIGroup(EUIGroup group, int iPad)
#endif
}
- m_tooltips = (UIComponent_Tooltips *)m_layers[static_cast<int>(eUILayer_Tooltips)]->addComponent(0, eUIComponent_Tooltips);
+ m_tooltips = (UIComponent_Tooltips *)m_layers[(int)eUILayer_Tooltips]->addComponent(0, eUIComponent_Tooltips);
- m_tutorialPopup = nullptr;
- m_hud = nullptr;
- m_pressStartToPlay = nullptr;
+ m_tutorialPopup = NULL;
+ m_hud = NULL;
+ m_pressStartToPlay = NULL;
if(m_group != eUIGroup_Fullscreen)
{
- m_tutorialPopup = (UIComponent_TutorialPopup *)m_layers[static_cast<int>(eUILayer_Popup)]->addComponent(m_iPad, eUIComponent_TutorialPopup);
+ m_tutorialPopup = (UIComponent_TutorialPopup *)m_layers[(int)eUILayer_Popup]->addComponent(m_iPad, eUIComponent_TutorialPopup);
- m_hud = (UIScene_HUD *)m_layers[static_cast<int>(eUILayer_HUD)]->addComponent(m_iPad, eUIScene_HUD);
+ m_hud = (UIScene_HUD *)m_layers[(int)eUILayer_HUD]->addComponent(m_iPad, eUIScene_HUD);
//m_layers[(int)eUILayer_Chat]->addComponent(m_iPad, eUIComponent_Chat);
}
else
{
- m_pressStartToPlay = (UIComponent_PressStartToPlay *)m_layers[static_cast<int>(eUILayer_Tooltips)]->addComponent(0, eUIComponent_PressStartToPlay);
+ m_pressStartToPlay = (UIComponent_PressStartToPlay *)m_layers[(int)eUILayer_Tooltips]->addComponent(0, eUIComponent_PressStartToPlay);
}
// 4J Stu - Pre-allocate this for cached rendering in scenes. It's horribly slow to do dynamically, but we should only need one
@@ -67,7 +65,7 @@ void UIGroup::ReloadAll()
if(highestRenderable < eUILayer_Fullscreen) highestRenderable = eUILayer_Fullscreen;
for(; highestRenderable >= 0; --highestRenderable)
{
- if(highestRenderable < eUILayer_COUNT) m_layers[highestRenderable]->ReloadAll(highestRenderable != static_cast<int>(eUILayer_Fullscreen));
+ if(highestRenderable < eUILayer_COUNT) m_layers[highestRenderable]->ReloadAll(highestRenderable != (int)eUILayer_Fullscreen);
}
}
@@ -129,7 +127,7 @@ void UIGroup::getRenderDimensions(S32 &width, S32 &height)
// NAVIGATION
bool UIGroup::NavigateToScene(int iPad, EUIScene scene, void *initData, EUILayer layer)
{
- bool succeeded = m_layers[static_cast<int>(layer)]->NavigateToScene(iPad, scene, initData);
+ bool succeeded = m_layers[(int)layer]->NavigateToScene(iPad, scene, initData);
updateStackStates();
return succeeded;
}
@@ -153,9 +151,9 @@ void UIGroup::closeAllScenes()
Minecraft *pMinecraft = Minecraft::GetInstance();
if( m_iPad >= 0 )
{
- if(pMinecraft != nullptr && pMinecraft->localgameModes[m_iPad] != nullptr )
+ if(pMinecraft != NULL && pMinecraft->localgameModes[m_iPad] != NULL )
{
- TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[m_iPad]);
+ TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[m_iPad];
// This just allows it to be shown
gameMode->getTutorial()->showTutorialPopup(true);
@@ -165,14 +163,14 @@ void UIGroup::closeAllScenes()
for(unsigned int i = 0; i < eUILayer_COUNT; ++i)
{
// Ignore the error layer
- if(i != static_cast<int>(eUILayer_Error)) m_layers[i]->closeAllScenes();
+ if(i != (int)eUILayer_Error) m_layers[i]->closeAllScenes();
}
updateStackStates();
}
UIScene *UIGroup::GetTopScene(EUILayer layer)
{
- return m_layers[static_cast<int>(layer)]->GetTopScene();
+ return m_layers[(int)layer]->GetTopScene();
}
bool UIGroup::GetMenuDisplayed()
@@ -216,10 +214,10 @@ UIScene *UIGroup::getCurrentScene()
{
pScene=m_layers[i]->getCurrentScene();
- if(pScene!=nullptr) return pScene;
+ if(pScene!=NULL) return pScene;
}
- return nullptr;
+ return NULL;
}
#endif
@@ -414,16 +412,16 @@ int UIGroup::getCommandBufferList()
return m_commandBufferList;
}
-// Returns the first scene of given type if it exists, nullptr otherwise
+// Returns the first scene of given type if it exists, NULL otherwise
UIScene *UIGroup::FindScene(EUIScene sceneType)
{
- UIScene *pScene = nullptr;
+ UIScene *pScene = NULL;
for (int i = 0; i < eUILayer_COUNT; i++)
{
pScene = m_layers[i]->FindScene(sceneType);
#ifdef __PS3__
- if (pScene != nullptr) return pScene;
+ if (pScene != NULL) return pScene;
#else
if (pScene != nullptr) return pScene;
#endif
diff --git a/Minecraft.Client/Common/UI/UILayer.cpp b/Minecraft.Client/Common/UI/UILayer.cpp
index bf360c07..2063778b 100644
--- a/Minecraft.Client/Common/UI/UILayer.cpp
+++ b/Minecraft.Client/Common/UI/UILayer.cpp
@@ -102,7 +102,7 @@ void UILayer::render(S32 width, S32 height, C4JRender::eViewportType viewport)
bool UILayer::IsSceneInStack(EUIScene scene)
{
bool inStack = false;
- for(size_t i = (int)m_sceneStack.size() - 1;i >= 0; --i)
+ for(int i = m_sceneStack.size() - 1;i >= 0; --i)
{
if(m_sceneStack[i]->getSceneType() == scene)
{
@@ -118,7 +118,7 @@ bool UILayer::HasFocus(int iPad)
bool hasFocus = false;
if(m_hasFocus)
{
- for(size_t i = (int)m_sceneStack.size() - 1;i >= 0; --i)
+ for(int i = m_sceneStack.size() - 1;i >= 0; --i)
{
if(m_sceneStack[i]->stealsFocus() )
{
@@ -146,7 +146,7 @@ bool UILayer::hidesLowerScenes()
}
if(!hidesScenes && !m_sceneStack.empty())
{
- for(size_t i = (int)m_sceneStack.size() - 1;i >= 0; --i)
+ for(int i = m_sceneStack.size() - 1;i >= 0; --i)
{
if(m_sceneStack[i]->hidesLowerScenes())
{
@@ -197,7 +197,7 @@ bool UILayer::GetMenuDisplayed()
bool UILayer::NavigateToScene(int iPad, EUIScene scene, void *initData)
{
- UIScene *newScene = nullptr;
+ UIScene *newScene = NULL;
switch(scene)
{
// Debug
@@ -424,7 +424,7 @@ bool UILayer::NavigateToScene(int iPad, EUIScene scene, void *initData)
break;
};
- if(newScene == nullptr)
+ if(newScene == NULL)
{
app.DebugPrintf("WARNING: Scene %d was not created. Add it to UILayer::NavigateToScene\n", scene);
return false;
@@ -451,7 +451,7 @@ bool UILayer::NavigateBack(int iPad, EUIScene eScene)
bool navigated = false;
if(eScene < eUIScene_COUNT)
{
- UIScene *scene = nullptr;
+ UIScene *scene = NULL;
do
{
scene = m_sceneStack.back();
@@ -523,9 +523,9 @@ UIScene *UILayer::addComponent(int iPad, EUIScene scene, void *initData)
return itComp;
}
}
- return nullptr;
+ return NULL;
}
- UIScene *newScene = nullptr;
+ UIScene *newScene = NULL;
switch(scene)
{
@@ -573,7 +573,7 @@ UIScene *UILayer::addComponent(int iPad, EUIScene scene, void *initData)
break;
};
- if(newScene == nullptr) return nullptr;
+ if(newScene == NULL) return NULL;
m_components.push_back(newScene);
@@ -661,12 +661,12 @@ void UILayer::closeAllScenes()
}
}
-// Get top scene on stack (or nullptr if stack is empty)
+// Get top scene on stack (or NULL if stack is empty)
UIScene *UILayer::GetTopScene()
{
if(m_sceneStack.size() == 0)
{
- return nullptr;
+ return NULL;
}
else
{
@@ -789,7 +789,7 @@ UIScene *UILayer::getCurrentScene()
}
}
- return nullptr;
+ return NULL;
}
#endif
@@ -894,10 +894,10 @@ void UILayer::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic)
totalDynamic += layerDynamic;
}
-// Returns the first scene of given type if it exists, nullptr otherwise
+// Returns the first scene of given type if it exists, NULL otherwise
UIScene *UILayer::FindScene(EUIScene sceneType)
{
- for (size_t i = 0; i < m_sceneStack.size(); i++)
+ for (int i = 0; i < m_sceneStack.size(); i++)
{
if (m_sceneStack[i]->getSceneType() == sceneType)
{
@@ -905,5 +905,5 @@ UIScene *UILayer::FindScene(EUIScene sceneType)
}
}
- return nullptr;
+ return NULL;
} \ No newline at end of file
diff --git a/Minecraft.Client/Common/UI/UILayer.h b/Minecraft.Client/Common/UI/UILayer.h
index 7f1a0bf5..ec6a1f8a 100644
--- a/Minecraft.Client/Common/UI/UILayer.h
+++ b/Minecraft.Client/Common/UI/UILayer.h
@@ -61,7 +61,7 @@ public:
// E.g. you can keep a component active while performing navigation with other scenes on this layer
void showComponent(int iPad, EUIScene scene, bool show);
bool isComponentVisible(EUIScene scene);
- UIScene *addComponent(int iPad, EUIScene scene, void *initData = nullptr);
+ UIScene *addComponent(int iPad, EUIScene scene, void *initData = NULL);
void removeComponent(EUIScene scene);
// INPUT
diff --git a/Minecraft.Client/Common/UI/UIScene.cpp b/Minecraft.Client/Common/UI/UIScene.cpp
index a714d32e..3f204414 100644
--- a/Minecraft.Client/Common/UI/UIScene.cpp
+++ b/Minecraft.Client/Common/UI/UIScene.cpp
@@ -11,8 +11,8 @@ UIScene::UIScene(int iPad, UILayer *parentLayer)
{
m_parentLayer = parentLayer;
m_iPad = iPad;
- swf = nullptr;
- m_pItemRenderer = nullptr;
+ swf = NULL;
+ m_pItemRenderer = NULL;
bHasFocus = false;
m_hasTickedOnce = false;
@@ -26,7 +26,7 @@ UIScene::UIScene(int iPad, UILayer *parentLayer)
m_lastOpacity = 1.0f;
m_bUpdateOpacity = false;
- m_backScene = nullptr;
+ m_backScene = NULL;
m_cacheSlotRenders = false;
m_needsCacheRendered = true;
@@ -49,14 +49,14 @@ UIScene::~UIScene()
ui.UnregisterCallbackId(m_callbackUniqueId);
}
- if(m_pItemRenderer != nullptr) delete m_pItemRenderer;
+ if(m_pItemRenderer != NULL) delete m_pItemRenderer;
}
void UIScene::destroyMovie()
{
/* Destroy the Iggy player. */
IggyPlayerDestroy( swf );
- swf = nullptr;
+ swf = NULL;
// Clear out the controls collection (doesn't delete the controls, and they get re-setup later)
m_controls.clear();
@@ -115,7 +115,7 @@ bool UIScene::needsReloaded()
bool UIScene::hasMovie()
{
- return swf != nullptr;
+ return swf != NULL;
}
F64 UIScene::getSafeZoneHalfHeight()
@@ -330,7 +330,7 @@ void UIScene::loadMovie()
byteArray baFile = ui.getMovieData(moviePath.c_str());
int64_t beforeLoad = ui.iggyAllocCount;
- swf = IggyPlayerCreateFromMemory ( baFile.data , baFile.length, nullptr);
+ swf = IggyPlayerCreateFromMemory ( baFile.data , baFile.length, NULL);
int64_t afterLoad = ui.iggyAllocCount;
IggyPlayerInitializeAndTickRS ( swf );
int64_t afterTick = ui.iggyAllocCount;
@@ -365,7 +365,7 @@ void UIScene::loadMovie()
int64_t totalStatic = 0;
int64_t totalDynamic = 0;
while(res = IggyDebugGetMemoryUseInfo ( swf ,
- nullptr ,
+ NULL ,
0 ,
0 ,
iteration ,
@@ -389,22 +389,21 @@ void UIScene::loadMovie()
void UIScene::getDebugMemoryUseRecursive(const wstring &moviePath, IggyMemoryUseInfo &memoryInfo)
{
- rrbool res;
- IggyMemoryUseInfo internalMemoryInfo;
- int internalIteration = 0;
- while (res = IggyDebugGetMemoryUseInfo(swf,
- 0,
- memoryInfo.subcategory,
- memoryInfo.subcategory_stringlen,
- internalIteration,
- &internalMemoryInfo))
- {
- app.DebugPrintf(app.USER_SR, "%ls - %.*s static: %d ( %d ) dynamic: %d ( %d )\n", moviePath.c_str(), internalMemoryInfo.subcategory_stringlen, internalMemoryInfo.subcategory,
- internalMemoryInfo.static_allocation_bytes, internalMemoryInfo.static_allocation_count, internalMemoryInfo.dynamic_allocation_bytes, internalMemoryInfo.dynamic_allocation_count);
- ++internalIteration;
- if (internalMemoryInfo.subcategory_stringlen > memoryInfo.subcategory_stringlen)
- getDebugMemoryUseRecursive(moviePath, internalMemoryInfo);
- }
+ rrbool res;
+ IggyMemoryUseInfo internalMemoryInfo;
+ int internalIteration = 0;
+ while(res = IggyDebugGetMemoryUseInfo ( swf ,
+ NULL ,
+ memoryInfo.subcategory ,
+ memoryInfo.subcategory_stringlen ,
+ internalIteration ,
+ &internalMemoryInfo ))
+ {
+ app.DebugPrintf(app.USER_SR, "%ls - %.*s static: %d ( %d ) dynamic: %d ( %d )\n", moviePath.c_str(), internalMemoryInfo.subcategory_stringlen, internalMemoryInfo.subcategory,
+ internalMemoryInfo.static_allocation_bytes, internalMemoryInfo.static_allocation_count, internalMemoryInfo.dynamic_allocation_bytes, internalMemoryInfo.dynamic_allocation_count);
+ ++internalIteration;
+ if(internalMemoryInfo.subcategory_stringlen > memoryInfo.subcategory_stringlen) getDebugMemoryUseRecursive(moviePath, internalMemoryInfo);
+ }
}
void UIScene::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic)
@@ -417,7 +416,7 @@ void UIScene::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic)
int64_t sceneStatic = 0;
int64_t sceneDynamic = 0;
while(res = IggyDebugGetMemoryUseInfo ( swf ,
- 0 ,
+ NULL ,
"" ,
0 ,
iteration ,
@@ -465,7 +464,7 @@ void UIScene::tick()
UIControl* UIScene::GetMainPanel()
{
- return nullptr;
+ return NULL;
}
#ifdef _WINDOWS64
@@ -667,19 +666,19 @@ void UIScene::removeControl( UIControl_Base *control, bool centreScene)
void UIScene::slideLeft()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSlideLeft , 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSlideLeft , 0 , NULL );
}
void UIScene::slideRight()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSlideRight , 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSlideRight , 0 , NULL );
}
void UIScene::doHorizontalResizeCheck()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcHorizontalResizeCheck , 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcHorizontalResizeCheck , 0 , NULL );
}
void UIScene::render(S32 width, S32 height, C4JRender::eViewportType viewport)
@@ -722,7 +721,7 @@ void UIScene::customDraw(IggyCustomDrawCallbackRegion *region)
void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, shared_ptr<ItemInstance> item, float fAlpha, bool isFoil, bool bDecorations)
{
- if (item!= nullptr)
+ if (item!= NULL)
{
if(m_cacheSlotRenders)
{
@@ -850,7 +849,7 @@ void UIScene::_customDrawSlotControl(CustomDrawData *region, int iPad, shared_pt
if (pop > 0)
{
glPushMatrix();
- float squeeze = 1 + pop / static_cast<float>(Inventory::POP_TIME_DURATION);
+ float squeeze = 1 + pop / (float) Inventory::POP_TIME_DURATION;
float sx = x;
float sy = y;
float sxoffs = 8 * scaleX;
@@ -861,7 +860,7 @@ void UIScene::_customDrawSlotControl(CustomDrawData *region, int iPad, shared_pt
}
PIXBeginNamedEvent(0,"Render and decorate");
- if(m_pItemRenderer == nullptr) m_pItemRenderer = new ItemRenderer();
+ if(m_pItemRenderer == NULL) m_pItemRenderer = new ItemRenderer();
RenderManager.StateSetBlendEnable(true);
RenderManager.StateSetBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
RenderManager.StateSetBlendFactor(0xffffffff);
@@ -879,15 +878,15 @@ void UIScene::_customDrawSlotControl(CustomDrawData *region, int iPad, shared_pt
{
glPushMatrix();
glScalef(scaleX, scaleY, 1.0f);
- int iX= static_cast<int>(0.5f + ((float)x) / scaleX);
- int iY= static_cast<int>(0.5f + ((float)y) / scaleY);
+ int iX= (int)(0.5f+((float)x)/scaleX);
+ int iY= (int)(0.5f+((float)y)/scaleY);
m_pItemRenderer->renderGuiItemDecorations(pMinecraft->font, pMinecraft->textures, item, iX, iY, fAlpha);
glPopMatrix();
}
else
{
- m_pItemRenderer->renderGuiItemDecorations(pMinecraft->font, pMinecraft->textures, item, static_cast<int>(x), static_cast<int>(y), fAlpha);
+ m_pItemRenderer->renderGuiItemDecorations(pMinecraft->font, pMinecraft->textures, item, (int)x, (int)y, fAlpha);
}
}
@@ -898,9 +897,9 @@ void UIScene::_customDrawSlotControl(CustomDrawData *region, int iPad, shared_pt
// 4J Stu - Not threadsafe
//void UIScene::navigateForward(int iPad, EUIScene scene, void *initData)
//{
-// if(m_parentLayer == nullptr)
+// if(m_parentLayer == NULL)
// {
-// app.DebugPrintf("A scene is trying to navigate forwards, but it's parent layer is nullptr!\n");
+// app.DebugPrintf("A scene is trying to navigate forwards, but it's parent layer is NULL!\n");
//#ifndef _CONTENT_PACKAGE
// __debugbreak();
//#endif
@@ -918,9 +917,9 @@ void UIScene::navigateBack()
ui.NavigateBack(m_iPad);
- if(m_parentLayer == nullptr)
+ if(m_parentLayer == NULL)
{
-// app.DebugPrintf("A scene is trying to navigate back, but it's parent layer is nullptr!\n");
+// app.DebugPrintf("A scene is trying to navigate back, but it's parent layer is NULL!\n");
#ifndef _CONTENT_PACKAGE
// __debugbreak();
#endif
@@ -1043,7 +1042,7 @@ void UIScene::sendInputToMovie(int key, bool repeat, bool pressed, bool released
IggyEvent keyEvent;
// 4J Stu - Keyloc is always standard as we don't care about shift/alt
- IggyMakeEventKey( &keyEvent, pressed?IGGY_KEYEVENT_Down:IGGY_KEYEVENT_Up, static_cast<IggyKeycode>(iggyKeyCode), IGGY_KEYLOC_Standard );
+ IggyMakeEventKey( &keyEvent, pressed?IGGY_KEYEVENT_Down:IGGY_KEYEVENT_Up, (IggyKeycode)iggyKeyCode, IGGY_KEYLOC_Standard );
IggyEventResult result;
IggyPlayerDispatchEventRS ( swf , &keyEvent , &result );
@@ -1332,8 +1331,8 @@ bool UIScene::hasRegisteredSubstitutionTexture(const wstring &textureName)
void UIScene::_handleFocusChange(F64 controlId, F64 childId)
{
- m_iFocusControl = static_cast<int>(controlId);
- m_iFocusChild = static_cast<int>(childId);
+ m_iFocusControl = (int)controlId;
+ m_iFocusChild = (int)childId;
handleFocusChange(controlId, childId);
ui.PlayUISFX(eSFX_Focus);
@@ -1341,8 +1340,8 @@ void UIScene::_handleFocusChange(F64 controlId, F64 childId)
void UIScene::_handleInitFocus(F64 controlId, F64 childId)
{
- m_iFocusControl = static_cast<int>(controlId);
- m_iFocusChild = static_cast<int>(childId);
+ m_iFocusControl = (int)controlId;
+ m_iFocusChild = (int)childId;
//handleInitFocus(controlId, childId);
handleFocusChange(controlId, childId);
diff --git a/Minecraft.Client/Common/UI/UIScene.h b/Minecraft.Client/Common/UI/UIScene.h
index ca089d39..e45ecdd1 100644
--- a/Minecraft.Client/Common/UI/UIScene.h
+++ b/Minecraft.Client/Common/UI/UIScene.h
@@ -265,7 +265,7 @@ public:
// NAVIGATION
protected:
- //void navigateForward(int iPad, EUIScene scene, void *initData = nullptr);
+ //void navigateForward(int iPad, EUIScene scene, void *initData = NULL);
void navigateBack();
public:
diff --git a/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp
index b8193bac..6b196c1b 100644
--- a/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp
@@ -49,15 +49,15 @@ void UIScene_AbstractContainerMenu::handleDestroy()
#endif
Minecraft *pMinecraft = Minecraft::GetInstance();
- if( pMinecraft->localgameModes[m_iPad] != nullptr )
+ if( pMinecraft->localgameModes[m_iPad] != NULL )
{
- TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[m_iPad]);
- if(gameMode != nullptr) gameMode->getTutorial()->changeTutorialState(m_previousTutorialState);
+ TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[m_iPad];
+ if(gameMode != NULL) gameMode->getTutorial()->changeTutorialState(m_previousTutorialState);
}
// 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst packet loss.
// We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying)
- if(pMinecraft->localplayers[m_iPad] != nullptr && pMinecraft->localplayers[m_iPad]->containerMenu->containerId == m_menu->containerId)
+ if(pMinecraft->localplayers[m_iPad] != NULL && pMinecraft->localplayers[m_iPad]->containerMenu->containerId == m_menu->containerId)
{
pMinecraft->localplayers[m_iPad]->closeContainer();
}
@@ -149,8 +149,8 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex)
m_fPointerMaxX = m_fPanelMaxX + fPointerWidth;
m_fPointerMaxY = m_fPanelMaxY + (fPointerHeight/2);
-// m_hPointerText=nullptr;
-// m_hPointerTextBkg=nullptr;
+// m_hPointerText=NULL;
+// m_hPointerTextBkg=NULL;
// Put the pointer over first item in use row to start with.
UIVec2D itemPos;
@@ -187,8 +187,8 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex)
IggyEvent mouseEvent;
S32 width, height;
m_parentLayer->getRenderDimensions(width, height);
- S32 x = m_pointerPos.x*(static_cast<float>(width)/m_movieWidth);
- S32 y = m_pointerPos.y*(static_cast<float>(height)/m_movieHeight);
+ S32 x = m_pointerPos.x*((float)width/m_movieWidth);
+ S32 y = m_pointerPos.y*((float)height/m_movieHeight);
IggyMakeEventMouseMove( &mouseEvent, x, y);
IggyEventResult result;
@@ -212,8 +212,8 @@ void UIScene_AbstractContainerMenu::tick()
S32 width, height;
m_parentLayer->getRenderDimensions(width, height);
- S32 x = static_cast<S32>(m_pointerPos.x * ((float)width / m_movieWidth));
- S32 y = static_cast<S32>(m_pointerPos.y * ((float)height / m_movieHeight));
+ S32 x = (S32)(m_pointerPos.x * ((float)width / m_movieWidth));
+ S32 y = (S32)(m_pointerPos.y * ((float)height / m_movieHeight));
IggyMakeEventMouseMove( &mouseEvent, x, y);
@@ -254,7 +254,7 @@ void UIScene_AbstractContainerMenu::render(S32 width, S32 height, C4JRender::eVi
void UIScene_AbstractContainerMenu::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;
shared_ptr<ItemInstance> item = nullptr;
int slotId = -1;
@@ -265,7 +265,7 @@ void UIScene_AbstractContainerMenu::customDraw(IggyCustomDrawCallbackRegion *reg
}
else
{
- swscanf(static_cast<wchar_t *>(region->name),L"slot_%d",&slotId);
+ swscanf((wchar_t*)region->name,L"slot_%d",&slotId);
if (slotId == -1)
{
app.DebugPrintf("This is not the control we are looking for\n");
@@ -278,7 +278,7 @@ void UIScene_AbstractContainerMenu::customDraw(IggyCustomDrawCallbackRegion *reg
}
}
- if(item != nullptr) customDrawSlotControl(region,m_iPad,item,m_menu->isValidIngredient(item, slotId)?1.0f:0.5f,item->isFoil(),true);
+ if(item != NULL) customDrawSlotControl(region,m_iPad,item,m_menu->isValidIngredient(item, slotId)?1.0f:0.5f,item->isFoil(),true);
}
void UIScene_AbstractContainerMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled)
@@ -337,7 +337,7 @@ Slot *UIScene_AbstractContainerMenu::getSlot(ESceneSection eSection, int iSlot)
{
Slot *slot = m_menu->getSlot( getSectionStartOffset(eSection) + iSlot );
if(slot) return slot;
- else return nullptr;
+ else return NULL;
}
bool UIScene_AbstractContainerMenu::isSlotEmpty(ESceneSection eSection, int iSlot)
diff --git a/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.h b/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.h
index c6ef29bb..605f5dbd 100644
--- a/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.h
+++ b/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.h
@@ -53,7 +53,7 @@ protected:
virtual bool isSlotEmpty(ESceneSection eSection, int iSlot);
virtual void adjustPointerForSafeZone();
- virtual UIControl *getSection(ESceneSection eSection) { return nullptr; }
+ virtual UIControl *getSection(ESceneSection eSection) { return NULL; }
virtual int GetBaseSlotCount() { return 0; }
public:
diff --git a/Minecraft.Client/Common/UI/UIScene_AnvilMenu.cpp b/Minecraft.Client/Common/UI/UIScene_AnvilMenu.cpp
index a3fb0d2d..4d43a638 100644
--- a/Minecraft.Client/Common/UI/UIScene_AnvilMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_AnvilMenu.cpp
@@ -16,13 +16,13 @@ UIScene_AnvilMenu::UIScene_AnvilMenu(int iPad, void *_initData, UILayer *parentL
m_labelAnvil.init( app.GetString(IDS_REPAIR_AND_NAME) );
- AnvilScreenInput *initData = static_cast<AnvilScreenInput *>(_initData);
+ AnvilScreenInput *initData = (AnvilScreenInput *)_initData;
m_inventory = initData->inventory;
Minecraft *pMinecraft = Minecraft::GetInstance();
- if( pMinecraft->localgameModes[iPad] != nullptr )
+ if( pMinecraft->localgameModes[iPad] != NULL )
{
- TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[iPad]);
+ TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[iPad];
m_previousTutorialState = gameMode->getTutorial()->getCurrentState();
gameMode->getTutorial()->changeTutorialState(e_Tutorial_State_Anvil_Menu, this);
}
@@ -263,7 +263,7 @@ void UIScene_AnvilMenu::setSectionSelectedSlot(ESceneSection eSection, int x, in
int index = (y * cols) + x;
- UIControl_SlotList *slotList = nullptr;
+ UIControl_SlotList *slotList = NULL;
switch( eSection )
{
case eSectionAnvilItem1:
@@ -291,7 +291,7 @@ void UIScene_AnvilMenu::setSectionSelectedSlot(ESceneSection eSection, int x, in
UIControl *UIScene_AnvilMenu::getSection(ESceneSection eSection)
{
- UIControl *control = nullptr;
+ UIControl *control = NULL;
switch( eSection )
{
case eSectionAnvilItem1:
@@ -334,7 +334,7 @@ void UIScene_AnvilMenu::onDirectEditFinished(UIControl_TextInput *input, UIContr
int UIScene_AnvilMenu::KeyboardCompleteCallback(LPVOID lpParam,bool bRes)
{
- UIScene_AnvilMenu *pClass=static_cast<UIScene_AnvilMenu *>(lpParam);
+ UIScene_AnvilMenu *pClass=(UIScene_AnvilMenu *)lpParam;
pClass->setIgnoreInput(false);
if (bRes)
@@ -343,8 +343,8 @@ int UIScene_AnvilMenu::KeyboardCompleteCallback(LPVOID lpParam,bool bRes)
uint16_t pchText[128];
ZeroMemory(pchText, 128 * sizeof(uint16_t));
Win64_GetKeyboardText(pchText, 128);
- pClass->setEditNameValue(reinterpret_cast<wchar_t *>(pchText));
- pClass->m_itemName = reinterpret_cast<wchar_t *>(pchText);
+ pClass->setEditNameValue((wchar_t *)pchText);
+ pClass->m_itemName = (wchar_t *)pchText;
pClass->updateItemName();
#else
uint16_t pchText[128];
@@ -395,7 +395,7 @@ void UIScene_AnvilMenu::handleEditNamePressed()
break;
}
#else
- InputManager.RequestKeyboard(app.GetString(IDS_TITLE_RENAME),m_textInputAnvil.getLabel(),static_cast<DWORD>(m_iPad),30,&UIScene_AnvilMenu::KeyboardCompleteCallback,this,C_4JInput::EKeyboardMode_Default);
+ InputManager.RequestKeyboard(app.GetString(IDS_TITLE_RENAME),m_textInputAnvil.getLabel(),(DWORD)m_iPad,30,&UIScene_AnvilMenu::KeyboardCompleteCallback,this,C_4JInput::EKeyboardMode_Default);
#endif
#endif
}
diff --git a/Minecraft.Client/Common/UI/UIScene_BeaconMenu.cpp b/Minecraft.Client/Common/UI/UIScene_BeaconMenu.cpp
index 64e12373..e70397d6 100644
--- a/Minecraft.Client/Common/UI/UIScene_BeaconMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_BeaconMenu.cpp
@@ -21,12 +21,12 @@ UIScene_BeaconMenu::UIScene_BeaconMenu(int iPad, void *_initData, UILayer *paren
m_buttonsPowers[eControl_Secondary1].setVisible(false);
m_buttonsPowers[eControl_Secondary2].setVisible(false);
- BeaconScreenInput *initData = static_cast<BeaconScreenInput *>(_initData);
+ BeaconScreenInput *initData = (BeaconScreenInput *)_initData;
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_Beacon_Menu, this);
}
@@ -254,7 +254,7 @@ void UIScene_BeaconMenu::setSectionSelectedSlot(ESceneSection eSection, int x, i
int index = (y * cols) + x;
- UIControl_SlotList *slotList = nullptr;
+ UIControl_SlotList *slotList = NULL;
switch( eSection )
{
case eSectionBeaconItem:
@@ -276,7 +276,7 @@ void UIScene_BeaconMenu::setSectionSelectedSlot(ESceneSection eSection, int x, i
UIControl *UIScene_BeaconMenu::getSection(ESceneSection eSection)
{
- UIControl *control = nullptr;
+ UIControl *control = NULL;
switch( eSection )
{
case eSectionBeaconItem:
@@ -324,11 +324,11 @@ UIControl *UIScene_BeaconMenu::getSection(ESceneSection eSection)
void UIScene_BeaconMenu::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;
shared_ptr<ItemInstance> item = nullptr;
int slotId = -1;
- swscanf(static_cast<wchar_t *>(region->name),L"slot_%d",&slotId);
+ swscanf((wchar_t*)region->name,L"slot_%d",&slotId);
if(slotId >= 0 && slotId >= m_menu->getSize() )
{
@@ -336,22 +336,22 @@ void UIScene_BeaconMenu::customDraw(IggyCustomDrawCallbackRegion *region)
switch(icon)
{
case 0:
- item = std::make_shared<ItemInstance>(Item::emerald);
+ item = shared_ptr<ItemInstance>(new ItemInstance(Item::emerald) );
break;
case 1:
- item = std::make_shared<ItemInstance>(Item::diamond);
+ item = shared_ptr<ItemInstance>(new ItemInstance(Item::diamond) );
break;
case 2:
- item = std::make_shared<ItemInstance>(Item::goldIngot);
+ item = shared_ptr<ItemInstance>(new ItemInstance(Item::goldIngot) );
break;
case 3:
- item = std::make_shared<ItemInstance>(Item::ironIngot);
+ item = shared_ptr<ItemInstance>(new ItemInstance(Item::ironIngot) );
break;
default:
assert(false);
break;
};
- if(item != nullptr) customDrawSlotControl(region,m_iPad,item,1.0f,item->isFoil(),true);
+ if(item != NULL) customDrawSlotControl(region,m_iPad,item,1.0f,item->isFoil(),true);
}
else
{
diff --git a/Minecraft.Client/Common/UI/UIScene_BrewingStandMenu.cpp b/Minecraft.Client/Common/UI/UIScene_BrewingStandMenu.cpp
index 129868fd..8563054c 100644
--- a/Minecraft.Client/Common/UI/UIScene_BrewingStandMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_BrewingStandMenu.cpp
@@ -14,15 +14,15 @@ UIScene_BrewingStandMenu::UIScene_BrewingStandMenu(int iPad, void *_initData, UI
m_progressBrewingArrow.init(L"",0,0,PotionBrewing::BREWING_TIME_SECONDS * SharedConstants::TICKS_PER_SECOND,0);
m_progressBrewingBubbles.init(L"",0,0,30,0);
- BrewingScreenInput *initData = static_cast<BrewingScreenInput *>(_initData);
+ BrewingScreenInput *initData = (BrewingScreenInput *)_initData;
m_brewingStand = initData->brewingStand;
m_labelBrewingStand.init( m_brewingStand->getName() );
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_Brewing_Menu, this);
}
@@ -249,7 +249,7 @@ void UIScene_BrewingStandMenu::setSectionSelectedSlot(ESceneSection eSection, in
int index = (y * cols) + x;
- UIControl_SlotList *slotList = nullptr;
+ UIControl_SlotList *slotList = NULL;
switch( eSection )
{
case eSectionBrewingBottle1:
@@ -280,7 +280,7 @@ void UIScene_BrewingStandMenu::setSectionSelectedSlot(ESceneSection eSection, in
UIControl *UIScene_BrewingStandMenu::getSection(ESceneSection eSection)
{
- UIControl *control = nullptr;
+ UIControl *control = NULL;
switch( eSection )
{
case eSectionBrewingBottle1:
diff --git a/Minecraft.Client/Common/UI/UIScene_ConnectingProgress.cpp b/Minecraft.Client/Common/UI/UIScene_ConnectingProgress.cpp
index e10a5a62..968072a8 100644
--- a/Minecraft.Client/Common/UI/UIScene_ConnectingProgress.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_ConnectingProgress.cpp
@@ -15,7 +15,7 @@ UIScene_ConnectingProgress::UIScene_ConnectingProgress(int iPad, void *_initData
m_progressBar.setVisible( false );
m_labelTip.setVisible( false );
- ConnectionProgressParams *param = static_cast<ConnectionProgressParams *>(_initData);
+ ConnectionProgressParams *param = (ConnectionProgressParams *)_initData;
if( param->stringId >= 0 )
{
@@ -210,7 +210,7 @@ void UIScene_ConnectingProgress::handleInput(int iPad, int key, bool repeat, boo
// 4J-PB - Removed the option to cancel join - it didn't work anyway
// case ACTION_MENU_CANCEL:
// {
-// if(m_cancelFunc != nullptr)
+// if(m_cancelFunc != NULL)
// {
// m_cancelFunc(m_cancelFuncParam);
// }
@@ -245,7 +245,7 @@ void UIScene_ConnectingProgress::handleInput(int iPad, int key, bool repeat, boo
void UIScene_ConnectingProgress::handlePress(F64 controlId, F64 childId)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_Confirm:
if(m_showingButton)
diff --git a/Minecraft.Client/Common/UI/UIScene_ContainerMenu.cpp b/Minecraft.Client/Common/UI/UIScene_ContainerMenu.cpp
index b26ae48e..9e48a57b 100644
--- a/Minecraft.Client/Common/UI/UIScene_ContainerMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_ContainerMenu.cpp
@@ -13,7 +13,7 @@
UIScene_ContainerMenu::UIScene_ContainerMenu(int iPad, void *_initData, UILayer *parentLayer) : UIScene_AbstractContainerMenu(iPad, parentLayer)
{
- ContainerScreenInput *initData = static_cast<ContainerScreenInput *>(_initData);
+ ContainerScreenInput *initData = (ContainerScreenInput *)_initData;
m_bLargeChest = (initData->container->getContainerSize() > 3*9)?true:false;
// Setup all the Iggy references we need for this scene
@@ -24,9 +24,9 @@ UIScene_ContainerMenu::UIScene_ContainerMenu(int iPad, void *_initData, UILayer
ContainerMenu* menu = new ContainerMenu( initData->inventory, initData->container );
Minecraft *pMinecraft = Minecraft::GetInstance();
- if( pMinecraft->localgameModes[iPad] != nullptr )
+ if( pMinecraft->localgameModes[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_Container_Menu, this);
}
@@ -181,7 +181,7 @@ void UIScene_ContainerMenu::setSectionSelectedSlot(ESceneSection eSection, int x
int index = (y * cols) + x;
- UIControl_SlotList *slotList = nullptr;
+ UIControl_SlotList *slotList = NULL;
switch( eSection )
{
case eSectionContainerChest:
@@ -203,7 +203,7 @@ void UIScene_ContainerMenu::setSectionSelectedSlot(ESceneSection eSection, int x
UIControl *UIScene_ContainerMenu::getSection(ESceneSection eSection)
{
- UIControl *control = nullptr;
+ UIControl *control = NULL;
switch( eSection )
{
case eSectionContainerChest:
diff --git a/Minecraft.Client/Common/UI/UIScene_ControlsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_ControlsMenu.cpp
index 939efde1..57567248 100644
--- a/Minecraft.Client/Common/UI/UIScene_ControlsMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_ControlsMenu.cpp
@@ -13,7 +13,7 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void *initData, UILayer *pa
IggyDataValue value[1];
value[0].type = IGGY_DATATYPE_number;
#if defined(_XBOX) || defined(_WIN64)
- value[0].number = static_cast<F64>(0);
+ value[0].number = (F64)0;
#elif defined(_DURANGO)
value[0].number = (F64)1;
#elif defined(__PS3__)
@@ -25,7 +25,7 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void *initData, UILayer *pa
#endif
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSetPlatform , 1 , value );
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
if(bNotInGame)
{
@@ -84,7 +84,7 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void *initData, UILayer *pa
IggyDataValue result;
IggyDataValue value[1];
value[0].type = IGGY_DATATYPE_number;
- value[0].number = static_cast<F64>(m_iCurrentNavigatedControlsLayout);
+ value[0].number = (F64)m_iCurrentNavigatedControlsLayout;
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSetControllerLayout , 1 , value );
}
@@ -180,7 +180,7 @@ void UIScene_ControlsMenu::handleInput(int iPad, int key, bool repeat, bool pres
void UIScene_ControlsMenu::handleCheckboxToggled(F64 controlId, bool selected)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_InvertLook:
app.SetGameSettings(m_iPad,eGameSetting_ControlInvertLook,(unsigned char)( selected ) );
@@ -194,13 +194,13 @@ void UIScene_ControlsMenu::handleCheckboxToggled(F64 controlId, bool selected)
void UIScene_ControlsMenu::handlePress(F64 controlId, F64 childId)
{
- int control = static_cast<int>(controlId);
+ int control = (int)controlId;
switch(control)
{
case eControl_Button0:
case eControl_Button1:
case eControl_Button2:
- app.SetGameSettings(m_iPad,eGameSetting_ControlScheme,static_cast<unsigned char>(control));
+ app.SetGameSettings(m_iPad,eGameSetting_ControlScheme,(unsigned char)control);
LPWSTR layoutString = new wchar_t[ 128 ];
swprintf( layoutString, 128, L"%ls : %ls", app.GetString( IDS_CURRENT_LAYOUT ),app.GetString(m_iSchemeTextA[control]));
#ifdef __ORBIS__
@@ -216,7 +216,7 @@ void UIScene_ControlsMenu::handlePress(F64 controlId, F64 childId)
void UIScene_ControlsMenu::handleFocusChange(F64 controlId, F64 childId)
{
- int control = static_cast<int>(controlId);
+ int control = (int)controlId;
switch(control)
{
case eControl_Button0:
diff --git a/Minecraft.Client/Common/UI/UIScene_CraftingMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CraftingMenu.cpp
index 16b63c4c..2d1b4302 100644
--- a/Minecraft.Client/Common/UI/UIScene_CraftingMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_CraftingMenu.cpp
@@ -22,7 +22,7 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void *_initData, UILayer *p
#endif
m_bIgnoreKeyPresses = false;
- CraftingPanelScreenInput* initData = static_cast<CraftingPanelScreenInput *>(_initData);
+ CraftingPanelScreenInput* initData = (CraftingPanelScreenInput*)_initData;
m_iContainerType=initData->iContainerType;
m_pPlayer=initData->player;
m_bSplitscreen=initData->bSplitscreen;
@@ -117,9 +117,9 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void *_initData, UILayer *p
// Update the tutorial state
Minecraft *pMinecraft = Minecraft::GetInstance();
- if( pMinecraft->localgameModes[m_iPad] != nullptr )
+ if( pMinecraft->localgameModes[m_iPad] != NULL )
{
- TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[m_iPad]);
+ TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[m_iPad];
m_previousTutorialState = gameMode->getTutorial()->getCurrentState();
if(m_iContainerType==RECIPE_TYPE_2x2)
{
@@ -198,14 +198,14 @@ void UIScene_CraftingMenu::handleDestroy()
{
Minecraft *pMinecraft = Minecraft::GetInstance();
- if( pMinecraft->localgameModes[m_iPad] != nullptr )
+ if( pMinecraft->localgameModes[m_iPad] != NULL )
{
- TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[m_iPad]);
- if(gameMode != nullptr) gameMode->getTutorial()->changeTutorialState(m_previousTutorialState);
+ TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[m_iPad];
+ if(gameMode != NULL) gameMode->getTutorial()->changeTutorialState(m_previousTutorialState);
}
// We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying)
- if(Minecraft::GetInstance()->localplayers[m_iPad] != nullptr && Minecraft::GetInstance()->localplayers[m_iPad]->containerMenu->containerId == m_menu->containerId)
+ if(Minecraft::GetInstance()->localplayers[m_iPad] != NULL && Minecraft::GetInstance()->localplayers[m_iPad]->containerMenu->containerId == m_menu->containerId)
{
Minecraft::GetInstance()->localplayers[m_iPad]->closeContainer();
}
@@ -525,14 +525,14 @@ void UIScene_CraftingMenu::handleReload()
void UIScene_CraftingMenu::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;
shared_ptr<ItemInstance> item = nullptr;
int slotId = -1;
float alpha = 1.0f;
bool decorations = true;
bool inventoryItem = false;
- swscanf(static_cast<wchar_t *>(region->name),L"slot_%d",&slotId);
+ swscanf((wchar_t*)region->name,L"slot_%d",&slotId);
if (slotId == -1)
{
app.DebugPrintf("This is not the control we are looking for\n");
@@ -560,7 +560,7 @@ void UIScene_CraftingMenu::customDraw(IggyCustomDrawCallbackRegion *region)
if(m_vSlotsInfo[iIndex].show)
{
item = m_vSlotsInfo[iIndex].item;
- alpha = static_cast<float>(m_vSlotsInfo[iIndex].alpha)/31.0f;
+ alpha = ((float)m_vSlotsInfo[iIndex].alpha)/31.0f;
}
}
else if(slotId >= CRAFTING_H_SLOT_START && slotId < (CRAFTING_H_SLOT_START + m_iCraftablesMaxHSlotC) )
@@ -596,7 +596,7 @@ void UIScene_CraftingMenu::customDraw(IggyCustomDrawCallbackRegion *region)
if(m_hSlotsInfo[iIndex].show)
{
item = m_hSlotsInfo[iIndex].item;
- alpha = static_cast<float>(m_hSlotsInfo[iIndex].alpha)/31.0f;
+ alpha = ((float)m_hSlotsInfo[iIndex].alpha)/31.0f;
}
}
else if(slotId >= CRAFTING_INGREDIENTS_LAYOUT_START && slotId < (CRAFTING_INGREDIENTS_LAYOUT_START + m_iIngredientsMaxSlotC) )
@@ -605,7 +605,7 @@ void UIScene_CraftingMenu::customDraw(IggyCustomDrawCallbackRegion *region)
if(m_ingredientsSlotsInfo[iIndex].show)
{
item = m_ingredientsSlotsInfo[iIndex].item;
- alpha = static_cast<float>(m_ingredientsSlotsInfo[iIndex].alpha)/31.0f;
+ alpha = ((float)m_ingredientsSlotsInfo[iIndex].alpha)/31.0f;
}
}
else if(slotId >= CRAFTING_INGREDIENTS_DESCRIPTION_START && slotId < (CRAFTING_INGREDIENTS_DESCRIPTION_START + 4) )
@@ -614,7 +614,7 @@ void UIScene_CraftingMenu::customDraw(IggyCustomDrawCallbackRegion *region)
if(m_ingredientsInfo[iIndex].show)
{
item = m_ingredientsInfo[iIndex].item;
- alpha = static_cast<float>(m_ingredientsInfo[iIndex].alpha)/31.0f;
+ alpha = ((float)m_ingredientsInfo[iIndex].alpha)/31.0f;
}
}
else if(slotId == CRAFTING_OUTPUT_SLOT_START )
@@ -622,11 +622,11 @@ void UIScene_CraftingMenu::customDraw(IggyCustomDrawCallbackRegion *region)
if(m_craftingOutputSlotInfo.show)
{
item = m_craftingOutputSlotInfo.item;
- alpha = static_cast<float>(m_craftingOutputSlotInfo.alpha)/31.0f;
+ alpha = ((float)m_craftingOutputSlotInfo.alpha)/31.0f;
}
}
- if(item != nullptr)
+ if(item != NULL)
{
if(!inventoryItem)
{
@@ -742,7 +742,7 @@ void UIScene_CraftingMenu::setCraftingOutputSlotItem(int iPad, shared_ptr<ItemIn
{
m_craftingOutputSlotInfo.item = item;
m_craftingOutputSlotInfo.alpha = 31;
- m_craftingOutputSlotInfo.show = item != nullptr;
+ m_craftingOutputSlotInfo.show = item != NULL;
}
void UIScene_CraftingMenu::setCraftingOutputSlotRedBox(bool show)
@@ -754,7 +754,7 @@ void UIScene_CraftingMenu::setIngredientSlotItem(int iPad, int index, shared_ptr
{
m_ingredientsSlotsInfo[index].item = item;
m_ingredientsSlotsInfo[index].alpha = 31;
- m_ingredientsSlotsInfo[index].show = item != nullptr;
+ m_ingredientsSlotsInfo[index].show = item != NULL;
}
void UIScene_CraftingMenu::setIngredientSlotRedBox(int index, bool show)
@@ -766,7 +766,7 @@ void UIScene_CraftingMenu::setIngredientDescriptionItem(int iPad, int index, sha
{
m_ingredientsInfo[index].item = item;
m_ingredientsInfo[index].alpha = 31;
- m_ingredientsInfo[index].show = item != nullptr;
+ m_ingredientsInfo[index].show = item != NULL;
IggyDataValue result;
IggyDataValue value[2];
diff --git a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp
index ef72ec16..67c0fd8c 100644
--- a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp
@@ -82,7 +82,7 @@ UIScene_CreateWorldMenu::UIScene_CreateWorldMenu(int iPad, void *initData, UILay
m_bGameModeCreative = false;
m_iGameModeId = GameType::SURVIVAL->getId();
- m_pDLCPack = nullptr;
+ m_pDLCPack = NULL;
m_bRebuildTouchBoxes = false;
m_bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
@@ -96,7 +96,7 @@ UIScene_CreateWorldMenu::UIScene_CreateWorldMenu(int iPad, void *initData, UILay
// #ifdef __PS3__
// if(ProfileManager.IsSignedInLive( m_iPad ))
// {
- // ProfileManager.GetChatAndContentRestrictions(m_iPad,true,&bChatRestricted,&bContentRestricted,nullptr);
+ // ProfileManager.GetChatAndContentRestrictions(m_iPad,true,&bChatRestricted,&bContentRestricted,NULL);
// }
// #endif
@@ -184,7 +184,7 @@ UIScene_CreateWorldMenu::UIScene_CreateWorldMenu(int iPad, void *initData, UILay
#if TO_BE_IMPLEMENTED
// 4J-PB - there may be texture packs we don't have, so use the info from TMS for this
- DLC_INFO *pDLCInfo=nullptr;
+ DLC_INFO *pDLCInfo=NULL;
// first pass - look to see if there are any that are not in the list
bool bTexturePackAlreadyListed;
@@ -289,6 +289,7 @@ void UIScene_CreateWorldMenu::tick()
{
UIScene::tick();
+
if(m_iSetTexturePackDescription >= 0 )
{
UpdateTexturePackDescription( m_iSetTexturePackDescription );
@@ -431,7 +432,7 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId)
//CD - Added for audio
ui.PlayUISFX(eSFX_Press);
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_EditWorldName:
{
@@ -481,7 +482,7 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId)
break;
case eControl_TexturePackList:
{
- UpdateCurrentTexturePack(static_cast<int>(childId));
+ UpdateCurrentTexturePack((int)childId);
}
break;
case eControl_NewWorld:
@@ -527,7 +528,7 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow()
// texture pack hasn't been set yet, so check what it will be
TexturePack *pTexturePack = pMinecraft->skins->getTexturePackById(m_MoreOptionsParams.dwTexturePack);
- if(pTexturePack==nullptr)
+ if(pTexturePack==NULL)
{
#if TO_BE_IMPLEMENTED
// They've selected a texture pack they don't have yet
@@ -577,7 +578,7 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow()
{
// texture pack hasn't been set yet, so check what it will be
TexturePack *pTexturePack = pMinecraft->skins->getTexturePackById(m_MoreOptionsParams.dwTexturePack);
- DLCTexturePack *pDLCTexPack=static_cast<DLCTexturePack *>(pTexturePack);
+ DLCTexturePack *pDLCTexPack=(DLCTexturePack *)pTexturePack;
m_pDLCPack=pDLCTexPack->getDLCInfoParentPack();
// do we have a license?
@@ -605,7 +606,7 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow()
DLC_INFO *pDLCInfo = app.GetDLCInfoForTrialOfferID(m_pDLCPack->getPurchaseOfferId());
ULONGLONG ullOfferID_Full;
- if(pDLCInfo!=nullptr)
+ if(pDLCInfo!=NULL)
{
ullOfferID_Full=pDLCInfo->ullOfferID_Full;
}
@@ -648,8 +649,8 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow()
void UIScene_CreateWorldMenu::handleSliderMove(F64 sliderId, F64 currentValue)
{
WCHAR TempString[256];
- int value = static_cast<int>(currentValue);
- switch(static_cast<int>(sliderId))
+ int value = (int)currentValue;
+ switch((int)sliderId)
{
case eControl_Difficulty:
m_sliderDifficulty.handleSliderMove(value);
@@ -724,7 +725,7 @@ void UIScene_CreateWorldMenu::handleTimerComplete(int id)
if(m_iConfigA[i]!=-1)
{
DWORD dwBytes=0;
- PBYTE pbData=nullptr;
+ PBYTE pbData=NULL;
//app.DebugPrintf("Retrieving iConfig %d from TPD\n",m_iConfigA[i]);
app.GetTPD(m_iConfigA[i],&pbData,&dwBytes);
@@ -733,7 +734,7 @@ void UIScene_CreateWorldMenu::handleTimerComplete(int id)
if(dwBytes > 0 && pbData)
{
DWORD dwImageBytes=0;
- PBYTE pbImageData=nullptr;
+ PBYTE pbImageData=NULL;
app.GetFileFromTPD(eTPDFileType_Icon,pbData,dwBytes,&pbImageData,&dwImageBytes );
ListInfo.fEnabled = TRUE;
@@ -763,7 +764,7 @@ void UIScene_CreateWorldMenu::handleGainFocus(bool navBack)
int UIScene_CreateWorldMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,bool bRes)
{
- UIScene_CreateWorldMenu *pClass=static_cast<UIScene_CreateWorldMenu *>(lpParam);
+ UIScene_CreateWorldMenu *pClass=(UIScene_CreateWorldMenu *)lpParam;
pClass->m_bIgnoreInput=false;
// 4J HEG - No reason to set value if keyboard was cancelled
if (bRes)
@@ -890,7 +891,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
// MGH - added this so we don't try and upsell when we don't know if the player has PS Plus yet (if it can't connect to the PS Plus server).
UINT uiIDA[1];
uiIDA[0]=IDS_OK;
- ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), nullptr, nullptr);
+ ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), NULL, NULL);
return;
}
@@ -910,7 +911,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
// UINT uiIDA[2];
// uiIDA[0]=IDS_PLAY_OFFLINE;
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
-// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this, app.GetStringTable(),nullptr,0,false);
+// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this, app.GetStringTable(),NULL,0,false);
return;
}
}
@@ -950,7 +951,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
#if defined(__PS3__) || defined(__PSVITA__)
if(isOnlineGame && isSignedInLive)
{
- ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,nullptr,&bContentRestricted,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,NULL,&bContentRestricted,NULL);
}
#endif
@@ -979,7 +980,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
// MGH - added this so we don't try and upsell when we don't know if the player has PS Plus yet (if it can't connect to the PS Plus server).
UINT uiIDA[1];
uiIDA[0]=IDS_OK;
- ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), nullptr, nullptr);
+ ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), NULL, NULL);
return;
}
@@ -997,7 +998,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
// UINT uiIDA[2];
// uiIDA[0]=IDS_PLAY_OFFLINE;
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
-// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this, app.GetStringTable(),nullptr,0,false);
+// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this, app.GetStringTable(),NULL,0,false);
}
#endif
@@ -1039,7 +1040,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
// MGH - added this so we don't try and upsell when we don't know if the player has PS Plus yet (if it can't connect to the PS Plus server).
UINT uiIDA[1];
uiIDA[0]=IDS_OK;
- ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), nullptr, nullptr);
+ ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), NULL, NULL);
return;
}
@@ -1061,7 +1062,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
// UINT uiIDA[2];
// uiIDA[0]=IDS_PLAY_OFFLINE;
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
-// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this, app.GetStringTable(),nullptr,0,false);
+// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this, app.GetStringTable(),NULL,0,false);
}
#endif
@@ -1071,7 +1072,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
if(isOnlineGame)
{
bool chatRestricted = false;
- ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&chatRestricted,nullptr,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&chatRestricted,NULL,NULL);
if(chatRestricted)
{
ProfileManager.DisplaySystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, ProfileManager.GetPrimaryPad() );
@@ -1135,7 +1136,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
if (wSeed.length() != 0)
{
int64_t value = 0;
- unsigned int len = static_cast<unsigned int>(wSeed.length());
+ unsigned int len = (unsigned int)wSeed.length();
//Check if the input string contains a numerical value
bool isNumber = true;
@@ -1173,7 +1174,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
param->seed = seedValue;
- param->saveData = nullptr;
+ param->saveData = NULL;
param->texturePackId = pClass->m_MoreOptionsParams.dwTexturePack;
Minecraft *pMinecraft = Minecraft::GetInstance();
@@ -1209,8 +1210,8 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
app.SetGameHostOption(eGameHostOption_WasntSaveOwner, false);
#ifdef _LARGE_WORLDS
app.SetGameHostOption(eGameHostOption_WorldSize, pClass->m_MoreOptionsParams.worldSize+1 ); // 0 is GAME_HOST_OPTION_WORLDSIZE_UNKNOWN
- pClass->m_MoreOptionsParams.currentWorldSize = static_cast<EGameHostOptionWorldSize>(pClass->m_MoreOptionsParams.worldSize + 1);
- pClass->m_MoreOptionsParams.newWorldSize = static_cast<EGameHostOptionWorldSize>(pClass->m_MoreOptionsParams.worldSize + 1);
+ pClass->m_MoreOptionsParams.currentWorldSize = (EGameHostOptionWorldSize)(pClass->m_MoreOptionsParams.worldSize+1);
+ pClass->m_MoreOptionsParams.newWorldSize = (EGameHostOptionWorldSize)(pClass->m_MoreOptionsParams.worldSize+1);
#endif
g_NetworkManager.HostGame(dwLocalUsersMask,isClientSide,isPrivate,MINECRAFT_NET_MAX_PLAYERS,0);
@@ -1252,7 +1253,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &CGameNetworkManager::RunNetworkGameThreadProc;
- loadingParams->lpParam = static_cast<LPVOID>(param);
+ loadingParams->lpParam = (LPVOID)param;
// Reset the autosave time
app.SetAutosaveTimerTime();
@@ -1270,7 +1271,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int iPad)
{
- UIScene_CreateWorldMenu* pClass = static_cast<UIScene_CreateWorldMenu *>(pParam);
+ UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu*)pParam;
if(bContinue==true)
{
@@ -1378,7 +1379,7 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinu
int UIScene_CreateWorldMenu::ConfirmCreateReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- UIScene_CreateWorldMenu* pClass = static_cast<UIScene_CreateWorldMenu *>(pParam);
+ UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu*)pParam;
if(result==C4JStorage::EMessage_ResultAccept)
{
@@ -1431,7 +1432,7 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(void *pParam,int iPad,C4JStor
if(isOnlineGame)
{
bool chatRestricted = false;
- ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&chatRestricted,nullptr,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&chatRestricted,NULL,NULL);
if(chatRestricted)
{
ProfileManager.DisplaySystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, ProfileManager.GetPrimaryPad() );
diff --git a/Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp
index ba2cd845..0895cdff 100644
--- a/Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp
@@ -19,9 +19,9 @@ UIScene_CreativeMenu::UIScene_CreativeMenu(int iPad, void *_initData, UILayer *p
// Setup all the Iggy references we need for this scene
initialiseMovie();
- InventoryScreenInput *initData = static_cast<InventoryScreenInput *>(_initData);
+ InventoryScreenInput *initData = (InventoryScreenInput *)_initData;
- shared_ptr<SimpleContainer> creativeContainer = std::make_shared<SimpleContainer>(0, L"", false, TabSpec::MAX_SIZE);
+ shared_ptr<SimpleContainer> creativeContainer = shared_ptr<SimpleContainer>(new SimpleContainer( 0, L"", false, TabSpec::MAX_SIZE ));
itemPickerMenu = new ItemPickerMenu(creativeContainer, initData->player->inventory);
Initialize( initData->iPad, itemPickerMenu, false, -1, eSectionInventoryCreativeUsing, eSectionInventoryCreativeMax, initData->bNavigateBack);
@@ -42,9 +42,9 @@ UIScene_CreativeMenu::UIScene_CreativeMenu(int iPad, void *_initData, UILayer *p
}
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_Creative_Inventory_Menu, this);
}
@@ -144,7 +144,7 @@ void UIScene_CreativeMenu::handleOtherClicked(int iPad, ESceneSection eSection,
case eSectionInventoryCreativeTab_6:
case eSectionInventoryCreativeTab_7:
{
- ECreativeInventoryTabs tab = static_cast<ECreativeInventoryTabs>((int)eCreativeInventoryTab_BuildingBlocks + (int)eSection - (int)eSectionInventoryCreativeTab_0);
+ ECreativeInventoryTabs tab = (ECreativeInventoryTabs)((int)eCreativeInventoryTab_BuildingBlocks + (int)eSection - (int)eSectionInventoryCreativeTab_0);
if(tab != m_curTab)
{
switchTab(tab);
@@ -193,8 +193,8 @@ void UIScene_CreativeMenu::handleInput(int iPad, int key, bool repeat, bool pres
// Fall through intentional
case VK_PAD_RSHOULDER:
{
- ECreativeInventoryTabs tab = static_cast<ECreativeInventoryTabs>(m_curTab + dir);
- if (tab < 0) tab = static_cast<ECreativeInventoryTabs>(eCreativeInventoryTab_COUNT - 1);
+ ECreativeInventoryTabs tab = (ECreativeInventoryTabs)(m_curTab + dir);
+ if (tab < 0) tab = (ECreativeInventoryTabs)(eCreativeInventoryTab_COUNT - 1);
if (tab >= eCreativeInventoryTab_COUNT) tab = eCreativeInventoryTab_BuildingBlocks;
switchTab(tab);
ui.PlayUISFX(eSFX_Focus);
@@ -220,7 +220,7 @@ void UIScene_CreativeMenu::updateTabHighlightAndText(ECreativeInventoryTabs tab)
IggyDataValue value[1];
value[0].type = IGGY_DATATYPE_number;
- value[0].number = static_cast<F64>(tab);
+ value[0].number = (F64)tab;
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ) , m_funcSetActiveTab , 1 , value );
@@ -400,7 +400,7 @@ void UIScene_CreativeMenu::setSectionSelectedSlot(ESceneSection eSection, int x,
int index = (y * cols) + x;
- UIControl_SlotList *slotList = nullptr;
+ UIControl_SlotList *slotList = NULL;
switch( eSection )
{
case eSectionInventoryCreativeSelector:
@@ -419,7 +419,7 @@ void UIScene_CreativeMenu::setSectionSelectedSlot(ESceneSection eSection, int x,
UIControl *UIScene_CreativeMenu::getSection(ESceneSection eSection)
{
- UIControl *control = nullptr;
+ UIControl *control = NULL;
switch( eSection )
{
case eSectionInventoryCreativeSelector:
@@ -468,10 +468,10 @@ void UIScene_CreativeMenu::updateScrollCurrentPage(int currentPage, int pageCoun
IggyDataValue value[2];
value[0].type = IGGY_DATATYPE_number;
- value[0].number = static_cast<F64>(pageCount);
+ value[0].number = (F64)pageCount;
value[1].type = IGGY_DATATYPE_number;
- value[1].number = static_cast<F64>(currentPage) - 1;
+ value[1].number = (F64)currentPage - 1;
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ) , m_funcSetScrollBar , 2 , value );
} \ No newline at end of file
diff --git a/Minecraft.Client/Common/UI/UIScene_Credits.cpp b/Minecraft.Client/Common/UI/UIScene_Credits.cpp
index 9900169c..75ddf92f 100644
--- a/Minecraft.Client/Common/UI/UIScene_Credits.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_Credits.cpp
@@ -593,11 +593,11 @@ void UIScene_Credits::tick()
}
// Set up the new text element.
- if(pDef->m_Text!=nullptr) // 4J-PB - think the RAD logo ones aren't set up yet and are coming is as null
+ if(pDef->m_Text!=NULL) // 4J-PB - think the RAD logo ones aren't set up yet and are coming is as null
{
if ( pDef->m_iStringID[0] == CREDIT_ICON )
{
- addImage(static_cast<ECreditIcons>(pDef->m_iStringID[1]));
+ addImage((ECreditIcons)pDef->m_iStringID[1]);
}
else // using additional translated string.
{
@@ -670,7 +670,7 @@ void UIScene_Credits::setNextLabel(const wstring &label, ECreditTextTypes size)
value[0].string16 = stringVal;
value[1].type = IGGY_DATATYPE_number;
- value[1].number = static_cast<int>(size);
+ value[1].number = (int)size;
value[2].type = IGGY_DATATYPE_boolean;
value[2].boolval = (m_iCurrDefIndex == (m_iNumTextDefs - 1));
@@ -684,7 +684,7 @@ void UIScene_Credits::addImage(ECreditIcons icon)
IggyDataValue value[2];
value[0].type = IGGY_DATATYPE_number;
- value[0].number = static_cast<int>(icon);
+ value[0].number = (int)icon;
value[1].type = IGGY_DATATYPE_boolean;
value[1].boolval = (m_iCurrDefIndex == (m_iNumTextDefs - 1));
diff --git a/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp b/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp
index 6d705765..77ffdffd 100644
--- a/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp
@@ -121,11 +121,11 @@ void UIScene_DLCMainMenu::handleInput(int iPad, int key, bool repeat, bool press
void UIScene_DLCMainMenu::handlePress(F64 controlId, F64 childId)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_OffersList:
{
- int iIndex = static_cast<int>(childId);
+ int iIndex = (int)childId;
DLCOffersParam *param = new DLCOffersParam();
param->iPad = m_iPad;
@@ -134,7 +134,7 @@ void UIScene_DLCMainMenu::handlePress(F64 controlId, F64 childId)
// Xbox One will have requested the marketplace content - there is only that type
#ifndef _XBOX_ONE
- app.AddDLCRequest(static_cast<eDLCMarketplaceType>(iIndex), true);
+ app.AddDLCRequest((eDLCMarketplaceType)iIndex, true);
#endif
killTimer(PLAYER_ONLINE_TIMER_ID);
ui.NavigateToScene(m_iPad, eUIScene_DLCOffersMenu, param);
@@ -166,7 +166,7 @@ void UIScene_DLCMainMenu::handleTimerComplete(int id)
int UIScene_DLCMainMenu::ExitDLCMainMenu(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- UIScene_DLCMainMenu* pClass = static_cast<UIScene_DLCMainMenu *>(pParam);
+ UIScene_DLCMainMenu* pClass = (UIScene_DLCMainMenu*)pParam;
#if defined __ORBIS__ || defined __PSVITA__
app.GetCommerce()->HidePsStoreIcon();
diff --git a/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp b/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp
index 5e644803..c109ed62 100644
--- a/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_DLCOffersMenu.cpp
@@ -16,12 +16,12 @@
UIScene_DLCOffersMenu::UIScene_DLCOffersMenu(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
{
m_bProductInfoShown=false;
- DLCOffersParam *param=static_cast<DLCOffersParam *>(initData);
+ DLCOffersParam *param=(DLCOffersParam *)initData;
m_iProductInfoIndex=param->iType;
m_iCurrentDLC=0;
m_iTotalDLC=0;
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
- m_pvProductInfo=nullptr;
+ m_pvProductInfo=NULL;
#endif
m_bAddAllDLCButtons=true;
@@ -51,7 +51,7 @@ UIScene_DLCOffersMenu::UIScene_DLCOffersMenu(int iPad, void *initData, UILayer *
}
#ifdef _DURANGO
- m_pNoImageFor_DLC = nullptr;
+ m_pNoImageFor_DLC = NULL;
// If we don't yet have this DLC, we need to display a timer
m_bDLCRequiredIsRetrieved=false;
m_bIgnorePress=true;
@@ -103,7 +103,7 @@ void UIScene_DLCOffersMenu::handleTimerComplete(int id)
int UIScene_DLCOffersMenu::ExitDLCOffersMenu(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- UIScene_DLCOffersMenu* pClass = static_cast<UIScene_DLCOffersMenu *>(pParam);
+ UIScene_DLCOffersMenu* pClass = (UIScene_DLCOffersMenu*)pParam;
#if defined __ORBIS__ || defined __PSVITA__
app.GetCommerce()->HidePsStoreIcon();
@@ -217,7 +217,7 @@ void UIScene_DLCOffersMenu::handleInput(int iPad, int key, bool repeat, bool pre
void UIScene_DLCOffersMenu::handlePress(F64 controlId, F64 childId)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_OffersList:
{
@@ -261,13 +261,13 @@ void UIScene_DLCOffersMenu::handlePress(F64 controlId, F64 childId)
#endif // __PS3__
#elif defined _XBOX_ONE
int iIndex = (int)childId;
- StorageManager.InstallOffer(1,StorageManager.GetOffer(iIndex).wszProductID,nullptr,nullptr);
+ StorageManager.InstallOffer(1,StorageManager.GetOffer(iIndex).wszProductID,NULL,NULL);
#else
- int iIndex = static_cast<int>(childId);
+ int iIndex = (int)childId;
ULONGLONG ullIndexA[1];
ullIndexA[0]=StorageManager.GetOffer(iIndex).qwOfferID;
- StorageManager.InstallOffer(1,ullIndexA,nullptr,nullptr);
+ StorageManager.InstallOffer(1,ullIndexA,NULL,NULL);
#endif
}
break;
@@ -343,10 +343,10 @@ void UIScene_DLCOffersMenu::tick()
{
m_bAddAllDLCButtons=false;
// add the categories to the list box
- if(m_pvProductInfo==nullptr)
+ if(m_pvProductInfo==NULL)
{
m_pvProductInfo=app.GetProductList(m_iProductInfoIndex);
- if(m_pvProductInfo==nullptr)
+ if(m_pvProductInfo==NULL)
{
m_iTotalDLC=0;
// need to display text to say no downloadable content available yet
@@ -690,7 +690,7 @@ void UIScene_DLCOffersMenu::GetDLCInfo( int iOfferC, bool bUpdateOnly )
// Check that this is in the list of known DLC
DLC_INFO *pDLC=app.GetDLCInfoForFullOfferID(xOffer.wszProductID);
- if(pDLC!=nullptr)
+ if(pDLC!=NULL)
{
OrderA[uiDLCCount].uiContentIndex=i;
OrderA[uiDLCCount++].uiSortIndex=pDLC->uiSortIndex;
@@ -710,7 +710,7 @@ void UIScene_DLCOffersMenu::GetDLCInfo( int iOfferC, bool bUpdateOnly )
// Check that this is in the list of known DLC
DLC_INFO *pDLC=app.GetDLCInfoForFullOfferID(xOffer.wszProductID);
- if(pDLC==nullptr)
+ if(pDLC==NULL)
{
// skip this one
app.DebugPrintf("Unknown offer - %ls\n",xOffer.wszOfferName);
@@ -736,7 +736,7 @@ void UIScene_DLCOffersMenu::GetDLCInfo( int iOfferC, bool bUpdateOnly )
// find the DLC in the installed packages
XCONTENT_DATA *pContentData=StorageManager.GetInstalledDLC(xOffer.wszProductID);
- if(pContentData!=nullptr)
+ if(pContentData!=NULL)
{
m_buttonListOffers.addItem(wstrTemp,!pContentData->bTrialLicense,OrderA[i].uiContentIndex);
}
@@ -809,7 +809,7 @@ bool UIScene_DLCOffersMenu::UpdateDisplay(MARKETPLACE_CONTENTOFFER_INFO& xOffer)
DLC_INFO *dlc = app.GetDLCInfoForFullOfferID(xOffer.wszOfferName);
#endif
- if (dlc != nullptr)
+ if (dlc != NULL)
{
WCHAR *cString = dlc->wchBanner;
@@ -844,7 +844,7 @@ bool UIScene_DLCOffersMenu::UpdateDisplay(MARKETPLACE_CONTENTOFFER_INFO& xOffer)
{
if(hasRegisteredSubstitutionTexture(cString)==false)
{
- BYTE *pData=nullptr;
+ BYTE *pData=NULL;
DWORD dwSize=0;
app.GetMemFileDetails(cString,&pData,&dwSize);
// set the image
diff --git a/Minecraft.Client/Common/UI/UIScene_DeathMenu.cpp b/Minecraft.Client/Common/UI/UIScene_DeathMenu.cpp
index a4dbe8a8..8f0f4c11 100644
--- a/Minecraft.Client/Common/UI/UIScene_DeathMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_DeathMenu.cpp
@@ -18,9 +18,9 @@ UIScene_DeathMenu::UIScene_DeathMenu(int iPad, void *initData, UILayer *parentLa
m_bIgnoreInput = false;
Minecraft *pMinecraft = Minecraft::GetInstance();
- if(pMinecraft != nullptr && pMinecraft->localgameModes[iPad] != nullptr )
+ if(pMinecraft != NULL && pMinecraft->localgameModes[iPad] != NULL )
{
- TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[iPad]);
+ TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[iPad];
// This just allows it to be shown
gameMode->getTutorial()->showTutorialPopup(false);
@@ -30,9 +30,9 @@ UIScene_DeathMenu::UIScene_DeathMenu(int iPad, void *initData, UILayer *parentLa
UIScene_DeathMenu::~UIScene_DeathMenu()
{
Minecraft *pMinecraft = Minecraft::GetInstance();
- if(pMinecraft != nullptr && pMinecraft->localgameModes[m_iPad] != nullptr )
+ if(pMinecraft != NULL && pMinecraft->localgameModes[m_iPad] != NULL )
{
- TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[m_iPad]);
+ TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[m_iPad];
// This just allows it to be shown
gameMode->getTutorial()->showTutorialPopup(true);
@@ -81,7 +81,7 @@ void UIScene_DeathMenu::handleInput(int iPad, int key, bool repeat, bool pressed
void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_Respawn:
m_bIgnoreInput = true;
@@ -104,9 +104,9 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId)
{
UINT uiIDA[3];
int playTime = -1;
- if( pMinecraft->localplayers[m_iPad] != nullptr )
+ if( pMinecraft->localplayers[m_iPad] != NULL )
{
- playTime = static_cast<int>(pMinecraft->localplayers[m_iPad]->getSessionTimer());
+ playTime = (int)pMinecraft->localplayers[m_iPad]->getSessionTimer();
}
TelemetryManager->RecordLevelExit(m_iPad, eSen_LevelExitStatus_Failed);
diff --git a/Minecraft.Client/Common/UI/UIScene_DebugCreateSchematic.cpp b/Minecraft.Client/Common/UI/UIScene_DebugCreateSchematic.cpp
index d698b51f..d3da0870 100644
--- a/Minecraft.Client/Common/UI/UIScene_DebugCreateSchematic.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_DebugCreateSchematic.cpp
@@ -132,96 +132,82 @@ void UIScene_DebugCreateSchematic::handleInput(int iPad, int key, bool repeat, b
void UIScene_DebugCreateSchematic::handlePress(F64 controlId, F64 childId)
{
#ifdef _WINDOWS64
- if (isDirectEditBlocking())
- return;
+ if (isDirectEditBlocking()) return;
#endif
+ switch((int)controlId)
+ {
+ case eControl_Create:
+ {
+ // We want the start to be even
+ if(m_data->startX > 0 && m_data->startX%2 != 0)
+ m_data->startX-=1;
+ else if(m_data->startX < 0 && m_data->startX%2 !=0)
+ m_data->startX-=1;
+ if(m_data->startY < 0) m_data->startY = 0;
+ else if(m_data->startY > 0 && m_data->startY%2 != 0)
+ m_data->startY-=1;
+ if(m_data->startZ > 0 && m_data->startZ%2 != 0)
+ m_data->startZ-=1;
+ else if(m_data->startZ < 0 && m_data->startZ%2 !=0)
+ m_data->startZ-=1;
+
+ // We want the end to be odd to have a total size that is even
+ if(m_data->endX > 0 && m_data->endX%2 == 0)
+ m_data->endX+=1;
+ else if(m_data->endX < 0 && m_data->endX%2 ==0)
+ m_data->endX+=1;
+ if(m_data->endY > Level::maxBuildHeight)
+ m_data->endY = Level::maxBuildHeight;
+ else if(m_data->endY > 0 && m_data->endY%2 == 0)
+ m_data->endY+=1;
+ else if(m_data->endY < 0 && m_data->endY%2 ==0)
+ m_data->endY+=1;
+ if(m_data->endZ > 0 && m_data->endZ%2 == 0)
+ m_data->endZ+=1;
+ else if(m_data->endZ < 0 && m_data->endZ%2 ==0)
+ m_data->endZ+=1;
+
+ app.SetXuiServerAction(ProfileManager.GetPrimaryPad(), eXuiServerAction_ExportSchematic, (void *)m_data);
- switch (static_cast<int>(controlId))
- {
- case eControl_Create:
- {
- // We want the start to be even
- if (m_data->startX > 0 && m_data->startX % 2 != 0)
- m_data->startX -= 1;
- else if (m_data->startX < 0 && m_data->startX % 2 != 0)
- m_data->startX -= 1;
-
- if (m_data->startY < 0)
- m_data->startY = 0;
- else if (m_data->startY > 0 && m_data->startY % 2 != 0)
- m_data->startY -= 1;
-
- if (m_data->startZ > 0 && m_data->startZ % 2 != 0)
- m_data->startZ -= 1;
- else if (m_data->startZ < 0 && m_data->startZ % 2 != 0)
- m_data->startZ -= 1;
-
- // We want the end to be odd to have a total size that is even
- if (m_data->endX > 0 && m_data->endX % 2 == 0)
- m_data->endX += 1;
- else if (m_data->endX < 0 && m_data->endX % 2 == 0)
- m_data->endX += 1;
-
- if (m_data->endY > Level::maxBuildHeight)
- m_data->endY = Level::maxBuildHeight;
- else if (m_data->endY > 0 && m_data->endY % 2 == 0)
- m_data->endY += 1;
- else if (m_data->endY < 0 && m_data->endY % 2 == 0)
- m_data->endY += 1;
-
- if (m_data->endZ > 0 && m_data->endZ % 2 == 0)
- m_data->endZ += 1;
- else if (m_data->endZ < 0 && m_data->endZ % 2 == 0)
- m_data->endZ += 1;
-
- app.SetXuiServerAction(ProfileManager.GetPrimaryPad(), eXuiServerAction_ExportSchematic, static_cast<void*>(m_data));
- navigateBack();
- }
- break;
-
- case eControl_Name:
- case eControl_StartX:
- case eControl_StartY:
- case eControl_StartZ:
- case eControl_EndX:
- case eControl_EndY:
- case eControl_EndZ:
- {
- m_keyboardCallbackControl = static_cast<eControls>(static_cast<int>(controlId));
+ navigateBack();
+ }
+ break;
+ case eControl_Name:
+ case eControl_StartX:
+ case eControl_StartY:
+ case eControl_StartZ:
+ case eControl_EndX:
+ case eControl_EndY:
+ case eControl_EndZ:
+ {
+ m_keyboardCallbackControl = (eControls)((int)controlId);
#ifdef _WINDOWS64
- if (g_KBMInput.IsKBMActive())
- {
- UIControl_TextInput* input = getTextInputForControl(m_keyboardCallbackControl);
- if (input) input->beginDirectEdit(25);
- }
- else
- {
- UIKeyboardInitData kbData;
- kbData.title = L"Enter something";
- kbData.defaultText = L"";
- kbData.maxChars = 25;
- kbData.callback = &UIScene_DebugCreateSchematic::KeyboardCompleteCallback;
- kbData.lpParam = this;
- ui.NavigateToScene(m_iPad, eUIScene_Keyboard, &kbData, eUILayer_Fullscreen, eUIGroup_Fullscreen);
- }
+ if (g_KBMInput.IsKBMActive())
+ {
+ UIControl_TextInput* input = getTextInputForControl(m_keyboardCallbackControl);
+ if (input) input->beginDirectEdit(25);
+ }
+ else
+ {
+ UIKeyboardInitData kbData;
+ kbData.title = L"Enter something";
+ kbData.defaultText = L"";
+ kbData.maxChars = 25;
+ kbData.callback = &UIScene_DebugCreateSchematic::KeyboardCompleteCallback;
+ kbData.lpParam = this;
+ ui.NavigateToScene(m_iPad, eUIScene_Keyboard, &kbData, eUILayer_Fullscreen, eUIGroup_Fullscreen);
+ }
#else
- InputManager.RequestKeyboard(
- L"Enter something",
- L"",
- static_cast<DWORD>(0),
- 25,
- &UIScene_DebugCreateSchematic::KeyboardCompleteCallback,
- this,
- C_4JInput::EKeyboardMode_Default);
+ InputManager.RequestKeyboard(L"Enter something",L"",(DWORD)0,25,&UIScene_DebugCreateSchematic::KeyboardCompleteCallback,this,C_4JInput::EKeyboardMode_Default);
#endif
- }
- break;
- }
+ }
+ break;
+ };
}
void UIScene_DebugCreateSchematic::handleCheckboxToggled(F64 controlId, bool selected)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_SaveMobs:
m_data->bSaveMobs = selected;
@@ -237,7 +223,7 @@ void UIScene_DebugCreateSchematic::handleCheckboxToggled(F64 controlId, bool sel
int UIScene_DebugCreateSchematic::KeyboardCompleteCallback(LPVOID lpParam,bool bRes)
{
- UIScene_DebugCreateSchematic *pClass=static_cast<UIScene_DebugCreateSchematic *>(lpParam);
+ UIScene_DebugCreateSchematic *pClass=(UIScene_DebugCreateSchematic *)lpParam;
#ifdef _WINDOWS64
uint16_t pchText[128];
diff --git a/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp b/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp
index c997fb31..fafcea02 100644
--- a/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp
@@ -21,16 +21,16 @@ UIScene_DebugOverlay::UIScene_DebugOverlay(int iPad, void *initData, UILayer *pa
// Setup all the Iggy references we need for this scene
initialiseMovie();
- const Minecraft *pMinecraft = Minecraft::GetInstance();
- WCHAR tempString[256];
- const int fovSliderVal = app.GetGameSettings(m_iPad, eGameSetting_FOV);
- const int fovDeg = 70 + fovSliderVal * 40 / 100;
- swprintf( tempString, 256, L"Set fov (%d)", fovDeg);
- m_sliderFov.init(tempString,eControl_FOV,0,100,fovSliderVal);
+ Minecraft *pMinecraft = Minecraft::GetInstance();
+ WCHAR TempString[256];
+ int fovSliderVal = app.GetGameSettings(m_iPad, eGameSetting_FOV);
+ int fovDeg = 70 + fovSliderVal * 40 / 100;
+ swprintf( (WCHAR *)TempString, 256, L"Set fov (%d)", fovDeg);
+ m_sliderFov.init(TempString,eControl_FOV,0,100,fovSliderVal);
- const float currentTime = pMinecraft->level->getLevelData()->getGameTime() % 24000;
- swprintf( tempString, 256, L"Set time (unsafe) (%d)", static_cast<int>(currentTime));
- m_sliderTime.init(tempString,eControl_Time,0,240,currentTime/100);
+ float currentTime = pMinecraft->level->getLevelData()->getGameTime() % 24000;
+ swprintf( (WCHAR *)TempString, 256, L"Set time (unsafe) (%d)", (int)currentTime);
+ m_sliderTime.init(TempString,eControl_Time,0,240,currentTime/100);
m_buttonRain.init(L"Toggle Rain",eControl_Rain);
m_buttonThunder.init(L"Toggle Thunder",eControl_Thunder);
@@ -46,7 +46,7 @@ UIScene_DebugOverlay::UIScene_DebugOverlay(int iPad, void *initData, UILayer *pa
std::vector<std::pair<std::wstring, unsigned int>> sortedItems;
for (size_t i = 0; i < Item::items.length; ++i)
{
- if (Item::items[i] != nullptr)
+ if (Item::items[i] != NULL)
{
sortedItems.emplace_back(std::wstring(app.GetString(Item::items[i]->getDescriptionId())), i);
}
@@ -138,19 +138,19 @@ wstring UIScene_DebugOverlay::getMoviePath()
void UIScene_DebugOverlay::customDraw(IggyCustomDrawCallbackRegion *region)
{
- const Minecraft *pMinecraft = Minecraft::GetInstance();
- if(pMinecraft->localplayers[m_iPad] == nullptr || pMinecraft->localgameModes[m_iPad] == nullptr) return;
+ Minecraft *pMinecraft = Minecraft::GetInstance();
+ if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL) return;
int itemId = -1;
- swscanf(static_cast<wchar_t *>(region->name),L"item_%d",&itemId);
- if (itemId == -1 || itemId > Item::ITEM_NUM_COUNT || Item::items[itemId] == nullptr)
+ swscanf((wchar_t*)region->name,L"item_%d",&itemId);
+ if (itemId == -1 || itemId > Item::ITEM_NUM_COUNT || Item::items[itemId] == NULL)
{
app.DebugPrintf("This is not the control we are looking for\n");
}
else
{
- const auto item = std::make_shared<ItemInstance>(itemId, 1, 0);
- if(item != nullptr) customDrawSlotControl(region,m_iPad,item,1.0f,false,false);
+ shared_ptr<ItemInstance> item = shared_ptr<ItemInstance>( new ItemInstance(itemId,1,0) );
+ if(item != NULL) customDrawSlotControl(region,m_iPad,item,1.0f,false,false);
}
}
@@ -183,7 +183,7 @@ void UIScene_DebugOverlay::handleInput(int iPad, int key, bool repeat, bool pres
void UIScene_DebugOverlay::handlePress(F64 controlId, F64 childId)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_Items:
{
@@ -213,14 +213,14 @@ void UIScene_DebugOverlay::handlePress(F64 controlId, F64 childId)
case eControl_Schematic:
{
#ifndef _CONTENT_PACKAGE
- ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_DebugCreateSchematic,nullptr,eUILayer_Debug);
+ ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_DebugCreateSchematic,NULL,eUILayer_Debug);
#endif
}
break;
case eControl_SetCamera:
{
#ifndef _CONTENT_PACKAGE
- ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_DebugSetCamera,nullptr,eUILayer_Debug);
+ ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_DebugSetCamera,NULL,eUILayer_Debug);
#endif
}
break;
@@ -254,7 +254,7 @@ void UIScene_DebugOverlay::handlePress(F64 controlId, F64 childId)
void UIScene_DebugOverlay::handleSliderMove(F64 sliderId, F64 currentValue)
{
- switch(static_cast<int>(sliderId))
+ switch((int)sliderId)
{
case eControl_Time:
{
@@ -266,25 +266,25 @@ void UIScene_DebugOverlay::handleSliderMove(F64 sliderId, F64 currentValue)
MinecraftServer::SetTime(currentValue * 100);
pMinecraft->level->getLevelData()->setGameTime(currentValue * 100);
- WCHAR tempString[256];
+ WCHAR TempString[256];
float currentTime = currentValue * 100;
- swprintf( tempString, 256, L"Set time (unsafe) (%d)", static_cast<int>(currentTime));
- m_sliderTime.setLabel(tempString);
+ swprintf( (WCHAR *)TempString, 256, L"Set time (unsafe) (%d)", (int)currentTime);
+ m_sliderTime.setLabel(TempString);
}
break;
case eControl_FOV:
{
Minecraft *pMinecraft = Minecraft::GetInstance();
- int v = static_cast<int>(currentValue);
+ int v = (int)currentValue;
if (v < 0) v = 0;
if (v > 100) v = 100;
int fovDeg = 70 + v * 40 / 100;
- pMinecraft->gameRenderer->SetFovVal(static_cast<float>(fovDeg));
+ pMinecraft->gameRenderer->SetFovVal((float)fovDeg);
app.SetGameSettings(m_iPad, eGameSetting_FOV, v);
- WCHAR tempString[256];
- swprintf( tempString, 256, L"Set fov (%d)", fovDeg);
- m_sliderFov.setLabel(tempString);
+ WCHAR TempString[256];
+ swprintf( (WCHAR *)TempString, 256, L"Set fov (%d)", fovDeg);
+ m_sliderFov.setLabel(TempString);
}
break;
};
diff --git a/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp b/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp
index 51eab5aa..62ee60b1 100644
--- a/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_DebugSetCamera.cpp
@@ -17,7 +17,7 @@ UIScene_DebugSetCamera::UIScene_DebugSetCamera(int iPad, void *initData, UILayer
currentPosition->player = playerNo;
Minecraft *pMinecraft = Minecraft::GetInstance();
- if (pMinecraft != nullptr)
+ if (pMinecraft != NULL)
{
Vec3 *vec = pMinecraft->localplayers[playerNo]->getPos(1.0);
@@ -143,7 +143,7 @@ void UIScene_DebugSetCamera::handlePress(F64 controlId, F64 childId)
#ifdef _WINDOWS64
if (isDirectEditBlocking()) return;
#endif
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_Teleport:
app.SetXuiServerAction( ProfileManager.GetPrimaryPad(),
@@ -155,7 +155,7 @@ void UIScene_DebugSetCamera::handlePress(F64 controlId, F64 childId)
case eControl_CamZ:
case eControl_YRot:
case eControl_Elevation:
- m_keyboardCallbackControl = static_cast<eControls>(static_cast<int>(controlId));
+ m_keyboardCallbackControl = (eControls)((int)controlId);
#ifdef _WINDOWS64
if (g_KBMInput.IsKBMActive())
{
@@ -173,7 +173,6 @@ void UIScene_DebugSetCamera::handlePress(F64 controlId, F64 childId)
ui.NavigateToScene(m_iPad, eUIScene_Keyboard, &kbData, eUILayer_Fullscreen, eUIGroup_Fullscreen);
}
#else
->>>>>>> origin/main
InputManager.RequestKeyboard(L"Enter something",L"",(DWORD)0,25,&UIScene_DebugSetCamera::KeyboardCompleteCallback,this,C_4JInput::EKeyboardMode_Default);
#endif
break;
@@ -182,7 +181,7 @@ void UIScene_DebugSetCamera::handlePress(F64 controlId, F64 childId)
void UIScene_DebugSetCamera::handleCheckboxToggled(F64 controlId, bool selected)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_LockPlayer:
app.SetFreezePlayers(selected);
@@ -192,19 +191,18 @@ void UIScene_DebugSetCamera::handleCheckboxToggled(F64 controlId, bool selected)
int UIScene_DebugSetCamera::KeyboardCompleteCallback(LPVOID lpParam,bool bRes)
{
- UIScene_DebugSetCamera *pClass=static_cast<UIScene_DebugSetCamera *>(lpParam);
+ UIScene_DebugSetCamera *pClass=(UIScene_DebugSetCamera *)lpParam;
uint16_t pchText[2048];
ZeroMemory(pchText, 2048 * sizeof(uint16_t));
#ifdef _WINDOWS64
Win64_GetKeyboardText(pchText, 2048);
#else
->>>>>>> origin/main
InputManager.GetText(pchText);
#endif
if(pchText[0]!=0)
{
- wstring value = reinterpret_cast<wchar_t*>(pchText);
+ wstring value = (wchar_t *)pchText;
double val = 0;
if(!value.empty()) val = _fromString<double>( value );
switch(pClass->m_keyboardCallbackControl)
diff --git a/Minecraft.Client/Common/UI/UIScene_DispenserMenu.cpp b/Minecraft.Client/Common/UI/UIScene_DispenserMenu.cpp
index 2e47dda4..97cf842a 100644
--- a/Minecraft.Client/Common/UI/UIScene_DispenserMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_DispenserMenu.cpp
@@ -10,14 +10,14 @@ UIScene_DispenserMenu::UIScene_DispenserMenu(int iPad, void *_initData, UILayer
// Setup all the Iggy references we need for this scene
initialiseMovie();
- TrapScreenInput *initData = static_cast<TrapScreenInput *>(_initData);
+ TrapScreenInput *initData = (TrapScreenInput *)_initData;
m_labelDispenser.init(initData->trap->getName());
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_Trap_Menu, this);
}
@@ -156,7 +156,7 @@ void UIScene_DispenserMenu::setSectionSelectedSlot(ESceneSection eSection, int x
int index = (y * cols) + x;
- UIControl_SlotList *slotList = nullptr;
+ UIControl_SlotList *slotList = NULL;
switch( eSection )
{
case eSectionTrapTrap:
@@ -177,7 +177,7 @@ void UIScene_DispenserMenu::setSectionSelectedSlot(ESceneSection eSection, int x
UIControl *UIScene_DispenserMenu::getSection(ESceneSection eSection)
{
- UIControl *control = nullptr;
+ UIControl *control = NULL;
switch( eSection )
{
case eSectionTrapTrap:
diff --git a/Minecraft.Client/Common/UI/UIScene_EULA.cpp b/Minecraft.Client/Common/UI/UIScene_EULA.cpp
index 41195621..3177344d 100644
--- a/Minecraft.Client/Common/UI/UIScene_EULA.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_EULA.cpp
@@ -48,8 +48,8 @@ UIScene_EULA::UIScene_EULA(int iPad, void *initData, UILayer *parentLayer) : UIS
#endif
vector<wstring> paragraphs;
- size_t lastIndex = 0;
- for ( size_t index = EULA.find(L"\r\n", lastIndex, 2);
+ int lastIndex = 0;
+ for ( int index = EULA.find(L"\r\n", lastIndex, 2);
index != wstring::npos;
index = EULA.find(L"\r\n", lastIndex, 2)
)
@@ -132,7 +132,7 @@ void UIScene_EULA::handleInput(int iPad, int key, bool repeat, bool pressed, boo
void UIScene_EULA::handlePress(F64 controlId, F64 childId)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_Confirm:
//CD - Added for audio
diff --git a/Minecraft.Client/Common/UI/UIScene_EnchantingMenu.cpp b/Minecraft.Client/Common/UI/UIScene_EnchantingMenu.cpp
index f90c4b12..27459ccc 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 = 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
diff --git a/Minecraft.Client/Common/UI/UIScene_EndPoem.cpp b/Minecraft.Client/Common/UI/UIScene_EndPoem.cpp
index 5b10e8cf..2f43cada 100644
--- a/Minecraft.Client/Common/UI/UIScene_EndPoem.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_EndPoem.cpp
@@ -50,7 +50,7 @@ UIScene_EndPoem::UIScene_EndPoem(int iPad, void *initData, UILayer *parentLayer)
Minecraft *pMinecraft = Minecraft::GetInstance();
wstring playerName = L"";
- if(pMinecraft->localplayers[ui.GetWinUserIndex()] != nullptr)
+ if(pMinecraft->localplayers[ui.GetWinUserIndex()] != NULL)
{
playerName = escapeXML( pMinecraft->localplayers[ui.GetWinUserIndex()]->getDisplayName() );
}
@@ -159,14 +159,14 @@ void UIScene_EndPoem::handleInput(int iPad, int key, bool repeat, bool pressed,
Minecraft *pMinecraft = Minecraft::GetInstance();
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
{
- if(pMinecraft->localplayers[i] != nullptr)
+ if(pMinecraft->localplayers[i] != NULL)
{
app.SetAction(i,eAppAction_Respawn);
}
}
// This just allows it to be shown
- if(pMinecraft->localgameModes[ProfileManager.GetPrimaryPad()] != nullptr) pMinecraft->localgameModes[ProfileManager.GetPrimaryPad()]->getTutorial()->showTutorialPopup(true);
+ if(pMinecraft->localgameModes[ProfileManager.GetPrimaryPad()] != NULL) pMinecraft->localgameModes[ProfileManager.GetPrimaryPad()]->getTutorial()->showTutorialPopup(true);
updateTooltips();
navigateBack();
@@ -191,7 +191,7 @@ void UIScene_EndPoem::handleDestroy()
void UIScene_EndPoem::handleRequestMoreData(F64 startIndex, bool up)
{
- m_requestedLabel = static_cast<int>(startIndex);
+ m_requestedLabel = (int)startIndex;
}
void UIScene_EndPoem::updateNoise()
@@ -221,13 +221,13 @@ void UIScene_EndPoem::updateNoise()
{
if (ui.UsingBitmapFont())
{
- randomChar = SharedConstants::acceptableLetters[random->nextInt(static_cast<int>(SharedConstants::acceptableLetters.length()))];
+ randomChar = SharedConstants::acceptableLetters[random->nextInt((int)SharedConstants::acceptableLetters.length())];
}
else
{
// 4J-JEV: It'd be nice to avoid null characters when using asian languages.
static wstring acceptableLetters = L"!\"#$%&'()*+,-./0123456789:;<=>?@[\\]^_'|}~";
- randomChar = acceptableLetters[ random->nextInt(static_cast<int>(acceptableLetters.length())) ];
+ randomChar = acceptableLetters[ random->nextInt((int)acceptableLetters.length()) ];
}
wstring randomCharStr = L"";
diff --git a/Minecraft.Client/Common/UI/UIScene_FireworksMenu.cpp b/Minecraft.Client/Common/UI/UIScene_FireworksMenu.cpp
index b33e086a..1d24f989 100644
--- a/Minecraft.Client/Common/UI/UIScene_FireworksMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_FireworksMenu.cpp
@@ -11,14 +11,14 @@ UIScene_FireworksMenu::UIScene_FireworksMenu(int iPad, void *_initData, UILayer
// Setup all the Iggy references we need for this scene
initialiseMovie();
- FireworksScreenInput *initData = static_cast<FireworksScreenInput *>(_initData);
+ FireworksScreenInput *initData = (FireworksScreenInput *)_initData;
m_labelFireworks.init(app.GetString(IDS_HOW_TO_PLAY_MENU_FIREWORKS));
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_Fireworks_Menu, this);
}
@@ -174,7 +174,7 @@ void UIScene_FireworksMenu::setSectionSelectedSlot(ESceneSection eSection, int x
int index = (y * cols) + x;
- UIControl_SlotList *slotList = nullptr;
+ UIControl_SlotList *slotList = NULL;
switch( eSection )
{
case eSectionFireworksIngredients:
@@ -198,7 +198,7 @@ void UIScene_FireworksMenu::setSectionSelectedSlot(ESceneSection eSection, int x
UIControl *UIScene_FireworksMenu::getSection(ESceneSection eSection)
{
- UIControl *control = nullptr;
+ UIControl *control = NULL;
switch( eSection )
{
case eSectionFireworksIngredients:
diff --git a/Minecraft.Client/Common/UI/UIScene_FullscreenProgress.cpp b/Minecraft.Client/Common/UI/UIScene_FullscreenProgress.cpp
index e89c0626..fb17bda4 100644
--- a/Minecraft.Client/Common/UI/UIScene_FullscreenProgress.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_FullscreenProgress.cpp
@@ -4,6 +4,7 @@
#include "..\..\Minecraft.h"
#include "..\..\ProgressRenderer.h"
+
UIScene_FullscreenProgress::UIScene_FullscreenProgress(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
{
// Setup all the Iggy references we need for this scene
@@ -26,7 +27,7 @@ UIScene_FullscreenProgress::UIScene_FullscreenProgress(int iPad, void *initData,
m_buttonConfirm.init( app.GetString( IDS_CONFIRM_OK ), eControl_Confirm );
m_buttonConfirm.setVisible(false);
- LoadingInputParams *params = static_cast<LoadingInputParams *>(initData);
+ LoadingInputParams *params = (LoadingInputParams *)initData;
m_CompletionData = params->completionData;
m_iPad=params->completionData->iPad;
@@ -101,7 +102,7 @@ void UIScene_FullscreenProgress::handleDestroy()
DWORD exitcode = *((DWORD *)&code);
// If we're active, have a cancel func, and haven't already cancelled, call cancel func
- if( exitcode == STILL_ACTIVE && m_cancelFunc != nullptr && !m_bWasCancelled)
+ if( exitcode == STILL_ACTIVE && m_cancelFunc != NULL && !m_bWasCancelled)
{
m_bWasCancelled = true;
m_cancelFunc(m_cancelFuncParam);
@@ -223,7 +224,7 @@ void UIScene_FullscreenProgress::tick()
// This just allows it to be shown
Minecraft *pMinecraft = Minecraft::GetInstance();
- if(pMinecraft->localgameModes[ProfileManager.GetPrimaryPad()] != nullptr) pMinecraft->localgameModes[ProfileManager.GetPrimaryPad()]->getTutorial()->showTutorialPopup(true);
+ if(pMinecraft->localgameModes[ProfileManager.GetPrimaryPad()] != NULL) pMinecraft->localgameModes[ProfileManager.GetPrimaryPad()]->getTutorial()->showTutorialPopup(true);
ui.UpdatePlayerBasePositions();
navigateBack();
}
@@ -285,7 +286,7 @@ void UIScene_FullscreenProgress::handleInput(int iPad, int key, bool repeat, boo
break;
case ACTION_MENU_B:
case ACTION_MENU_CANCEL:
- if( pressed && m_cancelFunc != nullptr && !m_bWasCancelled )
+ if( pressed && m_cancelFunc != NULL && !m_bWasCancelled )
{
m_bWasCancelled = true;
m_cancelFunc( m_cancelFuncParam );
@@ -297,7 +298,7 @@ void UIScene_FullscreenProgress::handleInput(int iPad, int key, bool repeat, boo
void UIScene_FullscreenProgress::handlePress(F64 controlId, F64 childId)
{
- if(m_threadCompleted && static_cast<int>(controlId) == eControl_Confirm)
+ if(m_threadCompleted && (int)controlId == eControl_Confirm)
{
// This assumes all buttons can only be pressed with the A button
ui.AnimateKeyPress(m_iPad, ACTION_MENU_A, false, true, false);
diff --git a/Minecraft.Client/Common/UI/UIScene_FurnaceMenu.cpp b/Minecraft.Client/Common/UI/UIScene_FurnaceMenu.cpp
index 9dcbe45b..392221a6 100644
--- a/Minecraft.Client/Common/UI/UIScene_FurnaceMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_FurnaceMenu.cpp
@@ -10,7 +10,7 @@ UIScene_FurnaceMenu::UIScene_FurnaceMenu(int iPad, void *_initData, UILayer *par
// Setup all the Iggy references we need for this scene
initialiseMovie();
- FurnaceScreenInput *initData = static_cast<FurnaceScreenInput *>(_initData);
+ FurnaceScreenInput *initData = (FurnaceScreenInput *)_initData;
m_furnace = initData->furnace;
m_labelFurnace.init(m_furnace->getName());
@@ -21,9 +21,9 @@ UIScene_FurnaceMenu::UIScene_FurnaceMenu(int iPad, void *_initData, UILayer *par
m_progressFurnaceArrow.init(L"",0,0,24,0);
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_Furnace_Menu, this);
}
@@ -202,7 +202,7 @@ void UIScene_FurnaceMenu::setSectionSelectedSlot(ESceneSection eSection, int x,
int index = (y * cols) + x;
- UIControl_SlotList *slotList = nullptr;
+ UIControl_SlotList *slotList = NULL;
switch( eSection )
{
case eSectionFurnaceResult:
@@ -230,7 +230,7 @@ void UIScene_FurnaceMenu::setSectionSelectedSlot(ESceneSection eSection, int x,
UIControl *UIScene_FurnaceMenu::getSection(ESceneSection eSection)
{
- UIControl *control = nullptr;
+ UIControl *control = NULL;
switch( eSection )
{
case eSectionFurnaceResult:
diff --git a/Minecraft.Client/Common/UI/UIScene_HUD.cpp b/Minecraft.Client/Common/UI/UIScene_HUD.cpp
index 2773b874..5f401c39 100644
--- a/Minecraft.Client/Common/UI/UIScene_HUD.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_HUD.cpp
@@ -114,7 +114,7 @@ void UIScene_HUD::tick()
if(getMovie() && app.GetGameStarted())
{
Minecraft *pMinecraft = Minecraft::GetInstance();
- if(pMinecraft->localplayers[m_iPad] == nullptr || pMinecraft->localgameModes[m_iPad] == nullptr)
+ if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL)
{
return;
}
@@ -155,10 +155,10 @@ void UIScene_HUD::tick()
void UIScene_HUD::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;
int slot = -1;
- swscanf(static_cast<wchar_t *>(region->name),L"slot_%d",&slot);
+ swscanf((wchar_t*)region->name,L"slot_%d",&slot);
if (slot == -1)
{
app.DebugPrintf("This is not the control we are looking for\n");
@@ -167,7 +167,7 @@ void UIScene_HUD::customDraw(IggyCustomDrawCallbackRegion *region)
{
Slot *invSlot = pMinecraft->localplayers[m_iPad]->inventoryMenu->getSlot(InventoryMenu::USE_ROW_SLOT_START + slot);
shared_ptr<ItemInstance> item = invSlot->getItem();
- if(item != nullptr)
+ if(item != NULL)
{
unsigned char ucAlpha=app.GetGameSettings(ProfileManager.GetPrimaryPad(),eGameSetting_InterfaceOpacity);
float fVal;
@@ -180,8 +180,8 @@ void UIScene_HUD::customDraw(IggyCustomDrawCallbackRegion *region)
{
if(uiOpacityTimer<10)
{
- float fStep=(80.0f-static_cast<float>(ucAlpha))/10.0f;
- fVal=0.01f*(80.0f-((10.0f-static_cast<float>(uiOpacityTimer))*fStep));
+ float fStep=(80.0f-(float)ucAlpha)/10.0f;
+ fVal=0.01f*(80.0f-((10.0f-(float)uiOpacityTimer)*fStep));
}
else
{
@@ -190,12 +190,12 @@ void UIScene_HUD::customDraw(IggyCustomDrawCallbackRegion *region)
}
else
{
- fVal=0.01f*static_cast<float>(ucAlpha);
+ fVal=0.01f*(float)ucAlpha;
}
}
else
{
- fVal=0.01f*static_cast<float>(ucAlpha);
+ fVal=0.01f*(float)ucAlpha;
}
customDrawSlotControl(region,m_iPad,item,fVal,item->isFoil(),true);
}
@@ -254,7 +254,7 @@ void UIScene_HUD::handleReload()
int iGuiScale;
Minecraft *pMinecraft = Minecraft::GetInstance();
- if(pMinecraft->localplayers[m_iPad] == nullptr || pMinecraft->localplayers[m_iPad]->m_iScreenSection == C4JRender::VIEWPORT_TYPE_FULLSCREEN)
+ if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localplayers[m_iPad]->m_iScreenSection == C4JRender::VIEWPORT_TYPE_FULLSCREEN)
{
iGuiScale=app.GetGameSettings(m_iPad,eGameSetting_UISize);
}
@@ -595,7 +595,7 @@ void UIScene_HUD::SetSelectedLabel(const wstring &label)
void UIScene_HUD::HideSelectedLabel()
{
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcHideSelectedLabel , 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcHideSelectedLabel , 0 , NULL );
}
@@ -679,15 +679,15 @@ void UIScene_HUD::render(S32 width, S32 height, C4JRender::eViewportType viewpor
{
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_LEFT:
- yPos = static_cast<S32>(ui.getScreenHeight() / 2);
+ yPos = (S32)(ui.getScreenHeight() / 2);
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_RIGHT:
- xPos = static_cast<S32>(ui.getScreenWidth() / 2);
+ xPos = (S32)(ui.getScreenWidth() / 2);
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_BOTTOM_RIGHT:
- xPos = static_cast<S32>(ui.getScreenWidth() / 2);
- yPos = static_cast<S32>(ui.getScreenHeight() / 2);
+ xPos = (S32)(ui.getScreenWidth() / 2);
+ yPos = (S32)(ui.getScreenHeight() / 2);
break;
}
ui.setupRenderPosition(xPos, yPos);
@@ -701,14 +701,14 @@ void UIScene_HUD::render(S32 width, S32 height, C4JRender::eViewportType viewpor
{
case C4JRender::VIEWPORT_TYPE_SPLIT_LEFT:
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
- tileHeight = static_cast<S32>(ui.getScreenHeight());
+ tileHeight = (S32)(ui.getScreenHeight());
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_TOP:
- tileWidth = static_cast<S32>(ui.getScreenWidth());
+ tileWidth = (S32)(ui.getScreenWidth());
tileYStart = (S32)(m_movieHeight / 2);
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
- tileWidth = static_cast<S32>(ui.getScreenWidth());
+ tileWidth = (S32)(ui.getScreenWidth());
tileYStart = (S32)(m_movieHeight / 2);
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_LEFT:
@@ -744,7 +744,7 @@ void UIScene_HUD::handleTimerComplete(int id)
Minecraft *pMinecraft = Minecraft::GetInstance();
bool anyVisible = false;
- if(pMinecraft->localplayers[m_iPad]!= nullptr)
+ if(pMinecraft->localplayers[m_iPad]!= NULL)
{
Gui *pGui = pMinecraft->gui;
//DWORD messagesToDisplay = min( CHAT_LINES_COUNT, pGui->getMessagesCount(m_iPad) );
@@ -802,11 +802,11 @@ void UIScene_HUD::repositionHud()
{
case C4JRender::VIEWPORT_TYPE_SPLIT_LEFT:
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
- height = static_cast<S32>(ui.getScreenHeight());
+ height = (S32)(ui.getScreenHeight());
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_TOP:
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
- width = static_cast<S32>(ui.getScreenWidth());
+ width = (S32)(ui.getScreenWidth());
break;
}
@@ -865,7 +865,7 @@ void UIScene_HUD::handleGameTick()
if(getMovie() && app.GetGameStarted())
{
Minecraft *pMinecraft = Minecraft::GetInstance();
- if(pMinecraft->localplayers[m_iPad] == nullptr || pMinecraft->localgameModes[m_iPad] == nullptr)
+ if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL)
{
m_parentLayer->showComponent(m_iPad, eUIScene_HUD,false);
return;
diff --git a/Minecraft.Client/Common/UI/UIScene_HelpAndOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_HelpAndOptionsMenu.cpp
index ab79b940..292b77af 100644
--- a/Minecraft.Client/Common/UI/UIScene_HelpAndOptionsMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_HelpAndOptionsMenu.cpp
@@ -8,7 +8,7 @@ UIScene_HelpAndOptionsMenu::UIScene_HelpAndOptionsMenu(int iPad, void *initData,
// Setup all the Iggy references we need for this scene
initialiseMovie();
- m_bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ m_bNotInGame=(Minecraft::GetInstance()->level==NULL);
m_buttons[BUTTON_HAO_CHANGESKIN].init(IDS_CHANGE_SKIN,BUTTON_HAO_CHANGESKIN);
m_buttons[BUTTON_HAO_HOWTOPLAY].init(IDS_HOW_TO_PLAY,BUTTON_HAO_HOWTOPLAY);
@@ -41,7 +41,7 @@ UIScene_HelpAndOptionsMenu::UIScene_HelpAndOptionsMenu(int iPad, void *initData,
// 4J-PB - do not need a storage device to see this menu - just need one when you choose to re-install them
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
// any content to be re-installed?
if(m_iPad==ProfileManager.GetPrimaryPad() && bNotInGame)
@@ -103,7 +103,7 @@ void UIScene_HelpAndOptionsMenu::updateTooltips()
void UIScene_HelpAndOptionsMenu::updateComponents()
{
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
if(bNotInGame)
{
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
@@ -128,7 +128,7 @@ void UIScene_HelpAndOptionsMenu::handleReload()
#endif
// 4J-PB - do not need a storage device to see this menu - just need one when you choose to re-install them
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
// any content to be re-installed?
if(m_iPad==ProfileManager.GetPrimaryPad() && bNotInGame)
@@ -207,7 +207,7 @@ void UIScene_HelpAndOptionsMenu::handleInput(int iPad, int key, bool repeat, boo
void UIScene_HelpAndOptionsMenu::handlePress(F64 controlId, F64 childId)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case BUTTON_HAO_CHANGESKIN:
ui.NavigateToScene(m_iPad, eUIScene_SkinSelectMenu);
diff --git a/Minecraft.Client/Common/UI/UIScene_HopperMenu.cpp b/Minecraft.Client/Common/UI/UIScene_HopperMenu.cpp
index 8c657c97..f0f6db18 100644
--- a/Minecraft.Client/Common/UI/UIScene_HopperMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_HopperMenu.cpp
@@ -10,14 +10,14 @@ UIScene_HopperMenu::UIScene_HopperMenu(int iPad, void *_initData, UILayer *paren
// Setup all the Iggy references we need for this scene
initialiseMovie();
- HopperScreenInput *initData = static_cast<HopperScreenInput *>(_initData);
+ HopperScreenInput *initData = (HopperScreenInput *)_initData;
m_labelDispenser.init(initData->hopper->getName());
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_Hopper_Menu, this);
}
@@ -156,7 +156,7 @@ void UIScene_HopperMenu::setSectionSelectedSlot(ESceneSection eSection, int x, i
int index = (y * cols) + x;
- UIControl_SlotList *slotList = nullptr;
+ UIControl_SlotList *slotList = NULL;
switch( eSection )
{
case eSectionHopperContents:
@@ -177,7 +177,7 @@ void UIScene_HopperMenu::setSectionSelectedSlot(ESceneSection eSection, int x, i
UIControl *UIScene_HopperMenu::getSection(ESceneSection eSection)
{
- UIControl *control = nullptr;
+ UIControl *control = NULL;
switch( eSection )
{
case eSectionHopperContents:
diff --git a/Minecraft.Client/Common/UI/UIScene_HorseInventoryMenu.cpp b/Minecraft.Client/Common/UI/UIScene_HorseInventoryMenu.cpp
index c062df4e..ab98e30f 100644
--- a/Minecraft.Client/Common/UI/UIScene_HorseInventoryMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_HorseInventoryMenu.cpp
@@ -11,16 +11,16 @@ UIScene_HorseInventoryMenu::UIScene_HorseInventoryMenu(int iPad, void *_initData
// Setup all the Iggy references we need for this scene
initialiseMovie();
- HorseScreenInput *initData = static_cast<HorseScreenInput *>(_initData);
+ HorseScreenInput *initData = (HorseScreenInput *)_initData;
m_labelHorse.init( initData->container->getName() );
m_inventory = initData->inventory;
m_horse = initData->horse;
Minecraft *pMinecraft = Minecraft::GetInstance();
- if( pMinecraft->localgameModes[iPad] != nullptr )
+ if( pMinecraft->localgameModes[iPad] != NULL )
{
- TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[iPad]);
+ TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[iPad];
m_previousTutorialState = gameMode->getTutorial()->getCurrentState();
gameMode->getTutorial()->changeTutorialState(e_Tutorial_State_Horse_Menu, this);
}
@@ -240,7 +240,7 @@ void UIScene_HorseInventoryMenu::setSectionSelectedSlot(ESceneSection eSection,
int index = (y * cols) + x;
- UIControl_SlotList *slotList = nullptr;
+ UIControl_SlotList *slotList = NULL;
switch( eSection )
{
case eSectionHorseArmor:
@@ -268,7 +268,7 @@ void UIScene_HorseInventoryMenu::setSectionSelectedSlot(ESceneSection eSection,
UIControl *UIScene_HorseInventoryMenu::getSection(ESceneSection eSection)
{
- UIControl *control = nullptr;
+ UIControl *control = NULL;
switch( eSection )
{
case eSectionHorseArmor:
@@ -296,7 +296,7 @@ UIControl *UIScene_HorseInventoryMenu::getSection(ESceneSection eSection)
void UIScene_HorseInventoryMenu::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"horse")==0)
{
diff --git a/Minecraft.Client/Common/UI/UIScene_HowToPlay.cpp b/Minecraft.Client/Common/UI/UIScene_HowToPlay.cpp
index bc721802..e33e24fe 100644
--- a/Minecraft.Client/Common/UI/UIScene_HowToPlay.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_HowToPlay.cpp
@@ -136,7 +136,7 @@ UIScene_HowToPlay::UIScene_HowToPlay(int iPad, void *initData, UILayer *parentLa
// Extract pad and required page from init data. We just put the data into the pointer rather than using it as an address.
size_t uiInitData = ( size_t )( initData );
- EHowToPlayPage eStartPage = static_cast<EHowToPlayPage>((uiInitData >> 16) & 0xFFF); // Ignores MSB which is set to 1!
+ EHowToPlayPage eStartPage = ( EHowToPlayPage )( ( uiInitData >> 16 ) & 0xFFF ); // Ignores MSB which is set to 1!
TelemetryManager->RecordMenuShown(m_iPad, eUIScene_HowToPlay, (ETelemetry_HowToPlay_SubMenuId)eStartPage);
@@ -216,10 +216,10 @@ void UIScene_HowToPlay::handleInput(int iPad, int key, bool repeat, bool pressed
if(pressed)
{
// Next page
- int iNextPage = static_cast<int>(m_eCurrPage) + 1;
+ int iNextPage = ( int )( m_eCurrPage ) + 1;
if ( iNextPage != eHowToPlay_NumPages )
{
- StartPage( static_cast<EHowToPlayPage>(iNextPage) );
+ StartPage( ( EHowToPlayPage )( iNextPage ) );
ui.PlayUISFX(eSFX_Press);
}
handled = true;
@@ -229,7 +229,7 @@ void UIScene_HowToPlay::handleInput(int iPad, int key, bool repeat, bool pressed
if(pressed)
{
// Previous page
- int iPrevPage = static_cast<int>(m_eCurrPage) - 1;
+ int iPrevPage = ( int )( m_eCurrPage ) - 1;
// 4J Stu - Add back for future platforms
#if 0
@@ -247,7 +247,7 @@ void UIScene_HowToPlay::handleInput(int iPad, int key, bool repeat, bool pressed
{
if ( iPrevPage >= 0 )
{
- StartPage( static_cast<EHowToPlayPage>(iPrevPage) );
+ StartPage( ( EHowToPlayPage )( iPrevPage ) );
ui.PlayUISFX(eSFX_Press);
}
@@ -300,8 +300,8 @@ void UIScene_HowToPlay::StartPage( EHowToPlayPage ePage )
finalText = startTags + finalText;
vector<wstring> paragraphs;
- size_t lastIndex = 0;
- for ( size_t index = finalText.find(L"\r\n", lastIndex, 2);
+ int lastIndex = 0;
+ for ( int index = finalText.find(L"\r\n", lastIndex, 2);
index != wstring::npos;
index = finalText.find(L"\r\n", lastIndex, 2)
)
@@ -318,7 +318,7 @@ void UIScene_HowToPlay::StartPage( EHowToPlayPage ePage )
IggyStringUTF16 * stringVal = new IggyStringUTF16[paragraphs.size()];
value[0].type = IGGY_DATATYPE_number;
- value[0].number = gs_pageToFlashMapping[static_cast<int>(ePage)];
+ value[0].number = gs_pageToFlashMapping[(int)ePage];
for(unsigned int i = 0; i < paragraphs.size(); ++i)
{
diff --git a/Minecraft.Client/Common/UI/UIScene_HowToPlayMenu.cpp b/Minecraft.Client/Common/UI/UIScene_HowToPlayMenu.cpp
index 728bd4c0..92e8bdef 100644
--- a/Minecraft.Client/Common/UI/UIScene_HowToPlayMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_HowToPlayMenu.cpp
@@ -122,7 +122,7 @@ void UIScene_HowToPlayMenu::updateTooltips()
void UIScene_HowToPlayMenu::updateComponents()
{
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
if(bNotInGame)
{
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
@@ -191,13 +191,13 @@ void UIScene_HowToPlayMenu::handleInput(int iPad, int key, bool repeat, bool pre
void UIScene_HowToPlayMenu::handlePress(F64 controlId, F64 childId)
{
- if( static_cast<int>(controlId) == eControl_Buttons)
+ if( (int)controlId == eControl_Buttons)
{
//CD - Added for audio
ui.PlayUISFX(eSFX_Press);
unsigned int uiInitData;
- uiInitData = ( ( 1 << 31 ) | ( m_uiHTPSceneA[static_cast<int>(childId)] << 16 ) | static_cast<short>(m_iPad) );
+ uiInitData = ( ( 1 << 31 ) | ( m_uiHTPSceneA[(int)childId] << 16 ) | ( short )( m_iPad ) );
ui.NavigateToScene(m_iPad, eUIScene_HowToPlay, ( void* )( uiInitData ) );
}
}
diff --git a/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp
index 51992e32..68ac537e 100644
--- a/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp
@@ -126,7 +126,7 @@ void UIScene_InGameHostOptionsMenu::handleInput(int iPad, int key, bool repeat,
shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad];
if(player->connection)
{
- player->connection->send(std::make_shared<ServerSettingsChangedPacket>(ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, hostOptions));
+ player->connection->send( shared_ptr<ServerSettingsChangedPacket>( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, hostOptions) ) );
}
}
@@ -153,7 +153,7 @@ void UIScene_InGameHostOptionsMenu::handlePress(F64 controlId, F64 childId)
TeleportMenuInitData *initData = new TeleportMenuInitData();
initData->iPad = m_iPad;
initData->teleportToPlayer = false;
- if( static_cast<int>(controlId) == eControl_TeleportToPlayer )
+ if( (int)controlId == eControl_TeleportToPlayer )
{
initData->teleportToPlayer = true;
}
diff --git a/Minecraft.Client/Common/UI/UIScene_InGameInfoMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InGameInfoMenu.cpp
index 7fc3d035..57acf345 100644
--- a/Minecraft.Client/Common/UI/UIScene_InGameInfoMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_InGameInfoMenu.cpp
@@ -23,7 +23,7 @@ UIScene_InGameInfoMenu::UIScene_InGameInfoMenu(int iPad, void *initData, UILayer
{
INetworkPlayer *player = g_NetworkManager.GetPlayerByIndex( i );
- if( player != nullptr )
+ if( player != NULL )
{
PlayerInfo *info = BuildPlayerInfo(player);
@@ -36,7 +36,7 @@ UIScene_InGameInfoMenu::UIScene_InGameInfoMenu(int iPad, void *initData, UILayer
INetworkPlayer *thisPlayer = g_NetworkManager.GetLocalPlayerByUserIndex( m_iPad );
m_isHostPlayer = false;
- if(thisPlayer != nullptr) m_isHostPlayer = thisPlayer->IsHost() == TRUE;
+ if(thisPlayer != NULL) m_isHostPlayer = thisPlayer->IsHost() == TRUE;
Minecraft *pMinecraft = Minecraft::GetInstance();
shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad];
@@ -109,7 +109,7 @@ void UIScene_InGameInfoMenu::updateTooltips()
{
keyA = IDS_TOOLTIPS_SELECT;
}
- else if( selectedPlayer != nullptr)
+ else if( selectedPlayer != NULL)
{
bool editingHost = selectedPlayer->IsHost();
if( (cheats && (m_isHostPlayer || !editingHost ) ) || (!trust && (m_isHostPlayer || !editingHost))
@@ -134,7 +134,7 @@ void UIScene_InGameInfoMenu::updateTooltips()
if(!m_buttonGameOptions.hasFocus())
{
// if the player is me, then view gamer profile
- if(selectedPlayer != nullptr && selectedPlayer->IsLocal() && selectedPlayer->GetUserIndex()==m_iPad)
+ if(selectedPlayer != NULL && selectedPlayer->IsLocal() && selectedPlayer->GetUserIndex()==m_iPad)
{
ikeyY = IDS_TOOLTIPS_VIEW_GAMERPROFILE;
}
@@ -172,7 +172,7 @@ void UIScene_InGameInfoMenu::handleReload()
{
INetworkPlayer *player = g_NetworkManager.GetPlayerByIndex( i );
- if( player != nullptr )
+ if( player != NULL )
{
PlayerInfo *info = BuildPlayerInfo(player);
@@ -183,7 +183,7 @@ void UIScene_InGameInfoMenu::handleReload()
INetworkPlayer *thisPlayer = g_NetworkManager.GetLocalPlayerByUserIndex( m_iPad );
m_isHostPlayer = false;
- if(thisPlayer != nullptr) m_isHostPlayer = thisPlayer->IsHost() == TRUE;
+ if(thisPlayer != NULL) m_isHostPlayer = thisPlayer->IsHost() == TRUE;
Minecraft *pMinecraft = Minecraft::GetInstance();
shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad];
@@ -209,7 +209,7 @@ void UIScene_InGameInfoMenu::tick()
{
INetworkPlayer *player = g_NetworkManager.GetPlayerByIndex( i );
- if(player != nullptr)
+ if(player != NULL)
{
PlayerInfo *info = BuildPlayerInfo(player);
@@ -283,7 +283,7 @@ void UIScene_InGameInfoMenu::handleInput(int iPad, int key, bool repeat, bool pr
if(pressed && m_playerList.hasFocus() && (m_playerList.getItemCount() > 0) && (m_playerList.getCurrentSelection() < m_players.size()) )
{
INetworkPlayer *player = g_NetworkManager.GetPlayerBySmallId(m_players[m_playerList.getCurrentSelection()]->m_smallId);
- if( player != nullptr )
+ if( player != NULL )
{
PlayerUID uid = player->GetUID();
if( uid != INVALID_XUID )
@@ -327,14 +327,14 @@ void UIScene_InGameInfoMenu::handleInput(int iPad, int key, bool repeat, bool pr
void UIScene_InGameInfoMenu::handlePress(F64 controlId, F64 childId)
{
- app.DebugPrintf("Pressed = %d, %d\n", static_cast<int>(controlId), static_cast<int>(childId));
- switch(static_cast<int>(controlId))
+ app.DebugPrintf("Pressed = %d, %d\n", (int)controlId, (int)childId);
+ switch((int)controlId)
{
case eControl_GameOptions:
ui.NavigateToScene(m_iPad,eUIScene_InGameHostOptionsMenu);
break;
case eControl_GamePlayers:
- int currentSelection = static_cast<int>(childId);
+ int currentSelection = (int)childId;
INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId(m_players[currentSelection]->m_smallId);
Minecraft *pMinecraft = Minecraft::GetInstance();
@@ -344,7 +344,7 @@ void UIScene_InGameInfoMenu::handlePress(F64 controlId, F64 childId)
bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0;
bool trust = app.GetGameHostOption(eGameHostOption_TrustPlayers) != 0;
- if( isOp && selectedPlayer != nullptr)
+ if( isOp && selectedPlayer != NULL)
{
bool editingHost = selectedPlayer->IsHost();
if( (cheats && (m_isHostPlayer || !editingHost ) ) || (!trust && (m_isHostPlayer || !editingHost))
@@ -377,10 +377,10 @@ void UIScene_InGameInfoMenu::handlePress(F64 controlId, F64 childId)
void UIScene_InGameInfoMenu::handleFocusChange(F64 controlId, F64 childId)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_GamePlayers:
- m_playerList.updateChildFocus( static_cast<int>(childId) );
+ m_playerList.updateChildFocus( (int) childId );
};
updateTooltips();
}
@@ -389,7 +389,7 @@ void UIScene_InGameInfoMenu::OnPlayerChanged(void *callbackParam, INetworkPlayer
{
app.DebugPrintf("<UIScene_InGameInfoMenu::OnPlayerChanged> Player \"%ls\" %s (smallId: %d)\n", pPlayer->GetOnlineName(), leaving ? "leaving" : "joining", pPlayer->GetSmallId());
- UIScene_InGameInfoMenu *scene = static_cast<UIScene_InGameInfoMenu *>(callbackParam);
+ UIScene_InGameInfoMenu *scene = (UIScene_InGameInfoMenu *)callbackParam;
bool playerFound = false;
int foundIndex = 0;
for(int i = 0; i < scene->m_players.size(); ++i)
@@ -439,7 +439,7 @@ void UIScene_InGameInfoMenu::OnPlayerChanged(void *callbackParam, INetworkPlayer
int UIScene_InGameInfoMenu::KickPlayerReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- BYTE smallId = *static_cast<BYTE *>(pParam);
+ BYTE smallId = *(BYTE *)pParam;
delete pParam;
if(result==C4JStorage::EMessage_ResultAccept)
@@ -448,7 +448,7 @@ int UIScene_InGameInfoMenu::KickPlayerReturned(void *pParam,int iPad,C4JStorage:
shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[iPad];
if(localPlayer->connection)
{
- localPlayer->connection->send(std::make_shared<KickPlayerPacket>(smallId));
+ localPlayer->connection->send( shared_ptr<KickPlayerPacket>( new KickPlayerPacket(smallId) ) );
}
}
@@ -473,7 +473,7 @@ UIScene_InGameInfoMenu::PlayerInfo *UIScene_InGameInfoMenu::BuildPlayerInfo(INet
}
int voiceStatus = 0;
- if(player != nullptr && player->HasVoice() )
+ if(player != NULL && player->HasVoice() )
{
if( player->IsMutedByLocalUser(m_iPad) )
{
diff --git a/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp
index 57937543..db9c1d4d 100644
--- a/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp
@@ -6,6 +6,7 @@
#include "..\..\ClientConnection.h"
#include "..\..\..\Minecraft.World\net.minecraft.network.packet.h"
+
#define CHECKBOXES_TIMER_ID 0
#define CHECKBOXES_TIMER_TIME 100
@@ -16,21 +17,21 @@ UIScene_InGamePlayerOptionsMenu::UIScene_InGamePlayerOptionsMenu(int iPad, void
m_bShouldNavBack = false;
- InGamePlayerOptionsInitData *initData = static_cast<InGamePlayerOptionsInitData *>(_initData);
+ InGamePlayerOptionsInitData *initData = (InGamePlayerOptionsInitData *)_initData;
m_networkSmallId = initData->networkSmallId;
m_playerPrivileges = initData->playerPrivileges;
INetworkPlayer *localPlayer = g_NetworkManager.GetLocalPlayerByUserIndex( m_iPad );
INetworkPlayer *editingPlayer = g_NetworkManager.GetPlayerBySmallId(m_networkSmallId);
- if(editingPlayer != nullptr)
+ if(editingPlayer != NULL)
{
m_labelGamertag.init(editingPlayer->GetDisplayName());
}
bool trustPlayers = app.GetGameHostOption(eGameHostOption_TrustPlayers) != 0;
bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0;
- m_editingSelf = (localPlayer != nullptr && localPlayer == editingPlayer);
+ m_editingSelf = (localPlayer != NULL && localPlayer == editingPlayer);
if( m_editingSelf || trustPlayers || editingPlayer->IsHost())
{
@@ -240,7 +241,7 @@ void UIScene_InGamePlayerOptionsMenu::handleReload()
bool trustPlayers = app.GetGameHostOption(eGameHostOption_TrustPlayers) != 0;
bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0;
- m_editingSelf = (localPlayer != nullptr && localPlayer == editingPlayer);
+ m_editingSelf = (localPlayer != NULL && localPlayer == editingPlayer);
if( m_editingSelf || trustPlayers || editingPlayer->IsHost())
{
@@ -371,7 +372,7 @@ void UIScene_InGamePlayerOptionsMenu::handleInput(int iPad, int key, bool repeat
else
{
INetworkPlayer *editingPlayer = g_NetworkManager.GetPlayerBySmallId(m_networkSmallId);
- if(!trustPlayers && (editingPlayer != nullptr && !editingPlayer->IsHost() ) )
+ if(!trustPlayers && (editingPlayer != NULL && !editingPlayer->IsHost() ) )
{
Player::setPlayerGamePrivilege(m_playerPrivileges,Player::ePlayerGamePrivilege_CannotMine,!m_checkboxes[eControl_BuildAndMine].IsChecked());
Player::setPlayerGamePrivilege(m_playerPrivileges,Player::ePlayerGamePrivilege_CannotBuild,!m_checkboxes[eControl_BuildAndMine].IsChecked());
@@ -404,7 +405,7 @@ void UIScene_InGamePlayerOptionsMenu::handleInput(int iPad, int key, bool repeat
shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad];
if(player->connection)
{
- player->connection->send(std::make_shared<PlayerInfoPacket>(m_networkSmallId, -1, m_playerPrivileges));
+ player->connection->send( shared_ptr<PlayerInfoPacket>( new PlayerInfoPacket( m_networkSmallId, -1, m_playerPrivileges) ) );
}
}
navigateBack();
@@ -427,7 +428,7 @@ void UIScene_InGamePlayerOptionsMenu::handleInput(int iPad, int key, bool repeat
void UIScene_InGamePlayerOptionsMenu::handlePress(F64 controlId, F64 childId)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_Kick:
{
@@ -445,7 +446,7 @@ void UIScene_InGamePlayerOptionsMenu::handlePress(F64 controlId, F64 childId)
int UIScene_InGamePlayerOptionsMenu::KickPlayerReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- BYTE smallId = *static_cast<BYTE *>(pParam);
+ BYTE smallId = *(BYTE *)pParam;
delete pParam;
if(result==C4JStorage::EMessage_ResultAccept)
@@ -454,7 +455,7 @@ int UIScene_InGamePlayerOptionsMenu::KickPlayerReturned(void *pParam,int iPad,C4
shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[iPad];
if(localPlayer->connection)
{
- localPlayer->connection->send(std::make_shared<KickPlayerPacket>(smallId));
+ localPlayer->connection->send( shared_ptr<KickPlayerPacket>( new KickPlayerPacket(smallId) ) );
}
// Fix for #61494 - [CRASH]: TU7: Code: Multiplayer: Title may crash while kicking a player from an online game.
@@ -469,12 +470,12 @@ int UIScene_InGamePlayerOptionsMenu::KickPlayerReturned(void *pParam,int iPad,C4
void UIScene_InGamePlayerOptionsMenu::OnPlayerChanged(void *callbackParam, INetworkPlayer *pPlayer, bool leaving)
{
app.DebugPrintf("UIScene_InGamePlayerOptionsMenu::OnPlayerChanged");
- UIScene_InGamePlayerOptionsMenu *scene = static_cast<UIScene_InGamePlayerOptionsMenu *>(callbackParam);
+ UIScene_InGamePlayerOptionsMenu *scene = (UIScene_InGamePlayerOptionsMenu *)callbackParam;
- UIScene_InGameInfoMenu *infoScene = static_cast<UIScene_InGameInfoMenu *>(scene->getBackScene());
- if(infoScene != nullptr) UIScene_InGameInfoMenu::OnPlayerChanged(infoScene,pPlayer,leaving);
+ UIScene_InGameInfoMenu *infoScene = (UIScene_InGameInfoMenu *)scene->getBackScene();
+ if(infoScene != NULL) UIScene_InGameInfoMenu::OnPlayerChanged(infoScene,pPlayer,leaving);
- if(leaving && pPlayer != nullptr && pPlayer->GetSmallId() == scene->m_networkSmallId)
+ if(leaving && pPlayer != NULL && pPlayer->GetSmallId() == scene->m_networkSmallId)
{
scene->m_bShouldNavBack = true;
}
@@ -496,7 +497,7 @@ void UIScene_InGamePlayerOptionsMenu::resetCheatCheckboxes()
void UIScene_InGamePlayerOptionsMenu::handleCheckboxToggled(F64 controlId, bool selected)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_Op:
// flag that the moderator state has changed
diff --git a/Minecraft.Client/Common/UI/UIScene_InGameSaveManagementMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InGameSaveManagementMenu.cpp
index fb118b15..fa2c7e61 100644
--- a/Minecraft.Client/Common/UI/UIScene_InGameSaveManagementMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_InGameSaveManagementMenu.cpp
@@ -8,7 +8,7 @@
int UIScene_InGameSaveManagementMenu::LoadSaveDataThumbnailReturned(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes)
{
- UIScene_InGameSaveManagementMenu *pClass= static_cast<UIScene_InGameSaveManagementMenu *>(lpParam);
+ UIScene_InGameSaveManagementMenu *pClass= (UIScene_InGameSaveManagementMenu *)lpParam;
app.DebugPrintf("Received data for save thumbnail\n");
@@ -20,9 +20,9 @@ int UIScene_InGameSaveManagementMenu::LoadSaveDataThumbnailReturned(LPVOID lpPar
}
else
{
- pClass->m_saveDetails[pClass->m_iRequestingThumbnailId].pbThumbnailData = nullptr;
+ pClass->m_saveDetails[pClass->m_iRequestingThumbnailId].pbThumbnailData = NULL;
pClass->m_saveDetails[pClass->m_iRequestingThumbnailId].dwThumbnailSize = 0;
- app.DebugPrintf("Save thumbnail data is nullptr, or has size 0\n");
+ app.DebugPrintf("Save thumbnail data is NULL, or has size 0\n");
}
pClass->m_bSaveThumbnailReady = true;
@@ -55,9 +55,9 @@ UIScene_InGameSaveManagementMenu::UIScene_InGameSaveManagementMenu(int iPad, voi
m_bRetrievingSaveThumbnails = false;
m_bSaveThumbnailReady = false;
m_bExitScene=false;
- m_pSaveDetails=nullptr;
+ m_pSaveDetails=NULL;
m_bSavesDisplayed=false;
- m_saveDetails = nullptr;
+ m_saveDetails = NULL;
m_iSaveDetailsCount = 0;
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) || defined(_DURANGO)
@@ -198,17 +198,17 @@ void UIScene_InGameSaveManagementMenu::tick()
if(!m_bSavesDisplayed)
{
m_pSaveDetails=StorageManager.ReturnSavesInfo();
- if(m_pSaveDetails!=nullptr)
+ if(m_pSaveDetails!=NULL)
{
m_spaceIndicatorSaves.reset();
m_bSavesDisplayed=true;
- if(m_saveDetails!=nullptr)
+ if(m_saveDetails!=NULL)
{
for(unsigned int i = 0; i < m_pSaveDetails->iSaveC; ++i)
{
- if(m_saveDetails[i].pbThumbnailData!=nullptr)
+ if(m_saveDetails[i].pbThumbnailData!=NULL)
{
delete m_saveDetails[i].pbThumbnailData;
}
@@ -371,9 +371,9 @@ void UIScene_InGameSaveManagementMenu::GetSaveInfo( )
m_controlSavesTimer.setVisible(true);
m_pSaveDetails=StorageManager.ReturnSavesInfo();
- if(m_pSaveDetails==nullptr)
+ if(m_pSaveDetails==NULL)
{
- C4JStorage::ESaveGameState eSGIStatus= StorageManager.GetSavesInfo(m_iPad,nullptr,this,"save");
+ C4JStorage::ESaveGameState eSGIStatus= StorageManager.GetSavesInfo(m_iPad,NULL,this,"save");
}
@@ -418,12 +418,12 @@ void UIScene_InGameSaveManagementMenu::handleInput(int iPad, int key, bool repea
void UIScene_InGameSaveManagementMenu::handleInitFocus(F64 controlId, F64 childId)
{
- app.DebugPrintf(app.USER_SR, "UIScene_InGameSaveManagementMenu::handleInitFocus - %d , %d\n", static_cast<int>(controlId), static_cast<int>(childId));
+ app.DebugPrintf(app.USER_SR, "UIScene_InGameSaveManagementMenu::handleInitFocus - %d , %d\n", (int)controlId, (int)childId);
}
void UIScene_InGameSaveManagementMenu::handleFocusChange(F64 controlId, F64 childId)
{
- app.DebugPrintf(app.USER_SR, "UIScene_InGameSaveManagementMenu::handleFocusChange - %d , %d\n", static_cast<int>(controlId), static_cast<int>(childId));
+ app.DebugPrintf(app.USER_SR, "UIScene_InGameSaveManagementMenu::handleFocusChange - %d , %d\n", (int)controlId, (int)childId);
m_iSaveListIndex = childId;
if(m_bSavesDisplayed) m_bUpdateSaveSize = true;
updateTooltips();
@@ -431,7 +431,7 @@ void UIScene_InGameSaveManagementMenu::handleFocusChange(F64 controlId, F64 chil
void UIScene_InGameSaveManagementMenu::handlePress(F64 controlId, F64 childId)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_SavesList:
{
@@ -452,7 +452,7 @@ void UIScene_InGameSaveManagementMenu::handlePress(F64 controlId, F64 childId)
int UIScene_InGameSaveManagementMenu::DeleteSaveDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- UIScene_InGameSaveManagementMenu* pClass = static_cast<UIScene_InGameSaveManagementMenu *>(pParam);
+ UIScene_InGameSaveManagementMenu* pClass = (UIScene_InGameSaveManagementMenu*)pParam;
// results switched for this dialog
if(result==C4JStorage::EMessage_ResultDecline)
@@ -477,7 +477,7 @@ int UIScene_InGameSaveManagementMenu::DeleteSaveDialogReturned(void *pParam,int
int UIScene_InGameSaveManagementMenu::DeleteSaveDataReturned(LPVOID lpParam,bool bRes)
{
- UIScene_InGameSaveManagementMenu* pClass = static_cast<UIScene_InGameSaveManagementMenu *>(lpParam);
+ UIScene_InGameSaveManagementMenu* pClass = (UIScene_InGameSaveManagementMenu*)lpParam;
if(bRes)
{
diff --git a/Minecraft.Client/Common/UI/UIScene_InventoryMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InventoryMenu.cpp
index 4e217c77..4a9dab43 100644
--- a/Minecraft.Client/Common/UI/UIScene_InventoryMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_InventoryMenu.cpp
@@ -23,17 +23,17 @@ UIScene_InventoryMenu::UIScene_InventoryMenu(int iPad, void *_initData, UILayer
// Setup all the Iggy references we need for this scene
initialiseMovie();
- InventoryScreenInput *initData = static_cast<InventoryScreenInput *>(_initData);
+ InventoryScreenInput *initData = (InventoryScreenInput *)_initData;
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_Inventory_Menu, this);
}
- InventoryMenu *menu = static_cast<InventoryMenu *>(initData->player->inventoryMenu);
+ InventoryMenu *menu = (InventoryMenu *)initData->player->inventoryMenu;
initData->player->awardStat(GenericStats::openInventory(),GenericStats::param_openInventory());
@@ -182,7 +182,7 @@ void UIScene_InventoryMenu::setSectionSelectedSlot(ESceneSection eSection, int x
int index = (y * cols) + x;
- UIControl_SlotList *slotList = nullptr;
+ UIControl_SlotList *slotList = NULL;
switch( eSection )
{
case eSectionInventoryArmor:
@@ -201,7 +201,7 @@ void UIScene_InventoryMenu::setSectionSelectedSlot(ESceneSection eSection, int x
UIControl *UIScene_InventoryMenu::getSection(ESceneSection eSection)
{
- UIControl *control = nullptr;
+ UIControl *control = NULL;
switch( eSection )
{
case eSectionInventoryArmor:
@@ -220,7 +220,7 @@ UIControl *UIScene_InventoryMenu::getSection(ESceneSection eSection)
void UIScene_InventoryMenu::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"player")==0)
{
@@ -253,7 +253,7 @@ void UIScene_InventoryMenu::updateEffectsDisplay()
Minecraft *pMinecraft = Minecraft::GetInstance();
shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad];
- if(player == nullptr) return;
+ if(player == NULL) return;
vector<MobEffectInstance *> *activeEffects = player->getActiveEffects();
diff --git a/Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp b/Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp
index 5ea5dd32..6e354922 100644
--- a/Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp
@@ -16,7 +16,7 @@ UIScene_JoinMenu::UIScene_JoinMenu(int iPad, void *_initData, UILayer *parentLay
// Setup all the Iggy references we need for this scene
initialiseMovie();
- JoinMenuInitData *initData = static_cast<JoinMenuInitData *>(_initData);
+ JoinMenuInitData *initData = (JoinMenuInitData *)_initData;
m_selectedSession = initData->selectedSession;
m_friendInfoUpdatedOK = false;
m_friendInfoUpdatedERROR = false;
@@ -62,7 +62,7 @@ void UIScene_JoinMenu::tick()
#if defined(__PS3__) || defined(__ORBIS__) || defined __PSVITA__
for( int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; i++ )
{
- if( m_selectedSession->data.players[i] != nullptr )
+ if( m_selectedSession->data.players[i] != NULL )
{
#ifndef _CONTENT_PACKAGE
if(app.DebugSettingsOn() && (app.GetGameSettingsDebugMask()&(1L<<eDebugSetting_DebugLeaderboards)))
@@ -88,7 +88,7 @@ void UIScene_JoinMenu::tick()
}
else
{
- // Leave the loop when we hit the first nullptr player
+ // Leave the loop when we hit the first NULL player
break;
}
}
@@ -224,7 +224,7 @@ void UIScene_JoinMenu::tick()
void UIScene_JoinMenu::friendSessionUpdated(bool success, void *pParam)
{
- UIScene_JoinMenu *scene = static_cast<UIScene_JoinMenu *>(pParam);
+ UIScene_JoinMenu *scene = (UIScene_JoinMenu *)pParam;
ui.NavigateBack(scene->m_iPad);
if( success )
{
@@ -238,7 +238,7 @@ void UIScene_JoinMenu::friendSessionUpdated(bool success, void *pParam)
int UIScene_JoinMenu::ErrorDialogReturned(void *pParam, int iPad, const C4JStorage::EMessageResult)
{
- UIScene_JoinMenu *scene = static_cast<UIScene_JoinMenu *>(pParam);
+ UIScene_JoinMenu *scene = (UIScene_JoinMenu *)pParam;
ui.NavigateBack(scene->m_iPad);
return 0;
@@ -272,7 +272,7 @@ void UIScene_JoinMenu::handleInput(int iPad, int key, bool repeat, bool pressed,
break;
#ifdef _DURANGO
case ACTION_MENU_Y:
- if(m_selectedSession != nullptr && getControlFocus() == eControl_GamePlayers && m_buttonListPlayers.getItemCount() > 0)
+ if(m_selectedSession != NULL && getControlFocus() == eControl_GamePlayers && m_buttonListPlayers.getItemCount() > 0)
{
PlayerUID uid = m_selectedSession->searchResult.m_playerXuids[m_buttonListPlayers.getCurrentSelection()];
if( uid != INVALID_XUID ) ProfileManager.ShowProfileCard(ProfileManager.GetLockedProfile(),uid);
@@ -301,7 +301,7 @@ void UIScene_JoinMenu::handleInput(int iPad, int key, bool repeat, bool pressed,
void UIScene_JoinMenu::handlePress(F64 controlId, F64 childId)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_JoinGame:
{
@@ -324,10 +324,10 @@ void UIScene_JoinMenu::handlePress(F64 controlId, F64 childId)
void UIScene_JoinMenu::handleFocusChange(F64 controlId, F64 childId)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_GamePlayers:
- m_buttonListPlayers.updateChildFocus( static_cast<int>(childId) );
+ m_buttonListPlayers.updateChildFocus( (int) childId );
};
updateTooltips();
}
@@ -370,7 +370,7 @@ void UIScene_JoinMenu::StartSharedLaunchFlow()
int UIScene_JoinMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int iPad)
{
- UIScene_JoinMenu* pClass = static_cast<UIScene_JoinMenu *>(ui.GetSceneFromCallbackId((size_t)pParam));
+ UIScene_JoinMenu* pClass = (UIScene_JoinMenu*)ui.GetSceneFromCallbackId((size_t)pParam);
if(pClass)
{
@@ -473,7 +473,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
#if defined(__PS3__) || defined(__PSVITA__)
if(isSignedInLive)
{
- ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&noUGC,nullptr,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&noUGC,NULL,NULL);
}
#else
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
@@ -511,7 +511,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
{
#if defined(__ORBIS__) || defined(__PSVITA__)
bool chatRestricted = false;
- ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&chatRestricted,nullptr,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&chatRestricted,NULL,NULL);
if(chatRestricted)
{
ProfileManager.DisplaySystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, ProfileManager.GetPrimaryPad() );
@@ -608,7 +608,7 @@ void UIScene_JoinMenu::handleTimerComplete(int id)
int selectedIndex = 0;
for(unsigned int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; ++i)
{
- if( m_selectedSession->data.players[i] != nullptr )
+ if( m_selectedSession->data.players[i] != NULL )
{
if(m_selectedSession->data.players[i] == selectedPlayerXUID) selectedIndex = i;
playersList.InsertItems(i,1);
@@ -625,7 +625,7 @@ void UIScene_JoinMenu::handleTimerComplete(int id)
}
else
{
- // Leave the loop when we hit the first nullptr player
+ // Leave the loop when we hit the first NULL player
break;
}
}
diff --git a/Minecraft.Client/Common/UI/UIScene_Keyboard.cpp b/Minecraft.Client/Common/UI/UIScene_Keyboard.cpp
index 352f2b7b..b28564c3 100644
--- a/Minecraft.Client/Common/UI/UIScene_Keyboard.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_Keyboard.cpp
@@ -17,8 +17,8 @@ UIScene_Keyboard::UIScene_Keyboard(int iPad, void *initData, UILayer *parentLaye
initialiseMovie();
#ifdef _WINDOWS64
- m_win64Callback = nullptr;
- m_win64CallbackParam = nullptr;
+ m_win64Callback = NULL;
+ m_win64CallbackParam = NULL;
m_win64TextBuffer = L"";
m_win64MaxChars = 25;
@@ -28,7 +28,7 @@ UIScene_Keyboard::UIScene_Keyboard(int iPad, void *initData, UILayer *parentLaye
m_bPCMode = false;
if (initData)
{
- UIKeyboardInitData* kbData = static_cast<UIKeyboardInitData *>(initData);
+ UIKeyboardInitData* kbData = (UIKeyboardInitData*)initData;
m_win64Callback = kbData->callback;
m_win64CallbackParam = kbData->lpParam;
if (kbData->title) titleText = kbData->title;
@@ -105,11 +105,11 @@ UIScene_Keyboard::UIScene_Keyboard(int iPad, void *initData, UILayer *parentLaye
};
IggyName nameVisible = registerFastName(L"visible");
IggyValuePath* root = IggyPlayerRootPath(getMovie());
- for (int i = 0; i < static_cast<int>(sizeof(s_keyNames) / sizeof(s_keyNames[0])); ++i)
+ for (int i = 0; i < (int)(sizeof(s_keyNames) / sizeof(s_keyNames[0])); ++i)
{
IggyValuePath keyPath;
if (IggyValuePathMakeNameRef(&keyPath, root, s_keyNames[i]))
- IggyValueSetBooleanRS(&keyPath, nameVisible, nullptr, false);
+ IggyValueSetBooleanRS(&keyPath, nameVisible, NULL, false);
}
}
#endif
@@ -192,7 +192,7 @@ void UIScene_Keyboard::tick()
m_bKeyboardDonePressed = true;
}
}
- else if (static_cast<int>(m_win64TextBuffer.length()) < m_win64MaxChars)
+ else if ((int)m_win64TextBuffer.length() < m_win64MaxChars)
{
m_win64TextBuffer += ch;
changed = true;
@@ -229,33 +229,33 @@ void UIScene_Keyboard::handleInput(int iPad, int key, bool repeat, bool pressed,
handled = true;
break;
case ACTION_MENU_X: // X
- out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcBackspaceButtonPressed, 0 , nullptr );
+ out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcBackspaceButtonPressed, 0 , NULL );
handled = true;
break;
case ACTION_MENU_PAGEUP: // LT
- out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSymbolButtonPressed, 0 , nullptr );
+ out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSymbolButtonPressed, 0 , NULL );
handled = true;
break;
case ACTION_MENU_Y: // Y
- out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSpaceButtonPressed, 0 , nullptr );
+ out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSpaceButtonPressed, 0 , NULL );
handled = true;
break;
case ACTION_MENU_STICK_PRESS: // LS
- out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcCapsButtonPressed, 0 , nullptr );
+ out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcCapsButtonPressed, 0 , NULL );
handled = true;
break;
case ACTION_MENU_LEFT_SCROLL: // LB
- out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcCursorLeftButtonPressed, 0 , nullptr );
+ out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcCursorLeftButtonPressed, 0 , NULL );
handled = true;
break;
case ACTION_MENU_RIGHT_SCROLL: // RB
- out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcCursorRightButtonPressed, 0 , nullptr );
+ out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcCursorRightButtonPressed, 0 , NULL );
handled = true;
break;
case ACTION_MENU_PAUSEMENU: // Start
if(!m_bKeyboardDonePressed)
{
- out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcDoneButtonPressed, 0 , nullptr );
+ out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcDoneButtonPressed, 0 , NULL );
// kick off done timer
addTimer(KEYBOARD_DONE_TIMER_ID,KEYBOARD_DONE_TIMER_TIME);
@@ -281,7 +281,7 @@ void UIScene_Keyboard::handleInput(int iPad, int key, bool repeat, bool pressed,
void UIScene_Keyboard::handlePress(F64 controlId, F64 childId)
{
- if(static_cast<int>(controlId) == 0)
+ if((int)controlId == 0)
{
// Done has been pressed. At this point we can query for the input string and pass it on to wherever it is needed.
// we can not query for m_KeyboardTextInput.getLabel() here because we're in an iggy callback so we need to wait a frame.
diff --git a/Minecraft.Client/Common/UI/UIScene_LanguageSelector.cpp b/Minecraft.Client/Common/UI/UIScene_LanguageSelector.cpp
index c2a30d3c..07039135 100644
--- a/Minecraft.Client/Common/UI/UIScene_LanguageSelector.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_LanguageSelector.cpp
@@ -58,7 +58,7 @@ void UIScene_LanguageSelector::updateTooltips()
void UIScene_LanguageSelector::updateComponents()
{
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
if(bNotInGame)
{
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
@@ -112,14 +112,14 @@ void UIScene_LanguageSelector::handleInput(int iPad, int key, bool repeat, bool
void UIScene_LanguageSelector::handlePress(F64 controlId, F64 childId)
{
- if( static_cast<int>(controlId) == eControl_Buttons )
+ if( (int)controlId == eControl_Buttons )
{
//CD - Added for audio
ui.PlayUISFX(eSFX_Press);
int newLanguage, newLocale;
- newLanguage = uiLangMap[static_cast<int>(childId)];
- newLocale = uiLocaleMap[static_cast<int>(childId)];
+ newLanguage = uiLangMap[(int)childId];
+ newLocale = uiLocaleMap[(int)childId];
app.SetMinecraftLanguage(m_iPad, newLanguage);
app.SetMinecraftLocale(m_iPad, newLocale);
diff --git a/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp
index b2981ebf..96dd744e 100644
--- a/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp
@@ -20,7 +20,7 @@ UIScene_LaunchMoreOptionsMenu::UIScene_LaunchMoreOptionsMenu(int iPad, void *ini
// Setup all the Iggy references we need for this scene
initialiseMovie();
- m_params = static_cast<LaunchMoreOptionsMenuInitData *>(initData);
+ m_params = (LaunchMoreOptionsMenuInitData *)initData;
m_labelWorldOptions.init(app.GetString(IDS_WORLD_OPTIONS));
@@ -116,9 +116,9 @@ UIScene_LaunchMoreOptionsMenu::UIScene_LaunchMoreOptionsMenu(int iPad, void *ini
if(m_params->currentWorldSize != e_worldSize_Unknown)
{
m_labelWorldResize.init(app.GetString(IDS_INCREASE_WORLD_SIZE));
- int min= static_cast<int>(m_params->currentWorldSize)-1;
+ int min= int(m_params->currentWorldSize)-1;
int max=3;
- int curr = static_cast<int>(m_params->newWorldSize)-1;
+ int curr = int(m_params->newWorldSize)-1;
m_sliderWorldResize.init(app.GetString(m_iWorldSizeTitleA[curr]),eControl_WorldResize,min,max,curr);
m_checkboxes[eLaunchCheckbox_WorldResizeType].init(app.GetString(IDS_INCREASE_WORLD_SIZE_OVERWRITE_EDGES),eLaunchCheckbox_WorldResizeType,m_params->newWorldSizeOverwriteEdges);
}
@@ -308,7 +308,7 @@ void UIScene_LaunchMoreOptionsMenu::handleInput(int iPad, int key, bool repeat,
m_tabIndex = m_tabIndex == 0 ? 1 : 0;
updateTooltips();
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcChangeTab , 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcChangeTab , 0 , NULL );
}
break;
}
@@ -330,7 +330,7 @@ void UIScene_LaunchMoreOptionsMenu::handleTouchInput(unsigned int iPad, S32 x, S
m_tabIndex = iNewTabIndex;
updateTooltips();
IggyDataValue result;
- IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcChangeTab , 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcChangeTab , 0 , NULL );
}
ui.TouchBoxRebuild(this);
break;
@@ -354,7 +354,7 @@ void UIScene_LaunchMoreOptionsMenu::handleCheckboxToggled(F64 controlId, bool se
//CD - Added for audio
ui.PlayUISFX(eSFX_Press);
- switch(static_cast<EControls>((int)controlId))
+ switch((EControls)((int)controlId))
{
case eLaunchCheckbox_Online:
m_params->bOnlineGame = selected;
@@ -428,7 +428,7 @@ void UIScene_LaunchMoreOptionsMenu::handleCheckboxToggled(F64 controlId, bool se
void UIScene_LaunchMoreOptionsMenu::handleFocusChange(F64 controlId, F64 childId)
{
int stringId = 0;
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eLaunchCheckbox_Online:
stringId = IDS_GAMEOPTION_ONLINE;
@@ -549,7 +549,7 @@ void UIScene_LaunchMoreOptionsMenu::handleTimerComplete(int id)
int UIScene_LaunchMoreOptionsMenu::KeyboardCompleteSeedCallback(LPVOID lpParam,bool bRes)
{
- UIScene_LaunchMoreOptionsMenu *pClass=static_cast<UIScene_LaunchMoreOptionsMenu *>(lpParam);
+ UIScene_LaunchMoreOptionsMenu *pClass=(UIScene_LaunchMoreOptionsMenu *)lpParam;
pClass->m_bIgnoreInput=false;
if (bRes)
{
@@ -595,7 +595,7 @@ void UIScene_LaunchMoreOptionsMenu::handlePress(F64 controlId, F64 childId)
if (isDirectEditBlocking()) return;
#endif
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_EditSeed:
{
@@ -642,8 +642,8 @@ void UIScene_LaunchMoreOptionsMenu::handlePress(F64 controlId, F64 childId)
void UIScene_LaunchMoreOptionsMenu::handleSliderMove(F64 sliderId, F64 currentValue)
{
- int value = static_cast<int>(currentValue);
- switch(static_cast<int>(sliderId))
+ int value = (int)currentValue;
+ switch((int)sliderId)
{
case eControl_WorldSize:
#ifdef _LARGE_WORLDS
@@ -654,11 +654,11 @@ void UIScene_LaunchMoreOptionsMenu::handleSliderMove(F64 sliderId, F64 currentVa
break;
case eControl_WorldResize:
#ifdef _LARGE_WORLDS
- EGameHostOptionWorldSize changedSize = static_cast<EGameHostOptionWorldSize>(value + 1);
+ EGameHostOptionWorldSize changedSize = EGameHostOptionWorldSize(value+1);
if(changedSize >= m_params->currentWorldSize)
{
m_sliderWorldResize.handleSliderMove(value);
- m_params->newWorldSize = static_cast<EGameHostOptionWorldSize>(value + 1);
+ m_params->newWorldSize = EGameHostOptionWorldSize(value+1);
m_sliderWorldResize.setLabel(app.GetString(m_iWorldSizeTitleA[value]));
}
#endif
diff --git a/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp
index ed0b3151..12b21905 100644
--- a/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp
@@ -9,12 +9,12 @@
#define PLAYER_ONLINE_TIMER_TIME 100
// if the value is greater than 32000, it's an xzp icon that needs displayed, rather than the game icon
-const int UIScene_LeaderboardsMenu::TitleIcons[UIScene_LeaderboardsMenu::NUM_LEADERBOARDS][7] =
+const int UIScene_LeaderboardsMenu::TitleIcons[UIScene_LeaderboardsMenu::NUM_LEADERBOARDS][7] =
{
- {UIControl_LeaderboardList::e_ICON_TYPE_WALKED, UIControl_LeaderboardList::e_ICON_TYPE_FALLEN, Item::minecart_Id, Item::boat_Id, -1},
- {Tile::dirt_Id, Tile::cobblestone_Id, Tile::sand_Id, Tile::stone_Id, Tile::gravel_Id, Tile::clay_Id, Tile::obsidian_Id},
- {Item::egg_Id, Item::wheat_Id, Tile::mushroom_brown_Id, Tile::reeds_Id, Item::bucket_milk_Id, Tile::pumpkin_Id, -1},
- {UIControl_LeaderboardList::e_ICON_TYPE_ZOMBIE, UIControl_LeaderboardList::e_ICON_TYPE_SKELETON, UIControl_LeaderboardList::e_ICON_TYPE_CREEPER, UIControl_LeaderboardList::e_ICON_TYPE_SPIDER, UIControl_LeaderboardList::e_ICON_TYPE_SPIDERJOKEY, UIControl_LeaderboardList::e_ICON_TYPE_ZOMBIEPIGMAN, UIControl_LeaderboardList::e_ICON_TYPE_SLIME},
+ { UIControl_LeaderboardList::e_ICON_TYPE_WALKED, UIControl_LeaderboardList::e_ICON_TYPE_FALLEN, Item::minecart_Id, Item::boat_Id, NULL },
+ { Tile::dirt_Id, Tile::cobblestone_Id, Tile::sand_Id, Tile::stone_Id, Tile::gravel_Id, Tile::clay_Id, Tile::obsidian_Id },
+ { Item::egg_Id, Item::wheat_Id, Tile::mushroom_brown_Id, Tile::reeds_Id, Item::bucket_milk_Id, Tile::pumpkin_Id, NULL },
+ { UIControl_LeaderboardList::e_ICON_TYPE_ZOMBIE, UIControl_LeaderboardList::e_ICON_TYPE_SKELETON, UIControl_LeaderboardList::e_ICON_TYPE_CREEPER, UIControl_LeaderboardList::e_ICON_TYPE_SPIDER, UIControl_LeaderboardList::e_ICON_TYPE_SPIDERJOKEY, UIControl_LeaderboardList::e_ICON_TYPE_ZOMBIEPIGMAN, UIControl_LeaderboardList::e_ICON_TYPE_SLIME },
};
const UIScene_LeaderboardsMenu::LeaderboardDescriptor UIScene_LeaderboardsMenu::LEADERBOARD_DESCRIPTORS[UIScene_LeaderboardsMenu::NUM_LEADERBOARDS][4] = {
{
@@ -438,7 +438,7 @@ void UIScene_LeaderboardsMenu::ReadStats(int startIndex)
}
else
{
- m_newEntryIndex = static_cast<unsigned int>(startIndex);
+ m_newEntryIndex = (unsigned int)startIndex;
// m_newReadSize = min((int)READ_SIZE, (int)m_leaderboard.m_totalEntryCount-(startIndex-1));
}
@@ -462,7 +462,7 @@ void UIScene_LeaderboardsMenu::ReadStats(int startIndex)
{
m_interface.ReadStats_TopRank(
this,
- m_currentDifficulty, static_cast<LeaderboardManager::EStatsType>(m_currentLeaderboard),
+ m_currentDifficulty, (LeaderboardManager::EStatsType) m_currentLeaderboard,
m_newEntryIndex, m_newReadSize
);
}
@@ -472,7 +472,7 @@ void UIScene_LeaderboardsMenu::ReadStats(int startIndex)
PlayerUID uid;
ProfileManager.GetXUID(ProfileManager.GetPrimaryPad(),&uid, true);
m_interface.ReadStats_MyScore( this,
- m_currentDifficulty, static_cast<LeaderboardManager::EStatsType>(m_currentLeaderboard),
+ m_currentDifficulty, (LeaderboardManager::EStatsType) m_currentLeaderboard,
uid /*ignored on PS3*/,
m_newReadSize
);
@@ -483,7 +483,7 @@ void UIScene_LeaderboardsMenu::ReadStats(int startIndex)
PlayerUID uid;
ProfileManager.GetXUID(ProfileManager.GetPrimaryPad(),&uid, true);
m_interface.ReadStats_Friends( this,
- m_currentDifficulty, static_cast<LeaderboardManager::EStatsType>(m_currentLeaderboard),
+ m_currentDifficulty, (LeaderboardManager::EStatsType) m_currentLeaderboard,
uid /*ignored on PS3*/,
m_newEntryIndex, m_newReadSize
);
@@ -558,7 +558,7 @@ bool UIScene_LeaderboardsMenu::RetrieveStats()
else
{
m_leaderboard.m_entries[entryIndex].m_columns[i] = UINT_MAX;
- swprintf(m_leaderboard.m_entries[entryIndex].m_wcColumns[i], 12, L"%.1fkm", static_cast<float>(m_leaderboard.m_entries[entryIndex].m_columns[i])/100.f/1000.f);
+ swprintf(m_leaderboard.m_entries[entryIndex].m_wcColumns[i], 12, L"%.1fkm", ((float)m_leaderboard.m_entries[entryIndex].m_columns[i])/100.f/1000.f);
}
}
@@ -576,7 +576,7 @@ bool UIScene_LeaderboardsMenu::RetrieveStats()
return true;
}
- //assert( LeaderboardManager::Instance()->GetStats() != nullptr );
+ //assert( LeaderboardManager::Instance()->GetStats() != NULL );
//PXUSER_STATS_READ_RESULTS stats = LeaderboardManager::Instance()->GetStats();
//if( m_currentFilter == LeaderboardManager::eFM_Friends ) LeaderboardManager::Instance()->SortFriendStats();
@@ -781,7 +781,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry(LeaderboardManager::ReadScor
else if(iDigitC<8)
{
// km with a .X
- swprintf(leaderboardEntry->m_wcColumns[i], 12, L"%.1fkm", static_cast<float>(leaderboardEntry->m_columns[i])/1000.f);
+ swprintf(leaderboardEntry->m_wcColumns[i], 12, L"%.1fkm", ((float)leaderboardEntry->m_columns[i])/1000.f);
#ifdef _DEBUG
//app.DebugPrintf("Display - %.1fkm\n", ((float)leaderboardEntry->m_columns[i])/1000.f);
#endif
@@ -789,7 +789,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry(LeaderboardManager::ReadScor
else
{
// bigger than that, so no decimal point
- swprintf(leaderboardEntry->m_wcColumns[i], 12, L"%.0fkm", static_cast<float>(leaderboardEntry->m_columns[i])/1000.f);
+ swprintf(leaderboardEntry->m_wcColumns[i], 12, L"%.0fkm", ((float)leaderboardEntry->m_columns[i])/1000.f);
#ifdef _DEBUG
//app.DebugPrintf("Display - %.0fkm\n", ((float)leaderboardEntry->m_columns[i])/1000.f);
#endif
@@ -964,14 +964,14 @@ int UIScene_LeaderboardsMenu::SetLeaderboardTitleIcons()
void UIScene_LeaderboardsMenu::customDraw(IggyCustomDrawCallbackRegion *region)
{
int slotId = -1;
- swscanf(static_cast<wchar_t *>(region->name),L"slot_%d",&slotId);
+ swscanf((wchar_t*)region->name,L"slot_%d",&slotId);
if (slotId == -1)
{
//app.DebugPrintf("This is not the control we are looking for\n");
}
else
{
- shared_ptr<ItemInstance> item = std::make_shared<ItemInstance>(TitleIcons[m_currentLeaderboard][slotId], 1, 0);
+ shared_ptr<ItemInstance> item = shared_ptr<ItemInstance>( new ItemInstance(TitleIcons[m_currentLeaderboard][slotId], 1, 0) );
customDrawSlotControl(region,m_iPad,item,1.0f,false,false);
}
}
@@ -979,14 +979,14 @@ void UIScene_LeaderboardsMenu::customDraw(IggyCustomDrawCallbackRegion *region)
void UIScene_LeaderboardsMenu::handleSelectionChanged(F64 selectedId)
{
ui.PlayUISFX(eSFX_Focus);
- m_newSel = static_cast<int>(selectedId);
+ m_newSel = (int)selectedId;
updateTooltips();
}
// Handle a request from Iggy for more data
void UIScene_LeaderboardsMenu::handleRequestMoreData(F64 startIndex, bool up)
{
- unsigned int item = static_cast<int>(startIndex);
+ unsigned int item = (int)startIndex;
if( m_leaderboard.m_totalEntryCount > 0 && (item+1) < GetEntryStartIndex() )
{
@@ -995,7 +995,7 @@ void UIScene_LeaderboardsMenu::handleRequestMoreData(F64 startIndex, bool up)
int readIndex = (GetEntryStartIndex() + 1) - READ_SIZE;
if( readIndex <= 0 )
readIndex = 1;
- assert( readIndex >= 1 && readIndex <= static_cast<int>(m_leaderboard.m_totalEntryCount));
+ assert( readIndex >= 1 && readIndex <= (int)m_leaderboard.m_totalEntryCount );
ReadStats(readIndex);
}
}
@@ -1004,7 +1004,7 @@ void UIScene_LeaderboardsMenu::handleRequestMoreData(F64 startIndex, bool up)
if( LeaderboardManager::Instance()->isIdle() )
{
int readIndex = (GetEntryStartIndex() + 1) + m_leaderboard.m_entries.size();
- assert( readIndex >= 1 && readIndex <= static_cast<int>(m_leaderboard.m_totalEntryCount));
+ assert( readIndex >= 1 && readIndex <= (int)m_leaderboard.m_totalEntryCount );
ReadStats(readIndex);
}
}
@@ -1033,7 +1033,7 @@ void UIScene_LeaderboardsMenu::handleTimerComplete(int id)
int UIScene_LeaderboardsMenu::ExitLeaderboards(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- UIScene_LeaderboardsMenu* pClass = static_cast<UIScene_LeaderboardsMenu *>(pParam);
+ UIScene_LeaderboardsMenu* pClass = (UIScene_LeaderboardsMenu*)pParam;
pClass->navigateBack();
diff --git a/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp
index d61a7902..ed3c8137 100644
--- a/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp
@@ -34,7 +34,7 @@ int UIScene_LoadMenu::m_iDifficultyTitleSettingA[4]=
int UIScene_LoadMenu::LoadSaveDataThumbnailReturned(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes)
{
- UIScene_LoadMenu *pClass= static_cast<UIScene_LoadMenu *>(ui.GetSceneFromCallbackId((size_t)lpParam));
+ UIScene_LoadMenu *pClass= (UIScene_LoadMenu *)ui.GetSceneFromCallbackId((size_t)lpParam);
if(pClass)
{
@@ -50,7 +50,7 @@ int UIScene_LoadMenu::LoadSaveDataThumbnailReturned(LPVOID lpParam,PBYTE pbThumb
}
else
{
- app.DebugPrintf("Thumbnail data is nullptr, or has size 0\n");
+ app.DebugPrintf("Thumbnail data is NULL, or has size 0\n");
pClass->m_bThumbnailGetFailed = true;
}
pClass->m_bRetrievingSaveThumbnail = false;
@@ -64,7 +64,7 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
// Setup all the Iggy references we need for this scene
initialiseMovie();
- LoadMenuInitData *params = static_cast<LoadMenuInitData *>(initData);
+ LoadMenuInitData *params = (LoadMenuInitData *)initData;
m_labelGameName.init(app.GetString(IDS_WORLD_NAME));
m_labelSeed.init(L"");
@@ -102,7 +102,7 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
m_bSaveThumbnailReady = false;
m_bRetrievingSaveThumbnail = true;
m_bShowTimer = false;
- m_pDLCPack = nullptr;
+ m_pDLCPack = NULL;
m_bAvailableTexturePacksChecked=false;
m_bRequestQuadrantSignin = false;
m_iTexturePacksNotInstalled=0;
@@ -249,7 +249,7 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
#endif
#endif
#ifdef _WINDOWS64
- if (params->saveDetails != nullptr && params->saveDetails->UTF8SaveName[0] != '\0')
+ if (params->saveDetails != NULL && params->saveDetails->UTF8SaveName[0] != '\0')
{
wchar_t wSaveName[128];
ZeroMemory(wSaveName, sizeof(wSaveName));
@@ -305,7 +305,7 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
if(!m_bAvailableTexturePacksChecked)
#endif
{
- DLC_INFO *pDLCInfo=nullptr;
+ DLC_INFO *pDLCInfo=NULL;
// first pass - look to see if there are any that are not in the list
bool bTexturePackAlreadyListed;
@@ -451,9 +451,9 @@ void UIScene_LoadMenu::tick()
// #ifdef _DEBUG
// // dump out the thumbnail
- // HANDLE hThumbnail = CreateFile("GAME:\\thumbnail.png", GENERIC_WRITE, 0, nullptr, OPEN_ALWAYS, FILE_FLAG_RANDOM_ACCESS, nullptr);
+ // HANDLE hThumbnail = CreateFile("GAME:\\thumbnail.png", GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_FLAG_RANDOM_ACCESS, NULL);
// DWORD dwBytes;
- // WriteFile(hThumbnail,pbImageData,dwImageBytes,&dwBytes,nullptr);
+ // WriteFile(hThumbnail,pbImageData,dwImageBytes,&dwBytes,NULL);
// XCloseHandle(hThumbnail);
// #endif
@@ -477,7 +477,7 @@ void UIScene_LoadMenu::tick()
m_MoreOptionsParams.bTNT = app.GetGameHostOption(uiHostOptions,eGameHostOption_TNT)>0?TRUE:FALSE;
m_MoreOptionsParams.bHostPrivileges = app.GetGameHostOption(uiHostOptions,eGameHostOption_CheatsEnabled)>0?TRUE:FALSE;
m_MoreOptionsParams.bDisableSaving = app.GetGameHostOption(uiHostOptions,eGameHostOption_DisableSaving)>0?TRUE:FALSE;
- m_MoreOptionsParams.currentWorldSize = static_cast<EGameHostOptionWorldSize>(app.GetGameHostOption(uiHostOptions, eGameHostOption_WorldSize));
+ m_MoreOptionsParams.currentWorldSize = (EGameHostOptionWorldSize)app.GetGameHostOption(uiHostOptions,eGameHostOption_WorldSize);
m_MoreOptionsParams.newWorldSize = m_MoreOptionsParams.currentWorldSize;
m_MoreOptionsParams.bMobGriefing = app.GetGameHostOption(uiHostOptions, eGameHostOption_MobGriefing);
@@ -696,7 +696,7 @@ void UIScene_LoadMenu::handlePress(F64 controlId, F64 childId)
//CD - Added for audio
ui.PlayUISFX(eSFX_Press);
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_GameMode:
switch(m_iGameModeId)
@@ -725,7 +725,7 @@ void UIScene_LoadMenu::handlePress(F64 controlId, F64 childId)
break;
case eControl_TexturePackList:
{
- UpdateCurrentTexturePack(static_cast<int>(childId));
+ UpdateCurrentTexturePack((int)childId);
}
break;
case eControl_LoadWorld:
@@ -771,7 +771,7 @@ void UIScene_LoadMenu::StartSharedLaunchFlow()
// texture pack hasn't been set yet, so check what it will be
TexturePack *pTexturePack = pMinecraft->skins->getTexturePackById(m_MoreOptionsParams.dwTexturePack);
- if(pTexturePack==nullptr)
+ if(pTexturePack==NULL)
{
#if TO_BE_IMPLEMENTED
// They've selected a texture pack they don't have yet
@@ -821,7 +821,7 @@ void UIScene_LoadMenu::StartSharedLaunchFlow()
{
// texture pack hasn't been set yet, so check what it will be
TexturePack *pTexturePack = pMinecraft->skins->getTexturePackById(m_MoreOptionsParams.dwTexturePack);
- DLCTexturePack *pDLCTexPack=static_cast<DLCTexturePack *>(pTexturePack);
+ DLCTexturePack *pDLCTexPack=(DLCTexturePack *)pTexturePack;
m_pDLCPack=pDLCTexPack->getDLCInfoParentPack();
// do we have a license?
@@ -849,7 +849,7 @@ void UIScene_LoadMenu::StartSharedLaunchFlow()
DLC_INFO *pDLCInfo = app.GetDLCInfoForTrialOfferID(m_pDLCPack->getPurchaseOfferId());
ULONGLONG ullOfferID_Full;
- if(pDLCInfo!=nullptr)
+ if(pDLCInfo!=NULL)
{
ullOfferID_Full=pDLCInfo->ullOfferID_Full;
}
@@ -946,8 +946,8 @@ void UIScene_LoadMenu::StartSharedLaunchFlow()
void UIScene_LoadMenu::handleSliderMove(F64 sliderId, F64 currentValue)
{
WCHAR TempString[256];
- int value = static_cast<int>(currentValue);
- switch(static_cast<int>(sliderId))
+ int value = (int)currentValue;
+ switch((int)sliderId)
{
case eControl_Difficulty:
m_sliderDifficulty.handleSliderMove(value);
@@ -1107,7 +1107,7 @@ void UIScene_LoadMenu::LaunchGame(void)
// inform them that leaderboard writes and achievements will be disabled
//ui.RequestMessageBox(IDS_TITLE_START_GAME, IDS_CONFIRM_START_SAVEDINCREATIVE_CONTINUE, uiIDA, 1, m_iPad,&CScene_LoadGameSettings::ConfirmLoadReturned,this,app.GetStringTable());
- if(m_levelGen != nullptr)
+ if(m_levelGen != NULL)
{
m_bIsCorrupt = false;
LoadDataComplete(this);
@@ -1150,7 +1150,7 @@ void UIScene_LoadMenu::LaunchGame(void)
}
else
{
- if(m_levelGen != nullptr)
+ if(m_levelGen != NULL)
{
m_bIsCorrupt = false;
LoadDataComplete(this);
@@ -1182,7 +1182,7 @@ void UIScene_LoadMenu::LaunchGame(void)
int UIScene_LoadMenu::CheckResetNetherReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- UIScene_LoadMenu* pClass = static_cast<UIScene_LoadMenu *>(pParam);
+ UIScene_LoadMenu* pClass = (UIScene_LoadMenu*)pParam;
// results switched for this dialog
if(result==C4JStorage::EMessage_ResultDecline)
@@ -1206,11 +1206,11 @@ int UIScene_LoadMenu::CheckResetNetherReturned(void *pParam,int iPad,C4JStorage:
int UIScene_LoadMenu::ConfirmLoadReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- UIScene_LoadMenu* pClass = static_cast<UIScene_LoadMenu *>(pParam);
+ UIScene_LoadMenu* pClass = (UIScene_LoadMenu*)pParam;
if(result==C4JStorage::EMessage_ResultAccept)
{
- if(pClass->m_levelGen != nullptr)
+ if(pClass->m_levelGen != NULL)
{
pClass->m_bIsCorrupt = false;
pClass->LoadDataComplete(pClass);
@@ -1246,7 +1246,7 @@ int UIScene_LoadMenu::ConfirmLoadReturned(void *pParam,int iPad,C4JStorage::EMes
int UIScene_LoadMenu::LoadDataComplete(void *pParam)
{
- UIScene_LoadMenu* pClass = static_cast<UIScene_LoadMenu *>(pParam);
+ UIScene_LoadMenu* pClass = (UIScene_LoadMenu*)pParam;
if(!pClass->m_bIsCorrupt)
{
@@ -1312,7 +1312,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
#if defined(__PS3__) || defined(__PSVITA__)
if(isOnlineGame)
{
- ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,nullptr,&bContentRestricted,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,NULL,&bContentRestricted,NULL);
}
#endif
@@ -1362,7 +1362,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
// MGH - added this so we don't try and upsell when we don't know if the player has PS Plus yet (if it can't connect to the PS Plus server).
UINT uiIDA[1];
uiIDA[0]=IDS_OK;
- ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), nullptr, nullptr);
+ ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), NULL, NULL);
return 0;
}
@@ -1381,7 +1381,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
// UINT uiIDA[2];
// uiIDA[0]=IDS_PLAY_OFFLINE;
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
-// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadMenu::PSPlusReturned,pClass, app.GetStringTable(),nullptr,0,false);
+// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadMenu::PSPlusReturned,pClass, app.GetStringTable(),NULL,0,false);
}
#endif
@@ -1392,7 +1392,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
if(isOnlineGame)
{
bool chatRestricted = false;
- ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&chatRestricted,nullptr,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&chatRestricted,NULL,NULL);
if(chatRestricted)
{
ProfileManager.DisplaySystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, ProfileManager.GetPrimaryPad() );
@@ -1431,7 +1431,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
// MGH - added this so we don't try and upsell when we don't know if the player has PS Plus yet (if it can't connect to the PS Plus server).
UINT uiIDA[1];
uiIDA[0]=IDS_OK;
- ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), nullptr, nullptr);
+ ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), NULL, NULL);
return 0;
}
@@ -1450,7 +1450,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
// UINT uiIDA[2];
// uiIDA[0]=IDS_PLAY_OFFLINE;
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
-// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadMenu::PSPlusReturned,pClass, app.GetStringTable(),nullptr,0,false);
+// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadMenu::PSPlusReturned,pClass, app.GetStringTable(),NULL,0,false);
}
#endif
else
@@ -1484,7 +1484,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
int UIScene_LoadMenu::LoadSaveDataReturned(void *pParam,bool bIsCorrupt, bool bIsOwner)
{
- UIScene_LoadMenu* pClass = static_cast<UIScene_LoadMenu *>(pParam);
+ UIScene_LoadMenu* pClass = (UIScene_LoadMenu*)pParam;
pClass->m_bIsCorrupt=bIsCorrupt;
@@ -1520,13 +1520,13 @@ int UIScene_LoadMenu::LoadSaveDataReturned(void *pParam,bool bIsCorrupt, bool bI
int UIScene_LoadMenu::TrophyDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- UIScene_LoadMenu* pClass = static_cast<UIScene_LoadMenu *>(pParam);
+ UIScene_LoadMenu* pClass = (UIScene_LoadMenu*)pParam;
return LoadDataComplete(pClass);
}
int UIScene_LoadMenu::DeleteSaveDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- UIScene_LoadMenu* pClass = static_cast<UIScene_LoadMenu *>(pParam);
+ UIScene_LoadMenu* pClass = (UIScene_LoadMenu*)pParam;
// results switched for this dialog
if(result==C4JStorage::EMessage_ResultDecline)
@@ -1543,7 +1543,7 @@ int UIScene_LoadMenu::DeleteSaveDialogReturned(void *pParam,int iPad,C4JStorage:
int UIScene_LoadMenu::DeleteSaveDataReturned(void *pParam,bool bSuccess)
{
- UIScene_LoadMenu* pClass = static_cast<UIScene_LoadMenu *>(pParam);
+ UIScene_LoadMenu* pClass = (UIScene_LoadMenu*)pParam;
app.SetCorruptSaveDeleted(true);
pClass->navigateBack();
@@ -1554,7 +1554,7 @@ int UIScene_LoadMenu::DeleteSaveDataReturned(void *pParam,bool bSuccess)
// 4J Stu - Shared functionality that is the same whether we needed a quadrant sign-in or not
void UIScene_LoadMenu::StartGameFromSave(UIScene_LoadMenu* pClass, DWORD dwLocalUsersMask)
{
- if(pClass->m_levelGen == nullptr)
+ if(pClass->m_levelGen == NULL)
{
INT saveOrCheckpointId = 0;
bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId);
@@ -1582,7 +1582,7 @@ void UIScene_LoadMenu::StartGameFromSave(UIScene_LoadMenu* pClass, DWORD dwLocal
NetworkGameInitData *param = new NetworkGameInitData();
param->seed = pClass->m_seed;
- param->saveData = nullptr;
+ param->saveData = NULL;
param->levelGen = pClass->m_levelGen;
param->texturePackId = pClass->m_MoreOptionsParams.dwTexturePack;
param->levelName = pClass->m_levelName;
@@ -1642,7 +1642,7 @@ void UIScene_LoadMenu::StartGameFromSave(UIScene_LoadMenu* pClass, DWORD dwLocal
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &CGameNetworkManager::RunNetworkGameThreadProc;
- loadingParams->lpParam = static_cast<LPVOID>(param);
+ loadingParams->lpParam = (LPVOID)param;
// Reset the autosave time
app.SetAutosaveTimerTime();
@@ -1676,7 +1676,7 @@ void UIScene_LoadMenu::checkStateAndStartGame()
int UIScene_LoadMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int iPad)
{
- UIScene_LoadMenu* pClass = static_cast<UIScene_LoadMenu *>(pParam);
+ UIScene_LoadMenu* pClass = (UIScene_LoadMenu*)pParam;
if(bContinue==true)
{
@@ -1779,7 +1779,7 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int
if(ProfileManager.IsSignedInLive(i))
{
bool chatRestricted = false;
- ProfileManager.GetChatAndContentRestrictions(i,false,&chatRestricted,nullptr,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(i,false,&chatRestricted,NULL,NULL);
if(chatRestricted)
{
ProfileManager.DisplaySystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, i );
diff --git a/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp
index c4829350..00462a90 100644
--- a/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp
@@ -36,13 +36,13 @@ static wstring ReadLevelNameFromSaveFile(const wstring& filePath)
if (slashPos != wstring::npos)
{
wstring sidecarPath = filePath.substr(0, slashPos + 1) + L"worldname.txt";
- FILE *fr = nullptr;
+ FILE *fr = NULL;
if (_wfopen_s(&fr, sidecarPath.c_str(), L"r") == 0 && fr)
{
char buf[128] = {};
if (fgets(buf, sizeof(buf), fr))
{
- int len = static_cast<int>(strlen(buf));
+ int len = (int)strlen(buf);
while (len > 0 && (buf[len-1] == '\n' || buf[len-1] == '\r' || buf[len-1] == ' '))
buf[--len] = '\0';
fclose(fr);
@@ -57,15 +57,15 @@ static wstring ReadLevelNameFromSaveFile(const wstring& filePath)
}
}
- HANDLE hFile = CreateFileW(filePath.c_str(), GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, nullptr);
+ HANDLE hFile = CreateFileW(filePath.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL);
if (hFile == INVALID_HANDLE_VALUE) return L"";
- DWORD fileSize = GetFileSize(hFile, nullptr);
+ DWORD fileSize = GetFileSize(hFile, NULL);
if (fileSize < 12 || fileSize == INVALID_FILE_SIZE) { CloseHandle(hFile); return L""; }
unsigned char *rawData = new unsigned char[fileSize];
DWORD bytesRead = 0;
- if (!ReadFile(hFile, rawData, fileSize, &bytesRead, nullptr) || bytesRead != fileSize)
+ if (!ReadFile(hFile, rawData, fileSize, &bytesRead, NULL) || bytesRead != fileSize)
{
CloseHandle(hFile);
delete[] rawData;
@@ -73,7 +73,7 @@ static wstring ReadLevelNameFromSaveFile(const wstring& filePath)
}
CloseHandle(hFile);
- unsigned char *saveData = nullptr;
+ unsigned char *saveData = NULL;
unsigned int saveSize = 0;
bool freeSaveData = false;
@@ -120,10 +120,10 @@ static wstring ReadLevelNameFromSaveFile(const wstring& filePath)
ba.data = (byte*)(saveData + off);
ba.length = len;
CompoundTag *root = NbtIo::decompress(ba);
- if (root != nullptr)
+ if (root != NULL)
{
CompoundTag *dataTag = root->getCompound(L"Data");
- if (dataTag != nullptr)
+ if (dataTag != NULL)
result = dataTag->getString(L"LevelName");
delete root;
}
@@ -172,7 +172,7 @@ C4JStorage::SAVETRANSFER_FILE_DETAILS UIScene_LoadOrJoinMenu::m_debugTransferDet
int UIScene_LoadOrJoinMenu::LoadSaveDataThumbnailReturned(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes)
{
- UIScene_LoadOrJoinMenu *pClass= static_cast<UIScene_LoadOrJoinMenu *>(lpParam);
+ UIScene_LoadOrJoinMenu *pClass= (UIScene_LoadOrJoinMenu *)lpParam;
app.DebugPrintf("Received data for save thumbnail\n");
@@ -184,9 +184,9 @@ int UIScene_LoadOrJoinMenu::LoadSaveDataThumbnailReturned(LPVOID lpParam,PBYTE p
}
else
{
- pClass->m_saveDetails[pClass->m_iRequestingThumbnailId].pbThumbnailData = nullptr;
+ pClass->m_saveDetails[pClass->m_iRequestingThumbnailId].pbThumbnailData = NULL;
pClass->m_saveDetails[pClass->m_iRequestingThumbnailId].dwThumbnailSize = 0;
- app.DebugPrintf("Save thumbnail data is nullptr, or has size 0\n");
+ app.DebugPrintf("Save thumbnail data is NULL, or has size 0\n");
}
pClass->m_bSaveThumbnailReady = true;
@@ -215,7 +215,7 @@ UIScene_LoadOrJoinMenu::UIScene_LoadOrJoinMenu(int iPad, void *initData, UILayer
m_bIgnoreInput = false;
m_bShowingPartyGamesOnly = false;
m_bInParty = false;
- m_currentSessions = nullptr;
+ m_currentSessions = NULL;
m_iState=e_SavesIdle;
//m_bRetrievingSaveInfo=false;
@@ -239,9 +239,9 @@ UIScene_LoadOrJoinMenu::UIScene_LoadOrJoinMenu(int iPad, void *initData, UILayer
m_bRetrievingSaveThumbnails = false;
m_bSaveThumbnailReady = false;
m_bExitScene=false;
- m_pSaveDetails=nullptr;
+ m_pSaveDetails=NULL;
m_bSavesDisplayed=false;
- m_saveDetails = nullptr;
+ m_saveDetails = NULL;
m_iSaveDetailsCount = 0;
m_iTexturePacksNotInstalled = 0;
m_bCopying = false;
@@ -320,7 +320,7 @@ UIScene_LoadOrJoinMenu::UIScene_LoadOrJoinMenu(int iPad, void *initData, UILayer
#ifdef _XBOX
// 4J-PB - there may be texture packs we don't have, so use the info from TMS for this
- DLC_INFO *pDLCInfo=nullptr;
+ DLC_INFO *pDLCInfo=NULL;
// first pass - look to see if there are any that are not in the list
bool bTexturePackAlreadyListed;
@@ -399,11 +399,11 @@ UIScene_LoadOrJoinMenu::UIScene_LoadOrJoinMenu(int iPad, void *initData, UILayer
UIScene_LoadOrJoinMenu::~UIScene_LoadOrJoinMenu()
{
- g_NetworkManager.SetSessionsUpdatedCallback( nullptr, nullptr );
+ g_NetworkManager.SetSessionsUpdatedCallback( NULL, NULL );
app.SetLiveLinkRequired( false );
delete m_currentSessions;
- m_currentSessions = nullptr;
+ m_currentSessions = NULL;
#if TO_BE_IMPLEMENTED
// Reset the background downloading, in case we changed it by attempting to download a texture pack
@@ -705,7 +705,7 @@ void UIScene_LoadOrJoinMenu::tick()
if(!m_bSavesDisplayed)
{
m_pSaveDetails=StorageManager.ReturnSavesInfo();
- if(m_pSaveDetails!=nullptr)
+ if(m_pSaveDetails!=NULL)
{
//CD - Fix - Adding define for ORBIS/XBOXONE
#if defined(_XBOX_ONE) || defined(__ORBIS__)
@@ -716,11 +716,11 @@ void UIScene_LoadOrJoinMenu::tick()
m_bSavesDisplayed=true;
UpdateGamesList();
- if(m_saveDetails!=nullptr)
+ if(m_saveDetails!=NULL)
{
for(unsigned int i = 0; i < m_iSaveDetailsCount; ++i)
{
- if(m_saveDetails[i].pbThumbnailData!=nullptr)
+ if(m_saveDetails[i].pbThumbnailData!=NULL)
{
delete m_saveDetails[i].pbThumbnailData;
}
@@ -1000,9 +1000,9 @@ void UIScene_LoadOrJoinMenu::GetSaveInfo()
#ifdef __ORBIS__
// We need to make sure this is non-null so that we have an idea of free space
m_pSaveDetails=StorageManager.ReturnSavesInfo();
- if(m_pSaveDetails==nullptr)
+ if(m_pSaveDetails==NULL)
{
- C4JStorage::ESaveGameState eSGIStatus= StorageManager.GetSavesInfo(m_iPad,nullptr,this,"save");
+ C4JStorage::ESaveGameState eSGIStatus= StorageManager.GetSavesInfo(m_iPad,NULL,this,"save");
}
#endif
@@ -1015,7 +1015,7 @@ void UIScene_LoadOrJoinMenu::GetSaveInfo()
if( savesDir.exists() )
{
m_saves = savesDir.listFiles();
- uiSaveC = static_cast<unsigned int>(m_saves->size());
+ uiSaveC = (unsigned int)m_saves->size();
}
// add the New Game and Tutorial after the saves list is retrieved, if there are any saves
@@ -1049,10 +1049,10 @@ void UIScene_LoadOrJoinMenu::GetSaveInfo()
m_controlSavesTimer.setVisible(true);
m_pSaveDetails=StorageManager.ReturnSavesInfo();
- if(m_pSaveDetails==nullptr)
+ if(m_pSaveDetails==NULL)
{
char savename[] = "save";
- C4JStorage::ESaveGameState eSGIStatus = StorageManager.GetSavesInfo(m_iPad, nullptr, this, savename);
+ C4JStorage::ESaveGameState eSGIStatus = StorageManager.GetSavesInfo(m_iPad, NULL, this, savename);
}
#if TO_BE_IMPLEMENTED
@@ -1391,7 +1391,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr
int UIScene_LoadOrJoinMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,bool bRes)
{
// 4J HEG - No reason to set value if keyboard was cancelled
- UIScene_LoadOrJoinMenu *pClass=static_cast<UIScene_LoadOrJoinMenu *>(lpParam);
+ UIScene_LoadOrJoinMenu *pClass=(UIScene_LoadOrJoinMenu *)lpParam;
pClass->m_bIgnoreInput=false;
if (bRes)
{
@@ -1416,7 +1416,7 @@ int UIScene_LoadOrJoinMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,boo
// Convert the ui16Text input to a wide string
wchar_t wNewName[128] = {};
for (int k = 0; k < 127 && ui16Text[k]; k++)
- wNewName[k] = static_cast<wchar_t>(ui16Text[k]);
+ wNewName[k] = (wchar_t)ui16Text[k];
// Convert to narrow for storage and in-memory update
char narrowName[128] = {};
@@ -1427,7 +1427,7 @@ int UIScene_LoadOrJoinMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,boo
mbstowcs(wFilename, pClass->m_saveDetails[listPos].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH - 1);
wstring sidecarPath = wstring(L"Windows64\\GameHDD\\") + wstring(wFilename) + wstring(L"\\worldname.txt");
- FILE *fw = nullptr;
+ FILE *fw = NULL;
if (_wfopen_s(&fw, sidecarPath.c_str(), L"w") == 0 && fw)
{
fputs(narrowName, fw);
@@ -1460,18 +1460,18 @@ int UIScene_LoadOrJoinMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,boo
}
void UIScene_LoadOrJoinMenu::handleInitFocus(F64 controlId, F64 childId)
{
- app.DebugPrintf(app.USER_SR, "UIScene_LoadOrJoinMenu::handleInitFocus - %d , %d\n", static_cast<int>(controlId), static_cast<int>(childId));
+ app.DebugPrintf(app.USER_SR, "UIScene_LoadOrJoinMenu::handleInitFocus - %d , %d\n", (int)controlId, (int)childId);
}
void UIScene_LoadOrJoinMenu::handleFocusChange(F64 controlId, F64 childId)
{
- app.DebugPrintf(app.USER_SR, "UIScene_LoadOrJoinMenu::handleFocusChange - %d , %d\n", static_cast<int>(controlId), static_cast<int>(childId));
+ app.DebugPrintf(app.USER_SR, "UIScene_LoadOrJoinMenu::handleFocusChange - %d , %d\n", (int)controlId, (int)childId);
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_GamesList:
m_iGameListIndex = childId;
- m_buttonListGames.updateChildFocus( static_cast<int>(childId) );
+ m_buttonListGames.updateChildFocus( (int) childId );
break;
case eControl_SavesList:
m_iSaveListIndex = childId;
@@ -1493,18 +1493,18 @@ void UIScene_LoadOrJoinMenu::remoteStorageGetSaveCallback(LPVOID lpParam, SonyRe
void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_SavesList:
{
m_bIgnoreInput=true;
- int lGenID = static_cast<int>(childId) - 1;
+ int lGenID = (int)childId - 1;
//CD - Added for audio
ui.PlayUISFX(eSFX_Press);
- if(static_cast<int>(childId) == JOIN_LOAD_CREATE_BUTTON_INDEX)
+ if((int)childId == JOIN_LOAD_CREATE_BUTTON_INDEX)
{
app.SetTutorialMode( false );
@@ -1535,7 +1535,7 @@ void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId)
params->iSaveGameInfoIndex=-1;
//params->pbSaveRenamed=&m_bSaveRenamed;
params->levelGen = levelGen;
- params->saveDetails = nullptr;
+ params->saveDetails = NULL;
// navigate to the settings scene
ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_LoadMenu, params);
@@ -1546,7 +1546,7 @@ void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId)
#ifdef __ORBIS__
// check if this is a damaged save
PSAVE_INFO pSaveInfo = &m_pSaveDetails->SaveInfoA[((int)childId)-m_iDefaultButtonsC];
- if(pSaveInfo->thumbnailData == nullptr && pSaveInfo->modifiedTime == 0) // no thumbnail data and time of zero and zero blocks useset for corrupt files
+ if(pSaveInfo->thumbnailData == NULL && pSaveInfo->modifiedTime == 0) // no thumbnail data and time of zero and zero blocks useset for corrupt files
{
// give the option to delete the save
UINT uiIDA[2];
@@ -1562,17 +1562,17 @@ void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId)
if(app.DebugSettingsOn() && app.GetLoadSavesFromFolderEnabled())
{
- LoadSaveFromDisk(m_saves->at(static_cast<int>(childId)-m_iDefaultButtonsC));
+ LoadSaveFromDisk(m_saves->at((int)childId-m_iDefaultButtonsC));
}
else
{
LoadMenuInitData *params = new LoadMenuInitData();
params->iPad = m_iPad;
// need to get the iIndex from the list item, since the position in the list doesn't correspond to the GetSaveGameInfo list because of sorting
- params->iSaveGameInfoIndex=m_saveDetails[static_cast<int>(childId)-m_iDefaultButtonsC].saveId;
+ params->iSaveGameInfoIndex=m_saveDetails[((int)childId)-m_iDefaultButtonsC].saveId;
//params->pbSaveRenamed=&m_bSaveRenamed;
- params->levelGen = nullptr;
- params->saveDetails = &m_saveDetails[ static_cast<int>(childId)-m_iDefaultButtonsC ];
+ params->levelGen = NULL;
+ params->saveDetails = &m_saveDetails[ ((int)childId)-m_iDefaultButtonsC ];
#ifdef _XBOX_ONE
// On XB1, saves might need syncing, in which case inform the user so they can decide whether they want to wait for this to happen
@@ -1606,7 +1606,7 @@ void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId)
ui.PlayUISFX(eSFX_Press);
{
- int nIndex = static_cast<int>(childId);
+ int nIndex = (int)childId;
m_iGameListIndex = nIndex;
CheckAndJoinGame(nIndex);
}
@@ -1626,7 +1626,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
bool bContentRestricted=false;
// we're online, since we are joining a game
- ProfileManager.GetChatAndContentRestrictions(m_iPad,true,&noUGC,&bContentRestricted,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(m_iPad,true,&noUGC,&bContentRestricted,NULL);
#ifdef __ORBIS__
// 4J Stu - On PS4 we don't restrict playing multiplayer based on chat restriction, so remove this check
@@ -1670,7 +1670,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
UINT uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
// Not allowed to play online
- ui.RequestAlertMessage(IDS_ONLINE_GAME, IDS_CHAT_RESTRICTION_UGC, uiIDA, 1, m_iPad,nullptr,this);
+ ui.RequestAlertMessage(IDS_ONLINE_GAME, IDS_CHAT_RESTRICTION_UGC, uiIDA, 1, m_iPad,NULL,this);
#else
// Not allowed to play online
ProfileManager.ShowSystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, 0 );
@@ -1715,7 +1715,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
// MGH - added this so we don't try and upsell when we don't know if the player has PS Plus yet (if it can't connect to the PS Plus server).
UINT uiIDA[1];
uiIDA[0]=IDS_OK;
- ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), nullptr, nullptr);
+ ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), NULL, NULL);
return;
}
@@ -1735,7 +1735,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
// UINT uiIDA[2];
// uiIDA[0]=IDS_CONFIRM_OK;
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
- // ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadOrJoinMenu::PSPlusReturned,this, app.GetStringTable(),nullptr,0,false);
+ // ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadOrJoinMenu::PSPlusReturned,this, app.GetStringTable(),NULL,0,false);
m_bIgnoreInput=false;
return;
@@ -1837,7 +1837,7 @@ void UIScene_LoadOrJoinMenu::LoadLevelGen(LevelGenerationOptions *levelGen)
NetworkGameInitData *param = new NetworkGameInitData();
param->seed = 0;
- param->saveData = nullptr;
+ param->saveData = NULL;
param->settings = app.GetGameHostOption( eGameHostOption_Tutorial );
param->levelGen = levelGen;
@@ -1856,7 +1856,7 @@ void UIScene_LoadOrJoinMenu::LoadLevelGen(LevelGenerationOptions *levelGen)
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &CGameNetworkManager::RunNetworkGameThreadProc;
- loadingParams->lpParam = static_cast<LPVOID>(param);
+ loadingParams->lpParam = (LPVOID)param;
UIFullscreenProgressCompletionData *completionData = new UIFullscreenProgressCompletionData();
completionData->bShowBackground=TRUE;
@@ -1870,9 +1870,9 @@ void UIScene_LoadOrJoinMenu::LoadLevelGen(LevelGenerationOptions *levelGen)
void UIScene_LoadOrJoinMenu::UpdateGamesListCallback(LPVOID pParam)
{
- if(pParam != nullptr)
+ if(pParam != NULL)
{
- UIScene_LoadOrJoinMenu *pScene = static_cast<UIScene_LoadOrJoinMenu *>(pParam);
+ UIScene_LoadOrJoinMenu *pScene = (UIScene_LoadOrJoinMenu *)pParam;
pScene->UpdateGamesList();
}
}
@@ -1892,7 +1892,7 @@ void UIScene_LoadOrJoinMenu::UpdateGamesList()
}
- FriendSessionInfo *pSelectedSession = nullptr;
+ FriendSessionInfo *pSelectedSession = NULL;
if(DoesGamesListHaveFocus() && m_buttonListGames.getItemCount() > 0)
{
unsigned int nIndex = m_buttonListGames.getCurrentSelection();
@@ -1901,8 +1901,8 @@ void UIScene_LoadOrJoinMenu::UpdateGamesList()
SessionID selectedSessionId;
ZeroMemory(&selectedSessionId,sizeof(SessionID));
- if( pSelectedSession != nullptr )selectedSessionId = pSelectedSession->sessionId;
- pSelectedSession = nullptr;
+ if( pSelectedSession != NULL )selectedSessionId = pSelectedSession->sessionId;
+ pSelectedSession = NULL;
m_controlJoinTimer.setVisible( false );
@@ -1917,7 +1917,7 @@ void UIScene_LoadOrJoinMenu::UpdateGamesList()
// Update the xui list displayed
unsigned int xuiListSize = m_buttonListGames.getItemCount();
- unsigned int filteredListSize = static_cast<unsigned int>(m_currentSessions->size());
+ unsigned int filteredListSize = (unsigned int)m_currentSessions->size();
BOOL gamesListHasFocus = DoesGamesListHaveFocus();
@@ -1968,12 +1968,12 @@ void UIScene_LoadOrJoinMenu::UpdateGamesList()
HRESULT hr;
DWORD dwImageBytes=0;
- PBYTE pbImageData=nullptr;
+ PBYTE pbImageData=NULL;
- if(tp==nullptr)
+ if(tp==NULL)
{
DWORD dwBytes=0;
- PBYTE pbData=nullptr;
+ PBYTE pbData=NULL;
app.GetTPD(sessionInfo->data.texturePackParentId,&pbData,&dwBytes);
// is it in the tpd data ?
@@ -2174,7 +2174,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromDisk(File *saveFile, ESavePlatform save
int64_t fileSize = saveFile->length();
FileInputStream fis(*saveFile);
- byteArray ba(static_cast<unsigned int>(fileSize));
+ byteArray ba(fileSize);
fis.read(ba);
fis.close();
@@ -2208,7 +2208,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromDisk(File *saveFile, ESavePlatform save
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &CGameNetworkManager::RunNetworkGameThreadProc;
- loadingParams->lpParam = static_cast<LPVOID>(param);
+ loadingParams->lpParam = (LPVOID)param;
UIFullscreenProgressCompletionData *completionData = new UIFullscreenProgressCompletionData();
completionData->bShowBackground=TRUE;
@@ -2314,7 +2314,7 @@ static bool Win64_DeleteSaveDirectory(const wchar_t* wPath)
int UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- UIScene_LoadOrJoinMenu* pClass = static_cast<UIScene_LoadOrJoinMenu *>(pParam);
+ UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam;
// results switched for this dialog
// Check that we have a valid save selected (can get a bad index if the save list has been refreshed)
@@ -2336,7 +2336,7 @@ int UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned(void *pParam,int iPad,C4JSt
if (pClass->m_saveDetails && displayIdx >= 0 && pClass->m_saveDetails[displayIdx].UTF8SaveFilename[0])
{
wchar_t wFilename[MAX_SAVEFILENAME_LENGTH] = {};
- mbstowcs_s(nullptr, wFilename, MAX_SAVEFILENAME_LENGTH, pClass->m_saveDetails[displayIdx].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH - 1);
+ mbstowcs_s(NULL, wFilename, MAX_SAVEFILENAME_LENGTH, pClass->m_saveDetails[displayIdx].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH - 1);
wchar_t wFolderPath[MAX_PATH] = {};
swprintf_s(wFolderPath, MAX_PATH, L"Windows64\\GameHDD\\%s", wFilename);
bSuccess = Win64_DeleteSaveDirectory(wFolderPath);
@@ -2360,7 +2360,7 @@ int UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned(void *pParam,int iPad,C4JSt
int UIScene_LoadOrJoinMenu::DeleteSaveDataReturned(LPVOID lpParam,bool bRes)
{
ui.EnterCallbackIdCriticalSection();
- UIScene_LoadOrJoinMenu* pClass = static_cast<UIScene_LoadOrJoinMenu *>(ui.GetSceneFromCallbackId((size_t)lpParam));
+ UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)ui.GetSceneFromCallbackId((size_t)lpParam);
if(pClass)
{
@@ -2380,7 +2380,7 @@ int UIScene_LoadOrJoinMenu::DeleteSaveDataReturned(LPVOID lpParam,bool bRes)
int UIScene_LoadOrJoinMenu::RenameSaveDataReturned(LPVOID lpParam,bool bRes)
{
- UIScene_LoadOrJoinMenu* pClass = static_cast<UIScene_LoadOrJoinMenu *>(lpParam);
+ UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)lpParam;
if(bRes)
{
@@ -2412,7 +2412,7 @@ void UIScene_LoadOrJoinMenu::LoadRemoteFileFromDisk(char* remoteFilename)
int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- UIScene_LoadOrJoinMenu* pClass = static_cast<UIScene_LoadOrJoinMenu *>(pParam);
+ UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam;
// results switched for this dialog
// EMessage_ResultAccept means cancel
@@ -2425,7 +2425,7 @@ int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned(void *pParam,int iPad,C4JS
{
wchar_t wSaveName[128];
ZeroMemory(wSaveName, 128 * sizeof(wchar_t));
- mbstowcs_s(nullptr, wSaveName, 128, pClass->m_saveDetails[pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC].UTF8SaveName, _TRUNCATE);
+ mbstowcs_s(NULL, wSaveName, 128, pClass->m_saveDetails[pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC].UTF8SaveName, _TRUNCATE);
UIKeyboardInitData kbData;
kbData.title = app.GetString(IDS_RENAME_WORLD_TITLE);
kbData.defaultText = wSaveName;
@@ -2542,7 +2542,7 @@ int UIScene_LoadOrJoinMenu::MustSignInReturnedTexturePack(void *pParam,bool bCon
if(bContinue==true)
{
SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo(pClass->m_initData->selectedSession->data.texturePackParentId);
- if(pSONYDLCInfo!=nullptr)
+ if(pSONYDLCInfo!=NULL)
{
char chName[42];
char chKeyName[20];
@@ -2551,7 +2551,7 @@ int UIScene_LoadOrJoinMenu::MustSignInReturnedTexturePack(void *pParam,bool bCon
memset(chSkuID,0,SCE_NP_COMMERCE2_SKU_ID_LEN);
// we have to retrieve the skuid from the store info, it can't be hardcoded since Sony may change it.
// So we assume the first sku for the product is the one we want
- // MGH - keyname in the DLC file is 16 chars long, but there's no space for a nullptr terminating char
+ // MGH - keyname in the DLC file is 16 chars long, but there's no space for a NULL terminating char
memset(chKeyName, 0, sizeof(chKeyName));
strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16);
@@ -2583,7 +2583,7 @@ int UIScene_LoadOrJoinMenu::MustSignInReturnedTexturePack(void *pParam,bool bCon
int UIScene_LoadOrJoinMenu::TexturePackDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- UIScene_LoadOrJoinMenu *pClass = static_cast<UIScene_LoadOrJoinMenu *>(pParam);
+ UIScene_LoadOrJoinMenu *pClass = (UIScene_LoadOrJoinMenu *)pParam;
// Exit with or without saving
if(result==C4JStorage::EMessage_ResultAccept)
@@ -2605,7 +2605,7 @@ int UIScene_LoadOrJoinMenu::TexturePackDialogReturned(void *pParam,int iPad,C4JS
#endif
SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo(pClass->m_initData->selectedSession->data.texturePackParentId);
- if(pSONYDLCInfo!=nullptr)
+ if(pSONYDLCInfo!=NULL)
{
char chName[42];
char chKeyName[20];
@@ -2614,7 +2614,7 @@ int UIScene_LoadOrJoinMenu::TexturePackDialogReturned(void *pParam,int iPad,C4JS
memset(chSkuID,0,SCE_NP_COMMERCE2_SKU_ID_LEN);
// we have to retrieve the skuid from the store info, it can't be hardcoded since Sony may change it.
// So we assume the first sku for the product is the one we want
- // MGH - keyname in the DLC file is 16 chars long, but there's no space for a nullptr terminating char
+ // MGH - keyname in the DLC file is 16 chars long, but there's no space for a NULL terminating char
memset(chKeyName, 0, sizeof(chKeyName));
strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16);
@@ -2648,7 +2648,7 @@ int UIScene_LoadOrJoinMenu::TexturePackDialogReturned(void *pParam,int iPad,C4JS
wstring ProductId;
app.GetDLCFullOfferIDForPackID(pClass->m_initData->selectedSession->data.texturePackParentId,ProductId);
- StorageManager.InstallOffer(1,(WCHAR *)ProductId.c_str(),nullptr,nullptr);
+ StorageManager.InstallOffer(1,(WCHAR *)ProductId.c_str(),NULL,NULL);
}
else
{
@@ -2840,7 +2840,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
pMinecraft->progressRenderer->progressStart(IDS_TOOLTIPS_SAVETRANSFER_DOWNLOAD);
pMinecraft->progressRenderer->progressStage( IDS_TOOLTIPS_SAVETRANSFER_DOWNLOAD );
- ConsoleSaveFile* pSave = nullptr;
+ ConsoleSaveFile* pSave = NULL;
pClass->m_eSaveTransferState = eSaveTransfer_GetRemoteSaveInfo;
@@ -2895,10 +2895,10 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
const char* pNameUTF8 = app.getRemoteStorage()->getSaveNameUTF8();
mbstowcs(wSaveName, pNameUTF8, strlen(pNameUTF8)+1); // plus null
StorageManager.SetSaveTitle(wSaveName);
- PBYTE pbThumbnailData=nullptr;
+ PBYTE pbThumbnailData=NULL;
DWORD dwThumbnailDataSize=0;
- PBYTE pbDataSaveImage=nullptr;
+ PBYTE pbDataSaveImage=NULL;
DWORD dwDataSizeSaveImage=0;
StorageManager.GetDefaultSaveImage(&pbDataSaveImage, &dwDataSizeSaveImage); // Get the default save thumbnail (as set by SetDefaultImages) for use on saving games t
@@ -3059,10 +3059,10 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
StorageManager.ResetSaveData();
{
- PBYTE pbThumbnailData=nullptr;
+ PBYTE pbThumbnailData=NULL;
DWORD dwThumbnailDataSize=0;
- PBYTE pbDataSaveImage=nullptr;
+ PBYTE pbDataSaveImage=NULL;
DWORD dwDataSizeSaveImage=0;
StorageManager.GetDefaultSaveImage(&pbDataSaveImage, &dwDataSizeSaveImage); // Get the default save thumbnail (as set by SetDefaultImages) for use on saving games t
@@ -3270,7 +3270,7 @@ void UIScene_LoadOrJoinMenu::SaveTransferReturned(LPVOID lpParam, SonyRemoteStor
}
ConsoleSaveFile* UIScene_LoadOrJoinMenu::SonyCrossSaveConvert()
{
- return nullptr;
+ return NULL;
}
void UIScene_LoadOrJoinMenu::CancelSaveTransferCallback(LPVOID lpParam)
@@ -3493,7 +3493,7 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
SaveTransferStateContainer *pStateContainer = (SaveTransferStateContainer *) lpParameter;
Minecraft *pMinecraft=Minecraft::GetInstance();
- ConsoleSaveFile* pSave = nullptr;
+ ConsoleSaveFile* pSave = NULL;
while(StorageManager.SaveTransferClearState()!=C4JStorage::eSaveTransfer_Idle)
{
@@ -3595,7 +3595,7 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
int iTextMetadataBytes = app.CreateImageTextData(bTextMetadata, seedVal, true, uiHostOptions, dwTexturePack);
// set the icon and save image
- StorageManager.SetSaveImages(ba.data, ba.length, nullptr, 0, bTextMetadata, iTextMetadataBytes);
+ StorageManager.SetSaveImages(ba.data, ba.length, NULL, 0, bTextMetadata, iTextMetadataBytes);
delete ba.data;
}
@@ -3758,12 +3758,12 @@ void UIScene_LoadOrJoinMenu::RequestFileData( SaveTransferStateContainer *pClass
File targetFile( wstring(L"FakeTMSPP\\").append(filename) );
if(targetFile.exists())
{
- HANDLE hSaveFile = CreateFile( targetFile.getPath().c_str(), GENERIC_READ, 0, nullptr, OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, nullptr);
+ HANDLE hSaveFile = CreateFile( targetFile.getPath().c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, NULL);
m_debugTransferDetails.pbData = new BYTE[m_debugTransferDetails.ulFileLen];
DWORD numberOfBytesRead = 0;
- ReadFile( hSaveFile,m_debugTransferDetails.pbData,m_debugTransferDetails.ulFileLen,&numberOfBytesRead,nullptr);
+ ReadFile( hSaveFile,m_debugTransferDetails.pbData,m_debugTransferDetails.ulFileLen,&numberOfBytesRead,NULL);
assert(numberOfBytesRead == m_debugTransferDetails.ulFileLen);
CloseHandle(hSaveFile);
@@ -3791,7 +3791,7 @@ int UIScene_LoadOrJoinMenu::SaveTransferReturned(LPVOID lpParam,C4JStorage::SAVE
app.DebugPrintf("Save Transfer - size is %d\n",pSaveTransferDetails->ulFileLen);
// if the file data is null, then assume this is the file size retrieval
- if(pSaveTransferDetails->pbData==nullptr)
+ if(pSaveTransferDetails->pbData==NULL)
{
pClass->m_eSaveTransferState=C4JStorage::eSaveTransfer_FileSizeRetrieved;
UIScene_LoadOrJoinMenu::s_ulFileSize=pSaveTransferDetails->ulFileLen;
diff --git a/Minecraft.Client/Common/UI/UIScene_MainMenu.cpp b/Minecraft.Client/Common/UI/UIScene_MainMenu.cpp
index a1cbc144..fe743adc 100644
--- a/Minecraft.Client/Common/UI/UIScene_MainMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_MainMenu.cpp
@@ -12,7 +12,7 @@
Random *UIScene_MainMenu::random = new Random();
-EUIScene UIScene_MainMenu::eNavigateWhenReady = static_cast<EUIScene>(-1);
+EUIScene UIScene_MainMenu::eNavigateWhenReady = (EUIScene) -1;
UIScene_MainMenu::UIScene_MainMenu(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
{
@@ -33,29 +33,29 @@ UIScene_MainMenu::UIScene_MainMenu(int iPad, void *initData, UILayer *parentLaye
m_bIgnorePress=false;
- m_buttons[static_cast<int>(eControl_PlayGame)].init(IDS_PLAY_GAME,eControl_PlayGame);
+ m_buttons[(int)eControl_PlayGame].init(IDS_PLAY_GAME,eControl_PlayGame);
#ifdef _XBOX_ONE
if(!ProfileManager.IsFullVersion()) m_buttons[(int)eControl_PlayGame].setLabel(IDS_PLAY_TRIAL_GAME);
app.SetReachedMainMenu();
#endif
- m_buttons[static_cast<int>(eControl_Leaderboards)].init(IDS_LEADERBOARDS,eControl_Leaderboards);
- m_buttons[static_cast<int>(eControl_Achievements)].init( (UIString)IDS_ACHIEVEMENTS,eControl_Achievements);
- m_buttons[static_cast<int>(eControl_HelpAndOptions)].init(IDS_HELP_AND_OPTIONS,eControl_HelpAndOptions);
+ m_buttons[(int)eControl_Leaderboards].init(IDS_LEADERBOARDS,eControl_Leaderboards);
+ m_buttons[(int)eControl_Achievements].init( (UIString)IDS_ACHIEVEMENTS,eControl_Achievements);
+ m_buttons[(int)eControl_HelpAndOptions].init(IDS_HELP_AND_OPTIONS,eControl_HelpAndOptions);
if(ProfileManager.IsFullVersion())
{
m_bTrialVersion=false;
- m_buttons[static_cast<int>(eControl_UnlockOrDLC)].init(IDS_DOWNLOADABLECONTENT,eControl_UnlockOrDLC);
+ m_buttons[(int)eControl_UnlockOrDLC].init(IDS_DOWNLOADABLECONTENT,eControl_UnlockOrDLC);
}
else
{
m_bTrialVersion=true;
- m_buttons[static_cast<int>(eControl_UnlockOrDLC)].init(IDS_UNLOCK_FULL_GAME,eControl_UnlockOrDLC);
+ m_buttons[(int)eControl_UnlockOrDLC].init(IDS_UNLOCK_FULL_GAME,eControl_UnlockOrDLC);
}
#ifndef _DURANGO
- m_buttons[static_cast<int>(eControl_Exit)].init(app.GetString(IDS_EXIT_GAME),eControl_Exit);
+ m_buttons[(int)eControl_Exit].init(app.GetString(IDS_EXIT_GAME),eControl_Exit);
#else
m_buttons[(int)eControl_XboxHelp].init(IDS_XBOX_HELP_APP, eControl_XboxHelp);
#endif
@@ -104,7 +104,7 @@ UIScene_MainMenu::UIScene_MainMenu(int iPad, void *initData, UILayer *parentLaye
m_bLoadTrialOnNetworkManagerReady = false;
// 4J Stu - Clear out any loaded game rules
- app.setLevelGenerationOptions(nullptr);
+ app.setLevelGenerationOptions(NULL);
// 4J Stu - Reset the leaving game flag so that we correctly handle signouts while in the menus
g_NetworkManager.ResetLeavingGame();
@@ -182,7 +182,7 @@ void UIScene_MainMenu::handleGainFocus(bool navBack)
if(navBack && ProfileManager.IsFullVersion())
{
// Replace the Unlock Full Game with Downloadable Content
- m_buttons[static_cast<int>(eControl_UnlockOrDLC)].setLabel(IDS_DOWNLOADABLECONTENT);
+ m_buttons[(int)eControl_UnlockOrDLC].setLabel(IDS_DOWNLOADABLECONTENT);
}
#if TO_BE_IMPLEMENTED
@@ -196,7 +196,7 @@ void UIScene_MainMenu::handleGainFocus(bool navBack)
#ifdef __PSVITA__
int splashIndex = eSplashRandomStart + 2 + random->nextInt( (int)m_splashes.size() - (eSplashRandomStart + 2) );
#else
- int splashIndex = eSplashRandomStart + 1 + random->nextInt( static_cast<int>(m_splashes.size()) - (eSplashRandomStart + 1) );
+ int splashIndex = eSplashRandomStart + 1 + random->nextInt( (int)m_splashes.size() - (eSplashRandomStart + 1) );
#endif
// Override splash text on certain dates
@@ -303,12 +303,12 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId)
int primaryPad = ProfileManager.GetPrimaryPad();
#ifdef _XBOX_ONE
- int (*signInReturnedFunc) (LPVOID,const bool, const int iPad, const int iController) = nullptr;
+ int (*signInReturnedFunc) (LPVOID,const bool, const int iPad, const int iController) = NULL;
#else
- int (*signInReturnedFunc) (LPVOID,const bool, const int iPad) = nullptr;
+ int (*signInReturnedFunc) (LPVOID,const bool, const int iPad) = NULL;
#endif
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_PlayGame:
#ifdef __ORBIS__
@@ -396,7 +396,7 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId)
bool confirmUser = false;
// Note: if no sign in returned func, assume this isn't required
- if (signInReturnedFunc != nullptr)
+ if (signInReturnedFunc != NULL)
{
if(ProfileManager.IsSignedIn(primaryPad))
{
@@ -466,10 +466,10 @@ void UIScene_MainMenu::customDrawSplash(IggyCustomDrawCallbackRegion *region)
// 4J Stu - Move this to the ctor when the main menu is not the first scene we navigate to
ScreenSizeCalculator ssc(pMinecraft->options, pMinecraft->width_phys, pMinecraft->height_phys);
- m_fScreenWidth=static_cast<float>(pMinecraft->width_phys);
- m_fRawWidth=static_cast<float>(ssc.rawWidth);
- m_fScreenHeight=static_cast<float>(pMinecraft->height_phys);
- m_fRawHeight=static_cast<float>(ssc.rawHeight);
+ m_fScreenWidth=(float)pMinecraft->width_phys;
+ m_fRawWidth=(float)ssc.rawWidth;
+ m_fScreenHeight=(float)pMinecraft->height_phys;
+ m_fRawHeight=(float)ssc.rawHeight;
// Setup GDraw, normal game render states and matrices
@@ -513,7 +513,7 @@ void UIScene_MainMenu::customDrawSplash(IggyCustomDrawCallbackRegion *region)
int UIScene_MainMenu::MustSignInReturned(void *pParam, int iPad, C4JStorage::EMessageResult result)
{
- UIScene_MainMenu* pClass = static_cast<UIScene_MainMenu *>(pParam);
+ UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam;
if(result==C4JStorage::EMessage_ResultAccept)
{
@@ -643,7 +643,7 @@ int UIScene_MainMenu::HelpAndOptions_SignInReturned(void *pParam,bool bContinue,
int UIScene_MainMenu::HelpAndOptions_SignInReturned(void *pParam,bool bContinue,int iPad)
#endif
{
- UIScene_MainMenu *pClass = static_cast<UIScene_MainMenu *>(pParam);
+ UIScene_MainMenu *pClass = (UIScene_MainMenu *)pParam;
if(bContinue)
{
@@ -714,7 +714,7 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void *pParam, bool bContinue, in
int UIScene_MainMenu::CreateLoad_SignInReturned(void *pParam, bool bContinue, int iPad)
#endif
{
- UIScene_MainMenu* pClass = static_cast<UIScene_MainMenu *>(pParam);
+ UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam;
if(bContinue)
{
@@ -916,7 +916,7 @@ int UIScene_MainMenu::Leaderboards_SignInReturned(void *pParam,bool bContinue,in
int UIScene_MainMenu::Leaderboards_SignInReturned(void *pParam,bool bContinue,int iPad)
#endif
{
- UIScene_MainMenu *pClass = static_cast<UIScene_MainMenu *>(pParam);
+ UIScene_MainMenu *pClass = (UIScene_MainMenu *)pParam;
if(bContinue)
{
@@ -940,7 +940,7 @@ int UIScene_MainMenu::Leaderboards_SignInReturned(void *pParam,bool bContinue,in
{
bool bContentRestricted=false;
#if defined(__PS3__) || defined(__PSVITA__)
- ProfileManager.GetChatAndContentRestrictions(iPad,true,nullptr,&bContentRestricted,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(iPad,true,NULL,&bContentRestricted,NULL);
#endif
if(bContentRestricted)
{
@@ -986,7 +986,7 @@ int UIScene_MainMenu::Achievements_SignInReturned(void *pParam,bool bContinue,in
int UIScene_MainMenu::Achievements_SignInReturned(void *pParam,bool bContinue,int iPad)
#endif
{
- UIScene_MainMenu *pClass = static_cast<UIScene_MainMenu *>(pParam);
+ UIScene_MainMenu *pClass = (UIScene_MainMenu *)pParam;
if (bContinue)
{
@@ -1020,7 +1020,7 @@ int UIScene_MainMenu::UnlockFullGame_SignInReturned(void *pParam,bool bContinue,
int UIScene_MainMenu::UnlockFullGame_SignInReturned(void *pParam,bool bContinue,int iPad)
#endif
{
- UIScene_MainMenu* pClass = static_cast<UIScene_MainMenu *>(pParam);
+ UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam;
if (bContinue)
{
@@ -1098,7 +1098,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_PlayGame(void *
UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam;
- int (*signInReturnedFunc) (LPVOID,const bool, const int iPad) = nullptr;
+ int (*signInReturnedFunc) (LPVOID,const bool, const int iPad) = NULL;
// 4J-PB - Check if there is a patch for the game
pClass->m_errorCode = ProfileManager.getNPAvailability(ProfileManager.GetPrimaryPad());
@@ -1141,7 +1141,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_PlayGame(void *
// UINT uiIDA[1];
// uiIDA[0]=IDS_OK;
-// ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,nullptr,pClass);
+// ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,NULL,pClass);
}
// Check if PSN is unavailable because of age restriction
@@ -1157,7 +1157,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_PlayGame(void *
bool confirmUser = false;
// Note: if no sign in returned func, assume this isn't required
- if (signInReturnedFunc != nullptr)
+ if (signInReturnedFunc != NULL)
{
if(ProfileManager.IsSignedIn(primaryPad))
{
@@ -1187,7 +1187,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_Leaderboards(vo
UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam;
- int (*signInReturnedFunc) (LPVOID,const bool, const int iPad) = nullptr;
+ int (*signInReturnedFunc) (LPVOID,const bool, const int iPad) = NULL;
// 4J-PB - Check if there is a patch for the game
pClass->m_errorCode = ProfileManager.getNPAvailability(ProfileManager.GetPrimaryPad());
@@ -1228,7 +1228,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_Leaderboards(vo
// UINT uiIDA[1];
// uiIDA[0]=IDS_OK;
-// ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,nullptr,pClass);
+// ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,NULL,pClass);
}
bool confirmUser = false;
@@ -1247,7 +1247,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_Leaderboards(vo
}
// Note: if no sign in returned func, assume this isn't required
- if (signInReturnedFunc != nullptr)
+ if (signInReturnedFunc != NULL)
{
if(ProfileManager.IsSignedIn(primaryPad))
{
@@ -1600,7 +1600,7 @@ void UIScene_MainMenu::RunLeaderboards(int iPad)
bool bContentRestricted=false;
#if defined(__PS3__) || defined(__PSVITA__)
- ProfileManager.GetChatAndContentRestrictions(iPad,true,nullptr,&bContentRestricted,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(iPad,true,NULL,&bContentRestricted,NULL);
#endif
if(bContentRestricted)
{
@@ -1608,7 +1608,7 @@ void UIScene_MainMenu::RunLeaderboards(int iPad)
// you can't see leaderboards
UINT uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
- ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),nullptr,this);
+ ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,this);
#endif
}
else
@@ -1669,7 +1669,7 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad)
// UINT uiIDA[1];
// uiIDA[0]=IDS_OK;
-// ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,nullptr,this);
+// ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,NULL,this);
return;
}
@@ -1704,7 +1704,7 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad)
{
bool bContentRestricted=false;
#if defined(__PS3__) || defined(__PSVITA__)
- ProfileManager.GetChatAndContentRestrictions(iPad,true,nullptr,&bContentRestricted,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(iPad,true,NULL,&bContentRestricted,NULL);
#endif
if(bContentRestricted)
{
@@ -1713,7 +1713,7 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad)
// you can't see the store
UINT uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
- ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),nullptr,this);
+ ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,this);
#endif
}
else
@@ -1898,7 +1898,7 @@ void UIScene_MainMenu::tick()
{
app.DebugPrintf("[MainMenu] Navigating away from MainMenu.\n");
ui.NavigateToScene(lockedProfile, eNavigateWhenReady);
- eNavigateWhenReady = static_cast<EUIScene>(-1);
+ eNavigateWhenReady = (EUIScene) -1;
}
#ifdef _DURANGO
else
@@ -1925,7 +1925,7 @@ void UIScene_MainMenu::tick()
// 4J-PB - need to check this user can access the store
bool bContentRestricted=false;
- ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,nullptr,&bContentRestricted,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
UINT uiIDA[1];
@@ -2102,7 +2102,7 @@ void UIScene_MainMenu::LoadTrial(void)
NetworkGameInitData *param = new NetworkGameInitData();
param->seed = 0;
- param->saveData = nullptr;
+ param->saveData = NULL;
param->settings = app.GetGameHostOption( eGameHostOption_Tutorial ) | app.GetGameHostOption(eGameHostOption_DisableSaving);
vector<LevelGenerationOptions *> *generators = app.getLevelGenerators();
@@ -2110,7 +2110,7 @@ void UIScene_MainMenu::LoadTrial(void)
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &CGameNetworkManager::RunNetworkGameThreadProc;
- loadingParams->lpParam = static_cast<LPVOID>(param);
+ loadingParams->lpParam = (LPVOID)param;
UIFullscreenProgressCompletionData *completionData = new UIFullscreenProgressCompletionData();
completionData->bShowBackground=TRUE;
@@ -2129,7 +2129,7 @@ void UIScene_MainMenu::LoadTrial(void)
void UIScene_MainMenu::handleUnlockFullVersion()
{
- m_buttons[static_cast<int>(eControl_UnlockOrDLC)].setLabel(IDS_DOWNLOADABLECONTENT,true);
+ m_buttons[(int)eControl_UnlockOrDLC].setLabel(IDS_DOWNLOADABLECONTENT,true);
}
diff --git a/Minecraft.Client/Common/UI/UIScene_MessageBox.cpp b/Minecraft.Client/Common/UI/UIScene_MessageBox.cpp
index 7a0749d4..6b8dc552 100644
--- a/Minecraft.Client/Common/UI/UIScene_MessageBox.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_MessageBox.cpp
@@ -7,7 +7,7 @@ UIScene_MessageBox::UIScene_MessageBox(int iPad, void *initData, UILayer *parent
// Setup all the Iggy references we need for this scene
initialiseMovie();
- MessageBoxInfo *param = static_cast<MessageBoxInfo *>(initData);
+ MessageBoxInfo *param = (MessageBoxInfo *)initData;
m_buttonCount = param->uiOptionC;
@@ -41,7 +41,7 @@ UIScene_MessageBox::UIScene_MessageBox(int iPad, void *initData, UILayer *parent
m_labelTitle.init(app.GetString(param->uiTitle));
m_labelContent.init(app.GetString(param->uiText));
- out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcAutoResize , 0 , nullptr );
+ out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcAutoResize , 0 , NULL );
m_Func = param->Func;
m_lpParam = param->lpParam;
@@ -84,10 +84,10 @@ void UIScene_MessageBox::handleReload()
value[0].number = m_buttonCount;
value[1].type = IGGY_DATATYPE_number;
- value[1].number = static_cast<F64>(getControlFocus());
+ value[1].number = (F64)getControlFocus();
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcInit , 2 , value );
- out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcAutoResize , 0 , nullptr );
+ out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcAutoResize , 0 , NULL );
}
void UIScene_MessageBox::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled)
@@ -120,7 +120,7 @@ void UIScene_MessageBox::handleInput(int iPad, int key, bool repeat, bool presse
void UIScene_MessageBox::handlePress(F64 controlId, F64 childId)
{
C4JStorage::EMessageResult result = C4JStorage::EMessage_Cancelled;
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case 0:
result = C4JStorage::EMessage_ResultAccept;
diff --git a/Minecraft.Client/Common/UI/UIScene_NewUpdateMessage.cpp b/Minecraft.Client/Common/UI/UIScene_NewUpdateMessage.cpp
index 118712a4..998679ca 100644
--- a/Minecraft.Client/Common/UI/UIScene_NewUpdateMessage.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_NewUpdateMessage.cpp
@@ -19,8 +19,8 @@ UIScene_NewUpdateMessage::UIScene_NewUpdateMessage(int iPad, void *initData, UIL
message=app.FormatHTMLString(m_iPad,message);
vector<wstring> paragraphs;
- size_t lastIndex = 0;
- for ( size_t index = message.find(L"\r\n", lastIndex, 2);
+ int lastIndex = 0;
+ for ( int index = message.find(L"\r\n", lastIndex, 2);
index != wstring::npos;
index = message.find(L"\r\n", lastIndex, 2)
)
@@ -100,7 +100,7 @@ void UIScene_NewUpdateMessage::handleInput(int iPad, int key, bool repeat, bool
void UIScene_NewUpdateMessage::handlePress(F64 controlId, F64 childId)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_Confirm:
{
diff --git a/Minecraft.Client/Common/UI/UIScene_PauseMenu.cpp b/Minecraft.Client/Common/UI/UIScene_PauseMenu.cpp
index 7cec38b3..6f502db8 100644
--- a/Minecraft.Client/Common/UI/UIScene_PauseMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_PauseMenu.cpp
@@ -101,9 +101,9 @@ UIScene_PauseMenu::UIScene_PauseMenu(int iPad, void *initData, UILayer *parentLa
TelemetryManager->RecordPauseOrInactive(m_iPad);
Minecraft *pMinecraft = Minecraft::GetInstance();
- if(pMinecraft != nullptr && pMinecraft->localgameModes[iPad] != nullptr )
+ if(pMinecraft != NULL && pMinecraft->localgameModes[iPad] != NULL )
{
- TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[iPad]);
+ TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[iPad];
// This just allows it to be shown
gameMode->getTutorial()->showTutorialPopup(false);
@@ -114,9 +114,9 @@ UIScene_PauseMenu::UIScene_PauseMenu(int iPad, void *initData, UILayer *parentLa
UIScene_PauseMenu::~UIScene_PauseMenu()
{
Minecraft *pMinecraft = Minecraft::GetInstance();
- if(pMinecraft != nullptr && pMinecraft->localgameModes[m_iPad] != nullptr )
+ if(pMinecraft != NULL && pMinecraft->localgameModes[m_iPad] != NULL )
{
- TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[m_iPad]);
+ TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[m_iPad];
// This just allows it to be shown
gameMode->getTutorial()->showTutorialPopup(true);
@@ -506,7 +506,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
{
if(m_bIgnoreInput) return;
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case BUTTON_PAUSE_RESUMEGAME:
if( m_iPad == ProfileManager.GetPrimaryPad() && g_NetworkManager.IsLocalGame() )
@@ -593,7 +593,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
{
bool bContentRestricted=false;
#if defined(__PS3__) || defined(__PSVITA__)
- ProfileManager.GetChatAndContentRestrictions(m_iPad,true,nullptr,&bContentRestricted,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(m_iPad,true,NULL,&bContentRestricted,NULL);
#endif
if(bContentRestricted)
{
@@ -654,9 +654,9 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
if(m_iPad==ProfileManager.GetPrimaryPad())
{
int playTime = -1;
- if( pMinecraft->localplayers[m_iPad] != nullptr )
+ if( pMinecraft->localplayers[m_iPad] != NULL )
{
- playTime = static_cast<int>(pMinecraft->localplayers[m_iPad]->getSessionTimer());
+ playTime = (int)pMinecraft->localplayers[m_iPad]->getSessionTimer();
}
#if defined(_XBOX_ONE) || defined(__ORBIS__)
@@ -723,9 +723,9 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
else
{
int playTime = -1;
- if( pMinecraft->localplayers[m_iPad] != nullptr )
+ if( pMinecraft->localplayers[m_iPad] != NULL )
{
- playTime = static_cast<int>(pMinecraft->localplayers[m_iPad]->getSessionTimer());
+ playTime = (int)pMinecraft->localplayers[m_iPad]->getSessionTimer();
}
TelemetryManager->RecordLevelExit(m_iPad, eSen_LevelExitStatus_Exited);
@@ -741,9 +741,9 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
if(m_iPad==ProfileManager.GetPrimaryPad())
{
int playTime = -1;
- if( pMinecraft->localplayers[m_iPad] != nullptr )
+ if( pMinecraft->localplayers[m_iPad] != NULL )
{
- playTime = static_cast<int>(pMinecraft->localplayers[m_iPad]->getSessionTimer());
+ playTime = (int)pMinecraft->localplayers[m_iPad]->getSessionTimer();
}
// adjust the trial time played
@@ -759,9 +759,9 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
else
{
int playTime = -1;
- if( pMinecraft->localplayers[m_iPad] != nullptr )
+ if( pMinecraft->localplayers[m_iPad] != NULL )
{
- playTime = static_cast<int>(pMinecraft->localplayers[m_iPad]->getSessionTimer());
+ playTime = (int)pMinecraft->localplayers[m_iPad]->getSessionTimer();
}
TelemetryManager->RecordLevelExit(m_iPad, eSen_LevelExitStatus_Exited);
@@ -839,7 +839,7 @@ void UIScene_PauseMenu::PerformActionSaveGame()
if(!Minecraft::GetInstance()->skins->isUsingDefaultSkin())
{
TexturePack *tPack = Minecraft::GetInstance()->skins->getSelected();
- DLCTexturePack *pDLCTexPack=static_cast<DLCTexturePack *>(tPack);
+ DLCTexturePack *pDLCTexPack=(DLCTexturePack *)tPack;
m_pDLCPack=pDLCTexPack->getDLCInfoParentPack();//tPack->getDLCPack();
@@ -979,7 +979,7 @@ int UIScene_PauseMenu::UnlockFullSaveReturned(void *pParam,int iPad,C4JStorage::
// 4J-PB - need to check this user can access the store
#if defined(__PS3__) || defined(__PSVITA__)
bool bContentRestricted;
- ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,nullptr,&bContentRestricted,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
UINT uiIDA[1];
@@ -1003,7 +1003,7 @@ int UIScene_PauseMenu::UnlockFullSaveReturned(void *pParam,int iPad,C4JStorage::
int UIScene_PauseMenu::SaveGame_SignInReturned(void *pParam,bool bContinue, int iPad)
{
- UIScene_PauseMenu* pClass = static_cast<UIScene_PauseMenu *>(ui.GetSceneFromCallbackId((size_t)pParam));
+ UIScene_PauseMenu* pClass = (UIScene_PauseMenu*)ui.GetSceneFromCallbackId((size_t)pParam);
if(pClass) pClass->SetIgnoreInput(false);
if(bContinue==true)
@@ -1112,7 +1112,7 @@ int UIScene_PauseMenu::ViewLeaderboards_SignInReturned(void *pParam,bool bContin
{
#ifndef __ORBIS__
bool bContentRestricted=false;
- ProfileManager.GetChatAndContentRestrictions(pClass->m_iPad,true,nullptr,&bContentRestricted,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(pClass->m_iPad,true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
// you can't see leaderboards
@@ -1183,7 +1183,7 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J
#ifndef __ORBIS__
// 4J-PB - need to check this user can access the store
bool bContentRestricted=false;
- ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,nullptr,&bContentRestricted,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
UINT uiIDA[1];
@@ -1203,7 +1203,7 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J
app.DebugPrintf("Texture Pack - %s\n",pchPackName);
SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo((char *)pchPackName);
- if(pSONYDLCInfo!=nullptr)
+ if(pSONYDLCInfo!=NULL)
{
char chName[42];
char chKeyName[20];
@@ -1214,7 +1214,7 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J
// we have to retrieve the skuid from the store info, it can't be hardcoded since Sony may change it.
// So we assume the first sku for the product is the one we want
- // MGH - keyname in the DLC file is 16 chars long, but there's no space for a nullptr terminating char
+ // MGH - keyname in the DLC file is 16 chars long, but there's no space for a NULL terminating char
memset(chKeyName, 0, sizeof(chKeyName));
strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16);
@@ -1260,7 +1260,7 @@ int UIScene_PauseMenu::BuyTexturePack_SignInReturned(void *pParam,bool bContinue
#ifndef __ORBIS__
// 4J-PB - need to check this user can access the store
bool bContentRestricted=false;
- ProfileManager.GetChatAndContentRestrictions(iPad,true,nullptr,&bContentRestricted,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(iPad,true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
UINT uiIDA[1];
@@ -1280,7 +1280,7 @@ int UIScene_PauseMenu::BuyTexturePack_SignInReturned(void *pParam,bool bContinue
app.DebugPrintf("Texture Pack - %s\n",pchPackName);
SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo((char *)pchPackName);
- if(pSONYDLCInfo!=nullptr)
+ if(pSONYDLCInfo!=NULL)
{
char chName[42];
char chKeyName[20];
@@ -1291,7 +1291,7 @@ int UIScene_PauseMenu::BuyTexturePack_SignInReturned(void *pParam,bool bContinue
// we have to retrieve the skuid from the store info, it can't be hardcoded since Sony may change it.
// So we assume the first sku for the product is the one we want
- // MGH - keyname in the DLC file is 16 chars long, but there's no space for a nullptr terminating char
+ // MGH - keyname in the DLC file is 16 chars long, but there's no space for a NULL terminating char
memset(chKeyName, 0, sizeof(chKeyName));
strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16);
diff --git a/Minecraft.Client/Common/UI/UIScene_QuadrantSignin.cpp b/Minecraft.Client/Common/UI/UIScene_QuadrantSignin.cpp
index 76676561..0cb6cf2b 100644
--- a/Minecraft.Client/Common/UI/UIScene_QuadrantSignin.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_QuadrantSignin.cpp
@@ -11,7 +11,7 @@ UIScene_QuadrantSignin::UIScene_QuadrantSignin(int iPad, void *_initData, UILaye
// Setup all the Iggy references we need for this scene
initialiseMovie();
- m_signInInfo = *static_cast<SignInInfo *>(_initData);
+ m_signInInfo = *((SignInInfo *)_initData);
m_bIgnoreInput = false;
@@ -167,7 +167,7 @@ int UIScene_QuadrantSignin::SignInReturned(void *pParam,bool bContinue, int iPad
{
app.DebugPrintf("SignInReturned for pad %d\n", iPad);
- UIScene_QuadrantSignin *pClass = static_cast<UIScene_QuadrantSignin *>(pParam);
+ UIScene_QuadrantSignin *pClass = (UIScene_QuadrantSignin *)pParam;
#ifdef _XBOX_ONE
if(bContinue && pClass->m_signInInfo.requireOnline && ProfileManager.IsSignedIn(iPad))
@@ -264,7 +264,7 @@ void UIScene_QuadrantSignin::setControllerState(int iPad, EControllerStatus stat
value[0].number = iPad;
value[1].type = IGGY_DATATYPE_number;
- value[1].number = static_cast<int>(state);
+ value[1].number = (int)state;
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSetControllerStatus , 2 , value );
}
@@ -272,9 +272,9 @@ void UIScene_QuadrantSignin::setControllerState(int iPad, EControllerStatus stat
int UIScene_QuadrantSignin::AvatarReturned(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes)
{
- UIScene_QuadrantSignin *pClass = static_cast<UIScene_QuadrantSignin *>(lpParam);
+ UIScene_QuadrantSignin *pClass = (UIScene_QuadrantSignin *)lpParam;
app.DebugPrintf(app.USER_SR,"AvatarReturned callback\n");
- if(pbThumbnail != nullptr)
+ if(pbThumbnail != NULL)
{
// 4J-JEV - Added to ensure each new texture gets a unique name.
static unsigned int quadrantImageCount = 0;
diff --git a/Minecraft.Client/Common/UI/UIScene_ReinstallMenu.cpp b/Minecraft.Client/Common/UI/UIScene_ReinstallMenu.cpp
index c713a390..3b67f79e 100644
--- a/Minecraft.Client/Common/UI/UIScene_ReinstallMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_ReinstallMenu.cpp
@@ -36,7 +36,7 @@ void UIScene_ReinstallMenu::updateTooltips()
void UIScene_ReinstallMenu::updateComponents()
{
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
if(bNotInGame)
{
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
diff --git a/Minecraft.Client/Common/UI/UIScene_SaveMessage.cpp b/Minecraft.Client/Common/UI/UIScene_SaveMessage.cpp
index 0b8e0ca4..b58f86fd 100644
--- a/Minecraft.Client/Common/UI/UIScene_SaveMessage.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_SaveMessage.cpp
@@ -19,7 +19,7 @@ UIScene_SaveMessage::UIScene_SaveMessage(int iPad, void *initData, UILayer *pare
IggyDataValue result;
// Russian needs to resize the box
- IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcAutoResize , 0 , nullptr );
+ IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcAutoResize , 0 , NULL );
// 4J-PB - If we have a signed in user connected, let's get the DLC now
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
@@ -101,7 +101,7 @@ void UIScene_SaveMessage::handleInput(int iPad, int key, bool repeat, bool press
void UIScene_SaveMessage::handlePress(F64 controlId, F64 childId)
{
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_Confirm:
diff --git a/Minecraft.Client/Common/UI/UIScene_SettingsAudioMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SettingsAudioMenu.cpp
index 083fbd35..6d892d70 100644
--- a/Minecraft.Client/Common/UI/UIScene_SettingsAudioMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_SettingsAudioMenu.cpp
@@ -47,7 +47,7 @@ void UIScene_SettingsAudioMenu::updateTooltips()
void UIScene_SettingsAudioMenu::updateComponents()
{
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
if(bNotInGame)
{
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
@@ -93,8 +93,8 @@ void UIScene_SettingsAudioMenu::handleInput(int iPad, int key, bool repeat, bool
void UIScene_SettingsAudioMenu::handleSliderMove(F64 sliderId, F64 currentValue)
{
WCHAR TempString[256];
- int value = static_cast<int>(currentValue);
- switch(static_cast<int>(sliderId))
+ int value = (int)currentValue;
+ switch((int)sliderId)
{
case eControl_Music:
m_sliderMusic.handleSliderMove(value);
diff --git a/Minecraft.Client/Common/UI/UIScene_SettingsControlMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SettingsControlMenu.cpp
index 7dbd243b..d5447f77 100644
--- a/Minecraft.Client/Common/UI/UIScene_SettingsControlMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_SettingsControlMenu.cpp
@@ -47,7 +47,7 @@ void UIScene_SettingsControlMenu::updateTooltips()
void UIScene_SettingsControlMenu::updateComponents()
{
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
if(bNotInGame)
{
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
@@ -93,8 +93,8 @@ void UIScene_SettingsControlMenu::handleInput(int iPad, int key, bool repeat, bo
void UIScene_SettingsControlMenu::handleSliderMove(F64 sliderId, F64 currentValue)
{
WCHAR TempString[256];
- int value = static_cast<int>(currentValue);
- switch(static_cast<int>(sliderId))
+ int value = (int)currentValue;
+ switch((int)sliderId)
{
case eControl_SensitivityInGame:
m_sliderSensitivityInGame.handleSliderMove(value);
diff --git a/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.cpp
index b258d8c3..423c8f4b 100644
--- a/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_SettingsGraphicsMenu.cpp
@@ -7,21 +7,20 @@
namespace
{
- constexpr int FOV_MIN = 70;
- constexpr int FOV_MAX = 110;
- constexpr int FOV_SLIDER_MAX = 100;
+ const int FOV_MIN = 70;
+ const int FOV_MAX = 110;
+ const int FOV_SLIDER_MAX = 100;
- int ClampFov(int value)
+ int clampFov(int value)
{
if (value < FOV_MIN) return FOV_MIN;
if (value > FOV_MAX) return FOV_MAX;
return value;
}
- [[maybe_unused]]
- int FovToSliderValue(float fov)
+ int fovToSliderValue(float fov)
{
- const int clampedFov = ClampFov(static_cast<int>(fov + 0.5f));
+ int clampedFov = clampFov((int)(fov + 0.5f));
return ((clampedFov - FOV_MIN) * FOV_SLIDER_MAX) / (FOV_MAX - FOV_MIN);
}
@@ -57,7 +56,7 @@ UIScene_SettingsGraphicsMenu::UIScene_SettingsGraphicsMenu(int iPad, void *initD
initialiseMovie();
Minecraft* pMinecraft = Minecraft::GetInstance();
- m_bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ m_bNotInGame=(Minecraft::GetInstance()->level==NULL);
m_checkboxClouds.init(app.GetString(IDS_CHECKBOX_RENDER_CLOUDS),eControl_Clouds,(app.GetGameSettings(m_iPad,eGameSetting_Clouds)!=0));
m_checkboxBedrockFog.init(app.GetString(IDS_CHECKBOX_RENDER_BEDROCKFOG),eControl_BedrockFog,(app.GetGameSettings(m_iPad,eGameSetting_BedrockFog)!=0));
@@ -66,24 +65,24 @@ UIScene_SettingsGraphicsMenu::UIScene_SettingsGraphicsMenu(int iPad, void *initD
WCHAR TempString[256];
- swprintf(TempString, 256, L"Render Distance: %d",app.GetGameSettings(m_iPad,eGameSetting_RenderDistance));
+ swprintf((WCHAR*)TempString, 256, L"Render Distance: %d",app.GetGameSettings(m_iPad,eGameSetting_RenderDistance));
m_sliderRenderDistance.init(TempString,eControl_RenderDistance,0,5,DistanceToLevel(app.GetGameSettings(m_iPad,eGameSetting_RenderDistance)));
- swprintf( TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_GAMMA ),app.GetGameSettings(m_iPad,eGameSetting_Gamma));
+ swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_GAMMA ),app.GetGameSettings(m_iPad,eGameSetting_Gamma));
m_sliderGamma.init(TempString,eControl_Gamma,0,100,app.GetGameSettings(m_iPad,eGameSetting_Gamma));
- const int initialFovSlider = app.GetGameSettings(m_iPad, eGameSetting_FOV);
- const int initialFovDeg = sliderValueToFov(initialFovSlider);
- swprintf(TempString, 256, L"FOV: %d", initialFovDeg);
+ int initialFovSlider = app.GetGameSettings(m_iPad, eGameSetting_FOV);
+ int initialFovDeg = sliderValueToFov(initialFovSlider);
+ swprintf((WCHAR*)TempString, 256, L"FOV: %d", initialFovDeg);
m_sliderFOV.init(TempString, eControl_FOV, 0, FOV_SLIDER_MAX, initialFovSlider);
- swprintf( TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_INTERFACEOPACITY ),app.GetGameSettings(m_iPad,eGameSetting_InterfaceOpacity));
+ swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_INTERFACEOPACITY ),app.GetGameSettings(m_iPad,eGameSetting_InterfaceOpacity));
m_sliderInterfaceOpacity.init(TempString,eControl_InterfaceOpacity,0,100,app.GetGameSettings(m_iPad,eGameSetting_InterfaceOpacity));
doHorizontalResizeCheck();
-
- const bool bInGame=(Minecraft::GetInstance()->level!=nullptr);
- const bool bIsPrimaryPad=(ProfileManager.GetPrimaryPad()==m_iPad);
+
+ bool bInGame=(Minecraft::GetInstance()->level!=NULL);
+ bool bIsPrimaryPad=(ProfileManager.GetPrimaryPad()==m_iPad);
// if we're not in the game, we need to use basescene 0
if(bInGame)
{
@@ -137,7 +136,7 @@ void UIScene_SettingsGraphicsMenu::updateTooltips()
void UIScene_SettingsGraphicsMenu::updateComponents()
{
- const bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
if(bNotInGame)
{
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
@@ -188,20 +187,20 @@ void UIScene_SettingsGraphicsMenu::handleInput(int iPad, int key, bool repeat, b
void UIScene_SettingsGraphicsMenu::handleSliderMove(F64 sliderId, F64 currentValue)
{
WCHAR TempString[256];
- const int value = static_cast<int>(currentValue);
- switch(static_cast<int>(sliderId))
+ int value = (int)currentValue;
+ switch((int)sliderId)
{
case eControl_RenderDistance:
{
m_sliderRenderDistance.handleSliderMove(value);
- const int dist = LevelToDistance(value);
+ int dist = LevelToDistance(value);
app.SetGameSettings(m_iPad,eGameSetting_RenderDistance,dist);
- const Minecraft* mc = Minecraft::GetInstance();
+ Minecraft* mc = Minecraft::GetInstance();
mc->options->viewDistance = 3 - value;
- swprintf(TempString,256,L"Render Distance: %d",dist);
+ swprintf((WCHAR*)TempString,256,L"Render Distance: %d",dist);
m_sliderRenderDistance.setLabel(TempString);
}
break;
@@ -210,7 +209,7 @@ void UIScene_SettingsGraphicsMenu::handleSliderMove(F64 sliderId, F64 currentVal
m_sliderGamma.handleSliderMove(value);
app.SetGameSettings(m_iPad,eGameSetting_Gamma,value);
- swprintf( TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_GAMMA ),value);
+ swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_GAMMA ),value);
m_sliderGamma.setLabel(TempString);
break;
@@ -218,13 +217,13 @@ void UIScene_SettingsGraphicsMenu::handleSliderMove(F64 sliderId, F64 currentVal
case eControl_FOV:
{
m_sliderFOV.handleSliderMove(value);
- const Minecraft* pMinecraft = Minecraft::GetInstance();
- const int fovValue = sliderValueToFov(value);
- pMinecraft->gameRenderer->SetFovVal(static_cast<float>(fovValue));
+ Minecraft* pMinecraft = Minecraft::GetInstance();
+ int fovValue = sliderValueToFov(value);
+ pMinecraft->gameRenderer->SetFovVal((float)fovValue);
app.SetGameSettings(m_iPad, eGameSetting_FOV, value);
- WCHAR tempString[256];
- swprintf(tempString, 256, L"FOV: %d", fovValue);
- m_sliderFOV.setLabel(tempString);
+ WCHAR TempString[256];
+ swprintf((WCHAR*)TempString, 256, L"FOV: %d", fovValue);
+ m_sliderFOV.setLabel(TempString);
}
break;
@@ -232,7 +231,7 @@ void UIScene_SettingsGraphicsMenu::handleSliderMove(F64 sliderId, F64 currentVal
m_sliderInterfaceOpacity.handleSliderMove(value);
app.SetGameSettings(m_iPad,eGameSetting_InterfaceOpacity,value);
- swprintf( TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_INTERFACEOPACITY ),value);
+ swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_INTERFACEOPACITY ),value);
m_sliderInterfaceOpacity.setLabel(TempString);
break;
diff --git a/Minecraft.Client/Common/UI/UIScene_SettingsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SettingsMenu.cpp
index 2ae9c897..39a0b7c6 100644
--- a/Minecraft.Client/Common/UI/UIScene_SettingsMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_SettingsMenu.cpp
@@ -8,7 +8,7 @@ UIScene_SettingsMenu::UIScene_SettingsMenu(int iPad, void *initData, UILayer *pa
// Setup all the Iggy references we need for this scene
initialiseMovie();
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
m_buttons[BUTTON_ALL_OPTIONS].init(IDS_OPTIONS,BUTTON_ALL_OPTIONS);
m_buttons[BUTTON_ALL_AUDIO].init(IDS_AUDIO,BUTTON_ALL_AUDIO);
@@ -51,7 +51,7 @@ wstring UIScene_SettingsMenu::getMoviePath()
void UIScene_SettingsMenu::handleReload()
{
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
if(ProfileManager.GetPrimaryPad()!=m_iPad)
{
removeControl( &m_buttons[BUTTON_ALL_AUDIO], bNotInGame);
@@ -68,7 +68,7 @@ void UIScene_SettingsMenu::updateTooltips()
void UIScene_SettingsMenu::updateComponents()
{
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
if(bNotInGame)
{
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
@@ -119,7 +119,7 @@ void UIScene_SettingsMenu::handlePress(F64 controlId, F64 childId)
//CD - Added for audio
ui.PlayUISFX(eSFX_Press);
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case BUTTON_ALL_OPTIONS:
ui.NavigateToScene(m_iPad, eUIScene_SettingsOptionsMenu);
@@ -151,7 +151,7 @@ void UIScene_SettingsMenu::handlePress(F64 controlId, F64 childId)
int UIScene_SettingsMenu::ResetDefaultsDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- UIScene_SettingsMenu* pClass = static_cast<UIScene_SettingsMenu *>(pParam);
+ UIScene_SettingsMenu* pClass = (UIScene_SettingsMenu*)pParam;
// results switched for this dialog
if(result==C4JStorage::EMessage_ResultDecline)
diff --git a/Minecraft.Client/Common/UI/UIScene_SettingsOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SettingsOptionsMenu.cpp
index 7b4d3d9d..6898d489 100644
--- a/Minecraft.Client/Common/UI/UIScene_SettingsOptionsMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_SettingsOptionsMenu.cpp
@@ -29,7 +29,7 @@ UIScene_SettingsOptionsMenu::UIScene_SettingsOptionsMenu(int iPad, void *initDat
// Setup all the Iggy references we need for this scene
initialiseMovie();
- m_bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ m_bNotInGame=(Minecraft::GetInstance()->level==NULL);
m_checkboxViewBob.init(IDS_VIEW_BOBBING,eControl_ViewBob,(app.GetGameSettings(m_iPad,eGameSetting_ViewBob)!=0));
m_checkboxShowHints.init(IDS_HINTS,eControl_ShowHints,(app.GetGameSettings(m_iPad,eGameSetting_Hints)!=0));
@@ -99,7 +99,7 @@ UIScene_SettingsOptionsMenu::UIScene_SettingsOptionsMenu(int iPad, void *initDat
bool bRemoveAutosave=false;
bool bRemoveInGameGamertags=false;
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
bool bPrimaryPlayer = ProfileManager.GetPrimaryPad()==m_iPad;
if(!bPrimaryPlayer)
{
@@ -196,7 +196,7 @@ void UIScene_SettingsOptionsMenu::updateTooltips()
void UIScene_SettingsOptionsMenu::updateComponents()
{
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
if(bNotInGame)
{
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
@@ -243,7 +243,7 @@ void UIScene_SettingsOptionsMenu::handlePress(F64 controlId, F64 childId)
//CD - Added for audio
ui.PlayUISFX(eSFX_Press);
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_Languages:
m_bNavigateToLanguageSelector = true;
@@ -324,7 +324,7 @@ void UIScene_SettingsOptionsMenu::handleReload()
bool bRemoveAutosave=false;
bool bRemoveInGameGamertags=false;
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
bool bPrimaryPlayer = ProfileManager.GetPrimaryPad()==m_iPad;
if(!bPrimaryPlayer)
{
@@ -378,8 +378,8 @@ void UIScene_SettingsOptionsMenu::handleReload()
void UIScene_SettingsOptionsMenu::handleSliderMove(F64 sliderId, F64 currentValue)
{
- int value = static_cast<int>(currentValue);
- switch(static_cast<int>(sliderId))
+ int value = (int)currentValue;
+ switch((int)sliderId)
{
case eControl_Autosave:
m_sliderAutosave.handleSliderMove(value);
diff --git a/Minecraft.Client/Common/UI/UIScene_SettingsUIMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SettingsUIMenu.cpp
index 873564f6..917012d6 100644
--- a/Minecraft.Client/Common/UI/UIScene_SettingsUIMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_SettingsUIMenu.cpp
@@ -7,7 +7,7 @@ UIScene_SettingsUIMenu::UIScene_SettingsUIMenu(int iPad, void *initData, UILayer
// Setup all the Iggy references we need for this scene
initialiseMovie();
- m_bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ m_bNotInGame=(Minecraft::GetInstance()->level==NULL);
m_checkboxDisplayHUD.init(app.GetString(IDS_CHECKBOX_DISPLAY_HUD),eControl_DisplayHUD,(app.GetGameSettings(m_iPad,eGameSetting_DisplayHUD)!=0));
m_checkboxDisplayHand.init(app.GetString(IDS_CHECKBOX_DISPLAY_HAND),eControl_DisplayHand,(app.GetGameSettings(m_iPad,eGameSetting_DisplayHand)!=0));
@@ -26,7 +26,7 @@ UIScene_SettingsUIMenu::UIScene_SettingsUIMenu(int iPad, void *initData, UILayer
doHorizontalResizeCheck();
- bool bInGame=(Minecraft::GetInstance()->level!=nullptr);
+ bool bInGame=(Minecraft::GetInstance()->level!=NULL);
bool bPrimaryPlayer = ProfileManager.GetPrimaryPad()==m_iPad;
// if we're not in the game, we need to use basescene 0
@@ -57,7 +57,7 @@ void UIScene_SettingsUIMenu::updateTooltips()
void UIScene_SettingsUIMenu::updateComponents()
{
- bool bNotInGame=(Minecraft::GetInstance()->level==nullptr);
+ bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
if(bNotInGame)
{
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
@@ -146,8 +146,8 @@ void UIScene_SettingsUIMenu::handleInput(int iPad, int key, bool repeat, bool pr
void UIScene_SettingsUIMenu::handleSliderMove(F64 sliderId, F64 currentValue)
{
WCHAR TempString[256];
- int value = static_cast<int>(currentValue);
- switch(static_cast<int>(sliderId))
+ int value = (int)currentValue;
+ switch((int)sliderId)
{
case eControl_UISize:
m_sliderUISize.handleSliderMove(value);
diff --git a/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.cpp
index 5ef783d3..9f049c8c 100644
--- a/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.cpp
@@ -13,7 +13,7 @@ UIScene_SignEntryMenu::UIScene_SignEntryMenu(int iPad, void *_initData, UILayer
// Setup all the Iggy references we need for this scene
initialiseMovie();
- SignEntryScreenInput* initData = static_cast<SignEntryScreenInput *>(_initData);
+ SignEntryScreenInput* initData = (SignEntryScreenInput*)_initData;
m_sign = initData->sign;
m_bConfirmed = false;
@@ -175,9 +175,9 @@ void UIScene_SignEntryMenu::tick()
if (pMinecraft->level->isClientSide)
{
shared_ptr<MultiplayerLocalPlayer> player = pMinecraft->localplayers[m_iPad];
- if(player != nullptr && player->connection && player->connection->isStarted())
+ if(player != NULL && player->connection && player->connection->isStarted())
{
- player->connection->send(std::make_shared<SignUpdatePacket>(m_sign->x, m_sign->y, m_sign->z, m_sign->IsVerified(), m_sign->IsCensored(), m_sign->GetMessages()));
+ player->connection->send( shared_ptr<SignUpdatePacket>( new SignUpdatePacket(m_sign->x, m_sign->y, m_sign->z, m_sign->IsVerified(), m_sign->IsCensored(), m_sign->GetMessages()) ) );
}
}
ui.CloseUIScenes(m_iPad);
@@ -309,7 +309,7 @@ bool UIScene_SignEntryMenu::handleMouseClick(F32 x, F32 y)
int UIScene_SignEntryMenu::KeyboardCompleteCallback(LPVOID lpParam,bool bRes)
{
- const auto pClass=static_cast<UIScene_SignEntryMenu *>(lpParam);
+ UIScene_SignEntryMenu *pClass=(UIScene_SignEntryMenu *)lpParam;
pClass->m_bIgnoreInput = false;
if (bRes)
{
@@ -317,7 +317,7 @@ int UIScene_SignEntryMenu::KeyboardCompleteCallback(LPVOID lpParam,bool bRes)
uint16_t pchText[128];
ZeroMemory(pchText, 128 * sizeof(uint16_t));
Win64_GetKeyboardText(pchText, 128);
- pClass->m_textInputLines[pClass->m_iEditingLine].setLabel(reinterpret_cast<wchar_t *>(pchText));
+ pClass->m_textInputLines[pClass->m_iEditingLine].setLabel((wchar_t *)pchText);
#else
uint16_t pchText[128];
ZeroMemory(pchText, 128 * sizeof(uint16_t) );
@@ -333,7 +333,7 @@ void UIScene_SignEntryMenu::handlePress(F64 controlId, F64 childId)
#ifdef _WINDOWS64
if (isDirectEditBlocking()) return;
#endif
- switch(static_cast<int>(controlId))
+ switch((int)controlId)
{
case eControl_Confirm:
{
@@ -345,7 +345,7 @@ void UIScene_SignEntryMenu::handlePress(F64 controlId, F64 childId)
case eControl_Line3:
case eControl_Line4:
{
- m_iEditingLine = static_cast<int>(controlId);
+ m_iEditingLine = (int)controlId;
#ifdef _WINDOWS64
if (g_KBMInput.IsKBMActive())
{
@@ -384,7 +384,7 @@ void UIScene_SignEntryMenu::handlePress(F64 controlId, F64 childId)
break;
}
#else
- InputManager.RequestKeyboard(app.GetString(IDS_SIGN_TITLE),m_textInputLines[m_iEditingLine].getLabel(),static_cast<DWORD>(m_iPad),15,&UIScene_SignEntryMenu::KeyboardCompleteCallback,this,C_4JInput::EKeyboardMode_Alphabet);
+ InputManager.RequestKeyboard(app.GetString(IDS_SIGN_TITLE),m_textInputLines[m_iEditingLine].getLabel(),(DWORD)m_iPad,15,&UIScene_SignEntryMenu::KeyboardCompleteCallback,this,C_4JInput::EKeyboardMode_Alphabet);
#endif
#endif
}
diff --git a/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp
index a3482a24..9e0059f3 100644
--- a/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp
@@ -40,7 +40,7 @@ UIScene_SkinSelectMenu::UIScene_SkinSelectMenu(int iPad, void *initData, UILayer
m_bIgnoreInput=false;
m_bNoSkinsToShow = false;
- m_currentPack = nullptr;
+ m_currentPack = NULL;
m_packIndex = SKIN_SELECT_PACK_DEFAULT;
m_skinIndex = 0;
@@ -48,7 +48,7 @@ UIScene_SkinSelectMenu::UIScene_SkinSelectMenu(int iPad, void *initData, UILayer
m_currentSkinPath = app.GetPlayerSkinName(iPad);
m_selectedSkinPath = L"";
m_selectedCapePath = L"";
- m_vAdditionalSkinBoxes = nullptr;
+ m_vAdditionalSkinBoxes = NULL;
m_bSlidingSkins = false;
m_bAnimatingMove = false;
@@ -107,7 +107,7 @@ UIScene_SkinSelectMenu::UIScene_SkinSelectMenu(int iPad, void *initData, UILayer
// Change to display the favorites if there are any. The current skin will be in there (probably) - need to check for it
m_currentPack = app.m_dlcManager.getPackContainingSkin(m_currentSkinPath);
bool bFound;
- if(m_currentPack != nullptr)
+ if(m_currentPack != NULL)
{
m_packIndex = app.m_dlcManager.getPackIndex(m_currentPack,bFound,DLCManager::e_DLCType_Skin) + SKIN_SELECT_MAX_DEFAULTS;
}
@@ -436,7 +436,7 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad)
}
break;
default:
- if( m_currentPack != nullptr )
+ if( m_currentPack != NULL )
{
bool renableInputAfterOperation = true;
m_bIgnoreInput = true;
@@ -520,7 +520,7 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad)
DLC_INFO *pDLCInfo = app.GetDLCInfoForTrialOfferID(m_currentPack->getPurchaseOfferId());
ULONGLONG ullOfferID_Full;
- if(pDLCInfo!=nullptr)
+ if(pDLCInfo!=NULL)
{
ullOfferID_Full=pDLCInfo->ullOfferID_Full;
}
@@ -534,7 +534,7 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad)
#endif
bool bContentRestricted=false;
#if defined(__PS3__) || defined(__PSVITA__)
- ProfileManager.GetChatAndContentRestrictions(m_iPad,true,nullptr,&bContentRestricted,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(m_iPad,true,NULL,&bContentRestricted,NULL);
#endif
if(bContentRestricted)
{
@@ -599,7 +599,7 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad)
void UIScene_SkinSelectMenu::customDraw(IggyCustomDrawCallbackRegion *region)
{
int characterId = -1;
- swscanf(static_cast<wchar_t *>(region->name),L"Character%d",&characterId);
+ swscanf((wchar_t*)region->name,L"Character%d",&characterId);
if (characterId == -1)
{
app.DebugPrintf("Invalid character to render found\n");
@@ -635,8 +635,8 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged()
wstring skinOrigin = L"";
bool bSkinIsFree=false;
bool bLicensed=false;
- DLCSkinFile *skinFile=nullptr;
- DLCPack *Pack=nullptr;
+ DLCSkinFile *skinFile=NULL;
+ DLCPack *Pack=NULL;
BYTE sidePreviewControlsL,sidePreviewControlsR;
m_bNoSkinsToShow=false;
@@ -646,7 +646,7 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged()
m_controlSkinNamePlate.setVisible( false );
- if( m_currentPack != nullptr )
+ if( m_currentPack != NULL )
{
skinFile = m_currentPack->getSkinFile(m_skinIndex);
m_selectedSkinPath = skinFile->getPath();
@@ -673,7 +673,7 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged()
{
m_selectedSkinPath = L"";
m_selectedCapePath = L"";
- m_vAdditionalSkinBoxes = nullptr;
+ m_vAdditionalSkinBoxes = NULL;
switch(m_packIndex)
{
@@ -758,13 +758,13 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged()
// add the boxes to the humanoid model, but only if we've not done this already
vector<ModelPart *> *pAdditionalModelParts = app.GetAdditionalModelParts(skinFile->getSkinID());
- if(pAdditionalModelParts==nullptr)
+ if(pAdditionalModelParts==NULL)
{
pAdditionalModelParts = app.SetAdditionalSkinBoxes(skinFile->getSkinID(),m_vAdditionalSkinBoxes);
}
}
- if(skinFile!=nullptr)
+ if(skinFile!=NULL)
{
app.SetAnimOverrideBitmask(skinFile->getSkinID(),skinFile->getAnimOverrideBitmask());
}
@@ -779,7 +779,7 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged()
wstring otherSkinPath = L"";
wstring otherCapePath = L"";
- vector<SKIN_BOX *> *othervAdditionalSkinBoxes=nullptr;
+ vector<SKIN_BOX *> *othervAdditionalSkinBoxes=NULL;
wchar_t chars[256];
// turn off all displays
@@ -824,11 +824,11 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged()
{
if(showNext)
{
- skinFile=nullptr;
+ skinFile=NULL;
m_characters[eCharacter_Next1 + i].setVisible(true);
- if( m_currentPack != nullptr )
+ if( m_currentPack != NULL )
{
skinFile = m_currentPack->getSkinFile(nextIndex);
otherSkinPath = skinFile->getPath();
@@ -840,7 +840,7 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged()
{
otherSkinPath = L"";
otherCapePath = L"";
- othervAdditionalSkinBoxes=nullptr;
+ othervAdditionalSkinBoxes=NULL;
switch(m_packIndex)
{
case SKIN_SELECT_PACK_DEFAULT:
@@ -872,13 +872,13 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged()
if(othervAdditionalSkinBoxes && othervAdditionalSkinBoxes->size()!=0)
{
vector<ModelPart *> *pAdditionalModelParts = app.GetAdditionalModelParts(skinFile->getSkinID());
- if(pAdditionalModelParts==nullptr)
+ if(pAdditionalModelParts==NULL)
{
pAdditionalModelParts = app.SetAdditionalSkinBoxes(skinFile->getSkinID(),othervAdditionalSkinBoxes);
}
}
// 4J-PB - anim override needs set before SetTexture
- if(skinFile!=nullptr)
+ if(skinFile!=NULL)
{
app.SetAnimOverrideBitmask(skinFile->getSkinID(),skinFile->getAnimOverrideBitmask());
}
@@ -895,11 +895,11 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged()
{
if(showPrevious)
{
- skinFile=nullptr;
+ skinFile=NULL;
m_characters[eCharacter_Previous1 + i].setVisible(true);
- if( m_currentPack != nullptr )
+ if( m_currentPack != NULL )
{
skinFile = m_currentPack->getSkinFile(previousIndex);
otherSkinPath = skinFile->getPath();
@@ -911,7 +911,7 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged()
{
otherSkinPath = L"";
otherCapePath = L"";
- othervAdditionalSkinBoxes=nullptr;
+ othervAdditionalSkinBoxes=NULL;
switch(m_packIndex)
{
case SKIN_SELECT_PACK_DEFAULT:
@@ -943,7 +943,7 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged()
if(othervAdditionalSkinBoxes && othervAdditionalSkinBoxes->size()!=0)
{
vector<ModelPart *> *pAdditionalModelParts = app.GetAdditionalModelParts(skinFile->getSkinID());
- if(pAdditionalModelParts==nullptr)
+ if(pAdditionalModelParts==NULL)
{
pAdditionalModelParts = app.SetAdditionalSkinBoxes(skinFile->getSkinID(),othervAdditionalSkinBoxes);
}
@@ -1021,7 +1021,7 @@ int UIScene_SkinSelectMenu::getNextSkinIndex(DWORD sourceIndex)
{
nextSkin = eDefaultSkins_ServerSelected;
}
- else if(m_currentPack != nullptr && nextSkin>=m_currentPack->getSkinCount())
+ else if(m_currentPack != NULL && nextSkin>=m_currentPack->getSkinCount())
{
nextSkin = 0;
}
@@ -1055,7 +1055,7 @@ int UIScene_SkinSelectMenu::getPreviousSkinIndex(DWORD sourceIndex)
{
previousSkin = eDefaultSkins_Count - 1;
}
- else if(m_currentPack != nullptr)
+ else if(m_currentPack != NULL)
{
previousSkin = m_currentPack->getSkinCount()-1;
}
@@ -1079,10 +1079,10 @@ void UIScene_SkinSelectMenu::handlePackIndexChanged()
}
else
{
- m_currentPack = nullptr;
+ m_currentPack = NULL;
}
m_skinIndex = 0;
- if(m_currentPack != nullptr)
+ if(m_currentPack != NULL)
{
bool found;
DWORD currentSkinIndex = m_currentPack->getSkinIndexAt(m_currentSkinPath, found);
@@ -1099,7 +1099,7 @@ void UIScene_SkinSelectMenu::handlePackIndexChanged()
DWORD defaultSkinIndex = GET_DEFAULT_SKIN_ID_FROM_BITMASK(m_originalSkinId);
if( ugcSkinIndex == 0 )
{
- m_skinIndex = static_cast<EDefaultSkins>(defaultSkinIndex);
+ m_skinIndex = (EDefaultSkins) defaultSkinIndex;
}
}
break;
@@ -1130,7 +1130,7 @@ void UIScene_SkinSelectMenu::handlePackIndexChanged()
std::wstring fakeWideToRealWide(const wchar_t* original)
{
const char* name = reinterpret_cast<const char*>(original);
- int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, nullptr, 0);
+ int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0);
std::wstring wName(len, 0);
MultiByteToWideChar(CP_UTF8, 0, name, -1, &wName[0], len);
return wName.c_str();
@@ -1500,7 +1500,7 @@ void UIScene_SkinSelectMenu::HandleDLCMountingComplete()
if(app.m_dlcManager.getPackCount(DLCManager::e_DLCType_Skin)>0)
{
m_currentPack = app.m_dlcManager.getPackContainingSkin(m_currentSkinPath);
- if(m_currentPack != nullptr)
+ if(m_currentPack != NULL)
{
bool bFound = false;
m_packIndex = app.m_dlcManager.getPackIndex(m_currentPack,bFound,DLCManager::e_DLCType_Skin) + SKIN_SELECT_MAX_DEFAULTS;
@@ -1520,7 +1520,7 @@ void UIScene_SkinSelectMenu::HandleDLCMountingComplete()
m_bIgnoreInput=false;
app.m_dlcManager.checkForCorruptDLCAndAlert();
- bool bInGame=(Minecraft::GetInstance()->level!=nullptr);
+ bool bInGame=(Minecraft::GetInstance()->level!=NULL);
#if TO_BE_IMPLEMENTED
if(bInGame) XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_AUTO);
@@ -1534,7 +1534,7 @@ void UIScene_SkinSelectMenu::showNotOnlineDialog(int iPad)
{
// need to be signed in to live. get them to sign in to online
#if defined(__PS3__)
- SQRNetworkManager_PS3::AttemptPSNSignIn(nullptr, this);
+ SQRNetworkManager_PS3::AttemptPSNSignIn(NULL, this);
#elif defined(__PSVITA__)
if(CGameNetworkManager::usingAdhocMode() && SQRNetworkManager_AdHoc_Vita::GetAdhocStatus())
@@ -1543,15 +1543,15 @@ void UIScene_SkinSelectMenu::showNotOnlineDialog(int iPad)
UINT uiIDA[2];
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
uiIDA[1]=IDS_CANCEL;
- ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, ProfileManager.GetPrimaryPad(),&UIScene_SkinSelectMenu::MustSignInReturned,nullptr);
+ ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, ProfileManager.GetPrimaryPad(),&UIScene_SkinSelectMenu::MustSignInReturned,NULL);
}
else
{
- SQRNetworkManager_Vita::AttemptPSNSignIn(nullptr, this);
+ SQRNetworkManager_Vita::AttemptPSNSignIn(NULL, this);
}
#elif defined(__ORBIS__)
- SQRNetworkManager_Orbis::AttemptPSNSignIn(nullptr, this, false, iPad);
+ SQRNetworkManager_Orbis::AttemptPSNSignIn(NULL, this, false, iPad);
#elif defined(_DURANGO)
@@ -1563,7 +1563,7 @@ void UIScene_SkinSelectMenu::showNotOnlineDialog(int iPad)
int UIScene_SkinSelectMenu::UnlockSkinReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- UIScene_SkinSelectMenu* pScene = static_cast<UIScene_SkinSelectMenu *>(pParam);
+ UIScene_SkinSelectMenu* pScene = (UIScene_SkinSelectMenu*)pParam;
if ( (result == C4JStorage::EMessage_ResultAccept)
&& ProfileManager.IsSignedIn(iPad)
@@ -1579,7 +1579,7 @@ int UIScene_SkinSelectMenu::UnlockSkinReturned(void *pParam,int iPad,C4JStorage:
const char *pchPackName=wstringtofilename(wStrPackName);
SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo((char *)pchPackName);
- if (pSONYDLCInfo != nullptr)
+ if (pSONYDLCInfo != NULL)
{
char chName[42];
char chKeyName[20];
@@ -1593,7 +1593,7 @@ int UIScene_SkinSelectMenu::UnlockSkinReturned(void *pParam,int iPad,C4JStorage:
// while the store is screwed, hardcode the sku
//sprintf(chName,"%s-%s-%s",app.GetCommerceCategory(),pSONYDLCInfo->chDLCKeyname,"EURO");
- // MGH - keyname in the DLC file is 16 chars long, but there's no space for a nullptr terminating char
+ // MGH - keyname in the DLC file is 16 chars long, but there's no space for a NULL terminating char
memset(chKeyName, 0, sizeof(chKeyName));
strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16);
@@ -1623,7 +1623,7 @@ int UIScene_SkinSelectMenu::UnlockSkinReturned(void *pParam,int iPad,C4JStorage:
// need to re-enable input because the user can back out of the store purchase, and we'll be stuck
pScene->m_bIgnoreInput = false; // MGH - moved this to outside the pSONYDLCInfo, so we don't get stuck
#elif defined _XBOX_ONE
- StorageManager.InstallOffer(1,(WCHAR *)(pScene->m_currentPack->getPurchaseOfferId().c_str()), &RenableInput, pScene, nullptr);
+ StorageManager.InstallOffer(1,(WCHAR *)(pScene->m_currentPack->getPurchaseOfferId().c_str()), &RenableInput, pScene, NULL);
#endif
}
else // Is signed in, but not live.
@@ -1642,7 +1642,7 @@ int UIScene_SkinSelectMenu::UnlockSkinReturned(void *pParam,int iPad,C4JStorage:
int UIScene_SkinSelectMenu::RenableInput(LPVOID lpVoid, int, int)
{
- static_cast<UIScene_SkinSelectMenu *>(lpVoid)->m_bIgnoreInput = false;
+ ((UIScene_SkinSelectMenu*) lpVoid)->m_bIgnoreInput = false;
return 0;
}
diff --git a/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp b/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp
index 017af93e..f6916d13 100644
--- a/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp
@@ -12,7 +12,7 @@ UIScene_TeleportMenu::UIScene_TeleportMenu(int iPad, void *initData, UILayer *pa
// Setup all the Iggy references we need for this scene
initialiseMovie();
- TeleportMenuInitData *initParam = static_cast<TeleportMenuInitData *>(initData);
+ TeleportMenuInitData *initParam = (TeleportMenuInitData *)initData;
m_teleportToPlayer = initParam->teleportToPlayer;
@@ -41,7 +41,7 @@ UIScene_TeleportMenu::UIScene_TeleportMenu(int iPad, void *initData, UILayer *pa
{
INetworkPlayer *player = g_NetworkManager.GetPlayerByIndex( i );
- if( player != nullptr && !(player->IsLocal() && player->GetUserIndex() == m_iPad) )
+ if( player != NULL && !(player->IsLocal() && player->GetUserIndex() == m_iPad) )
{
m_players[m_playersCount] = player->GetSmallId();
++m_playersCount;
@@ -59,7 +59,7 @@ UIScene_TeleportMenu::UIScene_TeleportMenu(int iPad, void *initData, UILayer *pa
}
int voiceStatus = 0;
- if(player != nullptr && player->HasVoice() )
+ if(player != NULL && player->HasVoice() )
{
if( player->IsMutedByLocalUser(m_iPad) )
{
@@ -131,7 +131,7 @@ void UIScene_TeleportMenu::handleReload()
{
INetworkPlayer *player = g_NetworkManager.GetPlayerByIndex( i );
- if( player != nullptr && !(player->IsLocal() && player->GetUserIndex() == m_iPad) )
+ if( player != NULL && !(player->IsLocal() && player->GetUserIndex() == m_iPad) )
{
m_players[m_playersCount] = player->GetSmallId();
++m_playersCount;
@@ -149,7 +149,7 @@ void UIScene_TeleportMenu::handleReload()
}
int voiceStatus = 0;
- if(player != nullptr && player->HasVoice() )
+ if(player != NULL && player->HasVoice() )
{
if( player->IsMutedByLocalUser(m_iPad) )
{
@@ -189,7 +189,7 @@ void UIScene_TeleportMenu::tick()
{
INetworkPlayer *player = g_NetworkManager.GetPlayerBySmallId( m_players[i] );
- if( player != nullptr )
+ if( player != NULL )
{
m_players[i] = player->GetSmallId();
@@ -250,11 +250,11 @@ void UIScene_TeleportMenu::handleInput(int iPad, int key, bool repeat, bool pres
void UIScene_TeleportMenu::handlePress(F64 controlId, F64 childId)
{
- app.DebugPrintf("Pressed = %d, %d\n", static_cast<int>(controlId), static_cast<int>(childId));
- switch(static_cast<int>(controlId))
+ app.DebugPrintf("Pressed = %d, %d\n", (int)controlId, (int)childId);
+ switch((int)controlId)
{
case eControl_GamePlayers:
- int currentSelection = static_cast<int>(childId);
+ int currentSelection = (int)childId;
INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId( m_players[ currentSelection ] );
INetworkPlayer *thisPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(m_iPad);
@@ -275,7 +275,7 @@ void UIScene_TeleportMenu::handlePress(F64 controlId, F64 childId)
void UIScene_TeleportMenu::OnPlayerChanged(void *callbackParam, INetworkPlayer *pPlayer, bool leaving)
{
- UIScene_TeleportMenu *scene = static_cast<UIScene_TeleportMenu *>(callbackParam);
+ UIScene_TeleportMenu *scene = (UIScene_TeleportMenu *)callbackParam;
bool playerFound = false;
int foundIndex = 0;
for(int i = 0; i < scene->m_playersCount; ++i)
@@ -320,7 +320,7 @@ void UIScene_TeleportMenu::OnPlayerChanged(void *callbackParam, INetworkPlayer *
}
int voiceStatus = 0;
- if(pPlayer != nullptr && pPlayer->HasVoice() )
+ if(pPlayer != NULL && pPlayer->HasVoice() )
{
if( pPlayer->IsMutedByLocalUser(scene->m_iPad) )
{
diff --git a/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp b/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp
index bb9e30af..0a35c8e5 100644
--- a/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp
@@ -25,13 +25,13 @@ UIScene_TradingMenu::UIScene_TradingMenu(int iPad, void *_initData, UILayer *par
m_labelRequest1.init(L"");
m_labelRequest2.init(L"");
- TradingScreenInput *initData = static_cast<TradingScreenInput *>(_initData);
+ TradingScreenInput *initData = (TradingScreenInput *)_initData;
m_merchant = initData->trader;
Minecraft *pMinecraft = Minecraft::GetInstance();
- if( pMinecraft->localgameModes[iPad] != nullptr )
+ if( pMinecraft->localgameModes[iPad] != NULL )
{
- TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[iPad]);
+ TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[iPad];
m_previousTutorialState = gameMode->getTutorial()->getCurrentState();
gameMode->getTutorial()->changeTutorialState(e_Tutorial_State_Trading_Menu, this);
}
@@ -87,15 +87,15 @@ void UIScene_TradingMenu::handleDestroy()
{
app.DebugPrintf("UIScene_TradingMenu::handleDestroy\n");
Minecraft *pMinecraft = Minecraft::GetInstance();
- if( pMinecraft->localgameModes[m_iPad] != nullptr )
+ if( pMinecraft->localgameModes[m_iPad] != NULL )
{
- TutorialMode *gameMode = static_cast<TutorialMode *>(pMinecraft->localgameModes[m_iPad]);
- if(gameMode != nullptr) gameMode->getTutorial()->changeTutorialState(m_previousTutorialState);
+ TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[m_iPad];
+ if(gameMode != NULL) gameMode->getTutorial()->changeTutorialState(m_previousTutorialState);
}
// 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst packet loss.
// We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying)
- if(pMinecraft->localplayers[m_iPad] != nullptr) pMinecraft->localplayers[m_iPad]->closeContainer();
+ if(pMinecraft->localplayers[m_iPad] != NULL) pMinecraft->localplayers[m_iPad]->closeContainer();
ui.OverrideSFX(m_iPad,ACTION_MENU_A,false);
ui.OverrideSFX(m_iPad,ACTION_MENU_OK,false);
@@ -155,11 +155,11 @@ void UIScene_TradingMenu::handleInput(int iPad, int key, bool repeat, bool press
void UIScene_TradingMenu::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;
shared_ptr<ItemInstance> item = nullptr;
int slotId = -1;
- swscanf(static_cast<wchar_t *>(region->name),L"slot_%d",&slotId);
+ swscanf((wchar_t*)region->name,L"slot_%d",&slotId);
if(slotId < MerchantMenu::USE_ROW_SLOT_END)
{
@@ -190,7 +190,7 @@ void UIScene_TradingMenu::customDraw(IggyCustomDrawCallbackRegion *region)
};
}
}
- if(item != nullptr) customDrawSlotControl(region,m_iPad,item,1.0f,item->isFoil(),true);
+ if(item != NULL) customDrawSlotControl(region,m_iPad,item,1.0f,item->isFoil(),true);
}
void UIScene_TradingMenu::showScrollRightArrow(bool show)
diff --git a/Minecraft.Client/Common/UI/UIScene_TrialExitUpsell.cpp b/Minecraft.Client/Common/UI/UIScene_TrialExitUpsell.cpp
index 9338daba..9ef8f189 100644
--- a/Minecraft.Client/Common/UI/UIScene_TrialExitUpsell.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_TrialExitUpsell.cpp
@@ -50,7 +50,7 @@ void UIScene_TrialExitUpsell::handleInput(int iPad, int key, bool repeat, bool p
// 4J-PB - need to check this user can access the store
#if defined(__PS3__) || defined(__PSVITA__)
bool bContentRestricted;
- ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,nullptr,&bContentRestricted,nullptr);
+ ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
UINT uiIDA[1];
diff --git a/Minecraft.Client/Common/UI/UIString.cpp b/Minecraft.Client/Common/UI/UIString.cpp
index 04d8b8e3..288fa87a 100644
--- a/Minecraft.Client/Common/UI/UIString.cpp
+++ b/Minecraft.Client/Common/UI/UIString.cpp
@@ -139,7 +139,7 @@ UIString::~UIString()
bool UIString::empty()
{
- return m_core.get() == nullptr;
+ return m_core.get() == NULL;
}
bool UIString::compare(const UIString &uiString)
@@ -149,19 +149,19 @@ bool UIString::compare(const UIString &uiString)
bool UIString::needsUpdating()
{
- if (m_core != nullptr) return m_core->needsUpdating();
+ if (m_core != NULL) return m_core->needsUpdating();
else return false;
}
void UIString::setUpdated()
{
- if (m_core != nullptr) m_core->setUpdated();
+ if (m_core != NULL) m_core->setUpdated();
}
wstring &UIString::getString()
{
static wstring blank(L"");
- if (m_core != nullptr) return m_core->getString();
+ if (m_core != NULL) return m_core->getString();
else return blank;
}
diff --git a/Minecraft.Client/Common/UI/UIStructs.h b/Minecraft.Client/Common/UI/UIStructs.h
index e5f5a833..ac83458f 100644
--- a/Minecraft.Client/Common/UI/UIStructs.h
+++ b/Minecraft.Client/Common/UI/UIStructs.h
@@ -196,8 +196,8 @@ typedef struct _ConnectionProgressParams
showTooltips = false;
setFailTimer = false;
timerTime = 0;
- cancelFunc = nullptr;
- cancelFuncParam = nullptr;
+ cancelFunc = NULL;
+ cancelFuncParam = NULL;
}
} ConnectionProgressParams;
@@ -250,7 +250,7 @@ typedef struct _SaveListDetails
_SaveListDetails()
{
saveId = 0;
- pbThumbnailData = nullptr;
+ pbThumbnailData = NULL;
dwThumbnailSize = 0;
#ifdef _DURANGO
ZeroMemory(UTF16SaveName,sizeof(wchar_t)*128);
@@ -403,15 +403,15 @@ typedef struct _LoadingInputParams
_LoadingInputParams()
{
- func = nullptr;
- lpParam = nullptr;
- completionData = nullptr;
+ func = NULL;
+ lpParam = NULL;
+ completionData = NULL;
cancelText = -1;
- cancelFunc = nullptr;
- completeFunc = nullptr;
- m_cancelFuncParam = nullptr;
- m_completeFuncParam = nullptr;
+ cancelFunc = NULL;
+ completeFunc = NULL;
+ m_cancelFuncParam = NULL;
+ m_completeFuncParam = NULL;
waitForThreadToDelete = false;
}
} LoadingInputParams;
@@ -439,7 +439,7 @@ typedef struct _TutorialPopupInfo
_TutorialPopupInfo()
{
- interactScene = nullptr;
+ interactScene = NULL;
desc = L"";
title = L"";
icon = -1;
@@ -447,7 +447,7 @@ typedef struct _TutorialPopupInfo
isFoil = false;
allowFade = true;
isReminder = false;
- tutorial = nullptr;
+ tutorial = NULL;
}
} TutorialPopupInfo;
diff --git a/Minecraft.Client/Common/UI/UITTFFont.cpp b/Minecraft.Client/Common/UI/UITTFFont.cpp
index 359ac76b..5d72ed97 100644
--- a/Minecraft.Client/Common/UI/UITTFFont.cpp
+++ b/Minecraft.Client/Common/UI/UITTFFont.cpp
@@ -11,9 +11,9 @@ UITTFFont::UITTFFont(const string &name, const string &path, S32 fallbackCharact
#ifdef _UNICODE
wstring wPath = convStringToWstring(path);
- HANDLE file = CreateFile(wPath.c_str(), GENERIC_READ, 0, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
+ HANDLE file = CreateFile(wPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#else
- HANDLE file = CreateFile(path.c_str(), GENERIC_READ, 0, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
+ HANDLE file = CreateFile(path.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#endif
if( file == INVALID_HANDLE_VALUE )
{
@@ -30,7 +30,7 @@ UITTFFont::UITTFFont(const string &name, const string &path, S32 fallbackCharact
DWORD bytesRead;
pbData = (PBYTE) new BYTE[dwFileSize];
- BOOL bSuccess = ReadFile(file,pbData,dwFileSize,&bytesRead,nullptr);
+ BOOL bSuccess = ReadFile(file,pbData,dwFileSize,&bytesRead,NULL);
if(bSuccess==FALSE)
{
app.FatalLoadError();