From 277e3a1e87189e01afad98745bbf867e132fcbcf Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Fri, 6 Mar 2026 20:31:41 -0600 Subject: [PATCH] fix: unglob all of /Build/Common --- Minecraft.Client/Build/Common/App_structs.h | 4 +- .../Build/Common/Audio/Consoles_SoundEngine.h | 12 +- .../Build/Common/Audio/SoundEngine.cpp | 44 ++-- .../Build/Common/Audio/SoundEngine.h | 18 +- .../Build/Common/Audio/SoundNames.cpp | 2 +- .../Build/Common/Colours/ColourTable.cpp | 10 +- .../Build/Common/Colours/ColourTable.h | 6 +- .../Build/Common/Consoles_App.cpp | 206 +++++++++--------- Minecraft.Client/Build/Common/Consoles_App.h | 152 ++++++------- .../Build/Common/DLC/DLCAudioFile.cpp | 14 +- .../Build/Common/DLC/DLCAudioFile.h | 12 +- .../Build/Common/DLC/DLCCapeFile.cpp | 2 +- .../Build/Common/DLC/DLCCapeFile.h | 2 +- .../Build/Common/DLC/DLCColourTableFile.cpp | 2 +- .../Build/Common/DLC/DLCColourTableFile.h | 2 +- Minecraft.Client/Build/Common/DLC/DLCFile.cpp | 4 +- Minecraft.Client/Build/Common/DLC/DLCFile.h | 10 +- .../Build/Common/DLC/DLCGameRules.h | 2 +- .../Build/Common/DLC/DLCGameRulesFile.cpp | 2 +- .../Build/Common/DLC/DLCGameRulesFile.h | 2 +- .../Build/Common/DLC/DLCGameRulesHeader.cpp | 12 +- .../Build/Common/DLC/DLCGameRulesHeader.h | 14 +- .../Build/Common/DLC/DLCLocalisationFile.cpp | 2 +- .../Build/Common/DLC/DLCLocalisationFile.h | 2 +- .../Build/Common/DLC/DLCManager.cpp | 46 ++-- .../Build/Common/DLC/DLCManager.h | 18 +- Minecraft.Client/Build/Common/DLC/DLCPack.cpp | 22 +- Minecraft.Client/Build/Common/DLC/DLCPack.h | 42 ++-- .../Build/Common/DLC/DLCSkinFile.cpp | 12 +- .../Build/Common/DLC/DLCSkinFile.h | 16 +- .../Build/Common/DLC/DLCTextureFile.cpp | 6 +- .../Build/Common/DLC/DLCTextureFile.h | 8 +- .../Build/Common/DLC/DLCUIDataFile.cpp | 2 +- .../Build/Common/DLC/DLCUIDataFile.h | 2 +- .../AddEnchantmentRuleDefinition.cpp | 4 +- .../GameRules/AddEnchantmentRuleDefinition.h | 4 +- .../GameRules/AddItemRuleDefinition.cpp | 8 +- .../Common/GameRules/AddItemRuleDefinition.h | 8 +- .../ApplySchematicRuleDefinition.cpp | 2 +- .../GameRules/ApplySchematicRuleDefinition.h | 6 +- .../Build/Common/GameRules/BiomeOverride.cpp | 2 +- .../Build/Common/GameRules/BiomeOverride.h | 4 +- .../GameRules/CollectItemRuleDefinition.cpp | 10 +- .../GameRules/CollectItemRuleDefinition.h | 8 +- .../GameRules/CompleteAllRuleDefinition.cpp | 10 +- .../GameRules/CompleteAllRuleDefinition.h | 6 +- .../GameRules/CompoundGameRuleDefinition.cpp | 6 +- .../GameRules/CompoundGameRuleDefinition.h | 8 +- .../GameRules/ConsoleGenerateStructure.cpp | 4 +- .../GameRules/ConsoleGenerateStructure.h | 6 +- .../Common/GameRules/ConsoleSchematicFile.cpp | 28 +-- .../Common/GameRules/ConsoleSchematicFile.h | 8 +- .../Build/Common/GameRules/GameRule.cpp | 10 +- .../Build/Common/GameRules/GameRule.h | 14 +- .../Common/GameRules/GameRuleDefinition.cpp | 24 +- .../Common/GameRules/GameRuleDefinition.h | 20 +- .../Common/GameRules/GameRuleManager.cpp | 34 +-- .../Build/Common/GameRules/GameRuleManager.h | 10 +- .../Common/GameRules/GameRulesInstance.h | 2 +- .../GameRules/LevelGenerationOptions.cpp | 62 +++--- .../Common/GameRules/LevelGenerationOptions.h | 84 +++---- .../Common/GameRules/LevelGenerators.cpp | 4 +- .../Build/Common/GameRules/LevelGenerators.h | 8 +- .../Build/Common/GameRules/LevelRules.cpp | 4 +- .../Build/Common/GameRules/LevelRules.h | 4 +- .../Build/Common/GameRules/LevelRuleset.cpp | 6 +- .../Build/Common/GameRules/LevelRuleset.h | 8 +- .../GameRules/NamedAreaRuleDefinition.cpp | 2 +- .../GameRules/NamedAreaRuleDefinition.h | 6 +- .../Build/Common/GameRules/StartFeature.cpp | 2 +- .../Build/Common/GameRules/StartFeature.h | 4 +- .../GameRules/UpdatePlayerRuleDefinition.cpp | 6 +- .../GameRules/UpdatePlayerRuleDefinition.h | 10 +- .../GameRules/UseTileRuleDefinition.cpp | 2 +- .../Common/GameRules/UseTileRuleDefinition.h | 4 +- .../XboxStructureActionGenerateBox.cpp | 2 +- .../XboxStructureActionGenerateBox.h | 2 +- .../XboxStructureActionPlaceBlock.cpp | 2 +- .../GameRules/XboxStructureActionPlaceBlock.h | 2 +- .../XboxStructureActionPlaceContainer.cpp | 6 +- .../XboxStructureActionPlaceContainer.h | 6 +- .../XboxStructureActionPlaceSpawner.cpp | 4 +- .../XboxStructureActionPlaceSpawner.h | 4 +- .../Leaderboards/LeaderboardManager.cpp | 4 +- .../Common/Leaderboards/LeaderboardManager.h | 4 +- .../Common/Network/GameNetworkManager.cpp | 22 +- .../Build/Common/Network/GameNetworkManager.h | 10 +- .../Common/Network/NetworkPlayerInterface.h | 2 +- .../Network/PlatformNetworkManagerInterface.h | 10 +- .../Network/PlatformNetworkManagerStub.cpp | 12 +- .../Network/PlatformNetworkManagerStub.h | 16 +- .../Common/Network/Sony/NetworkPlayerSony.cpp | 2 +- .../Common/Network/Sony/NetworkPlayerSony.h | 2 +- .../Sony/PlatformNetworkManagerSony.cpp | 12 +- .../Network/Sony/PlatformNetworkManagerSony.h | 16 +- .../Build/Common/Tutorial/AreaTask.cpp | 2 +- .../Build/Common/Tutorial/AreaTask.h | 4 +- .../Common/Tutorial/ChangeStateConstraint.cpp | 12 +- .../Build/Common/Tutorial/ChoiceTask.h | 2 +- .../Common/Tutorial/CompleteUsingItemTask.cpp | 2 +- .../Common/Tutorial/CompleteUsingItemTask.h | 4 +- .../Build/Common/Tutorial/ControllerTask.h | 6 +- .../Build/Common/Tutorial/CraftTask.cpp | 6 +- .../Build/Common/Tutorial/CraftTask.h | 6 +- .../Build/Common/Tutorial/DiggerItemHint.cpp | 4 +- .../Build/Common/Tutorial/DiggerItemHint.h | 4 +- .../Build/Common/Tutorial/EffectChangedTask.h | 2 +- .../Build/Common/Tutorial/FullTutorial.cpp | 6 +- .../Common/Tutorial/FullTutorialActiveTask.h | 2 +- .../Build/Common/Tutorial/InfoTask.h | 4 +- .../Build/Common/Tutorial/LookAtEntityHint.h | 2 +- .../Build/Common/Tutorial/LookAtTileHint.h | 2 +- .../Build/Common/Tutorial/PickupTask.cpp | 2 +- .../Build/Common/Tutorial/PickupTask.h | 6 +- .../Common/Tutorial/ProcedureCompoundTask.cpp | 8 +- .../Common/Tutorial/ProcedureCompoundTask.h | 10 +- .../Build/Common/Tutorial/ProgressFlagTask.h | 2 +- .../Build/Common/Tutorial/StatTask.h | 2 +- .../Build/Common/Tutorial/StateChangeTask.h | 4 +- .../Build/Common/Tutorial/TakeItemHint.cpp | 2 +- .../Build/Common/Tutorial/TakeItemHint.h | 4 +- .../Build/Common/Tutorial/Tutorial.cpp | 38 ++-- .../Build/Common/Tutorial/Tutorial.h | 48 ++-- .../Build/Common/Tutorial/TutorialHint.cpp | 10 +- .../Build/Common/Tutorial/TutorialHint.h | 12 +- .../Build/Common/Tutorial/TutorialMode.cpp | 6 +- .../Build/Common/Tutorial/TutorialMode.h | 6 +- .../Build/Common/Tutorial/TutorialTask.cpp | 2 +- .../Build/Common/Tutorial/TutorialTask.h | 16 +- .../Build/Common/Tutorial/UseItemTask.cpp | 4 +- .../Build/Common/Tutorial/UseItemTask.h | 6 +- .../Build/Common/Tutorial/UseTileTask.cpp | 6 +- .../Build/Common/Tutorial/UseTileTask.h | 8 +- .../Build/Common/Tutorial/XuiCraftingTask.h | 4 +- .../Build/Common/UI/IUIController.h | 2 +- .../UI/IUIScene_AbstractContainerMenu.cpp | 44 ++-- .../UI/IUIScene_AbstractContainerMenu.h | 10 +- .../Build/Common/UI/IUIScene_AnvilMenu.cpp | 8 +- .../Build/Common/UI/IUIScene_AnvilMenu.h | 12 +- .../Build/Common/UI/IUIScene_CraftingMenu.cpp | 34 +-- .../Build/Common/UI/IUIScene_CraftingMenu.h | 12 +- .../Build/Common/UI/IUIScene_CreativeMenu.cpp | 34 +-- .../Build/Common/UI/IUIScene_CreativeMenu.h | 16 +- .../Build/Common/UI/IUIScene_PauseMenu.cpp | 2 +- .../Build/Common/UI/IUIScene_StartGame.cpp | 2 +- .../Build/Common/UI/IUIScene_TradingMenu.cpp | 48 ++-- .../Build/Common/UI/IUIScene_TradingMenu.h | 22 +- .../Build/Common/UI/UIBitmapFont.h | 2 +- .../Build/Common/UI/UIComponent_Chat.cpp | 2 +- .../Build/Common/UI/UIComponent_Chat.h | 2 +- .../Common/UI/UIComponent_DebugUIConsole.cpp | 2 +- .../Common/UI/UIComponent_DebugUIConsole.h | 2 +- .../UI/UIComponent_DebugUIMarketingGuide.cpp | 2 +- .../UI/UIComponent_DebugUIMarketingGuide.h | 2 +- .../Build/Common/UI/UIComponent_Logo.cpp | 2 +- .../Build/Common/UI/UIComponent_Logo.h | 2 +- .../Common/UI/UIComponent_MenuBackground.cpp | 2 +- .../Common/UI/UIComponent_MenuBackground.h | 2 +- .../Build/Common/UI/UIComponent_Panorama.cpp | 2 +- .../Build/Common/UI/UIComponent_Panorama.h | 2 +- .../UI/UIComponent_PressStartToPlay.cpp | 10 +- .../Common/UI/UIComponent_PressStartToPlay.h | 10 +- .../Build/Common/UI/UIComponent_Tooltips.cpp | 4 +- .../Build/Common/UI/UIComponent_Tooltips.h | 4 +- .../Common/UI/UIComponent_TutorialPopup.cpp | 106 ++++----- .../Common/UI/UIComponent_TutorialPopup.h | 12 +- .../Build/Common/UI/UIControl.cpp | 2 +- Minecraft.Client/Build/Common/UI/UIControl.h | 2 +- .../Build/Common/UI/UIControl_Base.cpp | 6 +- .../Build/Common/UI/UIControl_Base.h | 4 +- .../Build/Common/UI/UIControl_BitmapIcon.cpp | 2 +- .../Build/Common/UI/UIControl_BitmapIcon.h | 2 +- .../Build/Common/UI/UIControl_Button.cpp | 2 +- .../Build/Common/UI/UIControl_Button.h | 2 +- .../Build/Common/UI/UIControl_ButtonList.cpp | 6 +- .../Build/Common/UI/UIControl_ButtonList.h | 6 +- .../Build/Common/UI/UIControl_CheckBox.cpp | 2 +- .../Build/Common/UI/UIControl_CheckBox.h | 2 +- .../Build/Common/UI/UIControl_DLCList.cpp | 2 +- .../Build/Common/UI/UIControl_DLCList.h | 2 +- .../Common/UI/UIControl_DynamicLabel.cpp | 2 +- .../Build/Common/UI/UIControl_DynamicLabel.h | 2 +- .../Common/UI/UIControl_EnchantmentBook.cpp | 2 +- .../Common/UI/UIControl_EnchantmentBook.h | 2 +- .../Common/UI/UIControl_EnchantmentButton.cpp | 8 +- .../Common/UI/UIControl_EnchantmentButton.h | 6 +- .../Build/Common/UI/UIControl_Label.cpp | 2 +- .../Build/Common/UI/UIControl_Label.h | 2 +- .../Common/UI/UIControl_LeaderboardList.cpp | 4 +- .../Common/UI/UIControl_LeaderboardList.h | 4 +- .../Build/Common/UI/UIControl_PlayerList.cpp | 2 +- .../Build/Common/UI/UIControl_PlayerList.h | 2 +- .../Common/UI/UIControl_PlayerSkinPreview.cpp | 8 +- .../Common/UI/UIControl_PlayerSkinPreview.h | 16 +- .../Build/Common/UI/UIControl_Progress.cpp | 2 +- .../Build/Common/UI/UIControl_Progress.h | 2 +- .../Build/Common/UI/UIControl_SaveList.cpp | 14 +- .../Build/Common/UI/UIControl_SaveList.h | 14 +- .../Build/Common/UI/UIControl_Slider.cpp | 2 +- .../Build/Common/UI/UIControl_Slider.h | 4 +- .../Common/UI/UIControl_SpaceIndicatorBar.cpp | 2 +- .../Common/UI/UIControl_SpaceIndicatorBar.h | 4 +- .../Build/Common/UI/UIControl_TextInput.cpp | 2 +- .../Build/Common/UI/UIControl_TextInput.h | 2 +- .../Common/UI/UIControl_TexturePackList.cpp | 4 +- .../Common/UI/UIControl_TexturePackList.h | 4 +- .../Build/Common/UI/UIController.cpp | 14 +- .../Build/Common/UI/UIController.h | 22 +- .../Build/Common/UI/UIFontData.cpp | 6 +- Minecraft.Client/Build/Common/UI/UIFontData.h | 6 +- Minecraft.Client/Build/Common/UI/UILayer.cpp | 4 +- Minecraft.Client/Build/Common/UI/UILayer.h | 14 +- Minecraft.Client/Build/Common/UI/UIScene.cpp | 18 +- Minecraft.Client/Build/Common/UI/UIScene.h | 30 +-- .../UI/UIScene_AbstractContainerMenu.cpp | 6 +- .../Common/UI/UIScene_AbstractContainerMenu.h | 4 +- .../Build/Common/UI/UIScene_AnvilMenu.cpp | 8 +- .../Build/Common/UI/UIScene_AnvilMenu.h | 6 +- .../Common/UI/UIScene_BrewingStandMenu.cpp | 2 +- .../Common/UI/UIScene_BrewingStandMenu.h | 4 +- .../Common/UI/UIScene_ConnectingProgress.cpp | 2 +- .../Common/UI/UIScene_ConnectingProgress.h | 2 +- .../Build/Common/UI/UIScene_ContainerMenu.cpp | 2 +- .../Build/Common/UI/UIScene_ContainerMenu.h | 2 +- .../Build/Common/UI/UIScene_ControlsMenu.cpp | 2 +- .../Build/Common/UI/UIScene_ControlsMenu.h | 2 +- .../Build/Common/UI/UIScene_CraftingMenu.cpp | 14 +- .../Build/Common/UI/UIScene_CraftingMenu.h | 14 +- .../Common/UI/UIScene_CreateWorldMenu.cpp | 6 +- .../Build/Common/UI/UIScene_CreateWorldMenu.h | 6 +- .../Build/Common/UI/UIScene_CreativeMenu.cpp | 4 +- .../Build/Common/UI/UIScene_CreativeMenu.h | 2 +- .../Build/Common/UI/UIScene_Credits.cpp | 4 +- .../Build/Common/UI/UIScene_Credits.h | 4 +- .../Build/Common/UI/UIScene_DLCMainMenu.cpp | 2 +- .../Build/Common/UI/UIScene_DLCMainMenu.h | 2 +- .../Build/Common/UI/UIScene_DLCOffersMenu.cpp | 22 +- .../Build/Common/UI/UIScene_DLCOffersMenu.h | 4 +- .../Build/Common/UI/UIScene_DeathMenu.cpp | 2 +- .../Build/Common/UI/UIScene_DeathMenu.h | 2 +- .../UI/UIScene_DebugCreateSchematic.cpp | 4 +- .../Common/UI/UIScene_DebugCreateSchematic.h | 2 +- .../Build/Common/UI/UIScene_DebugOptions.cpp | 4 +- .../Build/Common/UI/UIScene_DebugOptions.h | 2 +- .../Build/Common/UI/UIScene_DebugOverlay.cpp | 4 +- .../Build/Common/UI/UIScene_DebugOverlay.h | 8 +- .../Common/UI/UIScene_DebugSetCamera.cpp | 4 +- .../Build/Common/UI/UIScene_DebugSetCamera.h | 2 +- .../Build/Common/UI/UIScene_DispenserMenu.cpp | 2 +- .../Build/Common/UI/UIScene_DispenserMenu.h | 2 +- .../Build/Common/UI/UIScene_EULA.cpp | 10 +- .../Build/Common/UI/UIScene_EULA.h | 2 +- .../Common/UI/UIScene_EnchantingMenu.cpp | 2 +- .../Build/Common/UI/UIScene_EnchantingMenu.h | 2 +- .../Build/Common/UI/UIScene_EndPoem.cpp | 20 +- .../Build/Common/UI/UIScene_EndPoem.h | 10 +- .../Common/UI/UIScene_FullscreenProgress.cpp | 8 +- .../Common/UI/UIScene_FullscreenProgress.h | 4 +- .../Build/Common/UI/UIScene_FurnaceMenu.cpp | 2 +- .../Build/Common/UI/UIScene_FurnaceMenu.h | 4 +- .../Build/Common/UI/UIScene_HUD.cpp | 12 +- .../Build/Common/UI/UIScene_HUD.h | 10 +- .../Common/UI/UIScene_HelpAndOptionsMenu.cpp | 2 +- .../Common/UI/UIScene_HelpAndOptionsMenu.h | 2 +- .../Build/Common/UI/UIScene_HowToPlay.cpp | 16 +- .../Build/Common/UI/UIScene_HowToPlay.h | 2 +- .../Build/Common/UI/UIScene_HowToPlayMenu.cpp | 2 +- .../Build/Common/UI/UIScene_HowToPlayMenu.h | 2 +- .../UI/UIScene_InGameHostOptionsMenu.cpp | 6 +- .../Common/UI/UIScene_InGameHostOptionsMenu.h | 2 +- .../Common/UI/UIScene_InGameInfoMenu.cpp | 22 +- .../Build/Common/UI/UIScene_InGameInfoMenu.h | 4 +- .../UI/UIScene_InGamePlayerOptionsMenu.cpp | 10 +- .../UI/UIScene_InGamePlayerOptionsMenu.h | 2 +- .../UI/UIScene_InGameSaveManagementMenu.cpp | 2 +- .../UI/UIScene_InGameSaveManagementMenu.h | 4 +- .../Build/Common/UI/UIScene_Intro.cpp | 2 +- .../Build/Common/UI/UIScene_Intro.h | 2 +- .../Build/Common/UI/UIScene_InventoryMenu.cpp | 10 +- .../Build/Common/UI/UIScene_InventoryMenu.h | 2 +- .../Build/Common/UI/UIScene_JoinMenu.cpp | 2 +- .../Build/Common/UI/UIScene_JoinMenu.h | 2 +- .../Build/Common/UI/UIScene_Keyboard.cpp | 4 +- .../Build/Common/UI/UIScene_Keyboard.h | 2 +- .../UI/UIScene_LaunchMoreOptionsMenu.cpp | 8 +- .../Common/UI/UIScene_LaunchMoreOptionsMenu.h | 2 +- .../Common/UI/UIScene_LeaderboardsMenu.cpp | 6 +- .../Common/UI/UIScene_LeaderboardsMenu.h | 4 +- .../Build/Common/UI/UIScene_LoadMenu.cpp | 4 +- .../Build/Common/UI/UIScene_LoadMenu.h | 4 +- .../Common/UI/UIScene_LoadOrJoinMenu.cpp | 20 +- .../Build/Common/UI/UIScene_LoadOrJoinMenu.h | 12 +- .../Build/Common/UI/UIScene_MainMenu.cpp | 8 +- .../Build/Common/UI/UIScene_MainMenu.h | 6 +- .../Build/Common/UI/UIScene_MessageBox.cpp | 2 +- .../Build/Common/UI/UIScene_MessageBox.h | 2 +- .../Build/Common/UI/UIScene_PauseMenu.cpp | 6 +- .../Build/Common/UI/UIScene_PauseMenu.h | 2 +- .../Common/UI/UIScene_QuadrantSignin.cpp | 2 +- .../Build/Common/UI/UIScene_QuadrantSignin.h | 2 +- .../Build/Common/UI/UIScene_ReinstallMenu.cpp | 2 +- .../Build/Common/UI/UIScene_ReinstallMenu.h | 2 +- .../Build/Common/UI/UIScene_SaveMessage.cpp | 2 +- .../Build/Common/UI/UIScene_SaveMessage.h | 2 +- .../Common/UI/UIScene_SettingsAudioMenu.cpp | 2 +- .../Common/UI/UIScene_SettingsAudioMenu.h | 2 +- .../Common/UI/UIScene_SettingsControlMenu.cpp | 2 +- .../Common/UI/UIScene_SettingsControlMenu.h | 2 +- .../UI/UIScene_SettingsGraphicsMenu.cpp | 2 +- .../Common/UI/UIScene_SettingsGraphicsMenu.h | 2 +- .../Build/Common/UI/UIScene_SettingsMenu.cpp | 2 +- .../Build/Common/UI/UIScene_SettingsMenu.h | 2 +- .../Common/UI/UIScene_SettingsOptionsMenu.cpp | 6 +- .../Common/UI/UIScene_SettingsOptionsMenu.h | 2 +- .../Common/UI/UIScene_SettingsUIMenu.cpp | 2 +- .../Build/Common/UI/UIScene_SettingsUIMenu.h | 2 +- .../Build/Common/UI/UIScene_SignEntryMenu.cpp | 10 +- .../Build/Common/UI/UIScene_SignEntryMenu.h | 4 +- .../Common/UI/UIScene_SkinSelectMenu.cpp | 28 +-- .../Build/Common/UI/UIScene_SkinSelectMenu.h | 14 +- .../Build/Common/UI/UIScene_TeleportMenu.cpp | 12 +- .../Build/Common/UI/UIScene_TeleportMenu.h | 4 +- .../Build/Common/UI/UIScene_Timer.cpp | 2 +- .../Build/Common/UI/UIScene_Timer.h | 2 +- .../Build/Common/UI/UIScene_TradingMenu.cpp | 12 +- .../Build/Common/UI/UIScene_TradingMenu.h | 10 +- .../Common/UI/UIScene_TrialExitUpsell.cpp | 2 +- .../Build/Common/UI/UIScene_TrialExitUpsell.h | 2 +- Minecraft.Client/Build/Common/UI/UIStructs.h | 32 +-- .../Build/Common/UI/UITTFFont.cpp | 2 +- .../Build/Common/XUI/SlotProgressControl.cpp | 4 +- .../Build/Common/XUI/XUI_Ctrl_4JList.cpp | 4 +- .../Build/Common/XUI/XUI_Ctrl_BrewProgress.h | 2 +- .../Common/XUI/XUI_Ctrl_BubblesProgress.h | 2 +- .../Build/Common/XUI/XUI_Ctrl_BurnProgress.h | 2 +- .../XUI/XUI_Ctrl_CraftIngredientSlot.cpp | 2 +- .../Common/XUI/XUI_Ctrl_CraftIngredientSlot.h | 4 +- .../Build/Common/XUI/XUI_Ctrl_EnchantButton.h | 2 +- .../Common/XUI/XUI_Ctrl_EnchantmentBook.cpp | 2 +- .../Common/XUI/XUI_Ctrl_EnchantmentBook.h | 4 +- .../XUI/XUI_Ctrl_EnchantmentButtonText.cpp | 8 +- .../XUI/XUI_Ctrl_EnchantmentButtonText.h | 6 +- .../Build/Common/XUI/XUI_Ctrl_FireProgress.h | 2 +- .../Common/XUI/XUI_Ctrl_MinecraftPlayer.h | 2 +- .../XUI/XUI_Ctrl_MinecraftSkinPreview.cpp | 8 +- .../XUI/XUI_Ctrl_MinecraftSkinPreview.h | 18 +- .../Common/XUI/XUI_Ctrl_MinecraftSlot.cpp | 6 +- .../Build/Common/XUI/XUI_Ctrl_MinecraftSlot.h | 6 +- .../Build/Common/XUI/XUI_Ctrl_MobEffect.cpp | 4 +- .../Build/Common/XUI/XUI_Ctrl_MobEffect.h | 10 +- .../Common/XUI/XUI_Ctrl_SlotItemCtrlBase.cpp | 28 +-- .../Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h | 6 +- .../Common/XUI/XUI_Ctrl_SplashPulser.cpp | 2 +- .../Build/Common/XUI/XUI_Ctrl_SplashPulser.h | 2 +- .../Build/Common/XUI/XUI_CustomMessages.h | 2 +- .../Build/Common/XUI/XUI_DLCOffers.cpp | 16 +- .../Build/Common/XUI/XUI_DLCOffers.h | 4 +- .../Build/Common/XUI/XUI_DebugItemEditor.cpp | 14 +- .../Build/Common/XUI/XUI_DebugItemEditor.h | 4 +- .../Build/Common/XUI/XUI_DebugOverlay.cpp | 12 +- .../Build/Common/XUI/XUI_DebugOverlay.h | 12 +- .../Common/XUI/XUI_DebugSchematicCreator.cpp | 14 +- .../Build/Common/XUI/XUI_DebugSetCamera.cpp | 10 +- .../Build/Common/XUI/XUI_DebugTips.cpp | 4 +- .../Common/XUI/XUI_FullscreenProgress.cpp | 4 +- .../Build/Common/XUI/XUI_HelpHowToPlay.cpp | 8 +- .../Common/XUI/XUI_InGameHostOptions.cpp | 4 +- .../Build/Common/XUI/XUI_InGameInfo.cpp | 10 +- .../Build/Common/XUI/XUI_InGameInfo.h | 2 +- .../Common/XUI/XUI_InGamePlayerOptions.cpp | 8 +- .../Build/Common/XUI/XUI_MainMenu.cpp | 12 +- .../Build/Common/XUI/XUI_MainMenu.h | 2 +- .../Build/Common/XUI/XUI_MultiGameCreate.cpp | 8 +- .../Build/Common/XUI/XUI_MultiGameInfo.h | 2 +- .../Common/XUI/XUI_MultiGameJoinLoad.cpp | 6 +- .../Build/Common/XUI/XUI_MultiGameJoinLoad.h | 8 +- .../XUI/XUI_MultiGameLaunchMoreOptions.cpp | 2 +- .../XUI/XUI_MultiGameLaunchMoreOptions.h | 2 +- .../Build/Common/XUI/XUI_NewUpdateMessage.cpp | 4 +- .../Common/XUI/XUI_PartnernetPassword.cpp | 2 +- .../XUI/XUI_Scene_AbstractContainer.cpp | 6 +- .../Common/XUI/XUI_Scene_AbstractContainer.h | 4 +- .../Build/Common/XUI/XUI_Scene_Anvil.cpp | 14 +- .../Build/Common/XUI/XUI_Scene_Anvil.h | 6 +- .../Build/Common/XUI/XUI_Scene_Base.cpp | 8 +- .../Build/Common/XUI/XUI_Scene_Base.h | 4 +- .../Build/Common/XUI/XUI_Scene_BrewingStand.h | 2 +- .../Build/Common/XUI/XUI_Scene_Container.cpp | 2 +- .../Common/XUI/XUI_Scene_CraftingPanel.cpp | 10 +- .../Common/XUI/XUI_Scene_CraftingPanel.h | 12 +- .../Build/Common/XUI/XUI_Scene_Enchant.h | 2 +- .../Build/Common/XUI/XUI_Scene_Furnace.h | 2 +- .../Build/Common/XUI/XUI_Scene_Inventory.cpp | 10 +- .../Build/Common/XUI/XUI_Scene_Inventory.h | 2 +- .../XUI/XUI_Scene_Inventory_Creative.cpp | 4 +- .../Common/XUI/XUI_Scene_Inventory_Creative.h | 2 +- .../Build/Common/XUI/XUI_Scene_Trading.cpp | 16 +- .../Build/Common/XUI/XUI_Scene_Trading.h | 16 +- .../Build/Common/XUI/XUI_Scene_Trap.h | 2 +- .../Build/Common/XUI/XUI_Scene_Win.cpp | 10 +- .../Build/Common/XUI/XUI_Scene_Win.h | 6 +- .../Build/Common/XUI/XUI_SettingsOptions.cpp | 6 +- .../Build/Common/XUI/XUI_SignEntry.cpp | 8 +- .../Build/Common/XUI/XUI_SignEntry.h | 2 +- .../Build/Common/XUI/XUI_SkinSelect.cpp | 16 +- .../Build/Common/XUI/XUI_SkinSelect.h | 6 +- .../Build/Common/XUI/XUI_SocialPost.cpp | 14 +- .../Build/Common/XUI/XUI_SocialPost.h | 2 +- .../Build/Common/XUI/XUI_Teleport.cpp | 2 +- .../Build/Common/XUI/XUI_Teleport.h | 2 +- .../Build/Common/XUI/XUI_TextEntry.cpp | 10 +- .../Build/Common/XUI/XUI_TextEntry.h | 4 +- .../Build/Common/XUI/XUI_TransferToXboxOne.h | 2 +- .../Build/Common/XUI/XUI_TutorialPopup.cpp | 68 +++--- .../Build/Common/XUI/XUI_TutorialPopup.h | 6 +- .../Build/Common/XUI/XUI_debug.cpp | 2 +- 416 files changed, 1750 insertions(+), 1750 deletions(-) diff --git a/Minecraft.Client/Build/Common/App_structs.h b/Minecraft.Client/Build/Common/App_structs.h index ed321b5fd..e4465dad8 100644 --- a/Minecraft.Client/Build/Common/App_structs.h +++ b/Minecraft.Client/Build/Common/App_structs.h @@ -164,8 +164,8 @@ typedef struct #ifdef _XBOX_ONE - wstring wsProductId; - wstring wsDisplayName; + std::wstring wsProductId; + std::wstring wsDisplayName; // add a store for the local DLC image PBYTE pbImageData; diff --git a/Minecraft.Client/Build/Common/Audio/Consoles_SoundEngine.h b/Minecraft.Client/Build/Common/Audio/Consoles_SoundEngine.h index 0c0b0ff96..8a7124afb 100644 --- a/Minecraft.Client/Build/Common/Audio/Consoles_SoundEngine.h +++ b/Minecraft.Client/Build/Common/Audio/Consoles_SoundEngine.h @@ -46,19 +46,19 @@ class ConsoleSoundEngine public: ConsoleSoundEngine() : m_bIsPlayingStreamingCDMusic(false),m_bIsPlayingStreamingGameMusic(false), m_bIsPlayingEndMusic(false),m_bIsPlayingNetherMusic(false){}; - virtual void tick(shared_ptr *players, float a) =0; + virtual void tick(std::shared_ptr *players, float a) =0; virtual void destroy()=0; virtual void play(int iSound, float x, float y, float z, float volume, float pitch) =0; - virtual void playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay=true) =0; + virtual void playStreaming(const std::wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay=true) =0; virtual void playUI(int iSound, float volume, float pitch) =0; virtual void updateMusicVolume(float fVal) =0; virtual void updateSystemMusicPlaying(bool isPlaying) = 0; virtual void updateSoundEffectVolume(float fVal) =0; virtual void init(Options *) =0 ; - virtual void add(const wstring& name, File *file) =0; - virtual void addMusic(const wstring& name, File *file) =0; - virtual void addStreaming(const wstring& name, File *file) =0; - virtual char *ConvertSoundPathToName(const wstring& name, bool bConvertSpaces) =0; + virtual void add(const std::wstring& name, File *file) =0; + virtual void addMusic(const std::wstring& name, File *file) =0; + virtual void addStreaming(const std::wstring& name, File *file) =0; + virtual char *ConvertSoundPathToName(const std::wstring& name, bool bConvertSpaces) =0; virtual void playMusicTick() =0; virtual bool GetIsPlayingStreamingCDMusic() ; diff --git a/Minecraft.Client/Build/Common/Audio/SoundEngine.cpp b/Minecraft.Client/Build/Common/Audio/SoundEngine.cpp index 45ccd8a38..177abd100 100644 --- a/Minecraft.Client/Build/Common/Audio/SoundEngine.cpp +++ b/Minecraft.Client/Build/Common/Audio/SoundEngine.cpp @@ -32,7 +32,7 @@ void SoundEngine::init(Options *pOptions) { } -void SoundEngine::tick(shared_ptr *players, float a) +void SoundEngine::tick(std::shared_ptr *players, float a) { } void SoundEngine::destroy() {} @@ -40,16 +40,16 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa { app.DebugPrintf("PlaySound - %d\n",iSound); } -void SoundEngine::playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay) {} +void SoundEngine::playStreaming(const std::wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay) {} void SoundEngine::playUI(int iSound, float volume, float pitch) {} void SoundEngine::updateMusicVolume(float fVal) {} void SoundEngine::updateSoundEffectVolume(float fVal) {} -void SoundEngine::add(const wstring& name, File *file) {} -void SoundEngine::addMusic(const wstring& name, File *file) {} -void SoundEngine::addStreaming(const wstring& name, File *file) {} -char *SoundEngine::ConvertSoundPathToName(const wstring& name, bool bConvertSpaces) { return NULL; } +void SoundEngine::add(const std::wstring& name, File *file) {} +void SoundEngine::addMusic(const std::wstring& name, File *file) {} +void SoundEngine::addStreaming(const std::wstring& name, File *file) {} +char *SoundEngine::ConvertSoundPathToName(const std::wstring& name, bool bConvertSpaces) { return NULL; } bool SoundEngine::isStreamingWavebankReady() { return true; } void SoundEngine::playMusicTick() {}; void SoundEngine::SetStreamingSounds(int, int, int, int, int, int, int) {} @@ -631,7 +631,7 @@ static float fVal=0.0f; static S32 running = AIL_ms_count(); #endif -void SoundEngine::tick(shared_ptr *players, float a) +void SoundEngine::tick(std::shared_ptr *players, float a) { #ifdef __DISABLE_MILES__ return; @@ -749,7 +749,7 @@ void SoundEngine::destroy() {} void SoundEngine::GetSoundName(char *szSoundName,int iSound) { strcpy((char *)szSoundName,"Minecraft/"); - wstring name = wchSoundNames[iSound]; + std::wstring name = wchSoundNames[iSound]; char *SoundName = (char *)ConvertSoundPathToName(name); strcat((char *)szSoundName,SoundName); } @@ -774,7 +774,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa /* // if we are already playing loads of this sounds ignore this one if(CurrentSoundsPlaying[iSound+eSFX_MAX]>MAX_SAME_SOUNDS_PLAYING) { - // wstring name = wchSoundNames[iSound]; + // std::wstring name = wchSoundNames[iSound]; // char *SoundName = (char *)ConvertSoundPathToName(name); // app.DebugPrintf("Too many %s sounds playing!\n",SoundName); return; @@ -786,9 +786,9 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa strcpy((char *)szSoundName,"Minecraft/"); #ifdef DISTORTION_TEST - wstring name = wchSoundNames[eSoundType_MOB_ENDERDRAGON_GROWL]; + std::wstring name = wchSoundNames[eSoundType_MOB_ENDERDRAGON_GROWL]; #else - wstring name = wchSoundNames[iSound]; + std::wstring name = wchSoundNames[iSound]; #endif char *SoundName = (char *)ConvertSoundPathToName(name); @@ -822,7 +822,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa void SoundEngine::playUI(int iSound, float volume, float pitch) { U8 szSoundName[256]; - wstring name; + std::wstring name; // we have some game sounds played as UI sounds... // Not the best way to do this, but it seems to only be the portal sounds @@ -881,7 +881,7 @@ void SoundEngine::playUI(int iSound, float volume, float pitch) // playStreaming // ///////////////////////////////////////////// -void SoundEngine::playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay) +void SoundEngine::playStreaming(const std::wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay) { // This function doesn't actually play a streaming sound, just sets states and an id for the music tick to play it // Level audio will be played when a play with an empty name comes in @@ -1059,7 +1059,7 @@ int SoundEngine::getMusicID(int iDomain) // ///////////////////////////////////////////// // check what the CD is -int SoundEngine::getMusicID(const wstring& name) +int SoundEngine::getMusicID(const std::wstring& name) { int iCD=0; char *SoundName = (char *)ConvertSoundPathToName(name,true); @@ -1126,9 +1126,9 @@ void SoundEngine::updateSoundEffectVolume(float fVal) //AIL_set_variable_float(0,"UserEffectVol",fVal); } -void SoundEngine::add(const wstring& name, File *file) {} -void SoundEngine::addMusic(const wstring& name, File *file) {} -void SoundEngine::addStreaming(const wstring& name, File *file) {} +void SoundEngine::add(const std::wstring& name, File *file) {} +void SoundEngine::addMusic(const std::wstring& name, File *file) {} +void SoundEngine::addStreaming(const std::wstring& name, File *file) {} bool SoundEngine::isStreamingWavebankReady() { return true; } int SoundEngine::OpenStreamThreadProc( void* lpParameter ) @@ -1225,12 +1225,12 @@ void SoundEngine::playMusicUpdate() m_StreamingAudioInfo.bIs3D=false; #ifdef _XBOX_ONE - wstring &wstrSoundName=dlcAudioFile->GetSoundName(m_musicID); - wstring wstrFile=L"TPACK:\\Data\\" + wstrSoundName +L".binka"; + std::wstring &wstrSoundName=dlcAudioFile->GetSoundName(m_musicID); + std::wstring wstrFile=L"TPACK:\\Data\\" + wstrSoundName +L".binka"; std::wstring mountedPath = StorageManager.GetMountedPath(wstrFile); wcstombs(m_szStreamName,mountedPath.c_str(),255); #else - wstring &wstrSoundName=dlcAudioFile->GetSoundName(m_musicID); + std::wstring &wstrSoundName=dlcAudioFile->GetSoundName(m_musicID); char szName[255]; wcstombs(szName,wstrSoundName.c_str(),255); @@ -1323,7 +1323,7 @@ void SoundEngine::playMusicUpdate() #endif } - // wstring name = m_szStreamFileA[m_musicID]; + // std::wstring name = m_szStreamFileA[m_musicID]; // char *SoundName = (char *)ConvertSoundPathToName(name); // strcat((char *)szStreamName,SoundName); @@ -1632,7 +1632,7 @@ void SoundEngine::playMusicUpdate() // ConvertSoundPathToName // ///////////////////////////////////////////// -char *SoundEngine::ConvertSoundPathToName(const wstring& name, bool bConvertSpaces) +char *SoundEngine::ConvertSoundPathToName(const std::wstring& name, bool bConvertSpaces) { static char buf[256]; assert(name.length()<256); diff --git a/Minecraft.Client/Build/Common/Audio/SoundEngine.h b/Minecraft.Client/Build/Common/Audio/SoundEngine.h index 4f6ea511d..487c04e53 100644 --- a/Minecraft.Client/Build/Common/Audio/SoundEngine.h +++ b/Minecraft.Client/Build/Common/Audio/SoundEngine.h @@ -1,7 +1,7 @@ #pragma once class Mob; class Options; -using namespace std; +//using namespace std; #include "../../../../Minecraft.World/Util/SoundTypes.h" enum eMUSICFILES @@ -96,21 +96,21 @@ public: void GetSoundName(char *szSoundName,int iSound); #endif virtual void play(int iSound, float x, float y, float z, float volume, float pitch); - virtual void playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay=true); + virtual void playStreaming(const std::wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay=true); virtual void playUI(int iSound, float volume, float pitch); virtual void playMusicTick(); virtual void updateMusicVolume(float fVal); virtual void updateSystemMusicPlaying(bool isPlaying); virtual void updateSoundEffectVolume(float fVal); virtual void init(Options *); - virtual void tick(shared_ptr *players, float a); // 4J - updated to take array of local players rather than single one - virtual void add(const wstring& name, File *file); - virtual void addMusic(const wstring& name, File *file); - virtual void addStreaming(const wstring& name, File *file); - virtual char *ConvertSoundPathToName(const wstring& name, bool bConvertSpaces=false); + virtual void tick(std::shared_ptr *players, float a); // 4J - updated to take array of local players rather than single one + virtual void add(const std::wstring& name, File *file); + virtual void addMusic(const std::wstring& name, File *file); + virtual void addStreaming(const std::wstring& name, File *file); + virtual char *ConvertSoundPathToName(const std::wstring& name, bool bConvertSpaces=false); bool isStreamingWavebankReady(); // 4J Added int getMusicID(int iDomain); - int getMusicID(const wstring& name); + int getMusicID(const std::wstring& name); void SetStreamingSounds(int iOverworldMin, int iOverWorldMax, int iNetherMin, int iNetherMax, int iEndMin, int iEndMax, int iCD1); void updateMiles(); // AP added so Vita can update all the Miles functions during the mixer callback void playMusicUpdate(); @@ -145,7 +145,7 @@ private: int m_StreamState; int m_MusicType; AUDIO_INFO m_StreamingAudioInfo; - wstring m_CDMusic; + std::wstring m_CDMusic; BOOL m_bSystemMusicPlaying; float m_MasterMusicVolume; float m_MasterEffectsVolume; diff --git a/Minecraft.Client/Build/Common/Audio/SoundNames.cpp b/Minecraft.Client/Build/Common/Audio/SoundNames.cpp index fe1228098..06535e369 100644 --- a/Minecraft.Client/Build/Common/Audio/SoundNames.cpp +++ b/Minecraft.Client/Build/Common/Audio/SoundNames.cpp @@ -91,7 +91,7 @@ const WCHAR *ConsoleSoundEngine::wchSoundNames[eSoundType_MAX]= L"ambient.cave.cave2", // eSoundType_CAVE_CAVE2 - removed the two sounds that were at 192k in the first ambient cave event #endif L"portal.portal", // eSoundType_PORTAL_PORTAL, - // 4J-PB - added a couple that were still using wstring + // 4J-PB - added a couple that were still using std::wstring L"portal.trigger", // eSoundType_PORTAL_TRIGGER L"portal.travel", // eSoundType_PORTAL_TRAVEL diff --git a/Minecraft.Client/Build/Common/Colours/ColourTable.cpp b/Minecraft.Client/Build/Common/Colours/ColourTable.cpp index c6a9c4953..b8dc1e249 100644 --- a/Minecraft.Client/Build/Common/Colours/ColourTable.cpp +++ b/Minecraft.Client/Build/Common/Colours/ColourTable.cpp @@ -2,7 +2,7 @@ #include "ColourTable.h" #include "../../../../Minecraft.World/Util/StringHelpers.h" -unordered_map ColourTable::s_colourNamesMap; +std::unordered_map ColourTable::s_colourNamesMap; const wchar_t *ColourTable::ColourTableElements[eMinecraftColour_COUNT] = { @@ -310,7 +310,7 @@ void ColourTable::staticCtor() { for(unsigned int i = eMinecraftColour_NOT_SET; i < eMinecraftColour_COUNT; ++i) { - s_colourNamesMap.insert( unordered_map::value_type( ColourTableElements[i], (eMinecraftColour)i) ); + s_colourNamesMap.insert( std::unordered_map::value_type( ColourTableElements[i], (eMinecraftColour)i) ); } } @@ -337,7 +337,7 @@ void ColourTable::loadColoursFromData(PBYTE pbData, DWORD dwLength) for(int i = 0; i < coloursCount; ++i) { - wstring colourId = dis.readUTF(); + std::wstring colourId = dis.readUTF(); int colourValue = dis.readInt(); setColour(colourId, colourValue); AUTO_VAR(it,s_colourNamesMap.find(colourId)); @@ -346,7 +346,7 @@ void ColourTable::loadColoursFromData(PBYTE pbData, DWORD dwLength) bais.reset(); } -void ColourTable::setColour(const wstring &colourName, int value) +void ColourTable::setColour(const std::wstring &colourName, int value) { AUTO_VAR(it,s_colourNamesMap.find(colourName)); if(it != s_colourNamesMap.end()) @@ -355,7 +355,7 @@ void ColourTable::setColour(const wstring &colourName, int value) } } -void ColourTable::setColour(const wstring &colourName, const wstring &value) +void ColourTable::setColour(const std::wstring &colourName, const std::wstring &value) { setColour(colourName, _fromHEXString(value)); } diff --git a/Minecraft.Client/Build/Common/Colours/ColourTable.h b/Minecraft.Client/Build/Common/Colours/ColourTable.h index af99a8ed5..5b3e6ee03 100644 --- a/Minecraft.Client/Build/Common/Colours/ColourTable.h +++ b/Minecraft.Client/Build/Common/Colours/ColourTable.h @@ -6,7 +6,7 @@ private: unsigned int m_colourValues[eMinecraftColour_COUNT]; static const wchar_t *ColourTableElements[eMinecraftColour_COUNT]; - static unordered_map s_colourNamesMap; + static std::unordered_map s_colourNamesMap; public: static void staticCtor(); @@ -18,6 +18,6 @@ public: unsigned int getColor(eMinecraftColour id) { return getColour(id); } void loadColoursFromData(PBYTE pbData, DWORD dwLength); - void setColour(const wstring &colourName, int value); - void setColour(const wstring &colourName, const wstring &value); + void setColour(const std::wstring &colourName, int value); + void setColour(const std::wstring &colourName, const std::wstring &value); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/Consoles_App.cpp b/Minecraft.Client/Build/Common/Consoles_App.cpp index aeb8b66a4..40c4f6d19 100644 --- a/Minecraft.Client/Build/Common/Consoles_App.cpp +++ b/Minecraft.Client/Build/Common/Consoles_App.cpp @@ -213,7 +213,7 @@ CMinecraftApp::CMinecraftApp() for(int i=0;i; + m_vBannedListA[i] = new std::vector; } LocaleAndLanguageInit(); @@ -316,7 +316,7 @@ void CMinecraftApp::HandleButtonPresses(int iPad) // ProfileManager.WriteToProfile(iPad,true); } -bool CMinecraftApp::LoadInventoryMenu(int iPad,shared_ptr player,bool bNavigateBack) +bool CMinecraftApp::LoadInventoryMenu(int iPad,std::shared_ptr player,bool bNavigateBack) { bool success = true; @@ -339,7 +339,7 @@ bool CMinecraftApp::LoadInventoryMenu(int iPad,shared_ptr player,bo return success; } -bool CMinecraftApp::LoadCreativeMenu(int iPad,shared_ptr player,bool bNavigateBack) +bool CMinecraftApp::LoadCreativeMenu(int iPad,std::shared_ptr player,bool bNavigateBack) { bool success = true; @@ -362,7 +362,7 @@ bool CMinecraftApp::LoadCreativeMenu(int iPad,shared_ptr player,boo return success; } -bool CMinecraftApp::LoadCrafting2x2Menu(int iPad,shared_ptr player) +bool CMinecraftApp::LoadCrafting2x2Menu(int iPad,std::shared_ptr player) { bool success = true; @@ -388,7 +388,7 @@ bool CMinecraftApp::LoadCrafting2x2Menu(int iPad,shared_ptr player) return success; } -bool CMinecraftApp::LoadCrafting3x3Menu(int iPad,shared_ptr player, int x, int y, int z) +bool CMinecraftApp::LoadCrafting3x3Menu(int iPad,std::shared_ptr player, int x, int y, int z) { bool success = true; @@ -414,7 +414,7 @@ bool CMinecraftApp::LoadCrafting3x3Menu(int iPad,shared_ptr player, return success; } -bool CMinecraftApp::LoadEnchantingMenu(int iPad,shared_ptr inventory, int x, int y, int z, Level *level) +bool CMinecraftApp::LoadEnchantingMenu(int iPad,std::shared_ptr inventory, int x, int y, int z, Level *level) { bool success = true; @@ -440,7 +440,7 @@ bool CMinecraftApp::LoadEnchantingMenu(int iPad,shared_ptr inventory, return success; } -bool CMinecraftApp::LoadFurnaceMenu(int iPad,shared_ptr inventory, shared_ptr furnace) +bool CMinecraftApp::LoadFurnaceMenu(int iPad,std::shared_ptr inventory, std::shared_ptr furnace) { bool success = true; @@ -465,7 +465,7 @@ bool CMinecraftApp::LoadFurnaceMenu(int iPad,shared_ptr inventory, sh return success; } -bool CMinecraftApp::LoadBrewingStandMenu(int iPad,shared_ptr inventory, shared_ptr brewingStand) +bool CMinecraftApp::LoadBrewingStandMenu(int iPad,std::shared_ptr inventory, std::shared_ptr brewingStand) { bool success = true; @@ -491,7 +491,7 @@ bool CMinecraftApp::LoadBrewingStandMenu(int iPad,shared_ptr inventor } -bool CMinecraftApp::LoadContainerMenu(int iPad,shared_ptr inventory, shared_ptr container) +bool CMinecraftApp::LoadContainerMenu(int iPad,std::shared_ptr inventory, std::shared_ptr container) { bool success = true; @@ -525,7 +525,7 @@ bool CMinecraftApp::LoadContainerMenu(int iPad,shared_ptr inventory, return success; } -bool CMinecraftApp::LoadTrapMenu(int iPad,shared_ptr inventory, shared_ptr trap) +bool CMinecraftApp::LoadTrapMenu(int iPad,std::shared_ptr inventory, std::shared_ptr trap) { bool success = true; @@ -550,7 +550,7 @@ bool CMinecraftApp::LoadTrapMenu(int iPad,shared_ptr inventory, share return success; } -bool CMinecraftApp::LoadSignEntryMenu(int iPad,shared_ptr sign) +bool CMinecraftApp::LoadSignEntryMenu(int iPad,std::shared_ptr sign) { bool success = true; @@ -566,7 +566,7 @@ bool CMinecraftApp::LoadSignEntryMenu(int iPad,shared_ptr sign) return success; } -bool CMinecraftApp::LoadRepairingMenu(int iPad,shared_ptr inventory, Level *level, int x, int y, int z) +bool CMinecraftApp::LoadRepairingMenu(int iPad,std::shared_ptr inventory, Level *level, int x, int y, int z) { bool success = true; @@ -585,7 +585,7 @@ bool CMinecraftApp::LoadRepairingMenu(int iPad,shared_ptr inventory, return success; } -bool CMinecraftApp::LoadTradingMenu(int iPad, shared_ptr inventory, shared_ptr trader, Level *level) +bool CMinecraftApp::LoadTradingMenu(int iPad, std::shared_ptr inventory, std::shared_ptr trader, Level *level) { bool success = true; @@ -1223,7 +1223,7 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal) PlayerList *players = MinecraftServer::getInstance()->getPlayerList(); for(AUTO_VAR(it3, players->players.begin()); it3 != players->players.end(); ++it3) { - shared_ptr decorationPlayer = *it3; + std::shared_ptr decorationPlayer = *it3; decorationPlayer->setShowOnMaps((app.GetGameHostOption(eGameHostOption_Gamertags)!=0)?true:false); } } @@ -1328,7 +1328,7 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal) } } -void CMinecraftApp::SetPlayerSkin(int iPad,const wstring &name) +void CMinecraftApp::SetPlayerSkin(int iPad,const std::wstring &name) { DWORD skinId = app.getSkinIdFromPath(name); @@ -1348,7 +1348,7 @@ void CMinecraftApp::SetPlayerSkin(int iPad,DWORD dwSkinId) } -wstring CMinecraftApp::GetPlayerSkinName(int iPad) +std::wstring CMinecraftApp::GetPlayerSkinName(int iPad) { return app.getSkinPathFromId(GameSettingsA[iPad]->dwSelectedSkin); } @@ -1396,7 +1396,7 @@ DWORD CMinecraftApp::GetPlayerSkinId(int iPad) } -void CMinecraftApp::SetPlayerCape(int iPad,const wstring &name) +void CMinecraftApp::SetPlayerCape(int iPad,const std::wstring &name) { DWORD capeId = Player::getCapeIdFromPath(name); @@ -1415,7 +1415,7 @@ void CMinecraftApp::SetPlayerCape(int iPad,DWORD dwCapeId) if(Minecraft::GetInstance()->localplayers[iPad]!=NULL) Minecraft::GetInstance()->localplayers[iPad]->setAndBroadcastCustomCape(dwCapeId); } -wstring CMinecraftApp::GetPlayerCapeName(int iPad) +std::wstring CMinecraftApp::GetPlayerCapeName(int iPad) { return Player::getCapePathFromId(GameSettingsA[iPad]->dwSelectedCape); } @@ -2191,7 +2191,7 @@ unsigned int CMinecraftApp::GetGameSettingsDebugMask(int iPad,bool bOverridePlay } if(iPad < 0) iPad = 0; - shared_ptr player = Minecraft::GetInstance()->localplayers[iPad]; + std::shared_ptr player = Minecraft::GetInstance()->localplayers[iPad]; if(bOverridePlayer || player==NULL) { @@ -2211,7 +2211,7 @@ void CMinecraftApp::SetGameSettingsDebugMask(int iPad, unsigned int uiVal) GameSettingsA[iPad]->uiDebugBitmask=uiVal; // update the value so the network server can use it - shared_ptr player = Minecraft::GetInstance()->localplayers[iPad]; + std::shared_ptr player = Minecraft::GetInstance()->localplayers[iPad]; if(player) { @@ -2378,7 +2378,7 @@ void CMinecraftApp::HandleXuiActions(void) eTMSAction eTMS; LPVOID param; Minecraft *pMinecraft=Minecraft::GetInstance(); - shared_ptr player; + std::shared_ptr player; // are there any global actions to deal with? eAction = app.GetGlobalXuiAction(); @@ -4032,7 +4032,7 @@ int CMinecraftApp::BannedLevelDialogReturned(void *pParam,int iPad,const C4JStor void CMinecraftApp::loadMediaArchive() { - wstring mediapath = L""; + std::wstring mediapath = L""; #ifdef __PS3__ mediapath = L"Common\\Media\\MediaPS3.arc"; @@ -4102,7 +4102,7 @@ void CMinecraftApp::loadStringTable() // we need to unload the current string table, this is a reload delete m_stringTable; } - wstring localisationFile = L"languages.loc"; + std::wstring localisationFile = L"languages.loc"; if (m_mediaArchive->hasFile(localisationFile)) { byteArray locFile = m_mediaArchive->getFile(localisationFile); @@ -5146,7 +5146,7 @@ int CMinecraftApp::DLCMountedCallback(LPVOID pParam,int iPad,DWORD dwErr,DWORD d // // we only attempt to install the cape once per launch of the game // m_bDefaultCapeInstallAttempted=true; // -// wstring wTemp=L"Default_Cape.png"; +// std::wstring wTemp=L"Default_Cape.png"; // bool bRes=app.IsFileInMemoryTextures(wTemp); // // if the file is not already in the memory textures, then read it from TMS // if(!bRes) @@ -5210,7 +5210,7 @@ int CMinecraftApp::DLCMountedCallback(LPVOID pParam,int iPad,DWORD dwErr,DWORD d DWORD dwPackID=m_dlcManager.retrievePackIDFromDLCDataFile(szFullFilename,pack); // Do we need to override the TexturePack.pck with an updated version in a TU? - wstring wsTemp=getFilePath(dwPackID, wstring(L"TexturePack.pck"),false ); + std::wstring wsTemp=getFilePath(dwPackID, std::wstring(L"TexturePack.pck"),false ); File texturePCKPath(wsTemp ); if(texturePCKPath.exists()) { @@ -5314,7 +5314,7 @@ bool CMinecraftApp::isXuidDeadmau5(PlayerUID xuid) return false; } -void CMinecraftApp::AddMemoryTextureFile(const wstring &wName,PBYTE pbData,DWORD dwBytes) +void CMinecraftApp::AddMemoryTextureFile(const std::wstring &wName,PBYTE pbData,DWORD dwBytes) { EnterCriticalSection(&csMemFilesLock); // check it's not already in @@ -5360,7 +5360,7 @@ void CMinecraftApp::AddMemoryTextureFile(const wstring &wName,PBYTE pbData,DWORD LeaveCriticalSection(&csMemFilesLock); } -void CMinecraftApp::RemoveMemoryTextureFile(const wstring &wName) +void CMinecraftApp::RemoveMemoryTextureFile(const std::wstring &wName) { EnterCriticalSection(&csMemFilesLock); @@ -5386,7 +5386,7 @@ void CMinecraftApp::RemoveMemoryTextureFile(const wstring &wName) bool CMinecraftApp::DefaultCapeExists() { - wstring wTex=L"Special_Cape.png"; + std::wstring wTex=L"Special_Cape.png"; bool val = false; EnterCriticalSection(&csMemFilesLock); @@ -5397,7 +5397,7 @@ bool CMinecraftApp::DefaultCapeExists() return val; } -bool CMinecraftApp::IsFileInMemoryTextures(const wstring &wName) +bool CMinecraftApp::IsFileInMemoryTextures(const std::wstring &wName) { bool val = false; @@ -5409,7 +5409,7 @@ bool CMinecraftApp::IsFileInMemoryTextures(const wstring &wName) return val; } -void CMinecraftApp::GetMemFileDetails(const wstring &wName,PBYTE *ppbData,DWORD *pdwBytes) +void CMinecraftApp::GetMemFileDetails(const std::wstring &wName,PBYTE *ppbData,DWORD *pdwBytes) { EnterCriticalSection(&csMemFilesLock); AUTO_VAR(it, m_MEM_Files.find(wName)); @@ -5525,7 +5525,7 @@ void CMinecraftApp::GetTPD(int iConfig,PBYTE *ppbData,DWORD *pdwBytes) } -// bool CMinecraftApp::UploadFileToGlobalStorage(int iQuadrant, C4JStorage::eGlobalStorage eStorageFacility, wstring *wsFile ) +// bool CMinecraftApp::UploadFileToGlobalStorage(int iQuadrant, C4JStorage::eGlobalStorage eStorageFacility, std::wstring *wsFile ) // { // bool bRes=false; // #ifndef _CONTENT_PACKAGE @@ -5971,9 +5971,9 @@ int CMinecraftApp::GetHTMLFontSize(EHTMLFontSize size) return s_iHTMLFontSizesA[size]; } -wstring CMinecraftApp::FormatHTMLString(int iPad, const wstring &desc, int shadowColour /*= 0xFFFFFFFF*/) +std::wstring CMinecraftApp::FormatHTMLString(int iPad, const std::wstring &desc, int shadowColour /*= 0xFFFFFFFF*/) { - wstring text(desc); + std::wstring text(desc); wchar_t replacements[64]; // We will also insert line breaks here as couldn't figure out how to get them to come through from strings.resx ! @@ -6071,7 +6071,7 @@ wstring CMinecraftApp::FormatHTMLString(int iPad, const wstring &desc, int shado #endif #ifdef _XBOX - wstring imageRoot = L""; + std::wstring imageRoot = L""; Minecraft *pMinecraft = Minecraft::GetInstance(); imageRoot = pMinecraft->skins->getSelected()->getXuiRootPath(); @@ -6093,7 +6093,7 @@ wstring CMinecraftApp::FormatHTMLString(int iPad, const wstring &desc, int shado return text; } -wstring CMinecraftApp::GetActionReplacement(int iPad, unsigned char ucAction) +std::wstring CMinecraftApp::GetActionReplacement(int iPad, unsigned char ucAction) { unsigned int input = InputManager.GetGameJoypadMaps(InputManager.GetJoypadMapVal(iPad) ,ucAction); @@ -6145,7 +6145,7 @@ wstring CMinecraftApp::GetActionReplacement(int iPad, unsigned char ucAction) }; return L""; #else - wstring replacement = L""; + std::wstring replacement = L""; // 4J Stu - Some of our actions can be mapped to multiple physical buttons, so replaces the switch that was here if (input & _360_JOY_BUTTON_A) replacement = L"ButtonA"; @@ -6200,7 +6200,7 @@ wstring CMinecraftApp::GetActionReplacement(int iPad, unsigned char ucAction) #endif } -wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey) +std::wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey) { #ifdef _XBOX switch(uiVKey) @@ -6244,7 +6244,7 @@ wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey) } return NULL; #else - wstring replacement = L""; + std::wstring replacement = L""; switch(uiVKey) { case VK_PAD_A: @@ -6329,7 +6329,7 @@ wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey) #endif } -wstring CMinecraftApp::GetIconReplacement(unsigned int uiIcon) +std::wstring CMinecraftApp::GetIconReplacement(unsigned int uiIcon) { #ifdef _XBOX switch(uiIcon) @@ -6355,7 +6355,7 @@ wstring CMinecraftApp::GetIconReplacement(unsigned int uiIcon) #endif swprintf(string,128,L"", size, size); - wstring result = L""; + std::wstring result = L""; switch(uiIcon) { case XZP_ICON_SHANK_01: @@ -6372,22 +6372,22 @@ wstring CMinecraftApp::GetIconReplacement(unsigned int uiIcon) } #if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) -unordered_map CMinecraftApp::MojangData; -unordered_map CMinecraftApp::DLCTextures_PackID; -unordered_map CMinecraftApp::DLCInfo; -unordered_map CMinecraftApp::DLCInfo_SkinName; +std::unordered_map CMinecraftApp::MojangData; +std::unordered_map CMinecraftApp::DLCTextures_PackID; +std::unordered_map CMinecraftApp::DLCInfo; +std::unordered_map CMinecraftApp::DLCInfo_SkinName; #elif defined(_DURANGO) -unordered_map CMinecraftApp::MojangData; -unordered_map CMinecraftApp::DLCTextures_PackID; // for mash-up packs & texture packs -//unordered_map CMinecraftApp::DLCInfo_Trial; // full offerid, dlc_info -unordered_map CMinecraftApp::DLCInfo_Full; // full offerid, dlc_info -unordered_map CMinecraftApp::DLCInfo_SkinName; // skin name, full offer id +std::unordered_map CMinecraftApp::MojangData; +std::unordered_map CMinecraftApp::DLCTextures_PackID; // for mash-up packs & texture packs +//std::unordered_map CMinecraftApp::DLCInfo_Trial; // full offerid, dlc_info +std::unordered_map CMinecraftApp::DLCInfo_Full; // full offerid, dlc_info +std::unordered_map CMinecraftApp::DLCInfo_SkinName; // skin name, full offer id #else -unordered_map CMinecraftApp::MojangData; -unordered_map CMinecraftApp::DLCTextures_PackID; -unordered_map CMinecraftApp::DLCInfo_Trial; -unordered_map CMinecraftApp::DLCInfo_Full; -unordered_map CMinecraftApp::DLCInfo_SkinName; +std::unordered_map CMinecraftApp::MojangData; +std::unordered_map CMinecraftApp::DLCTextures_PackID; +std::unordered_map CMinecraftApp::DLCInfo_Trial; +std::unordered_map CMinecraftApp::DLCInfo_Full; +std::unordered_map CMinecraftApp::DLCInfo_SkinName; #endif @@ -6530,7 +6530,7 @@ HRESULT CMinecraftApp::RegisterDLCData(WCHAR *pType, WCHAR *pBannerName, int iGe } #elif defined _XBOX_ONE -unordered_map *CMinecraftApp::GetDLCInfo() +std::unordered_map *CMinecraftApp::GetDLCInfo() { return &DLCInfo_Full; } @@ -6549,7 +6549,7 @@ HRESULT CMinecraftApp::RegisterDLCData(eDLCContentType eType, WCHAR *pwchBannerN } // check if we already have this info from the local DLC file - wstring wsTemp=wchUppercaseProductID; + std::wstring wsTemp=wchUppercaseProductID; AUTO_VAR(it, DLCInfo_Full.find(wsTemp)); if( it == DLCInfo_Full.end() ) @@ -6662,7 +6662,7 @@ HRESULT CMinecraftApp::RegisterDLCData(char *pchDLCName, unsigned int uiSortInde #if defined( __PS3__) || defined(__ORBIS__) || defined(__PSVITA__) -bool CMinecraftApp::GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal) +bool CMinecraftApp::GetDLCFullOfferIDForSkinID(const std::wstring &FirstSkin,ULONGLONG *pullVal) { AUTO_VAR(it, DLCInfo_SkinName.find(FirstSkin)); if( it == DLCInfo_SkinName.end() ) @@ -6712,7 +6712,7 @@ DLC_INFO *CMinecraftApp::GetDLCInfo(char *pchDLCName) DLC_INFO *CMinecraftApp::GetDLCInfoFromTPackID(int iTPID) { - unordered_map::iterator it= DLCInfo.begin(); + std::unordered_map::iterator it= DLCInfo.begin(); for(int i=0;i::iterator it= DLCInfo.begin(); + std::unordered_map::iterator it= DLCInfo.begin(); for(int i=0;i::iterator it= DLCTextures_PackID.begin(); + std::unordered_map::iterator it= DLCTextures_PackID.begin(); for(int i=0;i::iterator it= DLCInfo_Full.begin(); + std::unordered_map::iterator it= DLCInfo_Full.begin(); for(int i=0;isecond; } -wstring CMinecraftApp::GetDLCInfoTexturesFullOffer(int iIndex) +std::wstring CMinecraftApp::GetDLCInfoTexturesFullOffer(int iIndex) { - unordered_map::iterator it= DLCTextures_PackID.begin(); + std::unordered_map::iterator it= DLCTextures_PackID.begin(); for(int i=0;isecond; } #else -bool CMinecraftApp::GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal) +bool CMinecraftApp::GetDLCFullOfferIDForSkinID(const std::wstring &FirstSkin,ULONGLONG *pullVal) { AUTO_VAR(it, DLCInfo_SkinName.find(FirstSkin)); if( it == DLCInfo_SkinName.end() ) @@ -6857,7 +6857,7 @@ DLC_INFO *CMinecraftApp::GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial) DLC_INFO *CMinecraftApp::GetDLCInfoTrialOffer(int iIndex) { - unordered_map::iterator it= DLCInfo_Trial.begin(); + std::unordered_map::iterator it= DLCInfo_Trial.begin(); for(int i=0;i::iterator it= DLCInfo_Full.begin(); + std::unordered_map::iterator it= DLCInfo_Full.begin(); for(int i=0;i::iterator it= DLCTextures_PackID.begin(); + std::unordered_map::iterator it= DLCTextures_PackID.begin(); for(int i=0;i0) { AUTO_VAR(it, DLCInfo_Full.find(wsTemp)); @@ -6913,8 +6913,8 @@ DLC_INFO *CMinecraftApp::GetDLCInfoForFullOfferID(WCHAR *pwchProductID) } DLC_INFO *CMinecraftApp::GetDLCInfoForProductName(WCHAR *pwchProductName) { - unordered_map::iterator it= DLCInfo_Full.begin(); - wstring wsProductName=pwchProductName; + std::unordered_map::iterator it= DLCInfo_Full.begin(); + std::wstring wsProductName=pwchProductName; for(int i=0;igetRenderer(eTYPE_PLAYER); Model *pModel = renderer->getModel(); - vector *pvModelPart = new vector; - vector *pvSkinBoxes = new vector; + std::vector *pvModelPart = new std::vector; + std::vector *pvSkinBoxes = new std::vector; EnterCriticalSection( &csAdditionalModelParts ); EnterCriticalSection( &csAdditionalSkinBoxes ); @@ -8618,19 +8618,19 @@ void CMinecraftApp::SetAdditionalSkinBoxes(DWORD dwSkinID, SKIN_BOX *SkinBoxA, D } - m_AdditionalModelParts.insert( std::pair *>(dwSkinID, pvModelPart) ); - m_AdditionalSkinBoxes.insert( std::pair *>(dwSkinID, pvSkinBoxes) ); + m_AdditionalModelParts.insert( std::pair *>(dwSkinID, pvModelPart) ); + m_AdditionalSkinBoxes.insert( std::pair *>(dwSkinID, pvSkinBoxes) ); LeaveCriticalSection( &csAdditionalSkinBoxes ); LeaveCriticalSection( &csAdditionalModelParts ); } -vector * CMinecraftApp::SetAdditionalSkinBoxes(DWORD dwSkinID, vector *pvSkinBoxA) +std::vector * CMinecraftApp::SetAdditionalSkinBoxes(DWORD dwSkinID, std::vector *pvSkinBoxA) { EntityRenderer *renderer = EntityRenderDispatcher::instance->getRenderer(eTYPE_PLAYER); Model *pModel = renderer->getModel(); - vector *pvModelPart = new vector; + std::vector *pvModelPart = new std::vector; EnterCriticalSection( &csAdditionalModelParts ); EnterCriticalSection( &csAdditionalSkinBoxes ); @@ -8646,8 +8646,8 @@ vector * CMinecraftApp::SetAdditionalSkinBoxes(DWORD dwSkinID, vect } } - m_AdditionalModelParts.insert( std::pair *>(dwSkinID, pvModelPart) ); - m_AdditionalSkinBoxes.insert( std::pair *>(dwSkinID, pvSkinBoxA) ); + m_AdditionalModelParts.insert( std::pair *>(dwSkinID, pvModelPart) ); + m_AdditionalSkinBoxes.insert( std::pair *>(dwSkinID, pvSkinBoxA) ); LeaveCriticalSection( &csAdditionalSkinBoxes ); LeaveCriticalSection( &csAdditionalModelParts ); @@ -8655,10 +8655,10 @@ vector * CMinecraftApp::SetAdditionalSkinBoxes(DWORD dwSkinID, vect } -vector *CMinecraftApp::GetAdditionalModelParts(DWORD dwSkinID) +std::vector *CMinecraftApp::GetAdditionalModelParts(DWORD dwSkinID) { EnterCriticalSection( &csAdditionalModelParts ); - vector *pvModelParts=NULL; + std::vector *pvModelParts=NULL; if(m_AdditionalModelParts.size()>0) { AUTO_VAR(it, m_AdditionalModelParts.find(dwSkinID)); @@ -8672,10 +8672,10 @@ vector *CMinecraftApp::GetAdditionalModelParts(DWORD dwSkinID) return pvModelParts; } -vector *CMinecraftApp::GetAdditionalSkinBoxes(DWORD dwSkinID) +std::vector *CMinecraftApp::GetAdditionalSkinBoxes(DWORD dwSkinID) { EnterCriticalSection( &csAdditionalSkinBoxes ); - vector *pvSkinBoxes=NULL; + std::vector *pvSkinBoxes=NULL; if(m_AdditionalSkinBoxes.size()>0) { AUTO_VAR(it,m_AdditionalSkinBoxes.find(dwSkinID)); @@ -8725,7 +8725,7 @@ void CMinecraftApp::SetAnimOverrideBitmask(DWORD dwSkinID,unsigned int uiAnimOve LeaveCriticalSection( &csAnimOverrideBitmask ); } -DWORD CMinecraftApp::getSkinIdFromPath(const wstring &skin) +DWORD CMinecraftApp::getSkinIdFromPath(const std::wstring &skin) { bool dlcSkin = false; unsigned int skinId = 0; @@ -8734,7 +8734,7 @@ DWORD CMinecraftApp::getSkinIdFromPath(const wstring &skin) { dlcSkin = skin.substr(0,3).compare(L"dlc") == 0; - wstring skinValue = skin.substr(7,skin.size()); + std::wstring skinValue = skin.substr(7,skin.size()); skinValue = skinValue.substr(0,skinValue.find_first_of(L'.')); std::wstringstream ss; @@ -8751,7 +8751,7 @@ DWORD CMinecraftApp::getSkinIdFromPath(const wstring &skin) return skinId; } -wstring CMinecraftApp::getSkinPathFromId(DWORD skinId) +std::wstring CMinecraftApp::getSkinPathFromId(DWORD skinId) { // 4J Stu - This function maps the encoded DWORD we store in the player profile // to a filename that is stored as a memory texture and shared between systems in game @@ -8810,7 +8810,7 @@ int CMinecraftApp::TexturePackDialogReturned(void *pParam,int iPad,C4JStorage::E return 0; } -int CMinecraftApp::getArchiveFileSize(const wstring &filename) +int CMinecraftApp::getArchiveFileSize(const std::wstring &filename) { TexturePack *tPack = NULL; Minecraft *pMinecraft = Minecraft::GetInstance(); @@ -8822,7 +8822,7 @@ int CMinecraftApp::getArchiveFileSize(const wstring &filename) else return m_mediaArchive->getFileSize(filename); } -bool CMinecraftApp::hasArchiveFile(const wstring &filename) +bool CMinecraftApp::hasArchiveFile(const std::wstring &filename) { TexturePack *tPack = NULL; Minecraft *pMinecraft = Minecraft::GetInstance(); @@ -8831,7 +8831,7 @@ bool CMinecraftApp::hasArchiveFile(const wstring &filename) else return m_mediaArchive->hasFile(filename); } -byteArray CMinecraftApp::getArchiveFile(const wstring &filename) +byteArray CMinecraftApp::getArchiveFile(const std::wstring &filename) { TexturePack *tPack = NULL; Minecraft *pMinecraft = Minecraft::GetInstance(); @@ -8945,9 +8945,9 @@ bool CMinecraftApp::IsLocalMultiplayerAvailable() // 4J-PB - language and locale function -void CMinecraftApp::getLocale(vector &vecWstrLocales) +void CMinecraftApp::getLocale(std::vector &vecWstrLocales) { - vector locales; + std::vector locales; DWORD dwSystemLanguage = XGetLanguage( ); @@ -9391,10 +9391,10 @@ void CMinecraftApp::SetTickTMSDLCFiles(bool bVal) m_bTickTMSDLCFiles=bVal; } -wstring CMinecraftApp::getFilePath(DWORD packId, wstring filename, bool bAddDataFolder) +std::wstring CMinecraftApp::getFilePath(DWORD packId, std::wstring filename, bool bAddDataFolder) { #ifdef _XBOX - wstring path = getRootPath(packId, true, bAddDataFolder) + filename; + std::wstring path = getRootPath(packId, true, bAddDataFolder) + filename; File f(path); if(f.exists()) { @@ -9421,15 +9421,15 @@ enum ETitleUpdateTexturePacks }; #ifdef _TU_BUILD -wstring titleUpdateTexturePackRoot = L"UPDATE:\\res\\DLC\\"; +std::wstring titleUpdateTexturePackRoot = L"UPDATE:\\res\\DLC\\"; #else -wstring titleUpdateTexturePackRoot = L"GAME:\\res\\TitleUpdate\\DLC\\"; +std::wstring titleUpdateTexturePackRoot = L"GAME:\\res\\TitleUpdate\\DLC\\"; #endif #endif -wstring CMinecraftApp::getRootPath(DWORD packId, bool allowOverride, bool bAddDataFolder) +std::wstring CMinecraftApp::getRootPath(DWORD packId, bool allowOverride, bool bAddDataFolder) { - wstring path = L"TPACK:"; + std::wstring path = L"TPACK:"; #ifdef _XBOX if(allowOverride) { diff --git a/Minecraft.Client/Build/Common/Consoles_App.h b/Minecraft.Client/Build/Common/Consoles_App.h index a0e22d924..6541253b6 100644 --- a/Minecraft.Client/Build/Common/Consoles_App.h +++ b/Minecraft.Client/Build/Common/Consoles_App.h @@ -1,6 +1,6 @@ #pragma once -using namespace std; +//using namespace std; #include "Audio/Consoles_SoundEngine.h" #ifndef __linux__ @@ -73,11 +73,11 @@ public: typedef std::vector VNOTIFICATIONS; // storing skin files - std::vector vSkinNames; + std::vector vSkinNames; DLCManager m_dlcManager; // storing credits text from the DLC - std::vector m_vCreditText; // hold the credit text lines so we can avoid duplicating them + std::vector m_vCreditText; // hold the credit text lines so we can avoid duplicating them // In builds prior to TU5, the size of the GAME_SETTINGS struct was 204 bytes. We added a few new values to the internal struct in TU5, and even though we @@ -128,18 +128,18 @@ public: bool GetGameStarted() {return m_bGameStarted;} void SetGameStarted(bool bVal) { if(bVal) DebugPrintf("SetGameStarted - true\n"); else DebugPrintf("SetGameStarted - false\n"); m_bGameStarted = bVal; m_bIsAppPaused = !bVal;} int GetLocalPlayerCount(void); - bool LoadInventoryMenu(int iPad,shared_ptr player, bool bNavigateBack=false); - bool LoadCreativeMenu(int iPad,shared_ptr player,bool bNavigateBack=false); - bool LoadEnchantingMenu(int iPad,shared_ptr inventory, int x, int y, int z, Level *level); - bool LoadFurnaceMenu(int iPad,shared_ptr inventory, shared_ptr furnace); - bool LoadBrewingStandMenu(int iPad,shared_ptr inventory, shared_ptr brewingStand); - bool LoadContainerMenu(int iPad,shared_ptr inventory, shared_ptr container); - bool LoadTrapMenu(int iPad,shared_ptr inventory, shared_ptr trap); - bool LoadCrafting2x2Menu(int iPad,shared_ptr player); - bool LoadCrafting3x3Menu(int iPad,shared_ptr player, int x, int y, int z); - bool LoadSignEntryMenu(int iPad,shared_ptr sign); - bool LoadRepairingMenu(int iPad,shared_ptr inventory, Level *level, int x, int y, int z); - bool LoadTradingMenu(int iPad, shared_ptr inventory, shared_ptr trader, Level *level); + bool LoadInventoryMenu(int iPad,std::shared_ptr player, bool bNavigateBack=false); + bool LoadCreativeMenu(int iPad,std::shared_ptr player,bool bNavigateBack=false); + bool LoadEnchantingMenu(int iPad,std::shared_ptr inventory, int x, int y, int z, Level *level); + bool LoadFurnaceMenu(int iPad,std::shared_ptr inventory, std::shared_ptr furnace); + bool LoadBrewingStandMenu(int iPad,std::shared_ptr inventory, std::shared_ptr brewingStand); + bool LoadContainerMenu(int iPad,std::shared_ptr inventory, std::shared_ptr container); + bool LoadTrapMenu(int iPad,std::shared_ptr inventory, std::shared_ptr trap); + bool LoadCrafting2x2Menu(int iPad,std::shared_ptr player); + bool LoadCrafting3x3Menu(int iPad,std::shared_ptr player, int x, int y, int z); + bool LoadSignEntryMenu(int iPad,std::shared_ptr sign); + bool LoadRepairingMenu(int iPad,std::shared_ptr inventory, Level *level, int x, int y, int z); + bool LoadTradingMenu(int iPad, std::shared_ptr inventory, std::shared_ptr trader, Level *level); bool GetTutorialMode() { return m_bTutorialMode;} void SetTutorialMode(bool bSet) {m_bTutorialMode=bSet;} @@ -231,9 +231,9 @@ public: void SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucVal); unsigned char GetGameSettings(int iPad,eGameSetting eVal); unsigned char GetGameSettings(eGameSetting eVal); // for the primary pad - void SetPlayerSkin(int iPad,const wstring &name); + void SetPlayerSkin(int iPad,const std::wstring &name); void SetPlayerSkin(int iPad,DWORD dwSkinId); - void SetPlayerCape(int iPad,const wstring &name); + void SetPlayerCape(int iPad,const std::wstring &name); void SetPlayerCape(int iPad,DWORD dwCapeId); void SetPlayerFavoriteSkin(int iPad, int iIndex,unsigned int uiSkinID); unsigned int GetPlayerFavoriteSkin(int iPad,int iIndex); @@ -258,9 +258,9 @@ public: void TickOpacityTimer(int iPad) { if(m_uiOpacityCountDown[iPad]>0) m_uiOpacityCountDown[iPad]--;} public: - wstring GetPlayerSkinName(int iPad); + std::wstring GetPlayerSkinName(int iPad); DWORD GetPlayerSkinId(int iPad); - wstring GetPlayerCapeName(int iPad); + std::wstring GetPlayerCapeName(int iPad); DWORD GetPlayerCapeId(int iPad); DWORD GetAdditionalModelParts(int iPad); void CheckGameSettingsChanged(bool bOverride5MinuteTimer=false, int iPad=XUSER_INDEX_ANY); @@ -310,7 +310,7 @@ public: #endif void SetDebugSequence(const char *pchSeq); static int DebugInputCallback(LPVOID pParam); - //bool UploadFileToGlobalStorage(int iQuadrant, C4JStorage::eGlobalStorage eStorageFacility, wstring *wsFile ); + //bool UploadFileToGlobalStorage(int iQuadrant, C4JStorage::eGlobalStorage eStorageFacility, std::wstring *wsFile ); // Installed DLC bool StartInstallDLCProcess(int iPad); @@ -325,7 +325,7 @@ public: void ClearDLCInstalled() { m_bDLCInstallProcessCompleted=false;} static int MarketplaceCountsCallback(LPVOID pParam,C4JStorage::DLC_TMS_DETAILS *,int iPad); - bool AlreadySeenCreditText(const wstring &wstemp); + bool AlreadySeenCreditText(const std::wstring &wstemp); void ClearNewDLCAvailable(void) { m_bNewDLCAvailable=false; m_bSeenNewDLCTip=true;} bool GetNewDLCAvailable() { return m_bNewDLCAvailable;} @@ -339,10 +339,10 @@ public: bool isXuidNotch(PlayerUID xuid); bool isXuidDeadmau5(PlayerUID xuid); - void AddMemoryTextureFile(const wstring &wName, PBYTE pbData, DWORD dwBytes); - void RemoveMemoryTextureFile(const wstring &wName); - void GetMemFileDetails(const wstring &wName,PBYTE *ppbData,DWORD *pdwBytes); - bool IsFileInMemoryTextures(const wstring &wName); + void AddMemoryTextureFile(const std::wstring &wName, PBYTE pbData, DWORD dwBytes); + void RemoveMemoryTextureFile(const std::wstring &wName); + void GetMemFileDetails(const std::wstring &wName,PBYTE *ppbData,DWORD *pdwBytes); + bool IsFileInMemoryTextures(const std::wstring &wName); // Texture Pack Data files (icon, banner, comparison shot & text) void AddMemoryTPDFile(int iConfig,PBYTE pbData,DWORD dwBytes); @@ -367,15 +367,15 @@ public: private: PlayerUID m_xuidNotch; #ifdef _DURANGO - unordered_map m_GTS_Files; + std::unordered_map m_GTS_Files; #else - unordered_map m_GTS_Files; + std::unordered_map m_GTS_Files; #endif // for storing memory textures - player skin - unordered_map m_MEM_Files; + std::unordered_map m_MEM_Files; // for storing texture pack data files - unordered_map m_MEM_TPD; + std::unordered_map m_MEM_TPD; CRITICAL_SECTION csMemFilesLock; // For locking access to the above map CRITICAL_SECTION csMemTPDLock; // For locking access to the above map @@ -422,9 +422,9 @@ protected: StringTable *m_stringTable; public: - int getArchiveFileSize(const wstring &filename); - bool hasArchiveFile(const wstring &filename); - byteArray getArchiveFile(const wstring &filename); + int getArchiveFileSize(const std::wstring &filename); + bool hasArchiveFile(const std::wstring &filename); + byteArray getArchiveFile(const std::wstring &filename); private: @@ -551,10 +551,10 @@ public: int GetHTMLColour(eMinecraftColour colour); int GetHTMLColor(eMinecraftColour colour) { return GetHTMLColour(colour); } int GetHTMLFontSize(EHTMLFontSize size); - wstring FormatHTMLString(int iPad, const wstring &desc, int shadowColour = 0xFFFFFFFF); - wstring GetActionReplacement(int iPad, unsigned char ucAction); - wstring GetVKReplacement(unsigned int uiVKey); - wstring GetIconReplacement(unsigned int uiIcon); + std::wstring FormatHTMLString(int iPad, const std::wstring &desc, int shadowColour = 0xFFFFFFFF); + std::wstring GetActionReplacement(int iPad, unsigned char ucAction); + std::wstring GetVKReplacement(unsigned int uiVKey); + std::wstring GetIconReplacement(unsigned int uiIcon); float getAppTime() { return m_Time.fAppTime; } void UpdateTrialPausedTimer() { mfTrialPausedTime+= m_Time.fElapsedTime;} @@ -583,18 +583,18 @@ public: #if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) HRESULT RegisterDLCData(char *pchDLCName, unsigned int uiSortIndex, char *pchImageURL); - bool GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal); + bool GetDLCFullOfferIDForSkinID(const std::wstring &FirstSkin,ULONGLONG *pullVal); DLC_INFO *GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial); DLC_INFO *GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full); #elif defined(_XBOX_ONE) static HRESULT RegisterDLCData(eDLCContentType, WCHAR *, WCHAR *, WCHAR *, WCHAR *, int, unsigned int); - //bool GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,WCHAR *pwchProductId); - bool GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,wstring &wsProductId); + //bool GetDLCFullOfferIDForSkinID(const std::wstring &FirstSkin,WCHAR *pwchProductId); + bool GetDLCFullOfferIDForSkinID(const std::wstring &FirstSkin,std::wstring &wsProductId); DLC_INFO *GetDLCInfoForFullOfferID(WCHAR *pwchProductId); DLC_INFO *GetDLCInfoForProductName(WCHAR *pwchProductName); #else static HRESULT RegisterDLCData(WCHAR *, WCHAR *, int, __uint64, __uint64, WCHAR *, unsigned int, int, WCHAR *pDataFile); - bool GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal); + bool GetDLCFullOfferIDForSkinID(const std::wstring &FirstSkin,ULONGLONG *pullVal); DLC_INFO *GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial); DLC_INFO *GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full); #endif @@ -619,22 +619,22 @@ private: std::vector vDLCCredits; #if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) - static unordered_map MojangData; - static unordered_map DLCTextures_PackID; // for mash-up packs & texture packs - static unordered_map DLCInfo; - static unordered_map DLCInfo_SkinName; // skin name, full offer id + static std::unordered_map MojangData; + static std::unordered_map DLCTextures_PackID; // for mash-up packs & texture packs + static std::unordered_map DLCInfo; + static std::unordered_map DLCInfo_SkinName; // skin name, full offer id #elif defined(_DURANGO) - static unordered_map MojangData; - static unordered_map DLCTextures_PackID; // for mash-up packs & texture packs - //static unordered_map DLCInfo_Trial; // full offerid, dlc_info - static unordered_map DLCInfo_Full; // full offerid, dlc_info - static unordered_map DLCInfo_SkinName; // skin name, full offer id + static std::unordered_map MojangData; + static std::unordered_map DLCTextures_PackID; // for mash-up packs & texture packs + //static std::unordered_map DLCInfo_Trial; // full offerid, dlc_info + static std::unordered_map DLCInfo_Full; // full offerid, dlc_info + static std::unordered_map DLCInfo_SkinName; // skin name, full offer id #else - static unordered_map MojangData; - static unordered_map DLCTextures_PackID; // for mash-up packs & texture packs - static unordered_map DLCInfo_Trial; // full offerid, dlc_info - static unordered_map DLCInfo_Full; // full offerid, dlc_info - static unordered_map DLCInfo_SkinName; // skin name, full offer id + static std::unordered_map MojangData; + static std::unordered_map DLCTextures_PackID; // for mash-up packs & texture packs + static std::unordered_map DLCInfo_Trial; // full offerid, dlc_info + static std::unordered_map DLCInfo_Full; // full offerid, dlc_info + static std::unordered_map DLCInfo_SkinName; // skin name, full offer id #endif // bool m_bRead_TMS_XUIDS_XML; // track whether we have already read the TMS xuids.xml file // bool m_bRead_TMS_DLCINFO_XML; // track whether we have already read the TMS DLC.xml file @@ -713,11 +713,11 @@ public: void processSchematics(LevelChunk *levelChunk); void processSchematicsLighting(LevelChunk *levelChunk); void loadDefaultGameRules(); - vector *getLevelGenerators() { return m_gameRules.getLevelGenerators(); } + std::vector *getLevelGenerators() { return m_gameRules.getLevelGenerators(); } void setLevelGenerationOptions(LevelGenerationOptions *levelGen); LevelRuleset *getGameRuleDefinitions() { return m_gameRules.getGameRuleDefinitions(); } LevelGenerationOptions *getLevelGenerationOptions() { return m_gameRules.getLevelGenerationOptions(); } - LPCWSTR GetGameRulesString(const wstring &key); + LPCWSTR GetGameRulesString(const std::wstring &key); private: BYTE m_playerColours[MINECRAFT_NET_MAX_PLAYERS]; // An array of QNet small-id's @@ -728,7 +728,7 @@ public: short GetPlayerColour(BYTE networkSmallId); unsigned int GetPlayerPrivileges(BYTE networkSmallId); - wstring getEntityName(eINSTANCEOF type); + std::wstring getEntityName(eINSTANCEOF type); @@ -758,7 +758,7 @@ public: #ifdef _XBOX_ONE static int TMSPPFileReturned(LPVOID pParam,int iPad,int iUserData,LPVOID, WCHAR *wchFilename); - unordered_map *GetDLCInfo(); + std::unordered_map *GetDLCInfo(); #else static int TMSPPFileReturned(LPVOID pParam,int iPad,int iUserData,C4JStorage::PTMSPP_FILEDATA pFileData, LPCSTR szFilename); #endif @@ -768,8 +768,8 @@ public: int GetDLCInfoTrialOffersCount(); int GetDLCInfoFullOffersCount(); #ifdef _XBOX_ONE - bool GetDLCFullOfferIDForPackID(const int iPackID,wstring &wsProductId); - wstring GetDLCInfoTexturesFullOffer(int iIndex); + bool GetDLCFullOfferIDForPackID(const int iPackID,std::wstring &wsProductId); + std::wstring GetDLCInfoTexturesFullOffer(int iIndex); #else bool GetDLCFullOfferIDForPackID(const int iPackID,ULONGLONG *pullVal); @@ -788,8 +788,8 @@ private: // Download Status //Request current_download; - vector m_DLCDownloadQueue; - vector m_TMSPPDownloadQueue; + std::vector m_DLCDownloadQueue; + std::vector m_TMSPPDownloadQueue; static DWORD m_dwContentTypeA[e_Marketplace_MAX]; int m_iDLCOfferC; bool m_bAllDLCContentRetrieved; @@ -817,14 +817,14 @@ public: // Storing additional model parts per skin texture void SetAdditionalSkinBoxes(DWORD dwSkinID, SKIN_BOX *SkinBoxA, DWORD dwSkinBoxC); - vector * SetAdditionalSkinBoxes(DWORD dwSkinID, vector *pvSkinBoxA); - vector *GetAdditionalModelParts(DWORD dwSkinID); - vector *GetAdditionalSkinBoxes(DWORD dwSkinID); + std::vector * SetAdditionalSkinBoxes(DWORD dwSkinID, std::vector *pvSkinBoxA); + std::vector *GetAdditionalModelParts(DWORD dwSkinID); + std::vector *GetAdditionalSkinBoxes(DWORD dwSkinID); void SetAnimOverrideBitmask(DWORD dwSkinID,unsigned int uiAnimOverrideBitmask); unsigned int GetAnimOverrideBitmask(DWORD dwSkinID); - static DWORD getSkinIdFromPath(const wstring &skin); - static wstring getSkinPathFromId(DWORD skinId); + static DWORD getSkinIdFromPath(const std::wstring &skin); + static std::wstring getSkinPathFromId(DWORD skinId); virtual int LoadLocalTMSFile(WCHAR *wchTMSFile)=0; virtual int LoadLocalTMSFile(WCHAR *wchTMSFile, eFileExtensionType eExt)=0; @@ -848,9 +848,9 @@ public: private: // vector of additional skin model parts, indexed by the skin texture id - unordered_map *> m_AdditionalModelParts; - unordered_map *> m_AdditionalSkinBoxes; - unordered_map m_AnimOverrides; + std::unordered_map *> m_AdditionalModelParts; + std::unordered_map *> m_AdditionalSkinBoxes; + std::unordered_map m_AnimOverrides; bool m_bResetNether; @@ -872,19 +872,19 @@ private: public: void LocaleAndLanguageInit(); - void getLocale(vector &vecWstrLocales); + void getLocale(std::vector &vecWstrLocales); DWORD get_eMCLang(WCHAR *pwchLocale); DWORD get_xcLang(WCHAR *pwchLocale); void SetTickTMSDLCFiles(bool bVal); - wstring getFilePath(DWORD packId, wstring filename, bool bAddDataFolder); + std::wstring getFilePath(DWORD packId, std::wstring filename, bool bAddDataFolder); private: - unordered_mapm_localeA; - unordered_mapm_eMCLangA; - unordered_mapm_xcLangA; - wstring getRootPath(DWORD packId, bool allowOverride, bool bAddDataFolder); + std::unordered_mapm_localeA; + std::unordered_mapm_eMCLangA; + std::unordered_mapm_xcLangA; + std::wstring getRootPath(DWORD packId, bool allowOverride, bool bAddDataFolder); public: #ifdef _XBOX diff --git a/Minecraft.Client/Build/Common/DLC/DLCAudioFile.cpp b/Minecraft.Client/Build/Common/DLC/DLCAudioFile.cpp index b18ed92f5..162bf33aa 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCAudioFile.cpp +++ b/Minecraft.Client/Build/Common/DLC/DLCAudioFile.cpp @@ -6,7 +6,7 @@ #include "../../../Platform/Xbox/XML/xmlFilesCallback.h" #endif -DLCAudioFile::DLCAudioFile(const wstring &path) : DLCFile(DLCManager::e_DLCType_Audio,path) +DLCAudioFile::DLCAudioFile(const std::wstring &path) : DLCFile(DLCManager::e_DLCType_Audio,path) { m_pbData = NULL; m_dwBytes = 0; @@ -32,7 +32,7 @@ WCHAR *DLCAudioFile::wchTypeNamesA[]= L"CREDIT", }; -DLCAudioFile::EAudioParameterType DLCAudioFile::getParameterType(const wstring ¶mName) +DLCAudioFile::EAudioParameterType DLCAudioFile::getParameterType(const std::wstring ¶mName) { EAudioParameterType type = e_AudioParamType_Invalid; @@ -48,7 +48,7 @@ DLCAudioFile::EAudioParameterType DLCAudioFile::getParameterType(const wstring & return type; } -void DLCAudioFile::addParameter(EAudioType type, EAudioParameterType ptype, const wstring &value) +void DLCAudioFile::addParameter(EAudioType type, EAudioParameterType ptype, const std::wstring &value) { switch(ptype) { @@ -79,7 +79,7 @@ void DLCAudioFile::addParameter(EAudioType type, EAudioParameterType ptype, cons maximumChars = 35; break; } - wstring creditValue = value; + std::wstring creditValue = value; while (creditValue.length() > maximumChars) { unsigned int i = 1; @@ -122,7 +122,7 @@ void DLCAudioFile::addParameter(EAudioType type, EAudioParameterType ptype, cons bool DLCAudioFile::processDLCDataFile(PBYTE pbData, DWORD dwLength) { - unordered_map parameterMapping; + std::unordered_map parameterMapping; unsigned int uiCurrentByte=0; // File format defined in the AudioPacker @@ -145,7 +145,7 @@ bool DLCAudioFile::processDLCDataFile(PBYTE pbData, DWORD dwLength) for(unsigned int i=0;iwchData); + std::wstring parameterName((WCHAR *)pParams->wchData); EAudioParameterType type = getParameterType(parameterName); if( type != e_AudioParamType_Invalid ) { @@ -204,7 +204,7 @@ int DLCAudioFile::GetCountofType(DLCAudioFile::EAudioType eType) } -wstring &DLCAudioFile::GetSoundName(int iIndex) +std::wstring &DLCAudioFile::GetSoundName(int iIndex) { int iWorldType=e_AudioType_Overworld; while(iIndex>=m_parameters[iWorldType].size()) diff --git a/Minecraft.Client/Build/Common/DLC/DLCAudioFile.h b/Minecraft.Client/Build/Common/DLC/DLCAudioFile.h index 728512d76..283e32520 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCAudioFile.h +++ b/Minecraft.Client/Build/Common/DLC/DLCAudioFile.h @@ -30,14 +30,14 @@ public: }; static WCHAR *wchTypeNamesA[e_AudioParamType_Max]; - DLCAudioFile(const wstring &path); + DLCAudioFile(const std::wstring &path); virtual void addData(PBYTE pbData, DWORD dwBytes); virtual PBYTE getData(DWORD &dwBytes); bool processDLCDataFile(PBYTE pbData, DWORD dwLength); int GetCountofType(DLCAudioFile::EAudioType ptype); - wstring &GetSoundName(int iIndex); + std::wstring &GetSoundName(int iIndex); private: using DLCFile::addParameter; @@ -45,10 +45,10 @@ private: PBYTE m_pbData; DWORD m_dwBytes; static const int CURRENT_AUDIO_VERSION_NUM=1; - //unordered_map m_parameters; - vector m_parameters[e_AudioType_Max]; + //std::unordered_map m_parameters; + std::vector m_parameters[e_AudioType_Max]; // use the EAudioType to order these - void addParameter(DLCAudioFile::EAudioType type, DLCAudioFile::EAudioParameterType ptype, const wstring &value); - DLCAudioFile::EAudioParameterType getParameterType(const wstring ¶mName); + void addParameter(DLCAudioFile::EAudioType type, DLCAudioFile::EAudioParameterType ptype, const std::wstring &value); + DLCAudioFile::EAudioParameterType getParameterType(const std::wstring ¶mName); }; diff --git a/Minecraft.Client/Build/Common/DLC/DLCCapeFile.cpp b/Minecraft.Client/Build/Common/DLC/DLCCapeFile.cpp index 0be1e8067..fc6c4077f 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCCapeFile.cpp +++ b/Minecraft.Client/Build/Common/DLC/DLCCapeFile.cpp @@ -2,7 +2,7 @@ #include "DLCManager.h" #include "DLCCapeFile.h" -DLCCapeFile::DLCCapeFile(const wstring &path) : DLCFile(DLCManager::e_DLCType_Cape,path) +DLCCapeFile::DLCCapeFile(const std::wstring &path) : DLCFile(DLCManager::e_DLCType_Cape,path) { } diff --git a/Minecraft.Client/Build/Common/DLC/DLCCapeFile.h b/Minecraft.Client/Build/Common/DLC/DLCCapeFile.h index 8373d340a..6626387a8 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCCapeFile.h +++ b/Minecraft.Client/Build/Common/DLC/DLCCapeFile.h @@ -4,7 +4,7 @@ class DLCCapeFile : public DLCFile { public: - DLCCapeFile(const wstring &path); + DLCCapeFile(const std::wstring &path); virtual void addData(PBYTE pbData, DWORD dwBytes); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/DLC/DLCColourTableFile.cpp b/Minecraft.Client/Build/Common/DLC/DLCColourTableFile.cpp index 59a75c53a..5910ac322 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCColourTableFile.cpp +++ b/Minecraft.Client/Build/Common/DLC/DLCColourTableFile.cpp @@ -5,7 +5,7 @@ #include "../../../Textures/Packs/TexturePackRepository.h" #include "../../../Textures/Packs/TexturePack.h" -DLCColourTableFile::DLCColourTableFile(const wstring &path) : DLCFile(DLCManager::e_DLCType_ColourTable,path) +DLCColourTableFile::DLCColourTableFile(const std::wstring &path) : DLCFile(DLCManager::e_DLCType_ColourTable,path) { m_colourTable = NULL; } diff --git a/Minecraft.Client/Build/Common/DLC/DLCColourTableFile.h b/Minecraft.Client/Build/Common/DLC/DLCColourTableFile.h index 842697391..cb7a8cf5a 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCColourTableFile.h +++ b/Minecraft.Client/Build/Common/DLC/DLCColourTableFile.h @@ -9,7 +9,7 @@ private: ColourTable *m_colourTable; public: - DLCColourTableFile(const wstring &path); + DLCColourTableFile(const std::wstring &path); ~DLCColourTableFile(); virtual void addData(PBYTE pbData, DWORD dwBytes); diff --git a/Minecraft.Client/Build/Common/DLC/DLCFile.cpp b/Minecraft.Client/Build/Common/DLC/DLCFile.cpp index fb98db81a..7a1f21e8b 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCFile.cpp +++ b/Minecraft.Client/Build/Common/DLC/DLCFile.cpp @@ -1,7 +1,7 @@ #include "../../../../Minecraft.World/Build/stdafx.h" #include "DLCFile.h" -DLCFile::DLCFile(DLCManager::EDLCType type, const wstring &path) +DLCFile::DLCFile(DLCManager::EDLCType type, const std::wstring &path) { m_type = type; m_path = path; @@ -11,7 +11,7 @@ DLCFile::DLCFile(DLCManager::EDLCType type, const wstring &path) if(dlcSkin) { - wstring skinValue = path.substr(7,path.size()); + std::wstring skinValue = path.substr(7,path.size()); skinValue = skinValue.substr(0,skinValue.find_first_of(L'.')); std::wstringstream ss; ss << std::dec << skinValue.c_str(); diff --git a/Minecraft.Client/Build/Common/DLC/DLCFile.h b/Minecraft.Client/Build/Common/DLC/DLCFile.h index 3a40dbc76..0f652f849 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCFile.h +++ b/Minecraft.Client/Build/Common/DLC/DLCFile.h @@ -5,21 +5,21 @@ class DLCFile { protected: DLCManager::EDLCType m_type; - wstring m_path; + std::wstring m_path; DWORD m_dwSkinId; public: - DLCFile(DLCManager::EDLCType type, const wstring &path); + DLCFile(DLCManager::EDLCType type, const std::wstring &path); virtual ~DLCFile() {} DLCManager::EDLCType getType() { return m_type; } - wstring getPath() { return m_path; } + std::wstring getPath() { return m_path; } DWORD getSkinID() { return m_dwSkinId; } virtual void addData(PBYTE pbData, DWORD dwBytes) {} virtual PBYTE getData(DWORD &dwBytes) { dwBytes = 0; return NULL; } - virtual void addParameter(DLCManager::EDLCParameterType type, const wstring &value) {} + virtual void addParameter(DLCManager::EDLCParameterType type, const std::wstring &value) {} - virtual wstring getParameterAsString(DLCManager::EDLCParameterType type) { return L""; } + virtual std::wstring getParameterAsString(DLCManager::EDLCParameterType type) { return L""; } virtual bool getParameterAsBool(DLCManager::EDLCParameterType type) { return false;} }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/DLC/DLCGameRules.h b/Minecraft.Client/Build/Common/DLC/DLCGameRules.h index a1998b1dd..4b1fe01f8 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCGameRules.h +++ b/Minecraft.Client/Build/Common/DLC/DLCGameRules.h @@ -6,5 +6,5 @@ class DLCGameRules : public DLCFile { public: - DLCGameRules(DLCManager::EDLCType type, const wstring &path) : DLCFile(type,path) {} + DLCGameRules(DLCManager::EDLCType type, const std::wstring &path) : DLCFile(type,path) {} }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/DLC/DLCGameRulesFile.cpp b/Minecraft.Client/Build/Common/DLC/DLCGameRulesFile.cpp index dd549f902..6623c676b 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCGameRulesFile.cpp +++ b/Minecraft.Client/Build/Common/DLC/DLCGameRulesFile.cpp @@ -2,7 +2,7 @@ #include "DLCManager.h" #include "DLCGameRulesFile.h" -DLCGameRulesFile::DLCGameRulesFile(const wstring &path) : DLCGameRules(DLCManager::e_DLCType_GameRules,path) +DLCGameRulesFile::DLCGameRulesFile(const std::wstring &path) : DLCGameRules(DLCManager::e_DLCType_GameRules,path) { m_pbData = NULL; m_dwBytes = 0; diff --git a/Minecraft.Client/Build/Common/DLC/DLCGameRulesFile.h b/Minecraft.Client/Build/Common/DLC/DLCGameRulesFile.h index e6456d73a..9924ca849 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCGameRulesFile.h +++ b/Minecraft.Client/Build/Common/DLC/DLCGameRulesFile.h @@ -8,7 +8,7 @@ private: DWORD m_dwBytes; public: - DLCGameRulesFile(const wstring &path); + DLCGameRulesFile(const std::wstring &path); virtual void addData(PBYTE pbData, DWORD dwBytes); virtual PBYTE getData(DWORD &dwBytes); diff --git a/Minecraft.Client/Build/Common/DLC/DLCGameRulesHeader.cpp b/Minecraft.Client/Build/Common/DLC/DLCGameRulesHeader.cpp index a8d8509ed..418c2c301 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCGameRulesHeader.cpp +++ b/Minecraft.Client/Build/Common/DLC/DLCGameRulesHeader.cpp @@ -9,7 +9,7 @@ #include "DLCManager.h" #include "DLCGameRulesHeader.h" -DLCGameRulesHeader::DLCGameRulesHeader(const wstring &path) : DLCGameRules(DLCManager::e_DLCType_GameRulesHeader,path) +DLCGameRulesHeader::DLCGameRulesHeader(const std::wstring &path) : DLCGameRules(DLCManager::e_DLCType_GameRulesHeader,path) { m_pbData = NULL; m_dwBytes = 0; @@ -35,7 +35,7 @@ void DLCGameRulesHeader::addData(PBYTE pbData, DWORD dwBytes) // Init values. int version_number; byte compression_type; - wstring texturepackid; + std::wstring texturepackid; // Read Datastream. version_number = dis.readInt(); @@ -57,10 +57,10 @@ void DLCGameRulesHeader::addData(PBYTE pbData, DWORD dwBytes) version_number, compression_type, - wstringtofilename(m_defaultSaveName), - wstringtofilename(m_displayName), - wstringtofilename(texturepackid), - wstringtofilename(m_grfPath) + std::wstringtofilename(m_defaultSaveName), + std::wstringtofilename(m_displayName), + std::wstringtofilename(texturepackid), + std::wstringtofilename(m_grfPath) ); // Texture Pack. diff --git a/Minecraft.Client/Build/Common/DLC/DLCGameRulesHeader.h b/Minecraft.Client/Build/Common/DLC/DLCGameRulesHeader.h index f73b817b8..fddc7318c 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCGameRulesHeader.h +++ b/Minecraft.Client/Build/Common/DLC/DLCGameRulesHeader.h @@ -16,22 +16,22 @@ private: public: virtual bool requiresTexturePack() {return m_bRequiresTexturePack;} virtual UINT getRequiredTexturePackId() {return m_requiredTexturePackId;} - virtual wstring getDefaultSaveName() {return m_defaultSaveName;} + virtual std::wstring getDefaultSaveName() {return m_defaultSaveName;} virtual LPCWSTR getWorldName() {return m_worldName.c_str();} virtual LPCWSTR getDisplayName() {return m_displayName.c_str();} - virtual wstring getGrfPath() {return L"GameRules.grf";} + virtual std::wstring getGrfPath() {return L"GameRules.grf";} virtual void setRequiresTexturePack(bool x) {m_bRequiresTexturePack = x;} virtual void setRequiredTexturePackId(UINT x) {m_requiredTexturePackId = x;} - virtual void setDefaultSaveName(const wstring &x) {m_defaultSaveName = x;} - virtual void setWorldName(const wstring & x) {m_worldName = x;} - virtual void setDisplayName(const wstring & x) {m_displayName = x;} - virtual void setGrfPath(const wstring & x) {m_grfPath = x;} + virtual void setDefaultSaveName(const std::wstring &x) {m_defaultSaveName = x;} + virtual void setWorldName(const std::wstring & x) {m_worldName = x;} + virtual void setDisplayName(const std::wstring & x) {m_displayName = x;} + virtual void setGrfPath(const std::wstring & x) {m_grfPath = x;} LevelGenerationOptions *lgo; public: - DLCGameRulesHeader(const wstring &path); + DLCGameRulesHeader(const std::wstring &path); virtual void addData(PBYTE pbData, DWORD dwBytes); virtual PBYTE getData(DWORD &dwBytes); diff --git a/Minecraft.Client/Build/Common/DLC/DLCLocalisationFile.cpp b/Minecraft.Client/Build/Common/DLC/DLCLocalisationFile.cpp index c54475a11..82c5549e1 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCLocalisationFile.cpp +++ b/Minecraft.Client/Build/Common/DLC/DLCLocalisationFile.cpp @@ -3,7 +3,7 @@ #include "DLCLocalisationFile.h" #include "../../../Utils/StringTable.h" -DLCLocalisationFile::DLCLocalisationFile(const wstring &path) : DLCFile(DLCManager::e_DLCType_LocalisationData,path) +DLCLocalisationFile::DLCLocalisationFile(const std::wstring &path) : DLCFile(DLCManager::e_DLCType_LocalisationData,path) { m_strings = NULL; } diff --git a/Minecraft.Client/Build/Common/DLC/DLCLocalisationFile.h b/Minecraft.Client/Build/Common/DLC/DLCLocalisationFile.h index 083e60d8b..db4211667 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCLocalisationFile.h +++ b/Minecraft.Client/Build/Common/DLC/DLCLocalisationFile.h @@ -9,7 +9,7 @@ private: StringTable *m_strings; public: - DLCLocalisationFile(const wstring &path); + DLCLocalisationFile(const std::wstring &path); DLCLocalisationFile(PBYTE pbData, DWORD dwBytes); // when we load in a texture pack details file from TMS++ virtual void addData(PBYTE pbData, DWORD dwBytes); diff --git a/Minecraft.Client/Build/Common/DLC/DLCManager.cpp b/Minecraft.Client/Build/Common/DLC/DLCManager.cpp index c30eab3ca..5f1deea2f 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCManager.cpp +++ b/Minecraft.Client/Build/Common/DLC/DLCManager.cpp @@ -10,18 +10,18 @@ #ifdef __linux__ #include static const size_t DLC_WCHAR_BINARY = 2; -static wstring dlc_read_wstring(const void *data) +static std::wstring dlc_read_std::wstring(const void *data) { const uint16_t *p = (const uint16_t *)data; - wstring s; + std::wstring s; while (*p) s += (wchar_t)*p++; return s; } -#define DLC_WSTRING(ptr) dlc_read_wstring(ptr) +#define DLC_WSTRING(ptr) dlc_read_std::wstring(ptr) #define DLC_PARAM_ADV(n) (sizeof(C4JStorage::DLC_FILE_PARAM) + (n) * DLC_WCHAR_BINARY) #define DLC_DETAIL_ADV(n) (sizeof(C4JStorage::DLC_FILE_DETAILS) + (n) * DLC_WCHAR_BINARY) #else -#define DLC_WSTRING(ptr) wstring((WCHAR *)(ptr)) +#define DLC_WSTRING(ptr) std::wstring((WCHAR *)(ptr)) #define DLC_PARAM_ADV(n) (sizeof(C4JStorage::DLC_FILE_PARAM) + sizeof(WCHAR) * (n)) #define DLC_DETAIL_ADV(n) (sizeof(C4JStorage::DLC_FILE_DETAILS) + sizeof(WCHAR) * (n)) #endif @@ -58,7 +58,7 @@ DLCManager::~DLCManager() } } -DLCManager::EDLCParameterType DLCManager::getParameterType(const wstring ¶mName) +DLCManager::EDLCParameterType DLCManager::getParameterType(const std::wstring ¶mName) { EDLCParameterType type = e_DLCParamType_Invalid; @@ -110,7 +110,7 @@ void DLCManager::removePack(DLCPack *pack) } } -DLCPack *DLCManager::getPack(const wstring &name) +DLCPack *DLCManager::getPack(const std::wstring &name) { DLCPack *pack = NULL; //DWORD currentIndex = 0; @@ -118,7 +118,7 @@ DLCPack *DLCManager::getPack(const wstring &name) for(AUTO_VAR(it, m_packs.begin()); it != m_packs.end(); ++it) { currentPack = *it; - wstring wsName=currentPack->getName(); + std::wstring wsName=currentPack->getName(); if(wsName.compare(name) == 0) { @@ -130,7 +130,7 @@ DLCPack *DLCManager::getPack(const wstring &name) } #ifdef _XBOX_ONE -DLCPack *DLCManager::getPackFromProductID(const wstring &productID) +DLCPack *DLCManager::getPackFromProductID(const std::wstring &productID) { DLCPack *pack = NULL; //DWORD currentIndex = 0; @@ -138,7 +138,7 @@ DLCPack *DLCManager::getPackFromProductID(const wstring &productID) for(AUTO_VAR(it, m_packs.begin()); it != m_packs.end(); ++it) { currentPack = *it; - wstring wsName=currentPack->getPurchaseOfferId(); + std::wstring wsName=currentPack->getPurchaseOfferId(); if(wsName.compare(productID) == 0) { @@ -230,7 +230,7 @@ DWORD DLCManager::getPackIndex(DLCPack *pack, bool &found, EDLCType type /*= e_D return foundIndex; } -DWORD DLCManager::getPackIndexContainingSkin(const wstring &path, bool &found) +DWORD DLCManager::getPackIndexContainingSkin(const std::wstring &path, bool &found) { DWORD foundIndex = 0; found = false; @@ -252,7 +252,7 @@ DWORD DLCManager::getPackIndexContainingSkin(const wstring &path, bool &found) return foundIndex; } -DLCPack *DLCManager::getPackContainingSkin(const wstring &path) +DLCPack *DLCManager::getPackContainingSkin(const std::wstring &path) { DLCPack *foundPack = NULL; for(AUTO_VAR(it, m_packs.begin()); it != m_packs.end(); ++it) @@ -270,7 +270,7 @@ DLCPack *DLCManager::getPackContainingSkin(const wstring &path) return foundPack; } -DLCSkinFile *DLCManager::getSkinFile(const wstring &path) +DLCSkinFile *DLCManager::getSkinFile(const std::wstring &path) { DLCSkinFile *foundSkinfile = NULL; for(AUTO_VAR(it, m_packs.begin()); it != m_packs.end(); ++it) @@ -326,15 +326,15 @@ DWORD DLCManager::checkForCorruptDLCAndAlert(bool showMessage /*= true*/) return corruptDLCCount; } -bool DLCManager::readDLCDataFile(DWORD &dwFilesProcessed, const wstring &path, DLCPack *pack, bool fromArchive) +bool DLCManager::readDLCDataFile(DWORD &dwFilesProcessed, const std::wstring &path, DLCPack *pack, bool fromArchive) { - return readDLCDataFile( dwFilesProcessed, wstringtofilename(path), pack, fromArchive); + return readDLCDataFile( dwFilesProcessed, std::wstringtofilename(path), pack, fromArchive); } bool DLCManager::readDLCDataFile(DWORD &dwFilesProcessed, const string &path, DLCPack *pack, bool fromArchive) { - wstring wPath = convStringToWstring(path); + std::wstring wPath = convStringToWstring(path); if (fromArchive && app.getArchiveFileSize(wPath) >= 0) { byteArray bytes = app.getArchiveFile(wPath); @@ -347,7 +347,7 @@ bool DLCManager::readDLCDataFile(DWORD &dwFilesProcessed, const string &path, DL if(finalPath.size() == 0) finalPath = path; HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); #elif defined(_DURANGO) - wstring finalPath = StorageManager.GetMountedPath(wPath.c_str()); + std::wstring finalPath = StorageManager.GetMountedPath(wPath.c_str()); if(finalPath.size() == 0) finalPath = wPath; HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); #else @@ -387,7 +387,7 @@ bool DLCManager::readDLCDataFile(DWORD &dwFilesProcessed, const string &path, DL bool DLCManager::processDLCDataFile(DWORD &dwFilesProcessed, PBYTE pbData, DWORD dwLength, DLCPack *pack) { - unordered_map parameterMapping; + std::unordered_map parameterMapping; unsigned int uiCurrentByte=0; // File format defined in the DLC_Creator @@ -418,7 +418,7 @@ bool DLCManager::processDLCDataFile(DWORD &dwFilesProcessed, PBYTE pbData, DWORD for(unsigned int i=0;iwchData); + std::wstring parameterName = DLC_WSTRING(pParams->wchData); DLCManager::EDLCParameterType type = DLCManager::getParameterType(parameterName); if( type != DLCManager::e_DLCParamType_Invalid ) { @@ -547,14 +547,14 @@ bool DLCManager::processDLCDataFile(DWORD &dwFilesProcessed, PBYTE pbData, DWORD DWORD DLCManager::retrievePackIDFromDLCDataFile(const string &path, DLCPack *pack) { DWORD packId = 0; - wstring wPath = convStringToWstring(path); + std::wstring wPath = convStringToWstring(path); #ifdef _WINDOWS64 string finalPath = StorageManager.GetMountedPath(path.c_str()); if(finalPath.size() == 0) finalPath = path; HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); #elif defined(_DURANGO) - wstring finalPath = StorageManager.GetMountedPath(wPath.c_str()); + std::wstring finalPath = StorageManager.GetMountedPath(wPath.c_str()); if(finalPath.size() == 0) finalPath = wPath; HANDLE file = CreateFile(finalPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); #else @@ -594,7 +594,7 @@ DWORD DLCManager::retrievePackID(PBYTE pbData, DWORD dwLength, DLCPack *pack) { DWORD packId=0; bool bPackIDSet=false; - unordered_map parameterMapping; + std::unordered_map parameterMapping; unsigned int uiCurrentByte=0; // File format defined in the DLC_Creator @@ -623,7 +623,7 @@ DWORD DLCManager::retrievePackID(PBYTE pbData, DWORD dwLength, DLCPack *pack) for(unsigned int i=0;iwchData); + std::wstring parameterName = DLC_WSTRING(pParams->wchData); DLCManager::EDLCParameterType type = DLCManager::getParameterType(parameterName); if( type != DLCManager::e_DLCParamType_Invalid ) { @@ -664,7 +664,7 @@ DWORD DLCManager::retrievePackID(PBYTE pbData, DWORD dwLength, DLCPack *pack) { if(it->second==e_DLCParamType_PackId) { - wstring wsTemp = DLC_WSTRING(pParams->wchData); + std::wstring wsTemp = DLC_WSTRING(pParams->wchData); std::wstringstream ss; // 4J Stu - numbered using decimal to make it easier for artists/people to number manually ss << std::dec << wsTemp.c_str(); diff --git a/Minecraft.Client/Build/Common/DLC/DLCManager.h b/Minecraft.Client/Build/Common/DLC/DLCManager.h index 1021b6641..99854fd49 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCManager.h +++ b/Minecraft.Client/Build/Common/DLC/DLCManager.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include class DLCPack; class DLCSkinFile; @@ -51,7 +51,7 @@ public: const static WCHAR *wchTypeNamesA[e_DLCParamType_Max]; private: - vector m_packs; + std::vector m_packs; //bool m_bNeedsUpdated; bool m_bNeedsCorruptCheck; DWORD m_dwUnnamedCorruptDLCCount; @@ -59,7 +59,7 @@ public: DLCManager(); ~DLCManager(); - static EDLCParameterType getParameterType(const wstring ¶mName); + static EDLCParameterType getParameterType(const std::wstring ¶mName); DWORD getPackCount(EDLCType type = e_DLCType_All); @@ -75,20 +75,20 @@ public: void addPack(DLCPack *pack); void removePack(DLCPack *pack); - DLCPack *getPack(const wstring &name); + DLCPack *getPack(const std::wstring &name); #ifdef _XBOX_ONE - DLCPack *DLCManager::getPackFromProductID(const wstring &productID); + DLCPack *DLCManager::getPackFromProductID(const std::wstring &productID); #endif DLCPack *getPack(DWORD index, EDLCType type = e_DLCType_All); DWORD getPackIndex(DLCPack *pack, bool &found, EDLCType type = e_DLCType_All); - DLCSkinFile *getSkinFile(const wstring &path); // Will hunt all packs of type skin to find the right skinfile + DLCSkinFile *getSkinFile(const std::wstring &path); // Will hunt all packs of type skin to find the right skinfile - DLCPack *getPackContainingSkin(const wstring &path); - DWORD getPackIndexContainingSkin(const wstring &path, bool &found); + DLCPack *getPackContainingSkin(const std::wstring &path); + DWORD getPackIndexContainingSkin(const std::wstring &path, bool &found); DWORD checkForCorruptDLCAndAlert(bool showMessage = true); - bool readDLCDataFile(DWORD &dwFilesProcessed, const wstring &path, DLCPack *pack, bool fromArchive = false); + bool readDLCDataFile(DWORD &dwFilesProcessed, const std::wstring &path, DLCPack *pack, bool fromArchive = false); bool readDLCDataFile(DWORD &dwFilesProcessed, const string &path, DLCPack *pack, bool fromArchive = false); DWORD retrievePackIDFromDLCDataFile(const string &path, DLCPack *pack); diff --git a/Minecraft.Client/Build/Common/DLC/DLCPack.cpp b/Minecraft.Client/Build/Common/DLC/DLCPack.cpp index f2878045b..91e857bae 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCPack.cpp +++ b/Minecraft.Client/Build/Common/DLC/DLCPack.cpp @@ -11,7 +11,7 @@ #include "DLCColourTableFile.h" #include "../../../../Minecraft.World/Util/StringHelpers.h" -DLCPack::DLCPack(const wstring &name,DWORD dwLicenseMask) +DLCPack::DLCPack(const std::wstring &name,DWORD dwLicenseMask) { m_dataPath = L""; m_packName = name; @@ -35,7 +35,7 @@ DLCPack::DLCPack(const wstring &name,DWORD dwLicenseMask) } #ifdef _XBOX_ONE -DLCPack::DLCPack(const wstring &name,const wstring &productID,DWORD dwLicenseMask) +DLCPack::DLCPack(const std::wstring &name,const std::wstring &productID,DWORD dwLicenseMask) { m_dataPath = L""; m_packName = name; @@ -119,7 +119,7 @@ void DLCPack::setParentPack(DLCPack *parentPack) m_parentPack = parentPack; } -void DLCPack::addParameter(DLCManager::EDLCParameterType type, const wstring &value) +void DLCPack::addParameter(DLCManager::EDLCParameterType type, const std::wstring &value) { switch(type) { @@ -183,7 +183,7 @@ bool DLCPack::getParameterAsUInt(DLCManager::EDLCParameterType type, unsigned in return false; } -DLCFile *DLCPack::addFile(DLCManager::EDLCType type, const wstring &path) +DLCFile *DLCPack::addFile(DLCManager::EDLCType type, const std::wstring &path) { DLCFile *newFile = NULL; @@ -192,7 +192,7 @@ DLCFile *DLCPack::addFile(DLCManager::EDLCType type, const wstring &path) case DLCManager::e_DLCType_Skin: { std::vector splitPath = stringSplit(path,L'/'); - wstring strippedPath = splitPath.back(); + std::wstring strippedPath = splitPath.back(); newFile = new DLCSkinFile(strippedPath); @@ -212,7 +212,7 @@ DLCFile *DLCPack::addFile(DLCManager::EDLCType type, const wstring &path) case DLCManager::e_DLCType_Cape: { std::vector splitPath = stringSplit(path,L'/'); - wstring strippedPath = splitPath.back(); + std::wstring strippedPath = splitPath.back(); newFile = new DLCCapeFile(strippedPath); } break; @@ -248,13 +248,13 @@ DLCFile *DLCPack::addFile(DLCManager::EDLCType type, const wstring &path) } // MGH - added this comp func, as the embedded func in find_if was confusing the PS3 compiler -static const wstring *g_pathCmpString = NULL; +static const std::wstring *g_pathCmpString = NULL; static bool pathCmp(DLCFile *val) { return (g_pathCmpString->compare(val->getPath()) == 0); } -bool DLCPack::doesPackContainFile(DLCManager::EDLCType type, const wstring &path) +bool DLCPack::doesPackContainFile(DLCManager::EDLCType type, const std::wstring &path) { bool hasFile = false; if(type == DLCManager::e_DLCType_All) @@ -300,7 +300,7 @@ DLCFile *DLCPack::getFile(DLCManager::EDLCType type, DWORD index) return file; } -DLCFile *DLCPack::getFile(DLCManager::EDLCType type, const wstring &path) +DLCFile *DLCPack::getFile(DLCManager::EDLCType type, const std::wstring &path) { DLCFile *file = NULL; if(type == DLCManager::e_DLCType_All) @@ -352,7 +352,7 @@ DWORD DLCPack::getDLCItemsCount(DLCManager::EDLCType type /*= DLCManager::e_DLCT return count; }; -DWORD DLCPack::getFileIndexAt(DLCManager::EDLCType type, const wstring &path, bool &found) +DWORD DLCPack::getFileIndexAt(DLCManager::EDLCType type, const std::wstring &path, bool &found) { if(type == DLCManager::e_DLCType_All) { @@ -380,7 +380,7 @@ DWORD DLCPack::getFileIndexAt(DLCManager::EDLCType type, const wstring &path, bo return foundIndex; } -bool DLCPack::hasPurchasedFile(DLCManager::EDLCType type, const wstring &path) +bool DLCPack::hasPurchasedFile(DLCManager::EDLCType type, const std::wstring &path) { if(type == DLCManager::e_DLCType_All) { diff --git a/Minecraft.Client/Build/Common/DLC/DLCPack.h b/Minecraft.Client/Build/Common/DLC/DLCPack.h index 856744c27..7a0ba2bac 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCPack.h +++ b/Minecraft.Client/Build/Common/DLC/DLCPack.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "DLCManager.h" class DLCFile; @@ -8,19 +8,19 @@ class DLCSkinFile; class DLCPack { private: - vector m_files[DLCManager::e_DLCType_Max]; - vector m_childPacks; + std::vector m_files[DLCManager::e_DLCType_Max]; + std::vector m_childPacks; DLCPack *m_parentPack; - unordered_map m_parameters; + std::unordered_map m_parameters; - wstring m_packName; - wstring m_dataPath; + std::wstring m_packName; + std::wstring m_dataPath; DWORD m_dwLicenseMask; int m_dlcMountIndex; XCONTENTDEVICEID m_dlcDeviceID; #ifdef _XBOX_ONE - wstring m_wsProductId; + std::wstring m_wsProductId; #else ULONGLONG m_ullFullOfferId; #endif @@ -31,13 +31,13 @@ private: PBYTE m_data; // This pointer is for all the data used for this pack, so deleting it invalidates ALL of it's children. public: - DLCPack(const wstring &name,DWORD dwLicenseMask); + DLCPack(const std::wstring &name,DWORD dwLicenseMask); #ifdef _XBOX_ONE - DLCPack(const wstring &name,const wstring &productID,DWORD dwLicenseMask); + DLCPack(const std::wstring &name,const std::wstring &productID,DWORD dwLicenseMask); #endif ~DLCPack(); - wstring getFullDataPath() { return m_dataPath; } + std::wstring getFullDataPath() { return m_dataPath; } void SetDataPointer(PBYTE pbData) { m_data = pbData; } @@ -61,33 +61,33 @@ public: void addChildPack(DLCPack *childPack); void setParentPack(DLCPack *parentPack); - void addParameter(DLCManager::EDLCParameterType type, const wstring &value); + void addParameter(DLCManager::EDLCParameterType type, const std::wstring &value); bool getParameterAsUInt(DLCManager::EDLCParameterType type, unsigned int ¶m); void updateLicenseMask( DWORD dwLicenseMask ) { m_dwLicenseMask = dwLicenseMask; } DWORD getLicenseMask( ) { return m_dwLicenseMask; } - wstring getName() { return m_packName; } + std::wstring getName() { return m_packName; } #ifdef _XBOX_ONE - wstring getPurchaseOfferId() { return m_wsProductId; } + std::wstring getPurchaseOfferId() { return m_wsProductId; } #else ULONGLONG getPurchaseOfferId() { return m_ullFullOfferId; } #endif - DLCFile *addFile(DLCManager::EDLCType type, const wstring &path); + DLCFile *addFile(DLCManager::EDLCType type, const std::wstring &path); DLCFile *getFile(DLCManager::EDLCType type, DWORD index); - DLCFile *getFile(DLCManager::EDLCType type, const wstring &path); + DLCFile *getFile(DLCManager::EDLCType type, const std::wstring &path); DWORD getDLCItemsCount(DLCManager::EDLCType type = DLCManager::e_DLCType_All); - DWORD getFileIndexAt(DLCManager::EDLCType type, const wstring &path, bool &found); - bool doesPackContainFile(DLCManager::EDLCType type, const wstring &path); + DWORD getFileIndexAt(DLCManager::EDLCType type, const std::wstring &path, bool &found); + bool doesPackContainFile(DLCManager::EDLCType type, const std::wstring &path); DWORD GetPackID() {return m_packId;} DWORD getSkinCount() { return getDLCItemsCount(DLCManager::e_DLCType_Skin); } - DWORD getSkinIndexAt(const wstring &path, bool &found) { return getFileIndexAt(DLCManager::e_DLCType_Skin, path, found); } - DLCSkinFile *getSkinFile(const wstring &path) { return (DLCSkinFile *)getFile(DLCManager::e_DLCType_Skin, path); } + DWORD getSkinIndexAt(const std::wstring &path, bool &found) { return getFileIndexAt(DLCManager::e_DLCType_Skin, path, found); } + DLCSkinFile *getSkinFile(const std::wstring &path) { return (DLCSkinFile *)getFile(DLCManager::e_DLCType_Skin, path); } DLCSkinFile *getSkinFile(DWORD index) { return (DLCSkinFile *)getFile(DLCManager::e_DLCType_Skin, index); } - bool doesPackContainSkin(const wstring &path) { return doesPackContainFile(DLCManager::e_DLCType_Skin, path); } + bool doesPackContainSkin(const std::wstring &path) { return doesPackContainFile(DLCManager::e_DLCType_Skin, path); } - bool hasPurchasedFile(DLCManager::EDLCType type, const wstring &path); + bool hasPurchasedFile(DLCManager::EDLCType type, const std::wstring &path); }; diff --git a/Minecraft.Client/Build/Common/DLC/DLCSkinFile.cpp b/Minecraft.Client/Build/Common/DLC/DLCSkinFile.cpp index fd366ba37..91bcdb563 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCSkinFile.cpp +++ b/Minecraft.Client/Build/Common/DLC/DLCSkinFile.cpp @@ -7,7 +7,7 @@ #include "../../../../Minecraft.World/Player/Player.h" #include "../../../../Minecraft.World/Util/StringHelpers.h" -DLCSkinFile::DLCSkinFile(const wstring &path) : DLCFile(DLCManager::e_DLCType_Skin,path) +DLCSkinFile::DLCSkinFile(const std::wstring &path) : DLCFile(DLCManager::e_DLCType_Skin,path) { m_displayName = L""; m_themeName = L""; @@ -21,7 +21,7 @@ void DLCSkinFile::addData(PBYTE pbData, DWORD dwBytes) app.AddMemoryTextureFile(m_path,pbData,dwBytes); } -void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type, const wstring &value) +void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type, const std::wstring &value) { switch(type) { @@ -71,7 +71,7 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type, const wstring maximumChars = 35; break; } - wstring creditValue = value; + std::wstring creditValue = value; while (creditValue.length() > maximumChars) { unsigned int i = 1; @@ -163,7 +163,7 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type, const wstring } } -// vector *DLCSkinFile::getAdditionalModelParts() +// std::vector *DLCSkinFile::getAdditionalModelParts() // { // return &m_AdditionalModelParts; // } @@ -172,12 +172,12 @@ int DLCSkinFile::getAdditionalBoxesCount() { return (int)m_AdditionalBoxes.size(); } -vector *DLCSkinFile::getAdditionalBoxes() +std::vector *DLCSkinFile::getAdditionalBoxes() { return &m_AdditionalBoxes; } -wstring DLCSkinFile::getParameterAsString(DLCManager::EDLCParameterType type) +std::wstring DLCSkinFile::getParameterAsString(DLCManager::EDLCParameterType type) { switch(type) { diff --git a/Minecraft.Client/Build/Common/DLC/DLCSkinFile.h b/Minecraft.Client/Build/Common/DLC/DLCSkinFile.h index 0e6d75308..b39583e1b 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCSkinFile.h +++ b/Minecraft.Client/Build/Common/DLC/DLCSkinFile.h @@ -6,23 +6,23 @@ class DLCSkinFile : public DLCFile { private: - wstring m_displayName; - wstring m_themeName; - wstring m_cape; + std::wstring m_displayName; + std::wstring m_themeName; + std::wstring m_cape; unsigned int m_uiAnimOverrideBitmask; bool m_bIsFree; - vector m_AdditionalBoxes; + std::vector m_AdditionalBoxes; public: - DLCSkinFile(const wstring &path); + DLCSkinFile(const std::wstring &path); virtual void addData(PBYTE pbData, DWORD dwBytes); - virtual void addParameter(DLCManager::EDLCParameterType type, const wstring &value); + virtual void addParameter(DLCManager::EDLCParameterType type, const std::wstring &value); - virtual wstring getParameterAsString(DLCManager::EDLCParameterType type); + virtual std::wstring getParameterAsString(DLCManager::EDLCParameterType type); virtual bool getParameterAsBool(DLCManager::EDLCParameterType type); - vector *getAdditionalBoxes(); + std::vector *getAdditionalBoxes(); int getAdditionalBoxesCount(); unsigned int getAnimOverrideBitmask() { return m_uiAnimOverrideBitmask;} bool isFree() {return m_bIsFree;} diff --git a/Minecraft.Client/Build/Common/DLC/DLCTextureFile.cpp b/Minecraft.Client/Build/Common/DLC/DLCTextureFile.cpp index 2593f3d72..1b4681d7e 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCTextureFile.cpp +++ b/Minecraft.Client/Build/Common/DLC/DLCTextureFile.cpp @@ -2,7 +2,7 @@ #include "DLCManager.h" #include "DLCTextureFile.h" -DLCTextureFile::DLCTextureFile(const wstring &path) : DLCFile(DLCManager::e_DLCType_Texture,path) +DLCTextureFile::DLCTextureFile(const std::wstring &path) : DLCFile(DLCManager::e_DLCType_Texture,path) { m_bIsAnim = false; m_animString = L""; @@ -24,7 +24,7 @@ PBYTE DLCTextureFile::getData(DWORD &dwBytes) return m_pbData; } -void DLCTextureFile::addParameter(DLCManager::EDLCParameterType type, const wstring &value) +void DLCTextureFile::addParameter(DLCManager::EDLCParameterType type, const std::wstring &value) { switch(type) { @@ -36,7 +36,7 @@ void DLCTextureFile::addParameter(DLCManager::EDLCParameterType type, const wstr } } -wstring DLCTextureFile::getParameterAsString(DLCManager::EDLCParameterType type) +std::wstring DLCTextureFile::getParameterAsString(DLCManager::EDLCParameterType type) { switch(type) { diff --git a/Minecraft.Client/Build/Common/DLC/DLCTextureFile.h b/Minecraft.Client/Build/Common/DLC/DLCTextureFile.h index bc7916867..831740601 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCTextureFile.h +++ b/Minecraft.Client/Build/Common/DLC/DLCTextureFile.h @@ -6,19 +6,19 @@ class DLCTextureFile : public DLCFile private: bool m_bIsAnim; - wstring m_animString; + std::wstring m_animString; PBYTE m_pbData; DWORD m_dwBytes; public: - DLCTextureFile(const wstring &path); + DLCTextureFile(const std::wstring &path); virtual void addData(PBYTE pbData, DWORD dwBytes); virtual PBYTE getData(DWORD &dwBytes); - virtual void addParameter(DLCManager::EDLCParameterType type, const wstring &value); + virtual void addParameter(DLCManager::EDLCParameterType type, const std::wstring &value); - virtual wstring getParameterAsString(DLCManager::EDLCParameterType type); + virtual std::wstring getParameterAsString(DLCManager::EDLCParameterType type); virtual bool getParameterAsBool(DLCManager::EDLCParameterType type); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/DLC/DLCUIDataFile.cpp b/Minecraft.Client/Build/Common/DLC/DLCUIDataFile.cpp index 438338aae..6bb5da7d1 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCUIDataFile.cpp +++ b/Minecraft.Client/Build/Common/DLC/DLCUIDataFile.cpp @@ -2,7 +2,7 @@ #include "DLCManager.h" #include "DLCUIDataFile.h" -DLCUIDataFile::DLCUIDataFile(const wstring &path) : DLCFile(DLCManager::e_DLCType_UIData,path) +DLCUIDataFile::DLCUIDataFile(const std::wstring &path) : DLCFile(DLCManager::e_DLCType_UIData,path) { m_pbData = NULL; m_dwBytes = 0; diff --git a/Minecraft.Client/Build/Common/DLC/DLCUIDataFile.h b/Minecraft.Client/Build/Common/DLC/DLCUIDataFile.h index 105ad0dfd..a9ffa6c1f 100644 --- a/Minecraft.Client/Build/Common/DLC/DLCUIDataFile.h +++ b/Minecraft.Client/Build/Common/DLC/DLCUIDataFile.h @@ -9,7 +9,7 @@ private: bool m_canDeleteData; public: - DLCUIDataFile(const wstring &path); + DLCUIDataFile(const std::wstring &path); ~DLCUIDataFile(); using DLCFile::addData; diff --git a/Minecraft.Client/Build/Common/GameRules/AddEnchantmentRuleDefinition.cpp b/Minecraft.Client/Build/Common/GameRules/AddEnchantmentRuleDefinition.cpp index 6bb11ff4c..facb15b36 100644 --- a/Minecraft.Client/Build/Common/GameRules/AddEnchantmentRuleDefinition.cpp +++ b/Minecraft.Client/Build/Common/GameRules/AddEnchantmentRuleDefinition.cpp @@ -20,7 +20,7 @@ void AddEnchantmentRuleDefinition::writeAttributes(DataOutputStream *dos, UINT n dos->writeUTF( _toString( m_enchantmentLevel ) ); } -void AddEnchantmentRuleDefinition::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void AddEnchantmentRuleDefinition::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"enchantmentId") == 0) { @@ -43,7 +43,7 @@ void AddEnchantmentRuleDefinition::addAttribute(const wstring &attributeName, co } } -bool AddEnchantmentRuleDefinition::enchantItem(shared_ptr item) +bool AddEnchantmentRuleDefinition::enchantItem(std::shared_ptr item) { bool enchanted = false; if (item != NULL) diff --git a/Minecraft.Client/Build/Common/GameRules/AddEnchantmentRuleDefinition.h b/Minecraft.Client/Build/Common/GameRules/AddEnchantmentRuleDefinition.h index 3beece109..bb6f48ae3 100644 --- a/Minecraft.Client/Build/Common/GameRules/AddEnchantmentRuleDefinition.h +++ b/Minecraft.Client/Build/Common/GameRules/AddEnchantmentRuleDefinition.h @@ -17,7 +17,7 @@ public: virtual void writeAttributes(DataOutputStream *, UINT numAttrs); - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); - bool enchantItem(shared_ptr item); + bool enchantItem(std::shared_ptr item); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/GameRules/AddItemRuleDefinition.cpp b/Minecraft.Client/Build/Common/GameRules/AddItemRuleDefinition.cpp index d3eb1b0d6..17c7d8f57 100644 --- a/Minecraft.Client/Build/Common/GameRules/AddItemRuleDefinition.cpp +++ b/Minecraft.Client/Build/Common/GameRules/AddItemRuleDefinition.cpp @@ -32,7 +32,7 @@ void AddItemRuleDefinition::writeAttributes(DataOutputStream *dos, UINT numAttrs dos->writeUTF( _toString( m_slot ) ); } -void AddItemRuleDefinition::getChildren(vector *children) +void AddItemRuleDefinition::getChildren(std::vector *children) { GameRuleDefinition::getChildren( children ); for (AUTO_VAR(it, m_enchantments.begin()); it != m_enchantments.end(); it++) @@ -56,7 +56,7 @@ GameRuleDefinition *AddItemRuleDefinition::addChild(ConsoleGameRules::EGameRuleT return rule; } -void AddItemRuleDefinition::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void AddItemRuleDefinition::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"itemId") == 0) { @@ -94,13 +94,13 @@ void AddItemRuleDefinition::addAttribute(const wstring &attributeName, const wst } } -bool AddItemRuleDefinition::addItemToContainer(shared_ptr container, int slotId) +bool AddItemRuleDefinition::addItemToContainer(std::shared_ptr container, int slotId) { bool added = false; if(Item::items[m_itemId] != NULL) { int quantity = min(m_quantity, Item::items[m_itemId]->getMaxStackSize()); - shared_ptr newItem = shared_ptr(new ItemInstance(m_itemId,quantity,m_auxValue) ); + std::shared_ptr newItem = std::shared_ptr(new ItemInstance(m_itemId,quantity,m_auxValue) ); newItem->set4JData(m_dataTag); for(AUTO_VAR(it, m_enchantments.begin()); it != m_enchantments.end(); ++it) diff --git a/Minecraft.Client/Build/Common/GameRules/AddItemRuleDefinition.h b/Minecraft.Client/Build/Common/GameRules/AddItemRuleDefinition.h index 602f2d824..01ac84eef 100644 --- a/Minecraft.Client/Build/Common/GameRules/AddItemRuleDefinition.h +++ b/Minecraft.Client/Build/Common/GameRules/AddItemRuleDefinition.h @@ -13,18 +13,18 @@ private: int m_auxValue; int m_dataTag; int m_slot; - vector m_enchantments; + std::vector m_enchantments; public: AddItemRuleDefinition(); virtual void writeAttributes(DataOutputStream *, UINT numAttributes); - virtual void getChildren(vector *children); + virtual void getChildren(std::vector *children); virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_AddItem; } virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType); - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); - bool addItemToContainer(shared_ptr container, int slotId); + bool addItemToContainer(std::shared_ptr container, int slotId); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/GameRules/ApplySchematicRuleDefinition.cpp b/Minecraft.Client/Build/Common/GameRules/ApplySchematicRuleDefinition.cpp index 03fc1b5c8..0bbd18dca 100644 --- a/Minecraft.Client/Build/Common/GameRules/ApplySchematicRuleDefinition.cpp +++ b/Minecraft.Client/Build/Common/GameRules/ApplySchematicRuleDefinition.cpp @@ -53,7 +53,7 @@ void ApplySchematicRuleDefinition::writeAttributes(DataOutputStream *dos, UINT n } } -void ApplySchematicRuleDefinition::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void ApplySchematicRuleDefinition::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"filename") == 0) { diff --git a/Minecraft.Client/Build/Common/GameRules/ApplySchematicRuleDefinition.h b/Minecraft.Client/Build/Common/GameRules/ApplySchematicRuleDefinition.h index 21c42dead..7cf307ae1 100644 --- a/Minecraft.Client/Build/Common/GameRules/ApplySchematicRuleDefinition.h +++ b/Minecraft.Client/Build/Common/GameRules/ApplySchematicRuleDefinition.h @@ -12,7 +12,7 @@ class ApplySchematicRuleDefinition : public GameRuleDefinition { private: LevelGenerationOptions *m_levelGenOptions; - wstring m_schematicName; + std::wstring m_schematicName; ConsoleSchematicFile *m_schematic; Vec3 *m_location; AABB *m_locationBox; @@ -31,7 +31,7 @@ public: virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_ApplySchematic; } virtual void writeAttributes(DataOutputStream *dos, UINT numAttrs); - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); void processSchematic(AABB *chunkBox, LevelChunk *chunk); void processSchematicLighting(AABB *chunkBox, LevelChunk *chunk); @@ -41,7 +41,7 @@ public: bool isComplete() { return m_completed; } - wstring getSchematicName() { return m_schematicName; } + std::wstring getSchematicName() { return m_schematicName; } /** 4J-JEV: * This GameRuleDefinition contains limited game state. diff --git a/Minecraft.Client/Build/Common/GameRules/BiomeOverride.cpp b/Minecraft.Client/Build/Common/GameRules/BiomeOverride.cpp index ef624bcb8..fb6256d70 100644 --- a/Minecraft.Client/Build/Common/GameRules/BiomeOverride.cpp +++ b/Minecraft.Client/Build/Common/GameRules/BiomeOverride.cpp @@ -21,7 +21,7 @@ void BiomeOverride::writeAttributes(DataOutputStream *dos, UINT numAttrs) dos->writeUTF(_toString(m_topTile)); } -void BiomeOverride::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void BiomeOverride::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"tileId") == 0) { diff --git a/Minecraft.Client/Build/Common/GameRules/BiomeOverride.h b/Minecraft.Client/Build/Common/GameRules/BiomeOverride.h index 5ad9263cf..6ce91bbd1 100644 --- a/Minecraft.Client/Build/Common/GameRules/BiomeOverride.h +++ b/Minecraft.Client/Build/Common/GameRules/BiomeOverride.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "GameRuleDefinition.h" @@ -16,7 +16,7 @@ public: virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_BiomeOverride; } virtual void writeAttributes(DataOutputStream *dos, UINT numAttrs); - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); bool isBiome(int id); void getTileValues(BYTE &tile, BYTE &topTile); diff --git a/Minecraft.Client/Build/Common/GameRules/CollectItemRuleDefinition.cpp b/Minecraft.Client/Build/Common/GameRules/CollectItemRuleDefinition.cpp index 4e118e68e..d4a7f2839 100644 --- a/Minecraft.Client/Build/Common/GameRules/CollectItemRuleDefinition.cpp +++ b/Minecraft.Client/Build/Common/GameRules/CollectItemRuleDefinition.cpp @@ -31,7 +31,7 @@ void CollectItemRuleDefinition::writeAttributes(DataOutputStream *dos, UINT numA dos->writeUTF( _toString( m_quantity ) ); } -void CollectItemRuleDefinition::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void CollectItemRuleDefinition::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"itemId") == 0) { @@ -74,7 +74,7 @@ void CollectItemRuleDefinition::populateGameRule(GameRulesInstance::EGameRulesIn GameRuleDefinition::populateGameRule(type, rule); } -bool CollectItemRuleDefinition::onCollectItem(GameRule *rule, shared_ptr item) +bool CollectItemRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr item) { bool statusChanged = false; if(item != NULL && item->id == m_itemId && item->getAuxValue() == m_auxValue && item->get4JData() == m_4JDataValue) @@ -94,7 +94,7 @@ bool CollectItemRuleDefinition::onCollectItem(GameRule *rule, shared_ptrgetConnection() != NULL) { - rule->getConnection()->send( shared_ptr( new UpdateGameRuleProgressPacket(getActionType(), this->m_descriptionId, m_itemId, m_auxValue, this->m_4JDataValue,NULL,0))); + rule->getConnection()->send( std::shared_ptr( new UpdateGameRuleProgressPacket(getActionType(), this->m_descriptionId, m_itemId, m_auxValue, this->m_4JDataValue,NULL,0))); } } } @@ -102,10 +102,10 @@ bool CollectItemRuleDefinition::onCollectItem(GameRule *rule, shared_ptr item) +std::wstring CollectItemRuleDefinition::generateXml(std::shared_ptr item) { // 4J Stu - This should be kept in sync with the GameRulesDefinition.xsd - wstring xml = L""; + std::wstring xml = L""; if(item != NULL) { xml = L"(item->id) + L"\" quantity=\"SET\" descriptionName=\"OPTIONAL\" promptName=\"OPTIONAL\""; diff --git a/Minecraft.Client/Build/Common/GameRules/CollectItemRuleDefinition.h b/Minecraft.Client/Build/Common/GameRules/CollectItemRuleDefinition.h index 5ee6f4c57..3a6b981c9 100644 --- a/Minecraft.Client/Build/Common/GameRules/CollectItemRuleDefinition.h +++ b/Minecraft.Client/Build/Common/GameRules/CollectItemRuleDefinition.h @@ -21,7 +21,7 @@ public: ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_CollectItemRule; } virtual void writeAttributes(DataOutputStream *, UINT numAttributes); - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); virtual int getGoal(); virtual int getProgress(GameRule *rule); @@ -31,10 +31,10 @@ public: void populateGameRule(GameRulesInstance::EGameRulesInstanceType type, GameRule *rule); - bool onCollectItem(GameRule *rule, shared_ptr item); + bool onCollectItem(GameRule *rule, std::shared_ptr item); - static wstring generateXml(shared_ptr item); + static std::wstring generateXml(std::shared_ptr item); private: - //static wstring generateXml(CollectItemRuleDefinition *ruleDef); + //static std::wstring generateXml(CollectItemRuleDefinition *ruleDef); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/GameRules/CompleteAllRuleDefinition.cpp b/Minecraft.Client/Build/Common/GameRules/CompleteAllRuleDefinition.cpp index 477264b36..69467b6e8 100644 --- a/Minecraft.Client/Build/Common/GameRules/CompleteAllRuleDefinition.cpp +++ b/Minecraft.Client/Build/Common/GameRules/CompleteAllRuleDefinition.cpp @@ -5,7 +5,7 @@ #include "../../../../Minecraft.World/Network/Connection.h" #include "../../../../Minecraft.World/Headers/net.minecraft.network.packet.h" -void CompleteAllRuleDefinition::getChildren(vector *children) +void CompleteAllRuleDefinition::getChildren(std::vector *children) { CompoundGameRuleDefinition::getChildren(children); } @@ -17,7 +17,7 @@ bool CompleteAllRuleDefinition::onUseTile(GameRule *rule, int tileId, int x, int return statusChanged; } -bool CompleteAllRuleDefinition::onCollectItem(GameRule *rule, shared_ptr item) +bool CompleteAllRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr item) { bool statusChanged = CompoundGameRuleDefinition::onCollectItem(rule,item); if(statusChanged) updateStatus(rule); @@ -51,15 +51,15 @@ void CompleteAllRuleDefinition::updateStatus(GameRule *rule) auxValue = m_lastRuleStatusChanged->getAuxValue(); m_lastRuleStatusChanged = NULL; } - rule->getConnection()->send( shared_ptr( new UpdateGameRuleProgressPacket(getActionType(), this->m_descriptionId,icon, auxValue, 0,&data,sizeof(PacketData)))); + rule->getConnection()->send( std::shared_ptr( new UpdateGameRuleProgressPacket(getActionType(), this->m_descriptionId,icon, auxValue, 0,&data,sizeof(PacketData)))); } app.DebugPrintf("Updated CompleteAllRule - Completed %d of %d\n", progress, goal); } -wstring CompleteAllRuleDefinition::generateDescriptionString(const wstring &description, void *data, int dataLength) +std::wstring CompleteAllRuleDefinition::generateDescriptionString(const std::wstring &description, void *data, int dataLength) { PacketData *values = (PacketData *)data; - wstring newDesc = description; + std::wstring newDesc = description; newDesc = replaceAll(newDesc,L"{*progress*}",_toString(values->progress)); newDesc = replaceAll(newDesc,L"{*goal*}",_toString(values->goal)); return newDesc; diff --git a/Minecraft.Client/Build/Common/GameRules/CompleteAllRuleDefinition.h b/Minecraft.Client/Build/Common/GameRules/CompleteAllRuleDefinition.h index b2cb8847f..dbf9365b8 100644 --- a/Minecraft.Client/Build/Common/GameRules/CompleteAllRuleDefinition.h +++ b/Minecraft.Client/Build/Common/GameRules/CompleteAllRuleDefinition.h @@ -14,12 +14,12 @@ private: public: ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_CompleteAllRule; } - virtual void getChildren(vector *children); + virtual void getChildren(std::vector *children); virtual bool onUseTile(GameRule *rule, int tileId, int x, int y, int z); - virtual bool onCollectItem(GameRule *rule, shared_ptr item); + virtual bool onCollectItem(GameRule *rule, std::shared_ptr item); - static wstring generateDescriptionString(const wstring &description, void *data, int dataLength); + static std::wstring generateDescriptionString(const std::wstring &description, void *data, int dataLength); private: void updateStatus(GameRule *rule); diff --git a/Minecraft.Client/Build/Common/GameRules/CompoundGameRuleDefinition.cpp b/Minecraft.Client/Build/Common/GameRules/CompoundGameRuleDefinition.cpp index 87eaf27f1..b7e7c67ad 100644 --- a/Minecraft.Client/Build/Common/GameRules/CompoundGameRuleDefinition.cpp +++ b/Minecraft.Client/Build/Common/GameRules/CompoundGameRuleDefinition.cpp @@ -17,7 +17,7 @@ CompoundGameRuleDefinition::~CompoundGameRuleDefinition() } } -void CompoundGameRuleDefinition::getChildren(vector *children) +void CompoundGameRuleDefinition::getChildren(std::vector *children) { GameRuleDefinition::getChildren(children); for (AUTO_VAR(it, m_children.begin()); it != m_children.end(); it++) @@ -91,7 +91,7 @@ bool CompoundGameRuleDefinition::onUseTile(GameRule *rule, int tileId, int x, in return statusChanged; } -bool CompoundGameRuleDefinition::onCollectItem(GameRule *rule, shared_ptr item) +bool CompoundGameRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr item) { bool statusChanged = false; for(AUTO_VAR(it, rule->m_parameters.begin()); it != rule->m_parameters.end(); ++it) @@ -109,7 +109,7 @@ bool CompoundGameRuleDefinition::onCollectItem(GameRule *rule, shared_ptr player) +void CompoundGameRuleDefinition::postProcessPlayer(std::shared_ptr player) { for(AUTO_VAR(it, m_children.begin()); it != m_children.end(); ++it) { diff --git a/Minecraft.Client/Build/Common/GameRules/CompoundGameRuleDefinition.h b/Minecraft.Client/Build/Common/GameRules/CompoundGameRuleDefinition.h index bfedfd092..ad13f67b9 100644 --- a/Minecraft.Client/Build/Common/GameRules/CompoundGameRuleDefinition.h +++ b/Minecraft.Client/Build/Common/GameRules/CompoundGameRuleDefinition.h @@ -5,19 +5,19 @@ class CompoundGameRuleDefinition : public GameRuleDefinition { protected: - vector m_children; + std::vector m_children; protected: GameRuleDefinition *m_lastRuleStatusChanged; public: CompoundGameRuleDefinition(); virtual ~CompoundGameRuleDefinition(); - virtual void getChildren(vector *children); + virtual void getChildren(std::vector *children); virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType); virtual void populateGameRule(GameRulesInstance::EGameRulesInstanceType type, GameRule *rule); virtual bool onUseTile(GameRule *rule, int tileId, int x, int y, int z); - virtual bool onCollectItem(GameRule *rule, shared_ptr item); - virtual void postProcessPlayer(shared_ptr player); + virtual bool onCollectItem(GameRule *rule, std::shared_ptr item); + virtual void postProcessPlayer(std::shared_ptr player); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/GameRules/ConsoleGenerateStructure.cpp b/Minecraft.Client/Build/Common/GameRules/ConsoleGenerateStructure.cpp index 6fdeb397d..8c2f27a2d 100644 --- a/Minecraft.Client/Build/Common/GameRules/ConsoleGenerateStructure.cpp +++ b/Minecraft.Client/Build/Common/GameRules/ConsoleGenerateStructure.cpp @@ -15,7 +15,7 @@ ConsoleGenerateStructure::ConsoleGenerateStructure() : StructurePiece(0) m_dimension = 0; } -void ConsoleGenerateStructure::getChildren(vector *children) +void ConsoleGenerateStructure::getChildren(std::vector *children) { GameRuleDefinition::getChildren(children); @@ -72,7 +72,7 @@ void ConsoleGenerateStructure::writeAttributes(DataOutputStream *dos, UINT numAt dos->writeUTF(_toString(m_dimension)); } -void ConsoleGenerateStructure::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void ConsoleGenerateStructure::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"x") == 0) { diff --git a/Minecraft.Client/Build/Common/GameRules/ConsoleGenerateStructure.h b/Minecraft.Client/Build/Common/GameRules/ConsoleGenerateStructure.h index f88fcb42b..717be3324 100644 --- a/Minecraft.Client/Build/Common/GameRules/ConsoleGenerateStructure.h +++ b/Minecraft.Client/Build/Common/GameRules/ConsoleGenerateStructure.h @@ -13,18 +13,18 @@ class ConsoleGenerateStructure : public GameRuleDefinition, public StructurePiec { private: int m_x, m_y, m_z; - vector m_actions; + std::vector m_actions; int m_dimension; public: ConsoleGenerateStructure(); virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_GenerateStructure; } - virtual void getChildren(vector *children); + virtual void getChildren(std::vector *children); virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType); virtual void writeAttributes(DataOutputStream *dos, UINT numAttrs); - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); // StructurePiece virtual BoundingBox *getBoundingBox(); diff --git a/Minecraft.Client/Build/Common/GameRules/ConsoleSchematicFile.cpp b/Minecraft.Client/Build/Common/GameRules/ConsoleSchematicFile.cpp index e9604f97b..b305bfc2a 100644 --- a/Minecraft.Client/Build/Common/GameRules/ConsoleSchematicFile.cpp +++ b/Minecraft.Client/Build/Common/GameRules/ConsoleSchematicFile.cpp @@ -116,7 +116,7 @@ void ConsoleSchematicFile::load(DataInputStream *dis) for (int i = 0; i < tileEntityTags->size(); i++) { CompoundTag *teTag = tileEntityTags->get(i); - shared_ptr te = TileEntity::loadStatic(teTag); + std::shared_ptr te = TileEntity::loadStatic(teTag); if(te == NULL) { @@ -433,7 +433,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox, { for(AUTO_VAR(it, m_tileEntities.begin()); it != m_tileEntities.end();++it) { - shared_ptr te = *it; + std::shared_ptr te = *it; double targetX = te->x; double targetY = te->y + destinationBox->y0; @@ -444,7 +444,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox, Vec3 *pos = Vec3::newTemp(targetX,targetY,targetZ); if( chunkBox->containsIncludingLowerBound(pos) ) { - shared_ptr teCopy = chunk->getTileEntity( (int)targetX & 15, (int)targetY & 15, (int)targetZ & 15 ); + std::shared_ptr teCopy = chunk->getTileEntity( (int)targetX & 15, (int)targetY & 15, (int)targetZ & 15 ); if ( teCopy != NULL ) { @@ -495,11 +495,11 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox, } CompoundTag *eTag = it->second; - shared_ptr e = EntityIO::loadStatic(eTag, NULL); + std::shared_ptr e = EntityIO::loadStatic(eTag, NULL); if( e->GetType() == eTYPE_PAINTING ) { - shared_ptr painting = dynamic_pointer_cast(e); + std::shared_ptr painting = dynamic_pointer_cast(e); double tileX = painting->xTile; double tileZ = painting->zTile; @@ -512,7 +512,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox, } else if( e->GetType() == eTYPE_ITEM_FRAME ) { - shared_ptr frame = dynamic_pointer_cast(e); + std::shared_ptr frame = dynamic_pointer_cast(e); double tileX = frame->xTile; double tileZ = frame->zTile; @@ -678,12 +678,12 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l { for (int zc = zc0; zc <= zc1; zc++) { - vector > *tileEntities = getTileEntitiesInRegion(level->getChunk(xc, zc), xStart, yStart, zStart, xStart + xSize, yStart + ySize, zStart + zSize); + std::vector > *tileEntities = getTileEntitiesInRegion(level->getChunk(xc, zc), xStart, yStart, zStart, xStart + xSize, yStart + ySize, zStart + zSize); for(AUTO_VAR(it, tileEntities->begin()); it != tileEntities->end(); ++it) { - shared_ptr te = *it; + std::shared_ptr te = *it; CompoundTag *teTag = new CompoundTag(); - shared_ptr teCopy = te->clone(); + std::shared_ptr teCopy = te->clone(); // Adjust the tileEntity position to schematic coords from world co-ords teCopy->x -= xStart; @@ -698,12 +698,12 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l tag.put(L"TileEntities", tileEntitiesTag); AABB *bb = AABB::newTemp(xStart,yStart,zStart,xEnd,yEnd,zEnd); - vector > *entities = level->getEntities(nullptr, bb); + std::vector > *entities = level->getEntities(nullptr, bb); ListTag *entitiesTag = new ListTag(L"entities"); for(AUTO_VAR(it, entities->begin()); it != entities->end(); ++it) { - shared_ptr e = *it; + std::shared_ptr e = *it; bool mobCanBeSaved = false; if(bSaveMobs) @@ -1005,12 +1005,12 @@ void ConsoleSchematicFile::setBlocksAndData(LevelChunk *chunk, byteArray blockDa } } -vector > *ConsoleSchematicFile::getTileEntitiesInRegion(LevelChunk *chunk, int x0, int y0, int z0, int x1, int y1, int z1) +std::vector > *ConsoleSchematicFile::getTileEntitiesInRegion(LevelChunk *chunk, int x0, int y0, int z0, int x1, int y1, int z1) { - vector > *result = new vector >; + std::vector > *result = new std::vector >; for (AUTO_VAR(it, chunk->tileEntities.begin()); it != chunk->tileEntities.end(); ++it) { - shared_ptr te = it->second; + std::shared_ptr te = it->second; if (te->x >= x0 && te->y >= y0 && te->z >= z0 && te->x < x1 && te->y < y1 && te->z < z1) { result->push_back(te); diff --git a/Minecraft.Client/Build/Common/GameRules/ConsoleSchematicFile.h b/Minecraft.Client/Build/Common/GameRules/ConsoleSchematicFile.h index c91a41cd3..787854d0c 100644 --- a/Minecraft.Client/Build/Common/GameRules/ConsoleSchematicFile.h +++ b/Minecraft.Client/Build/Common/GameRules/ConsoleSchematicFile.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #define XBOX_SCHEMATIC_ORIGINAL_VERSION 1 #define XBOX_SCHEMATIC_CURRENT_VERSION 2 @@ -55,8 +55,8 @@ public: } XboxSchematicInitParam; private: int m_xSize, m_ySize, m_zSize; - vector > m_tileEntities; - vector< pair > m_entities; + std::vector > m_tileEntities; + std::vector< pair > m_entities; public: byteArray m_data; @@ -83,7 +83,7 @@ private: void load_tags(DataInputStream *dis); static void getBlocksAndData(LevelChunk *chunk, byteArray *data, int x0, int y0, int z0, int x1, int y1, int z1, int &blocksP, int &dataP, int &blockLightP, int &skyLightP); - static vector > *getTileEntitiesInRegion(LevelChunk *chunk, int x0, int y0, int z0, int x1, int y1, int z1); + static std::vector > *getTileEntitiesInRegion(LevelChunk *chunk, int x0, int y0, int z0, int x1, int y1, int z1); void chunkCoordToSchematicCoord(AABB *destinationBox, int chunkX, int chunkZ, ESchematicRotation rot, int &schematicX, int &schematicZ); void schematicCoordToChunkCoord(AABB *destinationBox, double schematicX, double schematicZ, ESchematicRotation rot, double &chunkX, double &chunkZ); diff --git a/Minecraft.Client/Build/Common/GameRules/GameRule.cpp b/Minecraft.Client/Build/Common/GameRules/GameRule.cpp index 8e42aa5eb..d3c9a30a1 100644 --- a/Minecraft.Client/Build/Common/GameRules/GameRule.cpp +++ b/Minecraft.Client/Build/Common/GameRules/GameRule.cpp @@ -18,7 +18,7 @@ GameRule::~GameRule() } } -GameRule::ValueType GameRule::getParameter(const wstring ¶meterName) +GameRule::ValueType GameRule::getParameter(const std::wstring ¶meterName) { if(m_parameters.find(parameterName) == m_parameters.end()) { @@ -30,7 +30,7 @@ GameRule::ValueType GameRule::getParameter(const wstring ¶meterName) return m_parameters[parameterName]; } -void GameRule::setParameter(const wstring ¶meterName,ValueType value) +void GameRule::setParameter(const std::wstring ¶meterName,ValueType value) { if(m_parameters.find(parameterName) == m_parameters.end()) { @@ -53,7 +53,7 @@ GameRuleDefinition *GameRule::getGameRuleDefinition() } void GameRule::onUseTile(int tileId, int x, int y, int z) { m_definition->onUseTile(this,tileId,x,y,z); } -void GameRule::onCollectItem(shared_ptr item) { m_definition->onCollectItem(this,item); } +void GameRule::onCollectItem(std::shared_ptr item) { m_definition->onCollectItem(this,item); } void GameRule::write(DataOutputStream *dos) { @@ -61,7 +61,7 @@ void GameRule::write(DataOutputStream *dos) dos->writeInt(m_parameters.size()); for (AUTO_VAR(it, m_parameters.begin()); it != m_parameters.end(); it++) { - wstring pName = (*it).first; + std::wstring pName = (*it).first; ValueType vType = (*it).second; dos->writeUTF( (*it).first ); @@ -79,7 +79,7 @@ void GameRule::read(DataInputStream *dis) int savedParams = dis->readInt(); for (int i = 0; i < savedParams; i++) { - wstring pNames = dis->readUTF(); + std::wstring pNames = dis->readUTF(); ValueType vType = getParameter(pNames); diff --git a/Minecraft.Client/Build/Common/GameRules/GameRule.h b/Minecraft.Client/Build/Common/GameRules/GameRule.h index bdc2ceff5..33eb1348d 100644 --- a/Minecraft.Client/Build/Common/GameRules/GameRule.h +++ b/Minecraft.Client/Build/Common/GameRules/GameRule.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include @@ -36,7 +36,7 @@ private: Connection *m_connection; public: - typedef unordered_map stringValueMapType; + typedef std::unordered_map stringValueMapType; stringValueMapType m_parameters; // These are the members of this rule that maintain it's state public: @@ -45,17 +45,17 @@ public: Connection *getConnection() { return m_connection; } - ValueType getParameter(const wstring ¶meterName); - void setParameter(const wstring ¶meterName,ValueType value); + ValueType getParameter(const std::wstring ¶meterName); + void setParameter(const std::wstring ¶meterName,ValueType value); GameRuleDefinition *getGameRuleDefinition(); // All the hooks go here void onUseTile(int tileId, int x, int y, int z); - void onCollectItem(shared_ptr item); + void onCollectItem(std::shared_ptr item); // 4J-JEV: For saving. - //CompoundTag *toTags(unordered_map *map); - //static GameRule *fromTags(Connection *c, CompoundTag *cTag, vector *grds); + //CompoundTag *toTags(std::unordered_map *map); + //static GameRule *fromTags(Connection *c, CompoundTag *cTag, std::vector *grds); void write(DataOutputStream *dos); void read(DataInputStream *dos); diff --git a/Minecraft.Client/Build/Common/GameRules/GameRuleDefinition.cpp b/Minecraft.Client/Build/Common/GameRules/GameRuleDefinition.cpp index bc20a7263..4a0a52360 100644 --- a/Minecraft.Client/Build/Common/GameRules/GameRuleDefinition.cpp +++ b/Minecraft.Client/Build/Common/GameRules/GameRuleDefinition.cpp @@ -20,7 +20,7 @@ void GameRuleDefinition::write(DataOutputStream *dos) writeAttributes(dos, 0); // 4J-JEV: Get children. - vector *children = new vector(); + std::vector *children = new std::vector(); getChildren( children ); // Write children. @@ -43,7 +43,7 @@ void GameRuleDefinition::writeAttributes(DataOutputStream *dos, UINT numAttribut dos->writeUTF(_toString(m_4JDataValue)); } -void GameRuleDefinition::getChildren(vector *children) {} +void GameRuleDefinition::getChildren(std::vector *children) {} GameRuleDefinition *GameRuleDefinition::addChild(ConsoleGameRules::EGameRuleType ruleType) { @@ -53,7 +53,7 @@ GameRuleDefinition *GameRuleDefinition::addChild(ConsoleGameRules::EGameRuleType return NULL; } -void GameRuleDefinition::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void GameRuleDefinition::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"descriptionName") == 0) { @@ -104,23 +104,23 @@ void GameRuleDefinition::setComplete(GameRule *rule, bool val) rule->setParameter(L"bComplete",value); } -vector *GameRuleDefinition::enumerate() +std::vector *GameRuleDefinition::enumerate() { // Get Vector. - vector *gRules; - gRules = new vector(); + std::vector *gRules; + gRules = new std::vector(); gRules->push_back(this); getChildren(gRules); return gRules; } -unordered_map *GameRuleDefinition::enumerateMap() +std::unordered_map *GameRuleDefinition::enumerateMap() { - unordered_map *out - = new unordered_map(); + std::unordered_map *out + = new std::unordered_map(); int i = 0; - vector *gRules = enumerate(); + std::vector *gRules = enumerate(); for (AUTO_VAR(it, gRules->begin()); it != gRules->end(); it++) out->insert( pair( *it, i++ ) ); @@ -136,9 +136,9 @@ GameRulesInstance *GameRuleDefinition::generateNewGameRulesInstance(GameRulesIns return manager; } -wstring GameRuleDefinition::generateDescriptionString(ConsoleGameRules::EGameRuleType defType, const wstring &description, void *data, int dataLength) +std::wstring GameRuleDefinition::generateDescriptionString(ConsoleGameRules::EGameRuleType defType, const std::wstring &description, void *data, int dataLength) { - wstring formatted = description; + std::wstring formatted = description; switch(defType) { case ConsoleGameRules::eGameRuleType_CompleteAllRule: diff --git a/Minecraft.Client/Build/Common/GameRules/GameRuleDefinition.h b/Minecraft.Client/Build/Common/GameRules/GameRuleDefinition.h index fb93248d8..05d567db0 100644 --- a/Minecraft.Client/Build/Common/GameRules/GameRuleDefinition.h +++ b/Minecraft.Client/Build/Common/GameRules/GameRuleDefinition.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include #include @@ -21,8 +21,8 @@ private: protected: // These attributes should map to those in the XSD GameRuleType - wstring m_descriptionId; - wstring m_promptId; + std::wstring m_descriptionId; + std::wstring m_promptId; int m_4JDataValue; public: @@ -35,10 +35,10 @@ public: virtual void write(DataOutputStream *); virtual void writeAttributes(DataOutputStream *dos, UINT numAttributes); - virtual void getChildren(vector *); + virtual void getChildren(std::vector *); virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType); - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); virtual void populateGameRule(GameRulesInstance::EGameRulesInstanceType type, GameRule *rule); @@ -53,14 +53,14 @@ public: // Here we should have functions for all the hooks, with a GameRule* as the first parameter virtual bool onUseTile(GameRule *rule, int tileId, int x, int y, int z) { return false; } - virtual bool onCollectItem(GameRule *rule, shared_ptr item) { return false; } - virtual void postProcessPlayer(shared_ptr player) { } + virtual bool onCollectItem(GameRule *rule, std::shared_ptr item) { return false; } + virtual void postProcessPlayer(std::shared_ptr player) { } - vector *enumerate(); - unordered_map *enumerateMap(); + std::vector *enumerate(); + std::unordered_map *enumerateMap(); // Static functions static GameRulesInstance *generateNewGameRulesInstance(GameRulesInstance::EGameRulesInstanceType type, LevelRuleset *rules, Connection *connection); - static wstring generateDescriptionString(ConsoleGameRules::EGameRuleType defType, const wstring &description, void *data = NULL, int dataLength = 0); + static std::wstring generateDescriptionString(ConsoleGameRules::EGameRuleType defType, const std::wstring &description, void *data = NULL, int dataLength = 0); }; diff --git a/Minecraft.Client/Build/Common/GameRules/GameRuleManager.cpp b/Minecraft.Client/Build/Common/GameRules/GameRuleManager.cpp index 86f2f0851..30493a22f 100644 --- a/Minecraft.Client/Build/Common/GameRules/GameRuleManager.cpp +++ b/Minecraft.Client/Build/Common/GameRules/GameRuleManager.cpp @@ -347,12 +347,12 @@ void GameRuleManager::writeRuleFile(DataOutputStream *dos) for (int i = 0; i < ConsoleGameRules::eGameRuleAttr_Count; i++) dos->writeUTF( wchAttrNameA[i] ); // Write schematic files. - unordered_map *files; + std::unordered_map *files; files = getLevelGenerationOptions()->getUnfinishedSchematicFiles(); dos->writeInt( files->size() ); for (AUTO_VAR(it, files->begin()); it != files->end(); it++) { - wstring filename = it->first; + std::wstring filename = it->first; ConsoleSchematicFile *file = it->second; ByteArrayOutputStream fileBaos; @@ -470,18 +470,18 @@ bool GameRuleManager::readRuleFile(LevelGenerationOptions *lgo, uint8_t *dIn, UI // string lookup. UINT numStrings = contentDis->readInt(); - vector tagsAndAtts; + std::vector tagsAndAtts; for (UINT i = 0; i < numStrings; i++) tagsAndAtts.push_back( contentDis->readUTF() ); - unordered_map tagIdMap; + std::unordered_map tagIdMap; for(int type = (int)ConsoleGameRules::eGameRuleType_Root; type < (int)ConsoleGameRules::eGameRuleType_Count; ++type) { for(UINT i = 0; i < numStrings; ++i) { if(tagsAndAtts[i].compare(wchTagNameA[type]) == 0) { - tagIdMap.insert( unordered_map::value_type(i, (ConsoleGameRules::EGameRuleType)type) ); + tagIdMap.insert( std::unordered_map::value_type(i, (ConsoleGameRules::EGameRuleType)type) ); break; } } @@ -489,14 +489,14 @@ bool GameRuleManager::readRuleFile(LevelGenerationOptions *lgo, uint8_t *dIn, UI // 4J-JEV: TODO: As yet unused. /* - unordered_map attrIdMap; + std::unordered_map attrIdMap; for(int attr = (int)ConsoleGameRules::eGameRuleAttr_descriptionName; attr < (int)ConsoleGameRules::eGameRuleAttr_Count; ++attr) { for (UINT i = 0; i < numStrings; i++) { if (tagsAndAtts[i].compare(wchAttrNameA[attr]) == 0) { - tagIdMap.insert( unordered_map::value_type(i , (ConsoleGameRules::EGameRuleAttr)attr) ); + tagIdMap.insert( std::unordered_map::value_type(i , (ConsoleGameRules::EGameRuleAttr)attr) ); break; } } @@ -506,7 +506,7 @@ bool GameRuleManager::readRuleFile(LevelGenerationOptions *lgo, uint8_t *dIn, UI UINT numFiles = contentDis->readInt(); for (UINT i = 0; i < numFiles; i++) { - wstring sFilename = contentDis->readUTF(); + std::wstring sFilename = contentDis->readUTF(); int length = contentDis->readInt(); byteArray ba( length ); @@ -581,19 +581,19 @@ LevelGenerationOptions *GameRuleManager::readHeader(DLCGameRulesHeader *grh) return out; } -void GameRuleManager::readAttributes(DataInputStream *dis, vector *tagsAndAtts, GameRuleDefinition *rule) +void GameRuleManager::readAttributes(DataInputStream *dis, std::vector *tagsAndAtts, GameRuleDefinition *rule) { int numAttrs = dis->readInt(); for (UINT att = 0; att < numAttrs; ++att) { int attID = dis->readInt(); - wstring value = dis->readUTF(); + std::wstring value = dis->readUTF(); if(rule != NULL) rule->addAttribute(tagsAndAtts->at(attID),value); } } -void GameRuleManager::readChildren(DataInputStream *dis, vector *tagsAndAtts, unordered_map *tagIdMap, GameRuleDefinition *rule) +void GameRuleManager::readChildren(DataInputStream *dis, std::vector *tagsAndAtts, std::unordered_map *tagIdMap, GameRuleDefinition *rule) { int numChildren = dis->readInt(); for(UINT child = 0; child < numChildren; ++child) @@ -633,9 +633,9 @@ void GameRuleManager::loadDefaultGameRules() { #ifdef _XBOX #ifdef _TU_BUILD - wstring fileRoot = L"UPDATE:\\res\\GameRules\\Tutorial.pck"; + std::wstring fileRoot = L"UPDATE:\\res\\GameRules\\Tutorial.pck"; #else - wstring fileRoot = L"GAME:\\res\\TitleUpdate\\GameRules\\Tutorial.pck"; + std::wstring fileRoot = L"GAME:\\res\\TitleUpdate\\GameRules\\Tutorial.pck"; #endif File packedTutorialFile(fileRoot); if(loadGameRulesPack(&packedTutorialFile)) @@ -648,7 +648,7 @@ void GameRuleManager::loadDefaultGameRules() #ifndef _CONTENT_PACKAGE // 4J Stu - Remove these just now //File testRulesPath(L"GAME:\\GameRules"); - //vector *packFiles = testRulesPath.listFiles(); + //std::vector *packFiles = testRulesPath.listFiles(); //for(AUTO_VAR(it,packFiles->begin()); it != packFiles->end(); ++it) //{ @@ -659,7 +659,7 @@ void GameRuleManager::loadDefaultGameRules() #else // _XBOX - wstring fpTutorial = L"Tutorial.pck"; + std::wstring fpTutorial = L"Tutorial.pck"; if(app.getArchiveFileSize(fpTutorial) >= 0) { DLCPack *pack = new DLCPack(L"",0xffffffff); @@ -749,7 +749,7 @@ void GameRuleManager::setLevelGenerationOptions(LevelGenerationOptions *levelGen m_currentLevelGenerationOptions->reset_start(); } -LPCWSTR GameRuleManager::GetGameRulesString(const wstring &key) +LPCWSTR GameRuleManager::GetGameRulesString(const std::wstring &key) { if(m_currentGameRuleDefinitions != NULL && !key.empty() ) { @@ -763,7 +763,7 @@ LPCWSTR GameRuleManager::GetGameRulesString(const wstring &key) LEVEL_GEN_ID GameRuleManager::addLevelGenerationOptions(LevelGenerationOptions *lgo) { - vector *lgs = m_levelGenerators.getLevelGenerators(); + std::vector *lgs = m_levelGenerators.getLevelGenerators(); for (int i = 0; isize(); i++) if (lgs->at(i) == lgo) diff --git a/Minecraft.Client/Build/Common/GameRules/GameRuleManager.h b/Minecraft.Client/Build/Common/GameRules/GameRuleManager.h index 481fc723d..8d55510af 100644 --- a/Minecraft.Client/Build/Common/GameRules/GameRuleManager.h +++ b/Minecraft.Client/Build/Common/GameRules/GameRuleManager.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +////using namespace std; #include "LevelGenerators.h" #include "LevelRules.h" @@ -54,8 +54,8 @@ public: bool readRuleFile(LevelGenerationOptions *lgo, uint8_t *dIn, UINT dSize, StringTable *strings); //(DLCGameRulesFile *dlcFile, StringTable *strings); private: - void readAttributes(DataInputStream *dis, vector *tagsAndAtts, GameRuleDefinition *rule); - void readChildren(DataInputStream *dis, vector *tagsAndAtts, unordered_map *tagIdMap, GameRuleDefinition *rule); + void readAttributes(DataInputStream *dis, std::vector *tagsAndAtts, GameRuleDefinition *rule); + void readChildren(DataInputStream *dis, std::vector *tagsAndAtts, std::unordered_map *tagIdMap, GameRuleDefinition *rule); public: void processSchematics(LevelChunk *levelChunk); @@ -68,11 +68,11 @@ private: LEVEL_GEN_ID addLevelGenerationOptions(LevelGenerationOptions *); public: - vector *getLevelGenerators() { return m_levelGenerators.getLevelGenerators(); } + std::vector *getLevelGenerators() { return m_levelGenerators.getLevelGenerators(); } void setLevelGenerationOptions(LevelGenerationOptions *levelGen); LevelRuleset *getGameRuleDefinitions() { return m_currentGameRuleDefinitions; } LevelGenerationOptions *getLevelGenerationOptions() { return m_currentLevelGenerationOptions; } - LPCWSTR GetGameRulesString(const wstring &key); + LPCWSTR GetGameRulesString(const std::wstring &key); // 4J-JEV: // Properly cleans-up and unloads the current set of gameRules. diff --git a/Minecraft.Client/Build/Common/GameRules/GameRulesInstance.h b/Minecraft.Client/Build/Common/GameRules/GameRulesInstance.h index 064e086d8..c2c79547c 100644 --- a/Minecraft.Client/Build/Common/GameRules/GameRulesInstance.h +++ b/Minecraft.Client/Build/Common/GameRules/GameRulesInstance.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include #include "GameRule.h" diff --git a/Minecraft.Client/Build/Common/GameRules/LevelGenerationOptions.cpp b/Minecraft.Client/Build/Common/GameRules/LevelGenerationOptions.cpp index e84cd292f..376ca9676 100644 --- a/Minecraft.Client/Build/Common/GameRules/LevelGenerationOptions.cpp +++ b/Minecraft.Client/Build/Common/GameRules/LevelGenerationOptions.cpp @@ -24,20 +24,20 @@ JustGrSource::JustGrSource() bool JustGrSource::requiresTexturePack() {return m_bRequiresTexturePack;} UINT JustGrSource::getRequiredTexturePackId() {return m_requiredTexturePackId;} -wstring JustGrSource::getDefaultSaveName() {return m_defaultSaveName;} +std::wstring JustGrSource::getDefaultSaveName() {return m_defaultSaveName;} LPCWSTR JustGrSource::getWorldName() {return m_worldName.c_str();} LPCWSTR JustGrSource::getDisplayName() {return m_displayName.c_str();} -wstring JustGrSource::getGrfPath() {return m_grfPath;} +std::wstring JustGrSource::getGrfPath() {return m_grfPath;} bool JustGrSource::requiresBaseSave() { return m_bRequiresBaseSave; }; -wstring JustGrSource::getBaseSavePath() { return m_baseSavePath; }; +std::wstring JustGrSource::getBaseSavePath() { return m_baseSavePath; }; void JustGrSource::setRequiresTexturePack(bool x) {m_bRequiresTexturePack = x;} void JustGrSource::setRequiredTexturePackId(UINT x) {m_requiredTexturePackId = x;} -void JustGrSource::setDefaultSaveName(const wstring &x) {m_defaultSaveName = x;} -void JustGrSource::setWorldName(const wstring &x) {m_worldName = x;} -void JustGrSource::setDisplayName(const wstring &x) {m_displayName = x;} -void JustGrSource::setGrfPath(const wstring &x) {m_grfPath = x;} -void JustGrSource::setBaseSavePath(const wstring &x) { m_baseSavePath = x; m_bRequiresBaseSave = true; } +void JustGrSource::setDefaultSaveName(const std::wstring &x) {m_defaultSaveName = x;} +void JustGrSource::setWorldName(const std::wstring &x) {m_worldName = x;} +void JustGrSource::setDisplayName(const std::wstring &x) {m_displayName = x;} +void JustGrSource::setGrfPath(const std::wstring &x) {m_grfPath = x;} +void JustGrSource::setBaseSavePath(const std::wstring &x) { m_baseSavePath = x; m_bRequiresBaseSave = true; } bool JustGrSource::ready() { return true; } @@ -107,11 +107,11 @@ void LevelGenerationOptions::writeAttributes(DataOutputStream *dos, UINT numAttr dos->writeUTF(_toString(m_useFlatWorld)); } -void LevelGenerationOptions::getChildren(vector *children) +void LevelGenerationOptions::getChildren(std::vector *children) { GameRuleDefinition::getChildren(children); - vector used_schematics; + std::vector used_schematics; for (AUTO_VAR(it, m_schematicRules.begin()); it != m_schematicRules.end(); it++) if ( !(*it)->isComplete() ) used_schematics.push_back( *it ); @@ -158,7 +158,7 @@ GameRuleDefinition *LevelGenerationOptions::addChild(ConsoleGameRules::EGameRule return rule; } -void LevelGenerationOptions::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void LevelGenerationOptions::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"seed") == 0) { @@ -193,21 +193,21 @@ void LevelGenerationOptions::addAttribute(const wstring &attributeName, const ws } else if(attributeName.compare(L"saveName") == 0) { - wstring string(getString(attributeValue)); + std::wstring string(getString(attributeValue)); if(!string.empty()) setDefaultSaveName( string ); else setDefaultSaveName( attributeValue ); app.DebugPrintf("LevelGenerationOptions: Adding parameter saveName=%ls\n", getDefaultSaveName().c_str()); } else if(attributeName.compare(L"worldName") == 0) { - wstring string(getString(attributeValue)); + std::wstring string(getString(attributeValue)); if(!string.empty()) setWorldName( string ); else setWorldName( attributeValue ); app.DebugPrintf("LevelGenerationOptions: Adding parameter worldName=%ls\n", getWorldName()); } else if(attributeName.compare(L"displayName") == 0) { - wstring string(getString(attributeValue)); + std::wstring string(getString(attributeValue)); if(!string.empty()) setDisplayName( string ); else setDisplayName( attributeValue ); app.DebugPrintf("LevelGenerationOptions: Adding parameter displayName=%ls\n", getDisplayName()); @@ -331,7 +331,7 @@ void LevelGenerationOptions::clearSchematics() m_schematics.clear(); } -ConsoleSchematicFile *LevelGenerationOptions::loadSchematicFile(const wstring &filename, PBYTE pbData, DWORD dwLen) +ConsoleSchematicFile *LevelGenerationOptions::loadSchematicFile(const std::wstring &filename, PBYTE pbData, DWORD dwLen) { // If we have already loaded this, just return AUTO_VAR(it, m_schematics.find(filename)); @@ -355,7 +355,7 @@ ConsoleSchematicFile *LevelGenerationOptions::loadSchematicFile(const wstring &f return schematic; } -ConsoleSchematicFile *LevelGenerationOptions::getSchematicFile(const wstring &filename) +ConsoleSchematicFile *LevelGenerationOptions::getSchematicFile(const std::wstring &filename) { ConsoleSchematicFile *schematic = NULL; // If we have already loaded this, just return @@ -367,7 +367,7 @@ ConsoleSchematicFile *LevelGenerationOptions::getSchematicFile(const wstring &fi return schematic; } -void LevelGenerationOptions::releaseSchematicFile(const wstring &filename) +void LevelGenerationOptions::releaseSchematicFile(const std::wstring &filename) { // 4J Stu - We don't want to delete them when done, but probably want to keep a set of active schematics for the current world //AUTO_VAR(it, m_schematics.find(filename)); @@ -388,7 +388,7 @@ void LevelGenerationOptions::loadStringTable(StringTable *table) m_stringTable = table; } -LPCWSTR LevelGenerationOptions::getString(const wstring &key) +LPCWSTR LevelGenerationOptions::getString(const std::wstring &key) { if(m_stringTable == NULL) { @@ -429,19 +429,19 @@ bool LevelGenerationOptions::isFeatureChunk(int chunkX, int chunkZ, StructureFea return isFeature; } -unordered_map *LevelGenerationOptions::getUnfinishedSchematicFiles() +std::unordered_map *LevelGenerationOptions::getUnfinishedSchematicFiles() { // Clean schematic rules. - unordered_set usedFiles = unordered_set(); + unordered_set usedFiles = unordered_set(); for (AUTO_VAR(it, m_schematicRules.begin()); it!=m_schematicRules.end(); it++) if ( !(*it)->isComplete() ) usedFiles.insert( (*it)->getSchematicName() ); // Clean schematic files. - unordered_map *out - = new unordered_map(); + std::unordered_map *out + = new std::unordered_map(); for (AUTO_VAR(it, usedFiles.begin()); it!=usedFiles.end(); it++) - out->insert( pair(*it, getSchematicFile(*it)) ); + out->insert( pair(*it, getSchematicFile(*it)) ); return out; } @@ -478,22 +478,22 @@ bool LevelGenerationOptions::isFromDLC() { return getSrc() == eSrc_fromDLC; } bool LevelGenerationOptions::requiresTexturePack() { return info()->requiresTexturePack(); } UINT LevelGenerationOptions::getRequiredTexturePackId() { return info()->getRequiredTexturePackId(); } -wstring LevelGenerationOptions::getDefaultSaveName() { return info()->getDefaultSaveName(); } +std::wstring LevelGenerationOptions::getDefaultSaveName() { return info()->getDefaultSaveName(); } LPCWSTR LevelGenerationOptions::getWorldName() { return info()->getWorldName(); } LPCWSTR LevelGenerationOptions::getDisplayName() { return info()->getDisplayName(); } -wstring LevelGenerationOptions::getGrfPath() { return info()->getGrfPath(); } +std::wstring LevelGenerationOptions::getGrfPath() { return info()->getGrfPath(); } bool LevelGenerationOptions::requiresBaseSave() { return info()->requiresBaseSave(); } -wstring LevelGenerationOptions::getBaseSavePath() { return info()->getBaseSavePath(); } +std::wstring LevelGenerationOptions::getBaseSavePath() { return info()->getBaseSavePath(); } void LevelGenerationOptions::setGrSource(GrSource *grs) { m_pSrc = grs; } void LevelGenerationOptions::setRequiresTexturePack(bool x) { info()->setRequiresTexturePack(x); } void LevelGenerationOptions::setRequiredTexturePackId(UINT x) { info()->setRequiredTexturePackId(x); } -void LevelGenerationOptions::setDefaultSaveName(const wstring &x) { info()->setDefaultSaveName(x); } -void LevelGenerationOptions::setWorldName(const wstring &x) { info()->setWorldName(x); } -void LevelGenerationOptions::setDisplayName(const wstring &x) { info()->setDisplayName(x); } -void LevelGenerationOptions::setGrfPath(const wstring &x) { info()->setGrfPath(x); } -void LevelGenerationOptions::setBaseSavePath(const wstring &x) { info()->setBaseSavePath(x); } +void LevelGenerationOptions::setDefaultSaveName(const std::wstring &x) { info()->setDefaultSaveName(x); } +void LevelGenerationOptions::setWorldName(const std::wstring &x) { info()->setWorldName(x); } +void LevelGenerationOptions::setDisplayName(const std::wstring &x) { info()->setDisplayName(x); } +void LevelGenerationOptions::setGrfPath(const std::wstring &x) { info()->setGrfPath(x); } +void LevelGenerationOptions::setBaseSavePath(const std::wstring &x) { info()->setBaseSavePath(x); } bool LevelGenerationOptions::ready() { return info()->ready(); } diff --git a/Minecraft.Client/Build/Common/GameRules/LevelGenerationOptions.h b/Minecraft.Client/Build/Common/GameRules/LevelGenerationOptions.h index b75c2119f..c64409845 100644 --- a/Minecraft.Client/Build/Common/GameRules/LevelGenerationOptions.h +++ b/Minecraft.Client/Build/Common/GameRules/LevelGenerationOptions.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; // #pragma message("LevelGenerationOptions.h ") @@ -24,20 +24,20 @@ public: virtual bool requiresTexturePack()=0; virtual UINT getRequiredTexturePackId()=0; - virtual wstring getDefaultSaveName()=0; + virtual std::wstring getDefaultSaveName()=0; virtual LPCWSTR getWorldName()=0; virtual LPCWSTR getDisplayName()=0; - virtual wstring getGrfPath()=0; + virtual std::wstring getGrfPath()=0; virtual bool requiresBaseSave() = 0; - virtual wstring getBaseSavePath() = 0; + virtual std::wstring getBaseSavePath() = 0; virtual void setRequiresTexturePack(bool)=0; virtual void setRequiredTexturePackId(UINT)=0; - virtual void setDefaultSaveName(const wstring &)=0; - virtual void setWorldName(const wstring &)=0; - virtual void setDisplayName(const wstring &)=0; - virtual void setGrfPath(const wstring &)=0; - virtual void setBaseSavePath(const wstring &)=0; + virtual void setDefaultSaveName(const std::wstring &)=0; + virtual void setWorldName(const std::wstring &)=0; + virtual void setDisplayName(const std::wstring &)=0; + virtual void setGrfPath(const std::wstring &)=0; + virtual void setBaseSavePath(const std::wstring &)=0; virtual bool ready()=0; @@ -47,32 +47,32 @@ public: class JustGrSource : public GrSource { protected: - wstring m_worldName; - wstring m_displayName; - wstring m_defaultSaveName; + std::wstring m_worldName; + std::wstring m_displayName; + std::wstring m_defaultSaveName; bool m_bRequiresTexturePack; int m_requiredTexturePackId; - wstring m_grfPath; - wstring m_baseSavePath; + std::wstring m_grfPath; + std::wstring m_baseSavePath; bool m_bRequiresBaseSave; public: virtual bool requiresTexturePack(); virtual UINT getRequiredTexturePackId(); - virtual wstring getDefaultSaveName(); + virtual std::wstring getDefaultSaveName(); virtual LPCWSTR getWorldName(); virtual LPCWSTR getDisplayName(); - virtual wstring getGrfPath(); + virtual std::wstring getGrfPath(); virtual bool requiresBaseSave(); - virtual wstring getBaseSavePath(); + virtual std::wstring getBaseSavePath(); virtual void setRequiresTexturePack(bool x); virtual void setRequiredTexturePackId(UINT x); - virtual void setDefaultSaveName(const wstring &x); - virtual void setWorldName(const wstring &x); - virtual void setDisplayName(const wstring &x); - virtual void setGrfPath(const wstring &x); - virtual void setBaseSavePath(const wstring &x); + virtual void setDefaultSaveName(const std::wstring &x); + virtual void setWorldName(const std::wstring &x); + virtual void setDisplayName(const std::wstring &x); + virtual void setGrfPath(const std::wstring &x); + virtual void setBaseSavePath(const std::wstring &x); virtual bool ready(); @@ -117,22 +117,22 @@ public: bool requiresTexturePack(); UINT getRequiredTexturePackId(); - wstring getDefaultSaveName(); + std::wstring getDefaultSaveName(); LPCWSTR getWorldName(); LPCWSTR getDisplayName(); - wstring getGrfPath(); + std::wstring getGrfPath(); bool requiresBaseSave(); - wstring getBaseSavePath(); + std::wstring getBaseSavePath(); void setGrSource(GrSource *grs); void setRequiresTexturePack(bool x); void setRequiredTexturePackId(UINT x); - void setDefaultSaveName(const wstring &x); - void setWorldName(const wstring &x); - void setDisplayName(const wstring &x); - void setGrfPath(const wstring &x); - void setBaseSavePath(const wstring &x); + void setDefaultSaveName(const std::wstring &x); + void setWorldName(const std::wstring &x); + void setDisplayName(const std::wstring &x); + void setGrfPath(const std::wstring &x); + void setBaseSavePath(const std::wstring &x); bool ready(); @@ -149,13 +149,13 @@ private: __int64 m_seed; bool m_useFlatWorld; Pos *m_spawnPos; - vector m_schematicRules; - vector m_structureRules; + std::vector m_schematicRules; + std::vector m_structureRules; bool m_bHaveMinY; int m_minY; - unordered_map m_schematics; - vector m_biomeOverrides; - vector m_features; + std::unordered_map m_schematics; + std::vector m_biomeOverrides; + std::vector m_features; bool m_bRequiresGameRules; LevelRuleset *m_requiredGameRules; @@ -169,9 +169,9 @@ public: virtual ConsoleGameRules::EGameRuleType getActionType(); virtual void writeAttributes(DataOutputStream *dos, UINT numAttributes); - virtual void getChildren(vector *children); + virtual void getChildren(std::vector *children); virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType); - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); __int64 getLevelSeed(); Pos *getSpawnPos(); @@ -186,11 +186,11 @@ private: void clearSchematics(); public: - ConsoleSchematicFile *loadSchematicFile(const wstring &filename, PBYTE pbData, DWORD dwLen); + ConsoleSchematicFile *loadSchematicFile(const std::wstring &filename, PBYTE pbData, DWORD dwLen); public: - ConsoleSchematicFile *getSchematicFile(const wstring &filename); - void releaseSchematicFile(const wstring &filename); + ConsoleSchematicFile *getSchematicFile(const std::wstring &filename); + void releaseSchematicFile(const std::wstring &filename); bool requiresGameRules(); void setRequiredGameRules(LevelRuleset *rules); @@ -200,9 +200,9 @@ public: bool isFeatureChunk(int chunkX, int chunkZ, StructureFeature::EFeatureTypes feature); void loadStringTable(StringTable *table); - LPCWSTR getString(const wstring &key); + LPCWSTR getString(const std::wstring &key); - unordered_map *getUnfinishedSchematicFiles(); + std::unordered_map *getUnfinishedSchematicFiles(); // 4J-JEV: // ApplySchematicRules contain limited state diff --git a/Minecraft.Client/Build/Common/GameRules/LevelGenerators.cpp b/Minecraft.Client/Build/Common/GameRules/LevelGenerators.cpp index 362383f92..a92a208e6 100644 --- a/Minecraft.Client/Build/Common/GameRules/LevelGenerators.cpp +++ b/Minecraft.Client/Build/Common/GameRules/LevelGenerators.cpp @@ -7,7 +7,7 @@ LevelGenerators::LevelGenerators() { } -void LevelGenerators::addLevelGenerator(const wstring &displayName, LevelGenerationOptions *generator) +void LevelGenerators::addLevelGenerator(const std::wstring &displayName, LevelGenerationOptions *generator) { if(!displayName.empty()) generator->setDisplayName(displayName); m_levelGenerators.push_back(generator); @@ -15,7 +15,7 @@ void LevelGenerators::addLevelGenerator(const wstring &displayName, LevelGenerat void LevelGenerators::removeLevelGenerator(LevelGenerationOptions *generator) { - vector::iterator it; + std::vector::iterator it; while ( (it = find( m_levelGenerators.begin(), m_levelGenerators.end(), generator ) ) diff --git a/Minecraft.Client/Build/Common/GameRules/LevelGenerators.h b/Minecraft.Client/Build/Common/GameRules/LevelGenerators.h index 824b83875..ac05ee857 100644 --- a/Minecraft.Client/Build/Common/GameRules/LevelGenerators.h +++ b/Minecraft.Client/Build/Common/GameRules/LevelGenerators.h @@ -1,19 +1,19 @@ #pragma once -using namespace std; +//using namespace std; class LevelGenerationOptions; class LevelGenerators { private: - vector m_levelGenerators; + std::vector m_levelGenerators; public: LevelGenerators(); - void addLevelGenerator(const wstring &displayName, LevelGenerationOptions *generator); + void addLevelGenerator(const std::wstring &displayName, LevelGenerationOptions *generator); void removeLevelGenerator(LevelGenerationOptions *generator); - vector *getLevelGenerators() { return &m_levelGenerators; } + std::vector *getLevelGenerators() { return &m_levelGenerators; } }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/GameRules/LevelRules.cpp b/Minecraft.Client/Build/Common/GameRules/LevelRules.cpp index 9520cf996..141edd11c 100644 --- a/Minecraft.Client/Build/Common/GameRules/LevelRules.cpp +++ b/Minecraft.Client/Build/Common/GameRules/LevelRules.cpp @@ -6,11 +6,11 @@ LevelRules::LevelRules() { } -void LevelRules::addLevelRule(const wstring &displayName, PBYTE pbData, DWORD dwLen) +void LevelRules::addLevelRule(const std::wstring &displayName, PBYTE pbData, DWORD dwLen) { } -void LevelRules::addLevelRule(const wstring &displayName, LevelRuleset *rootRule) +void LevelRules::addLevelRule(const std::wstring &displayName, LevelRuleset *rootRule) { } diff --git a/Minecraft.Client/Build/Common/GameRules/LevelRules.h b/Minecraft.Client/Build/Common/GameRules/LevelRules.h index a94a2123b..e88cd5dac 100644 --- a/Minecraft.Client/Build/Common/GameRules/LevelRules.h +++ b/Minecraft.Client/Build/Common/GameRules/LevelRules.h @@ -7,8 +7,8 @@ class LevelRules public: LevelRules(); - void addLevelRule(const wstring &displayName, PBYTE pbData, DWORD dwLen); - void addLevelRule(const wstring &displayName, LevelRuleset *rootRule); + void addLevelRule(const std::wstring &displayName, PBYTE pbData, DWORD dwLen); + void addLevelRule(const std::wstring &displayName, LevelRuleset *rootRule); void removeLevelRule(LevelRuleset *removing); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/GameRules/LevelRuleset.cpp b/Minecraft.Client/Build/Common/GameRules/LevelRuleset.cpp index 555db7a4b..debe610ff 100644 --- a/Minecraft.Client/Build/Common/GameRules/LevelRuleset.cpp +++ b/Minecraft.Client/Build/Common/GameRules/LevelRuleset.cpp @@ -17,7 +17,7 @@ LevelRuleset::~LevelRuleset() } } -void LevelRuleset::getChildren(vector *children) +void LevelRuleset::getChildren(std::vector *children) { CompoundGameRuleDefinition::getChildren(children); for (AUTO_VAR(it, m_areas.begin()); it != m_areas.end(); it++) @@ -44,7 +44,7 @@ void LevelRuleset::loadStringTable(StringTable *table) m_stringTable = table; } -LPCWSTR LevelRuleset::getString(const wstring &key) +LPCWSTR LevelRuleset::getString(const std::wstring &key) { if(m_stringTable == NULL) { @@ -56,7 +56,7 @@ LPCWSTR LevelRuleset::getString(const wstring &key) } } -AABB *LevelRuleset::getNamedArea(const wstring &areaName) +AABB *LevelRuleset::getNamedArea(const std::wstring &areaName) { AABB *area = NULL; for(AUTO_VAR(it, m_areas.begin()); it != m_areas.end(); ++it) diff --git a/Minecraft.Client/Build/Common/GameRules/LevelRuleset.h b/Minecraft.Client/Build/Common/GameRules/LevelRuleset.h index bbb17c437..93802450c 100644 --- a/Minecraft.Client/Build/Common/GameRules/LevelRuleset.h +++ b/Minecraft.Client/Build/Common/GameRules/LevelRuleset.h @@ -7,21 +7,21 @@ class NamedAreaRuleDefinition; class LevelRuleset : public CompoundGameRuleDefinition { private: - vector m_areas; + std::vector m_areas; StringTable *m_stringTable; public: LevelRuleset(); ~LevelRuleset(); - virtual void getChildren(vector *children); + virtual void getChildren(std::vector *children); virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType); virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_LevelRules; } void loadStringTable(StringTable *table); - LPCWSTR getString(const wstring &key); + LPCWSTR getString(const std::wstring &key); - AABB *getNamedArea(const wstring &areaName); + AABB *getNamedArea(const std::wstring &areaName); StringTable *getStringTable() { return m_stringTable; } }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/GameRules/NamedAreaRuleDefinition.cpp b/Minecraft.Client/Build/Common/GameRules/NamedAreaRuleDefinition.cpp index 1e656af01..43f438609 100644 --- a/Minecraft.Client/Build/Common/GameRules/NamedAreaRuleDefinition.cpp +++ b/Minecraft.Client/Build/Common/GameRules/NamedAreaRuleDefinition.cpp @@ -36,7 +36,7 @@ void NamedAreaRuleDefinition::writeAttributes(DataOutputStream *dos, UINT numAtt dos->writeUTF(_toString(m_area->z1)); } -void NamedAreaRuleDefinition::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void NamedAreaRuleDefinition::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"name") == 0) { diff --git a/Minecraft.Client/Build/Common/GameRules/NamedAreaRuleDefinition.h b/Minecraft.Client/Build/Common/GameRules/NamedAreaRuleDefinition.h index 7cf7db193..8386b3fd4 100644 --- a/Minecraft.Client/Build/Common/GameRules/NamedAreaRuleDefinition.h +++ b/Minecraft.Client/Build/Common/GameRules/NamedAreaRuleDefinition.h @@ -5,7 +5,7 @@ class NamedAreaRuleDefinition : public GameRuleDefinition { private: - wstring m_name; + std::wstring m_name; AABB *m_area; public: @@ -16,8 +16,8 @@ public: virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_NamedArea; } - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); AABB *getArea() { return m_area; } - wstring getName() { return m_name; } + std::wstring getName() { return m_name; } }; diff --git a/Minecraft.Client/Build/Common/GameRules/StartFeature.cpp b/Minecraft.Client/Build/Common/GameRules/StartFeature.cpp index da0505a89..f9262df3e 100644 --- a/Minecraft.Client/Build/Common/GameRules/StartFeature.cpp +++ b/Minecraft.Client/Build/Common/GameRules/StartFeature.cpp @@ -21,7 +21,7 @@ void StartFeature::writeAttributes(DataOutputStream *dos, UINT numAttrs) dos->writeUTF(_toString((int)m_feature)); } -void StartFeature::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void StartFeature::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"chunkX") == 0) { diff --git a/Minecraft.Client/Build/Common/GameRules/StartFeature.h b/Minecraft.Client/Build/Common/GameRules/StartFeature.h index 4980ac9ab..51edc99f1 100644 --- a/Minecraft.Client/Build/Common/GameRules/StartFeature.h +++ b/Minecraft.Client/Build/Common/GameRules/StartFeature.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "GameRuleDefinition.h" #include "../../../../Minecraft.World/WorldGen/Features/StructureFeature.h" @@ -16,7 +16,7 @@ public: virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_StartFeature; } virtual void writeAttributes(DataOutputStream *dos, UINT numAttrs); - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); bool isFeatureChunk(int chunkX, int chunkZ, StructureFeature::EFeatureTypes feature); }; diff --git a/Minecraft.Client/Build/Common/GameRules/UpdatePlayerRuleDefinition.cpp b/Minecraft.Client/Build/Common/GameRules/UpdatePlayerRuleDefinition.cpp index 329330abd..77cb68f93 100644 --- a/Minecraft.Client/Build/Common/GameRules/UpdatePlayerRuleDefinition.cpp +++ b/Minecraft.Client/Build/Common/GameRules/UpdatePlayerRuleDefinition.cpp @@ -56,7 +56,7 @@ void UpdatePlayerRuleDefinition::writeAttributes(DataOutputStream *dos, UINT num } } -void UpdatePlayerRuleDefinition::getChildren(vector *children) +void UpdatePlayerRuleDefinition::getChildren(std::vector *children) { GameRuleDefinition::getChildren(children); for(AUTO_VAR(it, m_items.begin()); it!=m_items.end(); it++) @@ -80,7 +80,7 @@ GameRuleDefinition *UpdatePlayerRuleDefinition::addChild(ConsoleGameRules::EGame return rule; } -void UpdatePlayerRuleDefinition::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void UpdatePlayerRuleDefinition::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"spawnX") == 0) { @@ -130,7 +130,7 @@ void UpdatePlayerRuleDefinition::addAttribute(const wstring &attributeName, cons } } -void UpdatePlayerRuleDefinition::postProcessPlayer(shared_ptr player) +void UpdatePlayerRuleDefinition::postProcessPlayer(std::shared_ptr player) { if(m_bUpdateHealth) { diff --git a/Minecraft.Client/Build/Common/GameRules/UpdatePlayerRuleDefinition.h b/Minecraft.Client/Build/Common/GameRules/UpdatePlayerRuleDefinition.h index 538aefa1c..2b14dd508 100644 --- a/Minecraft.Client/Build/Common/GameRules/UpdatePlayerRuleDefinition.h +++ b/Minecraft.Client/Build/Common/GameRules/UpdatePlayerRuleDefinition.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "GameRuleDefinition.h" @@ -9,7 +9,7 @@ class Pos; class UpdatePlayerRuleDefinition : public GameRuleDefinition { private: - vector m_items; + std::vector m_items; bool m_bUpdateHealth, m_bUpdateFood, m_bUpdateYRot, m_bUpdateInventory; int m_health; @@ -23,11 +23,11 @@ public: virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_UpdatePlayerRule; } - virtual void getChildren(vector *children); + virtual void getChildren(std::vector *children); virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType); virtual void writeAttributes(DataOutputStream *dos, UINT numAttributes); - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); - virtual void postProcessPlayer(shared_ptr player); + virtual void postProcessPlayer(std::shared_ptr player); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/GameRules/UseTileRuleDefinition.cpp b/Minecraft.Client/Build/Common/GameRules/UseTileRuleDefinition.cpp index 7817df153..5e3b98cff 100644 --- a/Minecraft.Client/Build/Common/GameRules/UseTileRuleDefinition.cpp +++ b/Minecraft.Client/Build/Common/GameRules/UseTileRuleDefinition.cpp @@ -28,7 +28,7 @@ void UseTileRuleDefinition::writeAttributes(DataOutputStream *dos, UINT numAttri dos->writeUTF(_toString(m_coordinates.z)); } -void UseTileRuleDefinition::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void UseTileRuleDefinition::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"tileId") == 0) { diff --git a/Minecraft.Client/Build/Common/GameRules/UseTileRuleDefinition.h b/Minecraft.Client/Build/Common/GameRules/UseTileRuleDefinition.h index 6b95d47a2..6df664288 100644 --- a/Minecraft.Client/Build/Common/GameRules/UseTileRuleDefinition.h +++ b/Minecraft.Client/Build/Common/GameRules/UseTileRuleDefinition.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "GameRuleDefinition.h" #include "../../../../Minecraft.World/Util/Pos.h" @@ -18,7 +18,7 @@ public: ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_UseTileRule; } virtual void writeAttributes(DataOutputStream *dos, UINT numAttributes); - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); virtual bool onUseTile(GameRule *rule, int tileId, int x, int y, int z); }; diff --git a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionGenerateBox.cpp b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionGenerateBox.cpp index a748358b7..14efc4c72 100644 --- a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionGenerateBox.cpp +++ b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionGenerateBox.cpp @@ -35,7 +35,7 @@ void XboxStructureActionGenerateBox::writeAttributes(DataOutputStream *dos, UINT dos->writeUTF(_toString(m_skipAir)); } -void XboxStructureActionGenerateBox::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void XboxStructureActionGenerateBox::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"x0") == 0) { diff --git a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionGenerateBox.h b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionGenerateBox.h index 78664d421..3570b5a3f 100644 --- a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionGenerateBox.h +++ b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionGenerateBox.h @@ -20,7 +20,7 @@ public: virtual int getEndZ() { return m_z1; } virtual void writeAttributes(DataOutputStream *dos, UINT numAttrs); - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); bool generateBoxInLevel(StructurePiece *structure, Level *level, BoundingBox *chunkBB); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceBlock.cpp b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceBlock.cpp index b4c9d28b9..d0c469cf4 100644 --- a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceBlock.cpp +++ b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceBlock.cpp @@ -26,7 +26,7 @@ void XboxStructureActionPlaceBlock::writeAttributes(DataOutputStream *dos, UINT } -void XboxStructureActionPlaceBlock::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void XboxStructureActionPlaceBlock::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"x") == 0) { diff --git a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceBlock.h b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceBlock.h index 3ee377b99..75648965c 100644 --- a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceBlock.h +++ b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceBlock.h @@ -19,7 +19,7 @@ public: virtual int getEndZ() { return m_z; } virtual void writeAttributes(DataOutputStream *dos, UINT numAttrs); - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); bool placeBlockInLevel(StructurePiece *structure, Level *level, BoundingBox *chunkBB); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceContainer.cpp b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceContainer.cpp index abaaae744..5ab72345e 100644 --- a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceContainer.cpp +++ b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceContainer.cpp @@ -24,7 +24,7 @@ XboxStructureActionPlaceContainer::~XboxStructureActionPlaceContainer() //void XboxStructureActionPlaceContainer::writeAttributes(DataOutputStream *dos, UINT numAttrs) -void XboxStructureActionPlaceContainer::getChildren(vector *children) +void XboxStructureActionPlaceContainer::getChildren(std::vector *children) { XboxStructureActionPlaceBlock::getChildren(children); for(AUTO_VAR(it, m_items.begin()); it!=m_items.end(); it++) @@ -48,7 +48,7 @@ GameRuleDefinition *XboxStructureActionPlaceContainer::addChild(ConsoleGameRules return rule; } -void XboxStructureActionPlaceContainer::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void XboxStructureActionPlaceContainer::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"facing") == 0) { @@ -78,7 +78,7 @@ bool XboxStructureActionPlaceContainer::placeContainerInLevel(StructurePiece *st } level->setTile( worldX, worldY, worldZ, m_tile ); - shared_ptr container = dynamic_pointer_cast(level->getTileEntity( worldX, worldY, worldZ )); + std::shared_ptr container = dynamic_pointer_cast(level->getTileEntity( worldX, worldY, worldZ )); app.DebugPrintf("XboxStructureActionPlaceContainer - placing a container at (%d,%d,%d)\n", worldX, worldY, worldZ); if ( container != NULL ) diff --git a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceContainer.h b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceContainer.h index 6355ca116..bef68bbb9 100644 --- a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceContainer.h +++ b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceContainer.h @@ -10,20 +10,20 @@ class BoundingBox; class XboxStructureActionPlaceContainer : public XboxStructureActionPlaceBlock { private: - vector m_items; + std::vector m_items; public: XboxStructureActionPlaceContainer(); ~XboxStructureActionPlaceContainer(); virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_PlaceContainer; } - virtual void getChildren(vector *children); + virtual void getChildren(std::vector *children); virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType); // 4J-JEV: Super class handles attr-facing fine. //virtual void writeAttributes(DataOutputStream *dos, UINT numAttributes); - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); bool placeContainerInLevel(StructurePiece *structure, Level *level, BoundingBox *chunkBB); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceSpawner.cpp b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceSpawner.cpp index d51865f49..ac24ca861 100644 --- a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceSpawner.cpp +++ b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceSpawner.cpp @@ -23,7 +23,7 @@ void XboxStructureActionPlaceSpawner::writeAttributes(DataOutputStream *dos, UIN dos->writeUTF(m_entityId); } -void XboxStructureActionPlaceSpawner::addAttribute(const wstring &attributeName, const wstring &attributeValue) +void XboxStructureActionPlaceSpawner::addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue) { if(attributeName.compare(L"entity") == 0) { @@ -54,7 +54,7 @@ bool XboxStructureActionPlaceSpawner::placeSpawnerInLevel(StructurePiece *struct } level->setTile( worldX, worldY, worldZ, m_tile ); - shared_ptr entity = dynamic_pointer_cast(level->getTileEntity( worldX, worldY, worldZ )); + std::shared_ptr entity = dynamic_pointer_cast(level->getTileEntity( worldX, worldY, worldZ )); #ifndef _CONTENT_PACKAGE wprintf(L"XboxStructureActionPlaceSpawner - placing a %ls spawner at (%d,%d,%d)\n", m_entityId.c_str(), worldX, worldY, worldZ); diff --git a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceSpawner.h b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceSpawner.h index 160009807..92899b93e 100644 --- a/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceSpawner.h +++ b/Minecraft.Client/Build/Common/GameRules/XboxStructureActionPlaceSpawner.h @@ -10,7 +10,7 @@ class GRFObject; class XboxStructureActionPlaceSpawner : public XboxStructureActionPlaceBlock { private: - wstring m_entityId; + std::wstring m_entityId; public: XboxStructureActionPlaceSpawner(); ~XboxStructureActionPlaceSpawner(); @@ -18,7 +18,7 @@ public: virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_PlaceSpawner; } virtual void writeAttributes(DataOutputStream *dos, UINT numAttrs); - virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); + virtual void addAttribute(const std::wstring &attributeName, const std::wstring &attributeValue); bool placeSpawnerInLevel(StructurePiece *structure, Level *level, BoundingBox *chunkBB); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/Leaderboards/LeaderboardManager.cpp b/Minecraft.Client/Build/Common/Leaderboards/LeaderboardManager.cpp index 753dd3411..5422d8e90 100644 --- a/Minecraft.Client/Build/Common/Leaderboards/LeaderboardManager.cpp +++ b/Minecraft.Client/Build/Common/Leaderboards/LeaderboardManager.cpp @@ -4,7 +4,7 @@ #include "LeaderboardManager.h" -const wstring LeaderboardManager::filterNames[eNumFilterModes] = +const std::wstring LeaderboardManager::filterNames[eNumFilterModes] = { L"Friends", L"MyScore", L"TopRank" }; @@ -85,7 +85,7 @@ void LeaderboardManager::printStats(ReadView &view) { ReadScore score = view.m_queries[i]; - app.DebugPrintf( "\tname='%s'\n", wstringtofilename(wstring(score.m_name)) ); + app.DebugPrintf( "\tname='%s'\n", std::wstringtofilename(std::wstring(score.m_name)) ); app.DebugPrintf( "\trank='%i'\n", score.m_rank ); app.DebugPrintf( "\tstatsData=[" ); diff --git a/Minecraft.Client/Build/Common/Leaderboards/LeaderboardManager.h b/Minecraft.Client/Build/Common/Leaderboards/LeaderboardManager.h index b8b81c807..5dde22f38 100644 --- a/Minecraft.Client/Build/Common/Leaderboards/LeaderboardManager.h +++ b/Minecraft.Client/Build/Common/Leaderboards/LeaderboardManager.h @@ -84,7 +84,7 @@ public: eFM_UNDEFINED }; - static const wstring filterNames[eNumFilterModes]; + static const std::wstring filterNames[eNumFilterModes]; typedef struct KillsRecord { @@ -167,7 +167,7 @@ public: PlayerUID m_uid; // Player's unique identifier. unsigned long m_rank; // Rank of the player on this scoreboard. - wstring m_name; // Player's display name. + std::wstring m_name; // Player's display name. unsigned long m_totalScore; // Sum of all the player's scores on this leaderboard. diff --git a/Minecraft.Client/Build/Common/Network/GameNetworkManager.cpp b/Minecraft.Client/Build/Common/Network/GameNetworkManager.cpp index cc977f6f4..11a5e003d 100644 --- a/Minecraft.Client/Build/Common/Network/GameNetworkManager.cpp +++ b/Minecraft.Client/Build/Common/Network/GameNetworkManager.cpp @@ -284,7 +284,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame // PRIMARY PLAYER app.DebugPrintf("[NET] Creating ClientConnection (IsHost=%d)...\n", g_NetworkManager.IsHost()); - vector createdConnections; + std::vector createdConnections; ClientConnection *connection; if( g_NetworkManager.IsHost() ) @@ -327,7 +327,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame } app.DebugPrintf("[NET] Sending PreLoginPacket...\n"); - connection->send( shared_ptr( new PreLoginPacket(minecraft->user->name) ) ); + connection->send( std::shared_ptr( new PreLoginPacket(minecraft->user->name) ) ); app.DebugPrintf("[NET] PreLoginPacket sent. Entering connection tick loop...\n"); // Tick connection until we're ready to go. The stages involved in this are: @@ -415,7 +415,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame // Open the socket on the server end to accept incoming data Socket::addIncomingSocket(socket); - connection->send( shared_ptr( new PreLoginPacket(convStringToWstring( ProfileManager.GetGamertag(idx) )) ) ); + connection->send( std::shared_ptr( new PreLoginPacket(convStringToWstring( ProfileManager.GetGamertag(idx) )) ) ); createdConnections.push_back( connection ); @@ -540,7 +540,7 @@ INetworkPlayer *CGameNetworkManager::GetPlayerBySmallId(unsigned char smallId) } #ifdef _DURANGO -wstring CGameNetworkManager::GetDisplayNameByGamertag(wstring gamertag) +std::wstring CGameNetworkManager::GetDisplayNameByGamertag(std::wstring gamertag) { return s_pPlatformNetworkManager->GetDisplayNameByGamertag(gamertag); } @@ -634,7 +634,7 @@ bool CGameNetworkManager::SessionHasSpace(unsigned int spaceRequired) return s_pPlatformNetworkManager->SessionHasSpace( spaceRequired ); } -vector *CGameNetworkManager::GetSessionList(int iPad, int localPlayers, bool partyOnly) +std::vector *CGameNetworkManager::GetSessionList(int iPad, int localPlayers, bool partyOnly) { return s_pPlatformNetworkManager->GetSessionList( iPad, localPlayers, partyOnly ); } @@ -1146,7 +1146,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam ) PlayerList *players = pServer->getPlayers(); for(AUTO_VAR(it, players->players.begin()); it < players->players.end(); ++it) { - shared_ptr servPlayer = *it; + std::shared_ptr servPlayer = *it; if( servPlayer->connection->isLocal() && !servPlayer->connection->isGuest() ) { servPlayer->connection->connection->getSocket()->setPlayer(NULL); @@ -1214,7 +1214,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam ) PlayerList *players = pServer->getPlayers(); for(AUTO_VAR(it, players->players.begin()); it < players->players.end(); ++it) { - shared_ptr servPlayer = *it; + std::shared_ptr servPlayer = *it; if( servPlayer->getXuid() == localPlayerXuid ) { servPlayer->connection->connection->getSocket()->setPlayer( g_NetworkManager.GetLocalPlayerByUserIndex(index) ); @@ -1271,7 +1271,7 @@ bool CGameNetworkManager::SystemFlagGet(INetworkPlayer *pNetworkPlayer, int inde return s_pPlatformNetworkManager->SystemFlagGet( pNetworkPlayer, index ); } -wstring CGameNetworkManager::GatherStats() +std::wstring CGameNetworkManager::GatherStats() { return s_pPlatformNetworkManager->GatherStats(); } @@ -1289,7 +1289,7 @@ void CGameNetworkManager::renderQueueMeter() #endif } -wstring CGameNetworkManager::GatherRTTStats() +std::wstring CGameNetworkManager::GatherRTTStats() { return s_pPlatformNetworkManager->GatherRTTStats(); } @@ -1403,7 +1403,7 @@ void CGameNetworkManager::CreateSocket( INetworkPlayer *pNetworkPlayer, bool loc Minecraft *pMinecraft = Minecraft::GetInstance(); Socket *socket = NULL; - shared_ptr mpPlayer = pMinecraft->localplayers[pNetworkPlayer->GetUserIndex()]; + std::shared_ptr mpPlayer = pMinecraft->localplayers[pNetworkPlayer->GetUserIndex()]; if( localPlayer && mpPlayer != NULL && mpPlayer->connection != NULL) { // If we already have a MultiplayerLocalPlayer here then we are doing a session type change @@ -1440,7 +1440,7 @@ void CGameNetworkManager::CreateSocket( INetworkPlayer *pNetworkPlayer, bool loc if( connection->createdOk ) { - connection->send( shared_ptr( new PreLoginPacket( pNetworkPlayer->GetOnlineName() ) ) ); + connection->send( std::shared_ptr( new PreLoginPacket( pNetworkPlayer->GetOnlineName() ) ) ); pMinecraft->addPendingLocalConnection(idx, connection); } else diff --git a/Minecraft.Client/Build/Common/Network/GameNetworkManager.h b/Minecraft.Client/Build/Common/Network/GameNetworkManager.h index 479c2f51f..9512e7eb8 100644 --- a/Minecraft.Client/Build/Common/Network/GameNetworkManager.h +++ b/Minecraft.Client/Build/Common/Network/GameNetworkManager.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include #ifndef __linux__ #include @@ -69,7 +69,7 @@ public: INetworkPlayer *GetPlayerByIndex(int playerIndex); INetworkPlayer *GetPlayerByXuid(PlayerUID xuid); INetworkPlayer *GetPlayerBySmallId(unsigned char smallId); - wstring GetDisplayNameByGamertag(wstring gamertag); + std::wstring GetDisplayNameByGamertag(std::wstring gamertag); INetworkPlayer *GetHostPlayer(); void RegisterPlayerChangedCallback(int iPad, void (*callback)(void *callbackParam, INetworkPlayer *pPlayer, bool leaving), void *callbackParam); void UnRegisterPlayerChangedCallback(int iPad, void (*callback)(void *callbackParam, INetworkPlayer *pPlayer, bool leaving), void *callbackParam); @@ -96,7 +96,7 @@ public: // Client session discovery bool SessionHasSpace(unsigned int spaceRequired = 1); - vector *GetSessionList(int iPad, int localPlayers, bool partyOnly); + std::vector *GetSessionList(int iPad, int localPlayers, bool partyOnly); bool GetGameSessionInfo(int iPad, SessionID sessionId,FriendSessionInfo *foundSession); void SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(LPVOID pParam), LPVOID pSearchParam ); void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam ); @@ -157,9 +157,9 @@ public: #endif // Debug output - wstring GatherStats(); + std::wstring GatherStats(); void renderQueueMeter(); - wstring GatherRTTStats(); + std::wstring GatherRTTStats(); // GUI debug output diff --git a/Minecraft.Client/Build/Common/Network/NetworkPlayerInterface.h b/Minecraft.Client/Build/Common/Network/NetworkPlayerInterface.h index 501b08ff1..28db131e9 100644 --- a/Minecraft.Client/Build/Common/Network/NetworkPlayerInterface.h +++ b/Minecraft.Client/Build/Common/Network/NetworkPlayerInterface.h @@ -26,6 +26,6 @@ public: virtual void SetSocket(Socket *pSocket) = 0; virtual Socket *GetSocket() = 0; virtual const wchar_t *GetOnlineName() = 0; - virtual wstring GetDisplayName() = 0; + virtual std::wstring GetDisplayName() = 0; virtual PlayerUID GetUID() = 0; }; diff --git a/Minecraft.Client/Build/Common/Network/PlatformNetworkManagerInterface.h b/Minecraft.Client/Build/Common/Network/PlatformNetworkManagerInterface.h index fe7580bb5e..7cbc26394 100644 --- a/Minecraft.Client/Build/Common/Network/PlatformNetworkManagerInterface.h +++ b/Minecraft.Client/Build/Common/Network/PlatformNetworkManagerInterface.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include #ifndef __linux__ #include @@ -103,8 +103,8 @@ public: virtual void SystemFlagSet(INetworkPlayer *pNetworkPlayer, int index) = 0; virtual bool SystemFlagGet(INetworkPlayer *pNetworkPlayer, int index) = 0; - virtual wstring GatherStats() = 0; - virtual wstring GatherRTTStats() = 0; + virtual std::wstring GatherStats() = 0; + virtual std::wstring GatherRTTStats() = 0; private: virtual void SetSessionTexturePackParentId( int id ) = 0; @@ -112,7 +112,7 @@ private: virtual void Notify(int ID, ULONG_PTR Param) = 0; public: - virtual vector *GetSessionList(int iPad, int localPlayers, bool partyOnly) = 0; + virtual std::vector *GetSessionList(int iPad, int localPlayers, bool partyOnly) = 0; virtual bool GetGameSessionInfo(int iPad, SessionID sessionId,FriendSessionInfo *foundSession) = 0; virtual void SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(LPVOID pParam), LPVOID pSearchParam ) = 0; virtual void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam ) = 0; @@ -123,6 +123,6 @@ public: #endif #ifdef _DURANGO - virtual wstring GetDisplayNameByGamertag(wstring gamertag) = 0; + virtual std::wstring GetDisplayNameByGamertag(std::wstring gamertag) = 0; #endif }; diff --git a/Minecraft.Client/Build/Common/Network/PlatformNetworkManagerStub.cpp b/Minecraft.Client/Build/Common/Network/PlatformNetworkManagerStub.cpp index 1fb3d3059..3082fd774 100644 --- a/Minecraft.Client/Build/Common/Network/PlatformNetworkManagerStub.cpp +++ b/Minecraft.Client/Build/Common/Network/PlatformNetworkManagerStub.cpp @@ -340,7 +340,7 @@ void CPlatformNetworkManagerStub::UpdateAndSetGameSessionData(INetworkPlayer *pN // m_hostGameSessionData.players[i] = ((NetworkPlayerXbox *)pNetworkPlayer)->GetUID(); // // char *temp; -// temp = (char *)wstringtofilename( pNetworkPlayer->GetOnlineName() ); +// temp = (char *)std::wstringtofilename( pNetworkPlayer->GetOnlineName() ); // memcpy(m_hostGameSessionData.szPlayers[i],temp,XUSER_NAME_SIZE); // } // else @@ -476,14 +476,14 @@ bool CPlatformNetworkManagerStub::SystemFlagGet(INetworkPlayer *pNetworkPlayer, return false; } -wstring CPlatformNetworkManagerStub::GatherStats() +std::wstring CPlatformNetworkManagerStub::GatherStats() { return L""; } -wstring CPlatformNetworkManagerStub::GatherRTTStats() +std::wstring CPlatformNetworkManagerStub::GatherRTTStats() { - wstring stats(L"Rtt: "); + std::wstring stats(L"Rtt: "); wchar_t stat[32]; @@ -520,9 +520,9 @@ void CPlatformNetworkManagerStub::SetSearchResultsReady(int resultCount) m_searchResultsCount[m_lastSearchPad] = resultCount; } -vector *CPlatformNetworkManagerStub::GetSessionList(int iPad, int localPlayers, bool partyOnly) +std::vector *CPlatformNetworkManagerStub::GetSessionList(int iPad, int localPlayers, bool partyOnly) { - vector *filteredList = new vector();; + std::vector *filteredList = new std::vector();; return filteredList; } diff --git a/Minecraft.Client/Build/Common/Network/PlatformNetworkManagerStub.h b/Minecraft.Client/Build/Common/Network/PlatformNetworkManagerStub.h index 8a9dc797a..3ca2b8489 100644 --- a/Minecraft.Client/Build/Common/Network/PlatformNetworkManagerStub.h +++ b/Minecraft.Client/Build/Common/Network/PlatformNetworkManagerStub.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include #include "../../../../Minecraft.World/Util/C4JThread.h" #include "NetworkPlayerInterface.h" @@ -66,7 +66,7 @@ private: HANDLE m_notificationListener; - vector m_machineQNetPrimaryPlayers; // collection of players that we deem to be the main one for that system + std::vector m_machineQNetPrimaryPlayers; // collection of players that we deem to be the main one for that system bool m_bLeavingGame; bool m_bLeaveGameOnTick; @@ -101,7 +101,7 @@ private: PlayerFlags(INetworkPlayer *pNetworkPlayer, unsigned int count); ~PlayerFlags(); }; - vector m_playerFlags; + std::vector m_playerFlags; void SystemFlagAddPlayer(INetworkPlayer *pNetworkPlayer); void SystemFlagRemovePlayer(INetworkPlayer *pNetworkPlayer); void SystemFlagReset(); @@ -114,11 +114,11 @@ private: float m_lastPlayerEventTimeStart; public: - wstring GatherStats(); - wstring GatherRTTStats(); + std::wstring GatherStats(); + std::wstring GatherRTTStats(); private: - vector friendsSessions[XUSER_MAX_COUNT]; + std::vector friendsSessions[XUSER_MAX_COUNT]; int m_searchResultsCount[XUSER_MAX_COUNT]; int m_lastSearchStartTime[XUSER_MAX_COUNT]; @@ -145,7 +145,7 @@ private: void SetSearchResultsReady(int resultCount = 0); - vectorcurrentNetworkPlayers; + std::vectorcurrentNetworkPlayers; INetworkPlayer *addNetworkPlayer(IQNetPlayer *pQNetPlayer); void removeNetworkPlayer(IQNetPlayer *pQNetPlayer); static INetworkPlayer *getNetworkPlayer(IQNetPlayer *pQNetPlayer); @@ -155,7 +155,7 @@ private: virtual void Notify(int ID, ULONG_PTR Param); public: - virtual vector *GetSessionList(int iPad, int localPlayers, bool partyOnly); + virtual std::vector *GetSessionList(int iPad, int localPlayers, bool partyOnly); virtual bool GetGameSessionInfo(int iPad, SessionID sessionId,FriendSessionInfo *foundSession); virtual void SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(LPVOID pParam), LPVOID pSearchParam ); virtual void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam ); diff --git a/Minecraft.Client/Build/Common/Network/Sony/NetworkPlayerSony.cpp b/Minecraft.Client/Build/Common/Network/Sony/NetworkPlayerSony.cpp index a09235635..5359dfbaa 100644 --- a/Minecraft.Client/Build/Common/Network/Sony/NetworkPlayerSony.cpp +++ b/Minecraft.Client/Build/Common/Network/Sony/NetworkPlayerSony.cpp @@ -98,7 +98,7 @@ const wchar_t *NetworkPlayerSony::GetOnlineName() return m_sqrPlayer->GetName(); } -wstring NetworkPlayerSony::GetDisplayName() +std::wstring NetworkPlayerSony::GetDisplayName() { return m_sqrPlayer->GetName(); } diff --git a/Minecraft.Client/Build/Common/Network/Sony/NetworkPlayerSony.h b/Minecraft.Client/Build/Common/Network/Sony/NetworkPlayerSony.h index bc4c97a9e..c71b343b6 100644 --- a/Minecraft.Client/Build/Common/Network/Sony/NetworkPlayerSony.h +++ b/Minecraft.Client/Build/Common/Network/Sony/NetworkPlayerSony.h @@ -28,7 +28,7 @@ public: virtual void SetSocket(Socket *pSocket); virtual Socket *GetSocket(); virtual const wchar_t *GetOnlineName(); - virtual wstring GetDisplayName(); + virtual std::wstring GetDisplayName(); virtual PlayerUID GetUID(); void SetUID(PlayerUID UID); diff --git a/Minecraft.Client/Build/Common/Network/Sony/PlatformNetworkManagerSony.cpp b/Minecraft.Client/Build/Common/Network/Sony/PlatformNetworkManagerSony.cpp index 0a19a99de..48e51a666 100644 --- a/Minecraft.Client/Build/Common/Network/Sony/PlatformNetworkManagerSony.cpp +++ b/Minecraft.Client/Build/Common/Network/Sony/PlatformNetworkManagerSony.cpp @@ -1064,7 +1064,7 @@ bool CPlatformNetworkManagerSony::SystemFlagGet(INetworkPlayer *pNetworkPlayer, return false; } -wstring CPlatformNetworkManagerSony::GatherStats() +std::wstring CPlatformNetworkManagerSony::GatherStats() { #if 0 return L"Queue messages: " + _toString(((NetworkPlayerXbox *)GetHostPlayer())->GetQNetPlayer()->GetSendQueueSize( NULL, QNET_GETSENDQUEUESIZE_MESSAGES ) ) @@ -1074,10 +1074,10 @@ wstring CPlatformNetworkManagerSony::GatherStats() #endif } -wstring CPlatformNetworkManagerSony::GatherRTTStats() +std::wstring CPlatformNetworkManagerSony::GatherRTTStats() { #if 0 - wstring stats(L"Rtt: "); + std::wstring stats(L"Rtt: "); wchar_t stat[32]; @@ -1141,9 +1141,9 @@ void CPlatformNetworkManagerSony::TickSearch() } } -vector *CPlatformNetworkManagerSony::GetSessionList(int iPad, int localPlayers, bool partyOnly) +std::vector *CPlatformNetworkManagerSony::GetSessionList(int iPad, int localPlayers, bool partyOnly) { - vector *filteredList = new vector(); + std::vector *filteredList = new std::vector(); for( int i = 0; i < m_searchResultsCount; i++ ) { if( m_pSearchResults[i].m_extData ) @@ -1219,7 +1219,7 @@ bool CPlatformNetworkManagerSony::GetGameSessionInfo(int iPad, SessionID session { sessionInfo->data = *(GameSessionData *)pxnqi->pbData; - wstring gamerName = convStringToWstring(sessionInfo->data.hostName); + std::wstring gamerName = convStringToWstring(sessionInfo->data.hostName); swprintf(sessionInfo->displayLabel,app.GetString(IDS_GAME_HOST_NAME),L"MWWWWWWWWWWWWWWM");// gamerName.c_str() ); } else diff --git a/Minecraft.Client/Build/Common/Network/Sony/PlatformNetworkManagerSony.h b/Minecraft.Client/Build/Common/Network/Sony/PlatformNetworkManagerSony.h index 4746296d4..b36de5e07 100644 --- a/Minecraft.Client/Build/Common/Network/Sony/PlatformNetworkManagerSony.h +++ b/Minecraft.Client/Build/Common/Network/Sony/PlatformNetworkManagerSony.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include #include "../../../../../Minecraft.World/Util/C4JThread.h" #include "../NetworkPlayerInterface.h" @@ -86,7 +86,7 @@ private: HANDLE m_notificationListener; - vector m_machineSQRPrimaryPlayers; // collection of players that we deem to be the main one for that system + std::vector m_machineSQRPrimaryPlayers; // collection of players that we deem to be the main one for that system bool m_bLeavingGame; bool m_bLeaveGameOnTick; @@ -122,7 +122,7 @@ private: PlayerFlags(INetworkPlayer *pNetworkPlayer, unsigned int count); ~PlayerFlags(); }; - vector m_playerFlags; + std::vector m_playerFlags; void SystemFlagAddPlayer(INetworkPlayer *pNetworkPlayer); void SystemFlagRemovePlayer(INetworkPlayer *pNetworkPlayer); void SystemFlagReset(); @@ -135,11 +135,11 @@ private: float m_lastPlayerEventTimeStart; public: - wstring GatherStats(); - wstring GatherRTTStats(); + std::wstring GatherStats(); + std::wstring GatherRTTStats(); private: - vector friendsSessions; + std::vector friendsSessions; int m_lastSearchStartTime; @@ -156,7 +156,7 @@ private: void TickSearch(); - vectorcurrentNetworkPlayers; + std::vectorcurrentNetworkPlayers; INetworkPlayer *addNetworkPlayer(SQRNetworkPlayer *pSQRPlayer); void removeNetworkPlayer(SQRNetworkPlayer *pSQRPlayer); static INetworkPlayer *getNetworkPlayer(SQRNetworkPlayer *pSQRPlayer); @@ -166,7 +166,7 @@ private: virtual void Notify(int ID, ULONG_PTR Param); public: - virtual vector *GetSessionList(int iPad, int localPlayers, bool partyOnly); + virtual std::vector *GetSessionList(int iPad, int localPlayers, bool partyOnly); virtual bool GetGameSessionInfo(int iPad, SessionID sessionId,FriendSessionInfo *foundSession); virtual void SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(LPVOID pParam), LPVOID pSearchParam ); virtual void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam ); diff --git a/Minecraft.Client/Build/Common/Tutorial/AreaTask.cpp b/Minecraft.Client/Build/Common/Tutorial/AreaTask.cpp index aae2ec281..0706d858d 100644 --- a/Minecraft.Client/Build/Common/Tutorial/AreaTask.cpp +++ b/Minecraft.Client/Build/Common/Tutorial/AreaTask.cpp @@ -2,7 +2,7 @@ #include "Tutorial.h" #include "AreaTask.h" -AreaTask::AreaTask(eTutorial_State state, Tutorial *tutorial, vector *inConstraints, int descriptionId, EAreaTaskCompletionStates completionState) +AreaTask::AreaTask(eTutorial_State state, Tutorial *tutorial, std::vector *inConstraints, int descriptionId, EAreaTaskCompletionStates completionState) : TutorialTask( tutorial, descriptionId, false, inConstraints, false, false, false ) { m_tutorialState = state; diff --git a/Minecraft.Client/Build/Common/Tutorial/AreaTask.h b/Minecraft.Client/Build/Common/Tutorial/AreaTask.h index 0d20bd7ab..2480d398b 100644 --- a/Minecraft.Client/Build/Common/Tutorial/AreaTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/AreaTask.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "TutorialTask.h" @@ -16,7 +16,7 @@ private: EAreaTaskCompletionStates m_completionState; eTutorial_State m_tutorialState; public: - AreaTask(eTutorial_State state, Tutorial *tutorial, vector *inConstraints, int descriptionId = -1, EAreaTaskCompletionStates completionState = eAreaTaskCompletion_CompleteOnActivation); + AreaTask(eTutorial_State state, Tutorial *tutorial, std::vector *inConstraints, int descriptionId = -1, EAreaTaskCompletionStates completionState = eAreaTaskCompletion_CompleteOnActivation); virtual bool isCompleted(); virtual void setAsCurrentTask(bool active = true); virtual void onStateChange(eTutorial_State newState); diff --git a/Minecraft.Client/Build/Common/Tutorial/ChangeStateConstraint.cpp b/Minecraft.Client/Build/Common/Tutorial/ChangeStateConstraint.cpp index a5b23869c..545c0d35f 100644 --- a/Minecraft.Client/Build/Common/Tutorial/ChangeStateConstraint.cpp +++ b/Minecraft.Client/Build/Common/Tutorial/ChangeStateConstraint.cpp @@ -60,10 +60,10 @@ void ChangeStateConstraint::tick(int iPad) { // Send update settings packet to server Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr player = minecraft->localplayers[iPad]; + std::shared_ptr player = minecraft->localplayers[iPad]; if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL) { - player->connection->send( shared_ptr( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); + player->connection->send( std::shared_ptr( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); } } } @@ -101,10 +101,10 @@ void ChangeStateConstraint::tick(int iPad) { // Send update settings packet to server Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr player = minecraft->localplayers[iPad]; + std::shared_ptr player = minecraft->localplayers[iPad]; if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL) { - player->connection->send( shared_ptr( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); + player->connection->send( std::shared_ptr( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); } } } @@ -125,10 +125,10 @@ void ChangeStateConstraint::tick(int iPad) { // Send update settings packet to server Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr player = minecraft->localplayers[iPad]; + std::shared_ptr player = minecraft->localplayers[iPad]; if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL) { - player->connection->send( shared_ptr( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); + player->connection->send( std::shared_ptr( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); } } } diff --git a/Minecraft.Client/Build/Common/Tutorial/ChoiceTask.h b/Minecraft.Client/Build/Common/Tutorial/ChoiceTask.h index 79c2ba429..f10168b19 100644 --- a/Minecraft.Client/Build/Common/Tutorial/ChoiceTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/ChoiceTask.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "TutorialTask.h" diff --git a/Minecraft.Client/Build/Common/Tutorial/CompleteUsingItemTask.cpp b/Minecraft.Client/Build/Common/Tutorial/CompleteUsingItemTask.cpp index 2e4d12b1e..c47850043 100644 --- a/Minecraft.Client/Build/Common/Tutorial/CompleteUsingItemTask.cpp +++ b/Minecraft.Client/Build/Common/Tutorial/CompleteUsingItemTask.cpp @@ -23,7 +23,7 @@ bool CompleteUsingItemTask::isCompleted() return bIsCompleted; } -void CompleteUsingItemTask::completeUsingItem(shared_ptr item) +void CompleteUsingItemTask::completeUsingItem(std::shared_ptr item) { if(!hasBeenActivated() && !isPreCompletionEnabled()) return; for(int i=0;i item); + virtual void completeUsingItem(std::shared_ptr item); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/Tutorial/ControllerTask.h b/Minecraft.Client/Build/Common/Tutorial/ControllerTask.h index 1ee6746fd..90e0c4478 100644 --- a/Minecraft.Client/Build/Common/Tutorial/ControllerTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/ControllerTask.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "TutorialTask.h" @@ -7,8 +7,8 @@ using namespace std; class ControllerTask : public TutorialTask { private: - unordered_map completedMappings; - unordered_map southpawCompletedMappings; + std::unordered_map completedMappings; + std::unordered_map southpawCompletedMappings; bool m_bHasSouthpaw; unsigned int m_uiCompletionMask; int *m_iCompletionMaskA; diff --git a/Minecraft.Client/Build/Common/Tutorial/CraftTask.cpp b/Minecraft.Client/Build/Common/Tutorial/CraftTask.cpp index ee9292d14..ac543862b 100644 --- a/Minecraft.Client/Build/Common/Tutorial/CraftTask.cpp +++ b/Minecraft.Client/Build/Common/Tutorial/CraftTask.cpp @@ -3,7 +3,7 @@ #include "../../../../Minecraft.World/Headers/net.minecraft.world.item.h" CraftTask::CraftTask( int itemId, int auxValue, int quantity, - Tutorial *tutorial, int descriptionId, bool enablePreCompletion /*= true*/, vector *inConstraints /*= NULL*/, + Tutorial *tutorial, int descriptionId, bool enablePreCompletion /*= true*/, std::vector *inConstraints /*= NULL*/, bool bShowMinimumTime /*=false*/, bool bAllowFade /*=true*/, bool m_bTaskReminders /*=true*/ ) : TutorialTask(tutorial, descriptionId, enablePreCompletion, inConstraints, bShowMinimumTime, bAllowFade, m_bTaskReminders ), m_quantity( quantity ), @@ -17,7 +17,7 @@ CraftTask::CraftTask( int itemId, int auxValue, int quantity, } CraftTask::CraftTask( int *items, int *auxValues, int numItems, int quantity, - Tutorial *tutorial, int descriptionId, bool enablePreCompletion /*= true*/, vector *inConstraints /*= NULL*/, + Tutorial *tutorial, int descriptionId, bool enablePreCompletion /*= true*/, std::vector *inConstraints /*= NULL*/, bool bShowMinimumTime /*=false*/, bool bAllowFade /*=true*/, bool m_bTaskReminders /*=true*/ ) : TutorialTask(tutorial, descriptionId, enablePreCompletion, inConstraints, bShowMinimumTime, bAllowFade, m_bTaskReminders ), m_quantity( quantity ), @@ -40,7 +40,7 @@ CraftTask::~CraftTask() delete[] m_auxValues; } -void CraftTask::onCrafted(shared_ptr item) +void CraftTask::onCrafted(std::shared_ptr item) { #ifndef _CONTENT_PACKAGE wprintf(L"CraftTask::onCrafted - %ls\n", item->toString().c_str() ); diff --git a/Minecraft.Client/Build/Common/Tutorial/CraftTask.h b/Minecraft.Client/Build/Common/Tutorial/CraftTask.h index 1496f07a4..1a26b9264 100644 --- a/Minecraft.Client/Build/Common/Tutorial/CraftTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/CraftTask.h @@ -5,16 +5,16 @@ class CraftTask : public TutorialTask { public: CraftTask( int itemId, int auxValue, int quantity, - Tutorial *tutorial, int descriptionId, bool enablePreCompletion = true, vector *inConstraints = NULL, + Tutorial *tutorial, int descriptionId, bool enablePreCompletion = true, std::vector *inConstraints = NULL, bool bShowMinimumTime=false, bool bAllowFade=true, bool m_bTaskReminders=true ); CraftTask( int *items, int *auxValues, int numItems, int quantity, - Tutorial *tutorial, int descriptionId, bool enablePreCompletion = true, vector *inConstraints = NULL, + Tutorial *tutorial, int descriptionId, bool enablePreCompletion = true, std::vector *inConstraints = NULL, bool bShowMinimumTime=false, bool bAllowFade=true, bool m_bTaskReminders=true ); ~CraftTask(); virtual bool isCompleted() { return bIsCompleted; } - virtual void onCrafted(shared_ptr item); + virtual void onCrafted(std::shared_ptr item); private: int *m_items; diff --git a/Minecraft.Client/Build/Common/Tutorial/DiggerItemHint.cpp b/Minecraft.Client/Build/Common/Tutorial/DiggerItemHint.cpp index 078c5f4d4..bf6d8cfd0 100644 --- a/Minecraft.Client/Build/Common/Tutorial/DiggerItemHint.cpp +++ b/Minecraft.Client/Build/Common/Tutorial/DiggerItemHint.cpp @@ -20,7 +20,7 @@ DiggerItemHint::DiggerItemHint(eTutorial_Hint id, Tutorial *tutorial, int descri tutorial->addMessage(IDS_TUTORIAL_HINT_ATTACK_WITH_TOOL, true); } -int DiggerItemHint::startDestroyBlock(shared_ptr item, Tile *tile) +int DiggerItemHint::startDestroyBlock(std::shared_ptr item, Tile *tile) { if(item != NULL) { @@ -46,7 +46,7 @@ int DiggerItemHint::startDestroyBlock(shared_ptr item, Tile *tile) return -1; } -int DiggerItemHint::attack(shared_ptr item, shared_ptr entity) +int DiggerItemHint::attack(std::shared_ptr item, std::shared_ptr entity) { if(item != NULL) { diff --git a/Minecraft.Client/Build/Common/Tutorial/DiggerItemHint.h b/Minecraft.Client/Build/Common/Tutorial/DiggerItemHint.h index cb71742e7..b23a8be3d 100644 --- a/Minecraft.Client/Build/Common/Tutorial/DiggerItemHint.h +++ b/Minecraft.Client/Build/Common/Tutorial/DiggerItemHint.h @@ -13,6 +13,6 @@ private: public: DiggerItemHint(eTutorial_Hint id, Tutorial *tutorial, int descriptionId, int items[], unsigned int itemsLength); - virtual int startDestroyBlock(shared_ptr item, Tile *tile); - virtual int attack(shared_ptr item, shared_ptr entity); + virtual int startDestroyBlock(std::shared_ptr item, Tile *tile); + virtual int attack(std::shared_ptr item, std::shared_ptr entity); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/Tutorial/EffectChangedTask.h b/Minecraft.Client/Build/Common/Tutorial/EffectChangedTask.h index 23563f397..796653200 100644 --- a/Minecraft.Client/Build/Common/Tutorial/EffectChangedTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/EffectChangedTask.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "TutorialTask.h" diff --git a/Minecraft.Client/Build/Common/Tutorial/FullTutorial.cpp b/Minecraft.Client/Build/Common/Tutorial/FullTutorial.cpp index e64e68514..5ccbf067e 100644 --- a/Minecraft.Client/Build/Common/Tutorial/FullTutorial.cpp +++ b/Minecraft.Client/Build/Common/Tutorial/FullTutorial.cpp @@ -159,7 +159,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/) AABB *area = app.getGameRuleDefinitions()->getNamedArea(L"tutorialArea"); if(area != NULL) { - vector *areaConstraints = new vector(); + std::vector *areaConstraints = new std::vector(); areaConstraints->push_back( new AreaConstraint( IDS_TUTORIAL_CONSTRAINT_TUTORIAL_AREA, area->x0,area->y0,area->z0,area->x1,area->y1,area->z1) ); addTask(e_Tutorial_State_Gameplay, new AreaTask(e_Tutorial_State_Gameplay,this, areaConstraints) ); } @@ -413,12 +413,12 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/) AABB *exitArea = app.getGameRuleDefinitions()->getNamedArea(L"creativeExitArea"); if(exitArea != NULL) { - vector *creativeExitAreaConstraints = new vector(); + std::vector *creativeExitAreaConstraints = new std::vector(); creativeExitAreaConstraints->push_back( new AreaConstraint( -1, exitArea->x0,exitArea->y0,exitArea->z0,exitArea->x1,exitArea->y1,exitArea->z1,true,false) ); creativeFinalTask->AddTask( new AreaTask(e_Tutorial_State_CreativeMode, this, creativeExitAreaConstraints,IDS_TUTORIAL_TASK_CREATIVE_EXIT,AreaTask::eAreaTaskCompletion_CompleteOnConstraintsSatisfied) ); } - vector *creativeAreaConstraints = new vector(); + std::vector *creativeAreaConstraints = new std::vector(); creativeAreaConstraints->push_back( new AreaConstraint( IDS_TUTORIAL_CONSTRAINT_TUTORIAL_AREA, area->x0,area->y0,area->z0,area->x1,area->y1,area->z1) ); creativeFinalTask->AddTask( new AreaTask(e_Tutorial_State_CreativeMode, this, creativeAreaConstraints) ); diff --git a/Minecraft.Client/Build/Common/Tutorial/FullTutorialActiveTask.h b/Minecraft.Client/Build/Common/Tutorial/FullTutorialActiveTask.h index 5aa056103..8f827d593 100644 --- a/Minecraft.Client/Build/Common/Tutorial/FullTutorialActiveTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/FullTutorialActiveTask.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "TutorialTask.h" diff --git a/Minecraft.Client/Build/Common/Tutorial/InfoTask.h b/Minecraft.Client/Build/Common/Tutorial/InfoTask.h index e072038b7..1362ad52c 100644 --- a/Minecraft.Client/Build/Common/Tutorial/InfoTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/InfoTask.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "TutorialTask.h" @@ -7,7 +7,7 @@ using namespace std; class InfoTask : public TutorialTask { private: - unordered_map completedMappings; + std::unordered_map completedMappings; ETelemetryChallenges m_eTelemetryEvent; diff --git a/Minecraft.Client/Build/Common/Tutorial/LookAtEntityHint.h b/Minecraft.Client/Build/Common/Tutorial/LookAtEntityHint.h index 1c4629a89..beb5f1e1f 100644 --- a/Minecraft.Client/Build/Common/Tutorial/LookAtEntityHint.h +++ b/Minecraft.Client/Build/Common/Tutorial/LookAtEntityHint.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../../../../Minecraft.World/Util/Class.h" #include "TutorialHint.h" diff --git a/Minecraft.Client/Build/Common/Tutorial/LookAtTileHint.h b/Minecraft.Client/Build/Common/Tutorial/LookAtTileHint.h index 34ec1b957..856dbb63f 100644 --- a/Minecraft.Client/Build/Common/Tutorial/LookAtTileHint.h +++ b/Minecraft.Client/Build/Common/Tutorial/LookAtTileHint.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "TutorialHint.h" diff --git a/Minecraft.Client/Build/Common/Tutorial/PickupTask.cpp b/Minecraft.Client/Build/Common/Tutorial/PickupTask.cpp index 10268a13a..a1648e430 100644 --- a/Minecraft.Client/Build/Common/Tutorial/PickupTask.cpp +++ b/Minecraft.Client/Build/Common/Tutorial/PickupTask.cpp @@ -1,7 +1,7 @@ #include "../../../../Minecraft.World/Build/stdafx.h" #include "PickupTask.h" -void PickupTask::onTake(shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) +void PickupTask::onTake(std::shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) { if(item->id == m_itemId) { diff --git a/Minecraft.Client/Build/Common/Tutorial/PickupTask.h b/Minecraft.Client/Build/Common/Tutorial/PickupTask.h index 68e1d4793..91b800212 100644 --- a/Minecraft.Client/Build/Common/Tutorial/PickupTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/PickupTask.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "TutorialTask.h" class ItemInstance; @@ -8,7 +8,7 @@ class PickupTask : public TutorialTask { public: PickupTask( int itemId, unsigned int quantity, int auxValue, - Tutorial *tutorial, int descriptionId, bool enablePreCompletion = true, vector *inConstraints = NULL, + Tutorial *tutorial, int descriptionId, bool enablePreCompletion = true, std::vector *inConstraints = NULL, bool bShowMinimumTime=false, bool bAllowFade=true, bool m_bTaskReminders=true ) : TutorialTask(tutorial, descriptionId, enablePreCompletion, inConstraints, bShowMinimumTime, bAllowFade, m_bTaskReminders ), m_itemId( itemId), @@ -17,7 +17,7 @@ public: {} virtual bool isCompleted() { return bIsCompleted; } - virtual void onTake(shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux); + virtual void onTake(std::shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux); private: int m_itemId; diff --git a/Minecraft.Client/Build/Common/Tutorial/ProcedureCompoundTask.cpp b/Minecraft.Client/Build/Common/Tutorial/ProcedureCompoundTask.cpp index 88f906dce..a5fad5497 100644 --- a/Minecraft.Client/Build/Common/Tutorial/ProcedureCompoundTask.cpp +++ b/Minecraft.Client/Build/Common/Tutorial/ProcedureCompoundTask.cpp @@ -111,7 +111,7 @@ bool ProcedureCompoundTask::isCompleted() return allCompleted; } -void ProcedureCompoundTask::onCrafted(shared_ptr item) +void ProcedureCompoundTask::onCrafted(std::shared_ptr item) { AUTO_VAR(itEnd, m_taskSequence.end()); for(AUTO_VAR(it, m_taskSequence.begin()); it < itEnd; ++it) @@ -222,7 +222,7 @@ bool ProcedureCompoundTask::AllowFade() return allowFade; } -void ProcedureCompoundTask::useItemOn(Level *level, shared_ptr item, int x, int y, int z,bool bTestUseOnly) +void ProcedureCompoundTask::useItemOn(Level *level, std::shared_ptr item, int x, int y, int z,bool bTestUseOnly) { AUTO_VAR(itEnd, m_taskSequence.end()); for(AUTO_VAR(it, m_taskSequence.begin()); it < itEnd; ++it) @@ -232,7 +232,7 @@ void ProcedureCompoundTask::useItemOn(Level *level, shared_ptr ite } } -void ProcedureCompoundTask::useItem(shared_ptr item, bool bTestUseOnly) +void ProcedureCompoundTask::useItem(std::shared_ptr item, bool bTestUseOnly) { AUTO_VAR(itEnd, m_taskSequence.end()); for(AUTO_VAR(it, m_taskSequence.begin()); it < itEnd; ++it) @@ -242,7 +242,7 @@ void ProcedureCompoundTask::useItem(shared_ptr item, bool bTestUse } } -void ProcedureCompoundTask::onTake(shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) +void ProcedureCompoundTask::onTake(std::shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) { AUTO_VAR(itEnd, m_taskSequence.end()); for(AUTO_VAR(it, m_taskSequence.begin()); it < itEnd; ++it) diff --git a/Minecraft.Client/Build/Common/Tutorial/ProcedureCompoundTask.h b/Minecraft.Client/Build/Common/Tutorial/ProcedureCompoundTask.h index 36b327984..9be159aad 100644 --- a/Minecraft.Client/Build/Common/Tutorial/ProcedureCompoundTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/ProcedureCompoundTask.h @@ -18,7 +18,7 @@ public: virtual int getDescriptionId(); virtual int getPromptId(); virtual bool isCompleted(); - virtual void onCrafted(shared_ptr item); + virtual void onCrafted(std::shared_ptr item); virtual void handleUIInput(int iAction); virtual void setAsCurrentTask(bool active = true); virtual bool ShowMinimumTime(); @@ -26,11 +26,11 @@ public: virtual void setShownForMinimumTime(); virtual bool AllowFade(); - virtual void useItemOn(Level *level, shared_ptr item, int x, int y, int z, bool bTestUseOnly=false); - virtual void useItem(shared_ptr item, bool bTestUseOnly=false); - virtual void onTake(shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux); + virtual void useItemOn(Level *level, std::shared_ptr item, int x, int y, int z, bool bTestUseOnly=false); + virtual void useItem(std::shared_ptr item, bool bTestUseOnly=false); + virtual void onTake(std::shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux); virtual void onStateChange(eTutorial_State newState); private: - vector m_taskSequence; + std::vector m_taskSequence; }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/Tutorial/ProgressFlagTask.h b/Minecraft.Client/Build/Common/Tutorial/ProgressFlagTask.h index b96e1bc01..1d51c1751 100644 --- a/Minecraft.Client/Build/Common/Tutorial/ProgressFlagTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/ProgressFlagTask.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "Tutorial.h" #include "TutorialTask.h" diff --git a/Minecraft.Client/Build/Common/Tutorial/StatTask.h b/Minecraft.Client/Build/Common/Tutorial/StatTask.h index ba38f00a4..95af208a8 100644 --- a/Minecraft.Client/Build/Common/Tutorial/StatTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/StatTask.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "TutorialTask.h" diff --git a/Minecraft.Client/Build/Common/Tutorial/StateChangeTask.h b/Minecraft.Client/Build/Common/Tutorial/StateChangeTask.h index fb9e63966..89602bf1a 100644 --- a/Minecraft.Client/Build/Common/Tutorial/StateChangeTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/StateChangeTask.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "Tutorial.h" #include "TutorialTask.h" @@ -9,7 +9,7 @@ private: eTutorial_State m_state; public: StateChangeTask(eTutorial_State state, - Tutorial *tutorial, int descriptionId = -1, bool enablePreCompletion = false, vector *inConstraints = NULL, + Tutorial *tutorial, int descriptionId = -1, bool enablePreCompletion = false, std::vector *inConstraints = NULL, bool bShowMinimumTime=false, bool bAllowFade=true, bool m_bTaskReminders=true ) : TutorialTask(tutorial, descriptionId, enablePreCompletion, inConstraints, bShowMinimumTime, bAllowFade, m_bTaskReminders ), m_state( state ) diff --git a/Minecraft.Client/Build/Common/Tutorial/TakeItemHint.cpp b/Minecraft.Client/Build/Common/Tutorial/TakeItemHint.cpp index c39f783a2..618eab631 100644 --- a/Minecraft.Client/Build/Common/Tutorial/TakeItemHint.cpp +++ b/Minecraft.Client/Build/Common/Tutorial/TakeItemHint.cpp @@ -17,7 +17,7 @@ TakeItemHint::TakeItemHint(eTutorial_Hint id, Tutorial *tutorial, int items[], u } } -bool TakeItemHint::onTake(shared_ptr item) +bool TakeItemHint::onTake(std::shared_ptr item) { if(item != NULL) { diff --git a/Minecraft.Client/Build/Common/Tutorial/TakeItemHint.h b/Minecraft.Client/Build/Common/Tutorial/TakeItemHint.h index f001d4c7a..a7641f64b 100644 --- a/Minecraft.Client/Build/Common/Tutorial/TakeItemHint.h +++ b/Minecraft.Client/Build/Common/Tutorial/TakeItemHint.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "TutorialHint.h" @@ -15,5 +15,5 @@ public: TakeItemHint(eTutorial_Hint id, Tutorial *tutorial, int items[], unsigned int itemsLength); ~TakeItemHint(); - virtual bool onTake( shared_ptr item ); + virtual bool onTake( std::shared_ptr item ); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/Tutorial/Tutorial.cpp b/Minecraft.Client/Build/Common/Tutorial/Tutorial.cpp index 8f9e09935..5eb53da7d 100644 --- a/Minecraft.Client/Build/Common/Tutorial/Tutorial.cpp +++ b/Minecraft.Client/Build/Common/Tutorial/Tutorial.cpp @@ -18,7 +18,7 @@ #include "TutorialConstraints.h" #include "TutorialHints.h" -vector Tutorial::s_completableTasks; +std::vector Tutorial::s_completableTasks; int Tutorial::m_iTutorialHintDelayTime = 14000; @@ -1003,7 +1003,7 @@ Tutorial::~Tutorial() { delete (*it); } - for(unordered_map::iterator it = messages.begin(); it != messages.end(); ++it) + for(std::unordered_map::iterator it = messages.begin(); it != messages.end(); ++it) { delete (*it).second; } @@ -1557,7 +1557,7 @@ bool Tutorial::setMessage(PopupMessageDetails *message) if(!message->m_replaceCurrent) lastMessageTime = GetTickCount(); - wstring text; + std::wstring text; if(!message->m_messageString.empty()) { text = message->m_messageString; @@ -1568,11 +1568,11 @@ bool Tutorial::setMessage(PopupMessageDetails *message) if( it != messages.end() && it->second != NULL ) { TutorialMessage *messageString = it->second; - text = wstring( messageString->getMessageForDisplay() ); + text = std::wstring( messageString->getMessageForDisplay() ); } else { - text = wstring( app.GetString(message->m_messageId) ); + text = std::wstring( app.GetString(message->m_messageId) ); } } @@ -1590,7 +1590,7 @@ bool Tutorial::setMessage(PopupMessageDetails *message) } } - wstring title; + std::wstring title; TutorialPopupInfo popupInfo; popupInfo.interactScene = m_UIScene; popupInfo.desc = text.c_str(); @@ -1601,7 +1601,7 @@ bool Tutorial::setMessage(PopupMessageDetails *message) popupInfo.tutorial = this; if( !message->m_titleString.empty() || message->m_titleId > 0 ) { - if(message->m_titleString.empty()) title = wstring( app.GetString(message->m_titleId) ); + if(message->m_titleString.empty()) title = std::wstring( app.GetString(message->m_titleId) ); else title = message->m_titleString; popupInfo.title = title.c_str(); @@ -1656,7 +1656,7 @@ bool Tutorial::setMessage(TutorialHint *hint, PopupMessageDetails *message) return messageShown; } -bool Tutorial::setMessage(const wstring &messageString, int icon, int auxValue) +bool Tutorial::setMessage(const std::wstring &messageString, int icon, int auxValue) { PopupMessageDetails *message = new PopupMessageDetails(); message->m_messageString = messageString; @@ -1681,7 +1681,7 @@ void Tutorial::showTutorialPopup(bool show) } } -void Tutorial::useItemOn(Level *level, shared_ptr item, int x, int y, int z, bool bTestUseOnly) +void Tutorial::useItemOn(Level *level, std::shared_ptr item, int x, int y, int z, bool bTestUseOnly) { for(AUTO_VAR(it, activeTasks[m_CurrentState].begin()); it < activeTasks[m_CurrentState].end(); ++it) { @@ -1690,7 +1690,7 @@ void Tutorial::useItemOn(Level *level, shared_ptr item, int x, int } } -void Tutorial::useItemOn(shared_ptr item, bool bTestUseOnly) +void Tutorial::useItemOn(std::shared_ptr item, bool bTestUseOnly) { for(AUTO_VAR(it, activeTasks[m_CurrentState].begin()); it < activeTasks[m_CurrentState].end(); ++it) { @@ -1699,7 +1699,7 @@ void Tutorial::useItemOn(shared_ptr item, bool bTestUseOnly) } } -void Tutorial::completeUsingItem(shared_ptr item) +void Tutorial::completeUsingItem(std::shared_ptr item) { for(AUTO_VAR(it, activeTasks[m_CurrentState].begin()); it < activeTasks[m_CurrentState].end(); ++it) { @@ -1718,7 +1718,7 @@ void Tutorial::completeUsingItem(shared_ptr item) } } -void Tutorial::startDestroyBlock(shared_ptr item, Tile *tile) +void Tutorial::startDestroyBlock(std::shared_ptr item, Tile *tile) { int hintNeeded = -1; for(AUTO_VAR(it, hints[m_CurrentState].begin()); it < hints[m_CurrentState].end(); ++it) @@ -1754,7 +1754,7 @@ void Tutorial::destroyBlock(Tile *tile) } } -void Tutorial::attack(shared_ptr player, shared_ptr entity) +void Tutorial::attack(std::shared_ptr player, std::shared_ptr entity) { int hintNeeded = -1; for(AUTO_VAR(it, hints[m_CurrentState].begin()); it < hints[m_CurrentState].end(); ++it) @@ -1772,7 +1772,7 @@ void Tutorial::attack(shared_ptr player, shared_ptr entity) } } -void Tutorial::itemDamaged(shared_ptr item) +void Tutorial::itemDamaged(std::shared_ptr item) { int hintNeeded = -1; for(AUTO_VAR(it, hints[m_CurrentState].begin()); it < hints[m_CurrentState].end(); ++it) @@ -1803,7 +1803,7 @@ void Tutorial::handleUIInput(int iAction) currentTask[m_CurrentState]->handleUIInput(iAction); } -void Tutorial::createItemSelected(shared_ptr item, bool canMake) +void Tutorial::createItemSelected(std::shared_ptr item, bool canMake) { int hintNeeded = -1; for(AUTO_VAR(it, hints[m_CurrentState].begin()); it < hints[m_CurrentState].end(); ++it) @@ -1821,7 +1821,7 @@ void Tutorial::createItemSelected(shared_ptr item, bool canMake) } } -void Tutorial::onCrafted(shared_ptr item) +void Tutorial::onCrafted(std::shared_ptr item) { for(unsigned int state = 0; state < e_Tutorial_State_Max; ++state) { @@ -1833,7 +1833,7 @@ void Tutorial::onCrafted(shared_ptr item) } } -void Tutorial::onTake(shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) +void Tutorial::onTake(std::shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) { if( !m_hintDisplayed ) { @@ -1860,7 +1860,7 @@ void Tutorial::onTake(shared_ptr item, unsigned int invItemCountAn } } -void Tutorial::onSelectedItemChanged(shared_ptr item) +void Tutorial::onSelectedItemChanged(std::shared_ptr item) { // We only handle this if we are in a state that allows changing based on the selected item // Menus and states like riding in a minecart will NOT allow this @@ -1976,7 +1976,7 @@ bool Tutorial::isInputAllowed(int mapping) return allowed; } -vector *Tutorial::getTasks() +std::vector *Tutorial::getTasks() { return &tasks; } diff --git a/Minecraft.Client/Build/Common/Tutorial/Tutorial.h b/Minecraft.Client/Build/Common/Tutorial/Tutorial.h index aaaaba0a7..539d7c116 100644 --- a/Minecraft.Client/Build/Common/Tutorial/Tutorial.h +++ b/Minecraft.Client/Build/Common/Tutorial/Tutorial.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "TutorialTask.h" #include "TutorialConstraint.h" #include "TutorialHint.h" @@ -27,9 +27,9 @@ public: int m_messageId; int m_promptId; int m_titleId; - wstring m_messageString; - wstring m_promptString; - wstring m_titleString; + std::wstring m_messageString; + std::wstring m_promptString; + std::wstring m_titleString; int m_icon; int m_iAuxVal; bool m_allowFade; @@ -78,13 +78,13 @@ private: int m_firstTickTime; protected: - unordered_map messages; - vector m_globalConstraints; - vector constraints[e_Tutorial_State_Max]; - vector< pair > constraintsToRemove[e_Tutorial_State_Max]; - vector tasks; // We store a copy of the tasks for the main gameplay tutorial so that we could display an overview menu - vector activeTasks[e_Tutorial_State_Max]; - vector hints[e_Tutorial_State_Max]; + std::unordered_map messages; + std::vector m_globalConstraints; + std::vector constraints[e_Tutorial_State_Max]; + std::vector< pair > constraintsToRemove[e_Tutorial_State_Max]; + std::vector tasks; // We store a copy of the tasks for the main gameplay tutorial so that we could display an overview menu + std::vector activeTasks[e_Tutorial_State_Max]; + std::vector hints[e_Tutorial_State_Max]; TutorialTask *currentTask[e_Tutorial_State_Max]; TutorialConstraint *currentFailedConstraint[e_Tutorial_State_Max]; @@ -147,23 +147,23 @@ public: bool setMessage(PopupMessageDetails *message); bool setMessage(TutorialHint *hint, PopupMessageDetails *message); - bool setMessage(const wstring &message, int icon, int auxValue); + bool setMessage(const std::wstring &message, int icon, int auxValue); void showTutorialPopup(bool show); - void useItemOn(Level *level, shared_ptr item, int x, int y, int z,bool bTestUseOnly=false); - void useItemOn(shared_ptr item, bool bTestUseOnly=false); - void completeUsingItem(shared_ptr item); - void startDestroyBlock(shared_ptr item, Tile *tile); + void useItemOn(Level *level, std::shared_ptr item, int x, int y, int z,bool bTestUseOnly=false); + void useItemOn(std::shared_ptr item, bool bTestUseOnly=false); + void completeUsingItem(std::shared_ptr item); + void startDestroyBlock(std::shared_ptr item, Tile *tile); void destroyBlock(Tile *tile); - void attack(shared_ptr player, shared_ptr entity); - void itemDamaged(shared_ptr item); + void attack(std::shared_ptr player, std::shared_ptr entity); + void itemDamaged(std::shared_ptr item); void handleUIInput(int iAction); - void createItemSelected(shared_ptr item, bool canMake); - void onCrafted(shared_ptr item); - void onTake(shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux); - void onSelectedItemChanged(shared_ptr item); + void createItemSelected(std::shared_ptr item, bool canMake); + void onCrafted(std::shared_ptr item); + void onTake(std::shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux); + void onSelectedItemChanged(std::shared_ptr item); void onLookAt(int id, int iData=0); void onLookAtEntity(eINSTANCEOF type); void onEffectChanged(MobEffect *effect, bool bRemoved=false); @@ -181,7 +181,7 @@ public: int GetTutorialDisplayMessageTime() {return m_iTutorialDisplayMessageTime;} // Only for the main gameplay tutorial - vector *getTasks(); + std::vector *getTasks(); unsigned int getCurrentTaskIndex(); #ifdef _XBOX @@ -193,7 +193,7 @@ public: // These are required so that we have a consistent mapping of the completion bits stored in the profile data static void staticCtor(); - static vector s_completableTasks; + static std::vector s_completableTasks; static void debugResetPlayerSavedProgress(int iPad); }; diff --git a/Minecraft.Client/Build/Common/Tutorial/TutorialHint.cpp b/Minecraft.Client/Build/Common/Tutorial/TutorialHint.cpp index cd4f98f39..22a9ad555 100644 --- a/Minecraft.Client/Build/Common/Tutorial/TutorialHint.cpp +++ b/Minecraft.Client/Build/Common/Tutorial/TutorialHint.cpp @@ -14,7 +14,7 @@ TutorialHint::TutorialHint(eTutorial_Hint id, Tutorial *tutorial, int descriptio tutorial->addMessage(descriptionId, type != e_Hint_NoIngredients); } -int TutorialHint::startDestroyBlock(shared_ptr item, Tile *tile) +int TutorialHint::startDestroyBlock(std::shared_ptr item, Tile *tile) { int returnVal = -1; switch(m_type) @@ -59,7 +59,7 @@ int TutorialHint::destroyBlock(Tile *tile) return returnVal; } -int TutorialHint::attack(shared_ptr item, shared_ptr entity) +int TutorialHint::attack(std::shared_ptr item, std::shared_ptr entity) { /* switch(m_type) @@ -71,7 +71,7 @@ int TutorialHint::attack(shared_ptr item, shared_ptr entit return -1; } -int TutorialHint::createItemSelected(shared_ptr item, bool canMake) +int TutorialHint::createItemSelected(std::shared_ptr item, bool canMake) { int returnVal = -1; switch(m_type) @@ -86,7 +86,7 @@ int TutorialHint::createItemSelected(shared_ptr item, bool canMake return returnVal; } -int TutorialHint::itemDamaged(shared_ptr item) +int TutorialHint::itemDamaged(std::shared_ptr item) { int returnVal = -1; switch(m_type) @@ -100,7 +100,7 @@ int TutorialHint::itemDamaged(shared_ptr item) return returnVal; } -bool TutorialHint::onTake( shared_ptr item ) +bool TutorialHint::onTake( std::shared_ptr item ) { return false; } diff --git a/Minecraft.Client/Build/Common/Tutorial/TutorialHint.h b/Minecraft.Client/Build/Common/Tutorial/TutorialHint.h index 8ca543cc7..191b021f3 100644 --- a/Minecraft.Client/Build/Common/Tutorial/TutorialHint.h +++ b/Minecraft.Client/Build/Common/Tutorial/TutorialHint.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "TutorialEnum.h" @@ -40,12 +40,12 @@ public: eTutorial_Hint getId() { return m_id; } - virtual int startDestroyBlock(shared_ptr item, Tile *tile); + virtual int startDestroyBlock(std::shared_ptr item, Tile *tile); virtual int destroyBlock(Tile *tile); - virtual int attack(shared_ptr item, shared_ptr entity); - virtual int createItemSelected(shared_ptr item, bool canMake); - virtual int itemDamaged(shared_ptr item); - virtual bool onTake( shared_ptr item ); + virtual int attack(std::shared_ptr item, std::shared_ptr entity); + virtual int createItemSelected(std::shared_ptr item, bool canMake); + virtual int itemDamaged(std::shared_ptr item); + virtual bool onTake( std::shared_ptr item ); virtual bool onLookAt(int id, int iData=0); virtual bool onLookAtEntity(eINSTANCEOF type); virtual int tick(); diff --git a/Minecraft.Client/Build/Common/Tutorial/TutorialMode.cpp b/Minecraft.Client/Build/Common/Tutorial/TutorialMode.cpp index 26b43de7b..014ff6554 100644 --- a/Minecraft.Client/Build/Common/Tutorial/TutorialMode.cpp +++ b/Minecraft.Client/Build/Common/Tutorial/TutorialMode.cpp @@ -36,7 +36,7 @@ bool TutorialMode::destroyBlock(int x, int y, int z, int face) int t = minecraft->level->getTile(x, y, z); tutorial->destroyBlock(Tile::tiles[t]); } - shared_ptr item = minecraft->player->getSelectedItem(); + std::shared_ptr item = minecraft->player->getSelectedItem(); int damageBefore; if(item != NULL) { @@ -78,7 +78,7 @@ void TutorialMode::tick() */ } -bool TutorialMode::useItemOn(shared_ptr player, Level *level, shared_ptr item, int x, int y, int z, int face, Vec3 *hit, bool bTestUseOnly, bool *pbUsedItem) +bool TutorialMode::useItemOn(std::shared_ptr player, Level *level, std::shared_ptr item, int x, int y, int z, int face, Vec3 *hit, bool bTestUseOnly, bool *pbUsedItem) { bool haveItem = false; int itemCount = 0; @@ -110,7 +110,7 @@ bool TutorialMode::useItemOn(shared_ptr player, Level *level, shared_ptr return result; } -void TutorialMode::attack(shared_ptr player, shared_ptr entity) +void TutorialMode::attack(std::shared_ptr player, std::shared_ptr entity) { if(!tutorial->m_allTutorialsComplete) tutorial->attack(player, entity); diff --git a/Minecraft.Client/Build/Common/Tutorial/TutorialMode.h b/Minecraft.Client/Build/Common/Tutorial/TutorialMode.h index 1a13252c6..b7694d267 100644 --- a/Minecraft.Client/Build/Common/Tutorial/TutorialMode.h +++ b/Minecraft.Client/Build/Common/Tutorial/TutorialMode.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../../../Player/MultiPlayerGameMode.h" #include "Tutorial.h" @@ -19,8 +19,8 @@ public: virtual void startDestroyBlock(int x, int y, int z, int face); virtual bool destroyBlock(int x, int y, int z, int face); virtual void tick(); - virtual bool useItemOn(shared_ptr player, Level *level, shared_ptr item, int x, int y, int z, int face, Vec3 *hit, bool bTestUseOnly=false, bool *pbUsedItem=NULL); - virtual void attack(shared_ptr player, shared_ptr entity); + virtual bool useItemOn(std::shared_ptr player, Level *level, std::shared_ptr item, int x, int y, int z, int face, Vec3 *hit, bool bTestUseOnly=false, bool *pbUsedItem=NULL); + virtual void attack(std::shared_ptr player, std::shared_ptr entity); virtual bool isInputAllowed(int mapping); diff --git a/Minecraft.Client/Build/Common/Tutorial/TutorialTask.cpp b/Minecraft.Client/Build/Common/Tutorial/TutorialTask.cpp index eba9cdb72..4507dc25e 100644 --- a/Minecraft.Client/Build/Common/Tutorial/TutorialTask.cpp +++ b/Minecraft.Client/Build/Common/Tutorial/TutorialTask.cpp @@ -3,7 +3,7 @@ #include "TutorialConstraints.h" #include "TutorialTask.h" -TutorialTask::TutorialTask(Tutorial *tutorial, int descriptionId, bool enablePreCompletion, vector *inConstraints, +TutorialTask::TutorialTask(Tutorial *tutorial, int descriptionId, bool enablePreCompletion, std::vector *inConstraints, bool bShowMinimumTime, bool bAllowFade, bool bTaskReminders) : tutorial( tutorial ), descriptionId( descriptionId ), m_promptId( -1 ), enablePreCompletion( enablePreCompletion ), areConstraintsEnabled( false ), bIsCompleted( false ), bHasBeenActivated( false ), diff --git a/Minecraft.Client/Build/Common/Tutorial/TutorialTask.h b/Minecraft.Client/Build/Common/Tutorial/TutorialTask.h index 92cb59990..c3074b9dc 100644 --- a/Minecraft.Client/Build/Common/Tutorial/TutorialTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/TutorialTask.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "TutorialEnum.h" class Level; @@ -30,10 +30,10 @@ protected: protected: bool bIsCompleted; bool m_bShownForMinimumTime; - vector constraints; + std::vector constraints; bool areConstraintsEnabled; public: - TutorialTask(Tutorial *tutorial, int descriptionId, bool enablePreCompletion, vector *inConstraints, bool bShowMinimumTime=false, bool bAllowFade=true, bool m_bTaskReminders=true ); + TutorialTask(Tutorial *tutorial, int descriptionId, bool enablePreCompletion, std::vector *inConstraints, bool bShowMinimumTime=false, bool bAllowFade=true, bool m_bTaskReminders=true ); virtual ~TutorialTask(); virtual int getDescriptionId() { return descriptionId; } @@ -52,12 +52,12 @@ public: bool TaskReminders() { return m_bTaskReminders;} virtual bool ShowMinimumTime() { return m_bShowMinimumTime;} - virtual void useItemOn(Level *level, shared_ptr item, int x, int y, int z, bool bTestUseOnly=false) { } - virtual void useItem(shared_ptr item,bool bTestUseOnly=false) { } - virtual void completeUsingItem(shared_ptr item) { } + virtual void useItemOn(Level *level, std::shared_ptr item, int x, int y, int z, bool bTestUseOnly=false) { } + virtual void useItem(std::shared_ptr item,bool bTestUseOnly=false) { } + virtual void completeUsingItem(std::shared_ptr item) { } virtual void handleUIInput(int iAction) { } - virtual void onCrafted(shared_ptr item) { } - virtual void onTake(shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) { } + virtual void onCrafted(std::shared_ptr item) { } + virtual void onTake(std::shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) { } virtual void onStateChange(eTutorial_State newState) { } virtual void onEffectChanged(MobEffect *effect, bool bRemoved=false) { } }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/Tutorial/UseItemTask.cpp b/Minecraft.Client/Build/Common/Tutorial/UseItemTask.cpp index 2cbb1f18d..b9b0d4e33 100644 --- a/Minecraft.Client/Build/Common/Tutorial/UseItemTask.cpp +++ b/Minecraft.Client/Build/Common/Tutorial/UseItemTask.cpp @@ -5,7 +5,7 @@ #include "UseItemTask.h" UseItemTask::UseItemTask(const int itemId, Tutorial *tutorial, int descriptionId, - bool enablePreCompletion, vector *inConstraints, bool bShowMinimumTime, bool bAllowFade, bool bTaskReminders) + bool enablePreCompletion, std::vector *inConstraints, bool bShowMinimumTime, bool bAllowFade, bool bTaskReminders) : TutorialTask( tutorial, descriptionId, enablePreCompletion, inConstraints, bShowMinimumTime, bAllowFade, bTaskReminders ), itemId( itemId ) { @@ -16,7 +16,7 @@ bool UseItemTask::isCompleted() return bIsCompleted; } -void UseItemTask::useItem(shared_ptr item,bool bTestUseOnly) +void UseItemTask::useItem(std::shared_ptr item,bool bTestUseOnly) { if(bTestUseOnly) return; diff --git a/Minecraft.Client/Build/Common/Tutorial/UseItemTask.h b/Minecraft.Client/Build/Common/Tutorial/UseItemTask.h index 46d71be47..d86cd45e5 100644 --- a/Minecraft.Client/Build/Common/Tutorial/UseItemTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/UseItemTask.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "TutorialTask.h" @@ -14,7 +14,7 @@ private: public: UseItemTask(const int itemId, Tutorial *tutorial, int descriptionId, - bool enablePreCompletion = false, vector *inConstraints = NULL, bool bShowMinimumTime = false, bool bAllowFade = true, bool bTaskReminders = true ); + bool enablePreCompletion = false, std::vector *inConstraints = NULL, bool bShowMinimumTime = false, bool bAllowFade = true, bool bTaskReminders = true ); virtual bool isCompleted(); - virtual void useItem(shared_ptr item, bool bTestUseOnly=false); + virtual void useItem(std::shared_ptr item, bool bTestUseOnly=false); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/Tutorial/UseTileTask.cpp b/Minecraft.Client/Build/Common/Tutorial/UseTileTask.cpp index 191c37e07..0e21de012 100644 --- a/Minecraft.Client/Build/Common/Tutorial/UseTileTask.cpp +++ b/Minecraft.Client/Build/Common/Tutorial/UseTileTask.cpp @@ -5,7 +5,7 @@ #include "UseTileTask.h" UseTileTask::UseTileTask(const int tileId, int x, int y, int z, Tutorial *tutorial, int descriptionId, - bool enablePreCompletion, vector *inConstraints, bool bShowMinimumTime, bool bAllowFade, bool bTaskReminders) + bool enablePreCompletion, std::vector *inConstraints, bool bShowMinimumTime, bool bAllowFade, bool bTaskReminders) : TutorialTask( tutorial, descriptionId, enablePreCompletion, inConstraints, bShowMinimumTime, bAllowFade, bTaskReminders ), x( x ), y( y ), z( z ), tileId( tileId ) { @@ -13,7 +13,7 @@ UseTileTask::UseTileTask(const int tileId, int x, int y, int z, Tutorial *tutori } UseTileTask::UseTileTask(const int tileId, Tutorial *tutorial, int descriptionId, - bool enablePreCompletion, vector *inConstraints, bool bShowMinimumTime, bool bAllowFade, bool bTaskReminders) + bool enablePreCompletion, std::vector *inConstraints, bool bShowMinimumTime, bool bAllowFade, bool bTaskReminders) : TutorialTask( tutorial, descriptionId, enablePreCompletion, inConstraints, bShowMinimumTime, bAllowFade, bTaskReminders ), tileId( tileId ) { @@ -25,7 +25,7 @@ bool UseTileTask::isCompleted() return bIsCompleted; } -void UseTileTask::useItemOn(Level *level, shared_ptr item, int x, int y, int z,bool bTestUseOnly) +void UseTileTask::useItemOn(Level *level, std::shared_ptr item, int x, int y, int z,bool bTestUseOnly) { if(bTestUseOnly) return; diff --git a/Minecraft.Client/Build/Common/Tutorial/UseTileTask.h b/Minecraft.Client/Build/Common/Tutorial/UseTileTask.h index 74b3a40cc..7d2467086 100644 --- a/Minecraft.Client/Build/Common/Tutorial/UseTileTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/UseTileTask.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "TutorialTask.h" @@ -16,9 +16,9 @@ private: public: UseTileTask(const int tileId, int x, int y, int z, Tutorial *tutorial, int descriptionId, - bool enablePreCompletion = false, vector *inConstraints = NULL, bool bShowMinimumTime = false, bool bAllowFade = true, bool bTaskReminders = true ); + bool enablePreCompletion = false, std::vector *inConstraints = NULL, bool bShowMinimumTime = false, bool bAllowFade = true, bool bTaskReminders = true ); UseTileTask(const int tileId, Tutorial *tutorial, int descriptionId, - bool enablePreCompletion = false, vector *inConstraints = NULL, bool bShowMinimumTime = false, bool bAllowFade = true, bool bTaskReminders = true); + bool enablePreCompletion = false, std::vector *inConstraints = NULL, bool bShowMinimumTime = false, bool bAllowFade = true, bool bTaskReminders = true); virtual bool isCompleted(); - virtual void useItemOn(Level *level, shared_ptr item, int x, int y, int z, bool bTestUseOnly=false); + virtual void useItemOn(Level *level, std::shared_ptr item, int x, int y, int z, bool bTestUseOnly=false); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/Tutorial/XuiCraftingTask.h b/Minecraft.Client/Build/Common/Tutorial/XuiCraftingTask.h index fff91c833..eae78a54c 100644 --- a/Minecraft.Client/Build/Common/Tutorial/XuiCraftingTask.h +++ b/Minecraft.Client/Build/Common/Tutorial/XuiCraftingTask.h @@ -12,7 +12,7 @@ public: }; // Select group - XuiCraftingTask(Tutorial *tutorial, int descriptionId, Recipy::_eGroupType groupToSelect, bool enablePreCompletion = false, vector *inConstraints = NULL, + XuiCraftingTask(Tutorial *tutorial, int descriptionId, Recipy::_eGroupType groupToSelect, bool enablePreCompletion = false, std::vector *inConstraints = NULL, bool bShowMinimumTime=false, bool bAllowFade=true, bool m_bTaskReminders=true ) : TutorialTask(tutorial, descriptionId, enablePreCompletion, inConstraints, bShowMinimumTime, bAllowFade, m_bTaskReminders ), m_group(groupToSelect), @@ -20,7 +20,7 @@ public: {} // Select Item - XuiCraftingTask(Tutorial *tutorial, int descriptionId, int itemId, bool enablePreCompletion = false, vector *inConstraints = NULL, + XuiCraftingTask(Tutorial *tutorial, int descriptionId, int itemId, bool enablePreCompletion = false, std::vector *inConstraints = NULL, bool bShowMinimumTime=false, bool bAllowFade=true, bool m_bTaskReminders=true ) : TutorialTask(tutorial, descriptionId, enablePreCompletion, inConstraints, bShowMinimumTime, bAllowFade, m_bTaskReminders ), m_item(itemId), diff --git a/Minecraft.Client/Build/Common/UI/IUIController.h b/Minecraft.Client/Build/Common/UI/IUIController.h index 319185d83..b6ecc91f2 100644 --- a/Minecraft.Client/Build/Common/UI/IUIController.h +++ b/Minecraft.Client/Build/Common/UI/IUIController.h @@ -39,7 +39,7 @@ public: virtual void ShowUIDebugMarketingGuide(bool show) {} virtual void DisplayGamertag(unsigned int iPad, bool show) = 0; - virtual void SetSelectedItem(unsigned int iPad, const wstring &name) = 0; + virtual void SetSelectedItem(unsigned int iPad, const std::wstring &name) = 0; virtual void UpdateSelectedItemPos(unsigned int iPad) = 0; virtual void HandleDLCMountingComplete() = 0; diff --git a/Minecraft.Client/Build/Common/UI/IUIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Build/Common/UI/IUIScene_AbstractContainerMenu.cpp index acb96a88e..990fad03e 100644 --- a/Minecraft.Client/Build/Common/UI/IUIScene_AbstractContainerMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/IUIScene_AbstractContainerMenu.cpp @@ -703,11 +703,11 @@ void IUIScene_AbstractContainerMenu::onMouseTick() // Determine appropriate context sensitive tool tips, based on what is carried on the pointer and what is under the pointer. // What are we carrying on pointer. - shared_ptr player = Minecraft::GetInstance()->localplayers[getPad()]; - shared_ptr carriedItem = nullptr; + std::shared_ptr player = Minecraft::GetInstance()->localplayers[getPad()]; + std::shared_ptr carriedItem = nullptr; if(player != NULL) carriedItem = player->inventory->getCarried(); - shared_ptr slotItem = nullptr; + std::shared_ptr slotItem = nullptr; Slot *slot = NULL; int slotIndex = 0; if(bPointerIsOverSlot) @@ -767,14 +767,14 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if( bPointerIsOverSlot && bSlotHasItem ) { - vector unformattedStrings; - wstring desc = GetItemDescription( slot, unformattedStrings ); + std::vector unformattedStrings; + std::wstring desc = GetItemDescription( slot, unformattedStrings ); SetPointerText(desc, unformattedStrings, slot != m_lastPointerLabelSlot); m_lastPointerLabelSlot = slot; } else { - vector unformattedStrings; + std::vector unformattedStrings; SetPointerText(L"", unformattedStrings, false); m_lastPointerLabelSlot = NULL; } @@ -888,7 +888,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if((eSectionUnderPointer==eSectionInventoryUsing)||(eSectionUnderPointer==eSectionInventoryInventory)) { - shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); + std::shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); ArmorRecipes::_eArmorType eArmourType=ArmorRecipes::GetArmorType(item->id); if(eArmourType==ArmorRecipes::eArmorType_None) @@ -951,7 +951,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() else if((eSectionUnderPointer==eSectionFurnaceUsing)||(eSectionUnderPointer==eSectionFurnaceInventory)) { // Get the info on this item. - shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); + std::shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); bool bValidFuel = FurnaceTileEntity::isFuel(item); bool bValidIngredient = FurnaceRecipes::getInstance()->getResult(item->getItem()->id) != NULL; @@ -961,7 +961,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if(!isSlotEmpty(eSectionFurnaceIngredient,0)) { // is it the same as this item - shared_ptr IngredientItem = getSlotItem(eSectionFurnaceIngredient,0); + std::shared_ptr IngredientItem = getSlotItem(eSectionFurnaceIngredient,0); if(IngredientItem->id == item->id) { buttonY = eToolTipQuickMoveIngredient; @@ -990,7 +990,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if(!isSlotEmpty(eSectionFurnaceFuel,0)) { // is it the same as this item - shared_ptr fuelItem = getSlotItem(eSectionFurnaceFuel,0); + std::shared_ptr fuelItem = getSlotItem(eSectionFurnaceFuel,0); if(fuelItem->id == item->id) { buttonY = eToolTipQuickMoveFuel; @@ -1001,7 +1001,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if(!isSlotEmpty(eSectionFurnaceIngredient,0)) { // is it the same as this item - shared_ptr IngredientItem = getSlotItem(eSectionFurnaceIngredient,0); + std::shared_ptr IngredientItem = getSlotItem(eSectionFurnaceIngredient,0); if(IngredientItem->id == item->id) { buttonY = eToolTipQuickMoveIngredient; @@ -1043,7 +1043,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() else if((eSectionUnderPointer==eSectionBrewingUsing)||(eSectionUnderPointer==eSectionBrewingInventory)) { // Get the info on this item. - shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); + std::shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); int iId=item->id; // valid ingredient? @@ -1061,7 +1061,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if(!isSlotEmpty(eSectionBrewingIngredient,0)) { // is it the same as this item - shared_ptr IngredientItem = getSlotItem(eSectionBrewingIngredient,0); + std::shared_ptr IngredientItem = getSlotItem(eSectionBrewingIngredient,0); if(IngredientItem->id == item->id) { buttonY = eToolTipQuickMoveIngredient; @@ -1103,7 +1103,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() else if((eSectionUnderPointer==eSectionEnchantUsing)||(eSectionUnderPointer==eSectionEnchantInventory)) { // Get the info on this item. - shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); + std::shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); int iId=item->id; // valid enchantable tool? @@ -1198,7 +1198,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() SetPointerOutsideMenu( false ); } - shared_ptr item = nullptr; + std::shared_ptr item = nullptr; if(bPointerIsOverSlot && bSlotHasItem) item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); overrideTooltips(eSectionUnderPointer, item, bIsItemCarried, bSlotHasItem, bCarriedIsSameAsSlot, iSlotStackSizeRemaining, buttonA, buttonX, buttonY, buttonRT); @@ -1409,7 +1409,7 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b bool bSlotHasItem = !isSlotEmpty(m_eCurrSection, currentIndex); if ( bSlotHasItem ) { - shared_ptr item = getSlotItem(m_eCurrSection, currentIndex); + std::shared_ptr item = getSlotItem(m_eCurrSection, currentIndex); if( Minecraft::GetInstance()->localgameModes[iPad] != NULL ) { Tutorial::PopupMessageDetails *message = new Tutorial::PopupMessageDetails; @@ -1568,7 +1568,7 @@ int IUIScene_AbstractContainerMenu::getCurrentIndex(ESceneSection eSection) return currentIndex + getSectionStartOffset(eSection); } -bool IUIScene_AbstractContainerMenu::IsSameItemAs(shared_ptr itemA, shared_ptr itemB) +bool IUIScene_AbstractContainerMenu::IsSameItemAs(std::shared_ptr itemA, std::shared_ptr itemB) { if(itemA == NULL || itemB == NULL) return false; @@ -1582,7 +1582,7 @@ int IUIScene_AbstractContainerMenu::GetEmptyStackSpace(Slot *slot) if(slot != NULL && slot->hasItem()) { - shared_ptr item = slot->getItem(); + std::shared_ptr item = slot->getItem(); if ( item->isStackable() ) { int iCount = item->GetCount(); @@ -1597,16 +1597,16 @@ int IUIScene_AbstractContainerMenu::GetEmptyStackSpace(Slot *slot) return iResult; } -wstring IUIScene_AbstractContainerMenu::GetItemDescription(Slot *slot, vector &unformattedStrings) +std::wstring IUIScene_AbstractContainerMenu::GetItemDescription(Slot *slot, std::vector &unformattedStrings) { if(slot == NULL) return L""; - wstring desc = L""; - vector *strings = slot->getItem()->getHoverText(nullptr, false, unformattedStrings); + std::wstring desc = L""; + std::vector *strings = slot->getItem()->getHoverText(nullptr, false, unformattedStrings); bool firstLine = true; for(AUTO_VAR(it, strings->begin()); it != strings->end(); ++it) { - wstring thisString = *it; + std::wstring thisString = *it; if(!firstLine) { desc.append( L"
" ); diff --git a/Minecraft.Client/Build/Common/UI/IUIScene_AbstractContainerMenu.h b/Minecraft.Client/Build/Common/UI/IUIScene_AbstractContainerMenu.h index bdb8bb4c8..33c49f689 100644 --- a/Minecraft.Client/Build/Common/UI/IUIScene_AbstractContainerMenu.h +++ b/Minecraft.Client/Build/Common/UI/IUIScene_AbstractContainerMenu.h @@ -200,18 +200,18 @@ protected: virtual void setSectionFocus(ESceneSection eSection, int iPad) = 0; virtual void setSectionSelectedSlot(ESceneSection eSection, int x, int y) = 0; virtual void setFocusToPointer(int iPad) = 0; - virtual void SetPointerText(const wstring &description, vector &unformattedStrings, bool newSlot) = 0; - virtual shared_ptr getSlotItem(ESceneSection eSection, int iSlot) = 0; + virtual void SetPointerText(const std::wstring &description, std::vector &unformattedStrings, bool newSlot) = 0; + virtual std::shared_ptr getSlotItem(ESceneSection eSection, int iSlot) = 0; virtual bool isSlotEmpty(ESceneSection eSection, int iSlot) = 0; virtual void adjustPointerForSafeZone() = 0; - virtual bool overrideTooltips(ESceneSection sectionUnderPointer, shared_ptr itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, + virtual bool overrideTooltips(ESceneSection sectionUnderPointer, std::shared_ptr itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, EToolTipItem &buttonA, EToolTipItem &buttonX, EToolTipItem &buttonY, EToolTipItem &buttonRT) { return false; } private: - bool IsSameItemAs(shared_ptr itemA, shared_ptr itemB); + bool IsSameItemAs(std::shared_ptr itemA, std::shared_ptr itemB); int GetEmptyStackSpace(Slot *slot); - wstring GetItemDescription(Slot *slot, vector &unformattedStrings); + std::wstring GetItemDescription(Slot *slot, std::vector &unformattedStrings); protected: diff --git a/Minecraft.Client/Build/Common/UI/IUIScene_AnvilMenu.cpp b/Minecraft.Client/Build/Common/UI/IUIScene_AnvilMenu.cpp index 1f5c43ae7..3786d792a 100644 --- a/Minecraft.Client/Build/Common/UI/IUIScene_AnvilMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/IUIScene_AnvilMenu.cpp @@ -197,7 +197,7 @@ void IUIScene_AnvilMenu::handleTick() { Minecraft *pMinecraft = Minecraft::GetInstance(); bool canAfford = true; - wstring m_costString = L""; + std::wstring m_costString = L""; if(m_repairMenu->cost > 0) { @@ -245,15 +245,15 @@ void IUIScene_AnvilMenu::updateItemName() ByteArrayOutputStream baos; DataOutputStream dos(&baos); dos.writeUTF(m_itemName); - Minecraft::GetInstance()->localplayers[getPad()]->connection->send(shared_ptr(new CustomPayloadPacket(CustomPayloadPacket::SET_ITEM_NAME_PACKET, baos.toByteArray()))); + Minecraft::GetInstance()->localplayers[getPad()]->connection->send(std::shared_ptr(new CustomPayloadPacket(CustomPayloadPacket::SET_ITEM_NAME_PACKET, baos.toByteArray()))); } -void IUIScene_AnvilMenu::refreshContainer(AbstractContainerMenu *container, vector > *items) +void IUIScene_AnvilMenu::refreshContainer(AbstractContainerMenu *container, std::vector > *items) { slotChanged(container, RepairMenu::INPUT_SLOT, container->getSlot(0)->getItem()); } -void IUIScene_AnvilMenu::slotChanged(AbstractContainerMenu *container, int slotIndex, shared_ptr item) +void IUIScene_AnvilMenu::slotChanged(AbstractContainerMenu *container, int slotIndex, std::shared_ptr item) { if (slotIndex == RepairMenu::INPUT_SLOT) { diff --git a/Minecraft.Client/Build/Common/UI/IUIScene_AnvilMenu.h b/Minecraft.Client/Build/Common/UI/IUIScene_AnvilMenu.h index e4178d83e..a21210cfc 100644 --- a/Minecraft.Client/Build/Common/UI/IUIScene_AnvilMenu.h +++ b/Minecraft.Client/Build/Common/UI/IUIScene_AnvilMenu.h @@ -16,9 +16,9 @@ class RepairMenu; class IUIScene_AnvilMenu : public virtual IUIScene_AbstractContainerMenu, public net_minecraft_world_inventory::ContainerListener { protected: - shared_ptr m_inventory; + std::shared_ptr m_inventory; RepairMenu *m_repairMenu; - wstring m_itemName; + std::wstring m_itemName; protected: IUIScene_AnvilMenu(); @@ -32,14 +32,14 @@ protected: // Anvil only virtual void handleEditNamePressed() = 0; - virtual void setEditNameValue(const wstring &name) = 0; + virtual void setEditNameValue(const std::wstring &name) = 0; virtual void setEditNameEditable(bool enabled) = 0; - virtual void setCostLabel(const wstring &label, bool canAfford) = 0; + virtual void setCostLabel(const std::wstring &label, bool canAfford) = 0; virtual void showCross(bool show) = 0; void updateItemName(); // ContainerListenr - void refreshContainer(AbstractContainerMenu *container, vector > *items); - void slotChanged(AbstractContainerMenu *container, int slotIndex, shared_ptr item); + void refreshContainer(AbstractContainerMenu *container, std::vector > *items); + void slotChanged(AbstractContainerMenu *container, int slotIndex, std::shared_ptr item); void setContainerData(AbstractContainerMenu *container, int id, int value); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/UI/IUIScene_CraftingMenu.cpp b/Minecraft.Client/Build/Common/UI/IUIScene_CraftingMenu.cpp index d0421ad87..a65fda5e2 100644 --- a/Minecraft.Client/Build/Common/UI/IUIScene_CraftingMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/IUIScene_CraftingMenu.cpp @@ -208,7 +208,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) int iSlot=iVSlotIndexA[m_iCurrentSlotVIndex]; int iRecipe= CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]; - shared_ptr pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); + std::shared_ptr pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); //int iIcon=pTempItemInst->getItem()->getIcon(pTempItemInst->getAuxValue()); if( pMinecraft->localgameModes[iPad] != NULL) @@ -244,7 +244,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) iSlot=0; } int iRecipe= CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]; - shared_ptr pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); + std::shared_ptr pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); //int iIcon=pTempItemInst->getItem()->getIcon(pTempItemInst->getAuxValue()); if( pMinecraft->localgameModes[iPad] != NULL ) @@ -272,7 +272,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) { for(int j=0;j ingItemInst = nullptr; + std::shared_ptr ingItemInst = nullptr; // do we need to remove a specific aux value? if(pRecipeIngredientsRequired[iRecipe].iIngAuxValA[i]!=Recipes::ANY_AUX_VALUE) { @@ -291,7 +291,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) if (ingItemInst->getItem()->hasCraftingRemainingItem()) { // replace item with remaining result - m_pPlayer->inventory->add( shared_ptr( new ItemInstance(ingItemInst->getItem()->getCraftingRemainingItem()) ) ); + m_pPlayer->inventory->add( std::shared_ptr( new ItemInstance(ingItemInst->getItem()->getCraftingRemainingItem()) ) ); } } @@ -607,7 +607,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() { if (m_pPlayer->inventory->items[k] != NULL) { - wstring itemstring=m_pPlayer->inventory->items[k]->toString(); + std::wstring itemstring=m_pPlayer->inventory->items[k]->toString(); //printf("--- Player has "); OutputDebugStringW(itemstring.c_str()); @@ -624,10 +624,10 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() // for (int i = 0; i < iRecipeC; i++) // { - // shared_ptr pTempItemInst=pRecipeIngredientsRequired[i].pRecipy->assemble(NULL); + // std::shared_ptr pTempItemInst=pRecipeIngredientsRequired[i].pRecipy->assemble(NULL); // if (pTempItemInst != NULL) // { - // wstring itemstring=pTempItemInst->toString(); + // std::wstring itemstring=pTempItemInst->toString(); // // printf("Recipe [%d] = ",i); // OutputDebugStringW(itemstring.c_str()); @@ -761,7 +761,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() if(iHSlotBrushControl<=m_iCraftablesMaxHSlotC) { bool bFound=false; - shared_ptr pTempItemInst=pRecipeIngredientsRequired[i].pRecipy->assemble(nullptr); + std::shared_ptr pTempItemInst=pRecipeIngredientsRequired[i].pRecipy->assemble(nullptr); //int iIcon=pTempItemInst->getItem()->getIcon(pTempItemInst->getAuxValue()); int iID=pTempItemInst->getItem()->id; int iBaseType; @@ -835,7 +835,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() while((iIndex pTempItemInst=pRecipeIngredientsRequired[CanBeMadeA[iIndex].iRecipeA[0]].pRecipy->assemble(nullptr); + std::shared_ptr pTempItemInst=pRecipeIngredientsRequired[CanBeMadeA[iIndex].iRecipeA[0]].pRecipy->assemble(nullptr); assert(pTempItemInst->id!=0); unsigned int uiAlpha; @@ -903,7 +903,7 @@ void IUIScene_CraftingMenu::UpdateHighlight() { iSlot=0; } - shared_ptr pTempItemInstAdditional=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]].pRecipy->assemble(nullptr); + std::shared_ptr pTempItemInstAdditional=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]].pRecipy->assemble(nullptr); // special case for the torch coal/charcoal int id=pTempItemInstAdditional->getDescriptionId(); @@ -991,7 +991,7 @@ void IUIScene_CraftingMenu::UpdateVerticalSlots() { if(i!=1) continue; } - shared_ptr pTempItemInstAdditional=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iVSlotIndexA[i]]].pRecipy->assemble(nullptr); + std::shared_ptr pTempItemInstAdditional=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iVSlotIndexA[i]]].pRecipy->assemble(nullptr); assert(pTempItemInstAdditional->id!=0); unsigned int uiAlpha; @@ -1057,7 +1057,7 @@ void IUIScene_CraftingMenu::DisplayIngredients() int iBoxWidth=(m_iContainerType==RECIPE_TYPE_2x2)?2:3; int iRecipe=CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]; bool bCanMakeRecipe = pRecipeIngredientsRequired[iRecipe].bCanMake[getPad()]; - shared_ptr pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); + std::shared_ptr pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); m_iIngredientsC=pRecipeIngredientsRequired[iRecipe].iIngC; @@ -1077,7 +1077,7 @@ void IUIScene_CraftingMenu::DisplayIngredients() iAuxVal = 0xFF; } - shared_ptr itemInst= shared_ptr(new ItemInstance(item,pRecipeIngredientsRequired[iRecipe].iIngValA[i],iAuxVal)); + std::shared_ptr itemInst= std::shared_ptr(new ItemInstance(item,pRecipeIngredientsRequired[iRecipe].iIngValA[i],iAuxVal)); setIngredientDescriptionItem(getPad(),i,itemInst); setIngredientDescriptionRedBox(i,false); @@ -1141,7 +1141,7 @@ void IUIScene_CraftingMenu::DisplayIngredients() { iAuxVal = 0xFF; } - shared_ptr itemInst= shared_ptr(new ItemInstance(id,1,iAuxVal)); + std::shared_ptr itemInst= std::shared_ptr(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< pTempItemInst=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]].pRecipy->assemble(nullptr); + std::shared_ptr pTempItemInst=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]].pRecipy->assemble(nullptr); int iID=pTempItemInst->getItem()->id; int iAuxVal=pTempItemInst->getAuxValue(); int iBaseType; @@ -1257,8 +1257,8 @@ void IUIScene_CraftingMenu::UpdateDescriptionText(bool bCanBeMade) if(iIDSString>=0) { // this is an html control now, so set the font size and colour - //wstring wsText=app.GetString(iIDSString); - wstring wsText=app.FormatHTMLString(getPad(),app.GetString(iIDSString)); + //std::wstring wsText=app.GetString(iIDSString); + std::wstring wsText=app.FormatHTMLString(getPad(),app.GetString(iIDSString)); // 12 for splitscreen, 14 for normal EHTMLFontSize size = eHTMLSize_Normal; diff --git a/Minecraft.Client/Build/Common/UI/IUIScene_CraftingMenu.h b/Minecraft.Client/Build/Common/UI/IUIScene_CraftingMenu.h index 98b952752..ca2fa20c3 100644 --- a/Minecraft.Client/Build/Common/UI/IUIScene_CraftingMenu.h +++ b/Minecraft.Client/Build/Common/UI/IUIScene_CraftingMenu.h @@ -49,7 +49,7 @@ protected: int m_iCurrentSlotVIndex; int m_iRecipeC; int m_iContainerType; // 2x2 or 3x3 - shared_ptr m_pPlayer; + std::shared_ptr m_pPlayer; int m_iGroupIndex; int iVSlotIndexA[3]; // index of the v slots currently displayed @@ -96,13 +96,13 @@ protected: virtual void hideAllHSlots() = 0; virtual void hideAllVSlots() = 0; virtual void hideAllIngredientsSlots() = 0; - virtual void setCraftHSlotItem(int iPad, int iIndex, shared_ptr item, unsigned int uiAlpha) = 0; - virtual void setCraftVSlotItem(int iPad, int iIndex, shared_ptr item, unsigned int uiAlpha) = 0; - virtual void setCraftingOutputSlotItem(int iPad, shared_ptr item) = 0; + virtual void setCraftHSlotItem(int iPad, int iIndex, std::shared_ptr item, unsigned int uiAlpha) = 0; + virtual void setCraftVSlotItem(int iPad, int iIndex, std::shared_ptr item, unsigned int uiAlpha) = 0; + virtual void setCraftingOutputSlotItem(int iPad, std::shared_ptr item) = 0; virtual void setCraftingOutputSlotRedBox(bool show) = 0; - virtual void setIngredientSlotItem(int iPad, int index, shared_ptr item) = 0; + virtual void setIngredientSlotItem(int iPad, int index, std::shared_ptr item) = 0; virtual void setIngredientSlotRedBox(int index, bool show) = 0; - virtual void setIngredientDescriptionItem(int iPad, int index, shared_ptr item) = 0; + virtual void setIngredientDescriptionItem(int iPad, int index, std::shared_ptr item) = 0; virtual void setIngredientDescriptionRedBox(int index, bool show) = 0; virtual void setIngredientDescriptionText(int index, LPCWSTR text) = 0; virtual void setShowCraftHSlot(int iIndex, bool show) = 0; diff --git a/Minecraft.Client/Build/Common/UI/IUIScene_CreativeMenu.cpp b/Minecraft.Client/Build/Common/UI/IUIScene_CreativeMenu.cpp index a3fbfe7f5..0f43e4c88 100644 --- a/Minecraft.Client/Build/Common/UI/IUIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/IUIScene_CreativeMenu.cpp @@ -12,16 +12,16 @@ // 4J JEV - Images for each tab. IUIScene_CreativeMenu::TabSpec **IUIScene_CreativeMenu::specs = NULL; -vector< shared_ptr > IUIScene_CreativeMenu::categoryGroups[eCreativeInventoryGroupsCount]; +std::vector< std::shared_ptr > IUIScene_CreativeMenu::categoryGroups[eCreativeInventoryGroupsCount]; -#define ITEM(id) list->push_back( shared_ptr(new ItemInstance(id, 1, 0)) ); -#define ITEM_AUX(id, aux) list->push_back( shared_ptr(new ItemInstance(id, 1, aux)) ); +#define ITEM(id) list->push_back( std::shared_ptr(new ItemInstance(id, 1, 0)) ); +#define ITEM_AUX(id, aux) list->push_back( std::shared_ptr(new ItemInstance(id, 1, aux)) ); #define DEF(index) list = &categoryGroups[index]; void IUIScene_CreativeMenu::staticCtor() { - vector< shared_ptr > *list; + std::vector< std::shared_ptr > *list; // Building Blocks @@ -708,7 +708,7 @@ unsigned int IUIScene_CreativeMenu::TabSpec::getPageCount() // 4J JEV - Item Picker Menu -IUIScene_CreativeMenu::ItemPickerMenu::ItemPickerMenu( shared_ptr smp, shared_ptr inv ) : AbstractContainerMenu() +IUIScene_CreativeMenu::ItemPickerMenu::ItemPickerMenu( std::shared_ptr smp, std::shared_ptr inv ) : AbstractContainerMenu() { inventory = inv; creativeContainer = smp; @@ -734,7 +734,7 @@ IUIScene_CreativeMenu::ItemPickerMenu::ItemPickerMenu( shared_ptr player) +bool IUIScene_CreativeMenu::ItemPickerMenu::stillValid(std::shared_ptr player) { return true; } @@ -794,7 +794,7 @@ bool IUIScene_CreativeMenu::handleValidKeyPress(int iPad, int buttonNum, BOOL qu Minecraft *pMinecraft = Minecraft::GetInstance(); for(unsigned int i = TabSpec::MAX_SIZE; i < TabSpec::MAX_SIZE + 9; ++i) { - shared_ptr newItem = m_menu->getSlot(i)->getItem(); + std::shared_ptr newItem = m_menu->getSlot(i)->getItem(); if(newItem != NULL) { @@ -813,7 +813,7 @@ void IUIScene_CreativeMenu::handleOutsideClicked(int iPad, int buttonNum, BOOL q // Drop items. Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr playerInventory = pMinecraft->localplayers[iPad]->inventory; + std::shared_ptr playerInventory = pMinecraft->localplayers[iPad]->inventory; if (playerInventory->getCarried() != NULL) { if (buttonNum == 0) @@ -823,7 +823,7 @@ void IUIScene_CreativeMenu::handleOutsideClicked(int iPad, int buttonNum, BOOL q } if (buttonNum == 1) { - shared_ptr removedItem = playerInventory->getCarried()->remove(1); + std::shared_ptr removedItem = playerInventory->getCarried()->remove(1); pMinecraft->localgameModes[iPad]->handleCreativeModeItemDrop(removedItem); if (playerInventory->getCarried()->count == 0) playerInventory->setCarried(nullptr); } @@ -894,9 +894,9 @@ void IUIScene_CreativeMenu::handleSlotListClicked(ESceneSection eSection, int bu if (buttonNum == 0) { - shared_ptr playerInventory = pMinecraft->localplayers[getPad()]->inventory; - shared_ptr carried = playerInventory->getCarried(); - shared_ptr clicked = m_menu->getSlot(currentIndex)->getItem(); + std::shared_ptr playerInventory = pMinecraft->localplayers[getPad()]->inventory; + std::shared_ptr carried = playerInventory->getCarried(); + std::shared_ptr clicked = m_menu->getSlot(currentIndex)->getItem(); if (clicked != NULL) { playerInventory->setCarried(ItemInstance::clone(clicked)); @@ -928,7 +928,7 @@ void IUIScene_CreativeMenu::handleSlotListClicked(ESceneSection eSection, int bu quickKeyHeld = FALSE; } m_menu->clicked(currentIndex, buttonNum, quickKeyHeld?AbstractContainerMenu::CLICK_QUICK_MOVE:AbstractContainerMenu::CLICK_PICKUP, pMinecraft->localplayers[getPad()]); - shared_ptr newItem = m_menu->getSlot(currentIndex)->getItem(); + std::shared_ptr newItem = m_menu->getSlot(currentIndex)->getItem(); // call this function to synchronize multiplayer item bar pMinecraft->localgameModes[getPad()]->handleCreativeModeItemAdd(newItem, currentIndex - (int)m_menu->slots->size() + 9 + InventoryMenu::USE_ROW_SLOT_START); @@ -941,7 +941,7 @@ void IUIScene_CreativeMenu::handleSlotListClicked(ESceneSection eSection, int bu m_iCurrSlotX = m_creativeSlotX; m_iCurrSlotY = m_creativeSlotY; - shared_ptr playerInventory = pMinecraft->localplayers[getPad()]->inventory; + std::shared_ptr playerInventory = pMinecraft->localplayers[getPad()]->inventory; playerInventory->setCarried(nullptr); m_bCarryingCreativeItem = false; } @@ -970,14 +970,14 @@ bool IUIScene_CreativeMenu::CanHaveFocus( ESceneSection eSection ) return false; } -bool IUIScene_CreativeMenu::getEmptyInventorySlot(shared_ptr item, int &slotX) +bool IUIScene_CreativeMenu::getEmptyInventorySlot(std::shared_ptr item, int &slotX) { bool sameItemFound = false; bool emptySlotFound = false; // Jump to the slot with this item already on it, if we can stack more for(unsigned int i = TabSpec::MAX_SIZE; i < TabSpec::MAX_SIZE + 9; ++i) { - shared_ptr slotItem = m_menu->getSlot(i)->getItem(); + std::shared_ptr slotItem = m_menu->getSlot(i)->getItem(); if( slotItem != NULL && slotItem->sameItem(item) && (slotItem->GetCount() + item->GetCount() <= item->getMaxStackSize() )) { sameItemFound = true; @@ -1020,7 +1020,7 @@ int IUIScene_CreativeMenu::getSectionStartOffset(ESceneSection eSection) return offset; } -bool IUIScene_CreativeMenu::overrideTooltips(ESceneSection sectionUnderPointer, shared_ptr itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, +bool IUIScene_CreativeMenu::overrideTooltips(ESceneSection sectionUnderPointer, std::shared_ptr itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, EToolTipItem &buttonA, EToolTipItem &buttonX, EToolTipItem &buttonY, EToolTipItem &buttonRT) { bool _override = false; diff --git a/Minecraft.Client/Build/Common/UI/IUIScene_CreativeMenu.h b/Minecraft.Client/Build/Common/UI/IUIScene_CreativeMenu.h index c844d9d89..0c738e7f7 100644 --- a/Minecraft.Client/Build/Common/UI/IUIScene_CreativeMenu.h +++ b/Minecraft.Client/Build/Common/UI/IUIScene_CreativeMenu.h @@ -74,21 +74,21 @@ public: class ItemPickerMenu : public AbstractContainerMenu { protected: - shared_ptr creativeContainer; - shared_ptr inventory; + std::shared_ptr creativeContainer; + std::shared_ptr inventory; public: - ItemPickerMenu( shared_ptr creativeContainer, shared_ptr inventory ); + ItemPickerMenu( std::shared_ptr creativeContainer, std::shared_ptr inventory ); - virtual bool stillValid(shared_ptr player); + virtual bool stillValid(std::shared_ptr player); bool isOverrideResultClick(int slotNum, int buttonNum); protected: // 4J Stu - Brought forward from 1.2 to fix infinite recursion bug in creative - virtual void loopClick(int slotIndex, int buttonNum, bool quickKeyHeld, shared_ptr player) { } // do nothing + virtual void loopClick(int slotIndex, int buttonNum, bool quickKeyHeld, std::shared_ptr player) { } // do nothing } *itemPickerMenu; protected: - static vector< shared_ptr > categoryGroups[eCreativeInventoryGroupsCount]; + static std::vector< std::shared_ptr > categoryGroups[eCreativeInventoryGroupsCount]; // 4J JEV - Tabs static TabSpec **specs; @@ -112,11 +112,11 @@ protected: virtual void handleOutsideClicked(int iPad, int buttonNum, BOOL quickKeyHeld); virtual void handleAdditionalKeyPress(int iAction); virtual void handleSlotListClicked(ESceneSection eSection, int buttonNum, BOOL quickKeyHeld); - bool getEmptyInventorySlot(shared_ptr item, int &slotX); + bool getEmptyInventorySlot(std::shared_ptr item, int &slotX); int getSectionStartOffset(ESceneSection eSection); virtual bool IsSectionSlotList( ESceneSection eSection ); virtual bool CanHaveFocus( ESceneSection eSection ); - virtual bool overrideTooltips(ESceneSection sectionUnderPointer, shared_ptr itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, + virtual bool overrideTooltips(ESceneSection sectionUnderPointer, std::shared_ptr itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, EToolTipItem &buttonA, EToolTipItem &buttonX, EToolTipItem &buttonY, EToolTipItem &buttonRT); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/UI/IUIScene_PauseMenu.cpp b/Minecraft.Client/Build/Common/UI/IUIScene_PauseMenu.cpp index ff4c53e45..5d9607469 100644 --- a/Minecraft.Client/Build/Common/UI/IUIScene_PauseMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/IUIScene_PauseMenu.cpp @@ -224,7 +224,7 @@ int IUIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4 // retrieve the store name for the skin pack DLCPack *pDLCPack=pDLCTexPack->getDLCInfoParentPack();//tPack->getDLCPack(); - const char *pchPackName=wstringtofilename(pDLCPack->getName()); + const char *pchPackName=std::wstringtofilename(pDLCPack->getName()); app.DebugPrintf("Texture Pack - %s\n",pchPackName); SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo((char *)pchPackName); diff --git a/Minecraft.Client/Build/Common/UI/IUIScene_StartGame.cpp b/Minecraft.Client/Build/Common/UI/IUIScene_StartGame.cpp index d6dfad931..fe0410249 100644 --- a/Minecraft.Client/Build/Common/UI/IUIScene_StartGame.cpp +++ b/Minecraft.Client/Build/Common/UI/IUIScene_StartGame.cpp @@ -356,7 +356,7 @@ int IUIScene_StartGame::TexturePackDialogReturned(void *pParam,int iPad,C4JStora { if (ProfileManager.IsSignedInLive(iPad)) { - wstring ProductId; + std::wstring ProductId; app.GetDLCFullOfferIDForPackID(pClass->m_MoreOptionsParams.dwTexturePack,ProductId); diff --git a/Minecraft.Client/Build/Common/UI/IUIScene_TradingMenu.cpp b/Minecraft.Client/Build/Common/UI/IUIScene_TradingMenu.cpp index 2e853d212..69a0e2960 100644 --- a/Minecraft.Client/Build/Common/UI/IUIScene_TradingMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/IUIScene_TradingMenu.cpp @@ -16,7 +16,7 @@ IUIScene_TradingMenu::IUIScene_TradingMenu() m_bHasUpdatedOnce = false; } -shared_ptr IUIScene_TradingMenu::getMerchant() +std::shared_ptr IUIScene_TradingMenu::getMerchant() { return m_merchant; } @@ -70,9 +70,9 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) if(!activeRecipe->isDeprecated()) { // Do we have the ingredients? - shared_ptr buyAItem = activeRecipe->getBuyAItem(); - shared_ptr buyBItem = activeRecipe->getBuyBItem(); - shared_ptr player = Minecraft::GetInstance()->localplayers[getPad()]; + std::shared_ptr buyAItem = activeRecipe->getBuyAItem(); + std::shared_ptr buyBItem = activeRecipe->getBuyBItem(); + std::shared_ptr player = Minecraft::GetInstance()->localplayers[getPad()]; int buyAMatches = player->inventory->countMatches(buyAItem); int buyBMatches = player->inventory->countMatches(buyBItem); if( (buyAItem != NULL && buyAMatches >= buyAItem->count) && (buyBItem == NULL || buyBMatches >= buyBItem->count) ) @@ -84,7 +84,7 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) player->inventory->removeResources(buyBItem); // Add the item we have purchased - shared_ptr result = activeRecipe->getSellItem()->copy(); + std::shared_ptr result = activeRecipe->getSellItem()->copy(); if(!player->inventory->add( result ) ) { player->drop(result); @@ -92,7 +92,7 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) // Send a packet to the server int actualShopItem = m_activeOffers.at(selectedShopItem).second; - player->connection->send( shared_ptr( new TradeItemPacket(m_menu->containerId, actualShopItem) ) ); + player->connection->send( std::shared_ptr( new TradeItemPacket(m_menu->containerId, actualShopItem) ) ); updateDisplay(); } @@ -149,7 +149,7 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) ByteArrayOutputStream rawOutput; DataOutputStream output(&rawOutput); output.writeInt(actualShopItem); - Minecraft::GetInstance()->getConnection(getPad())->send(shared_ptr( new CustomPayloadPacket(CustomPayloadPacket::TRADER_SELECTION_PACKET, rawOutput.toByteArray()))); + Minecraft::GetInstance()->getConnection(getPad())->send(std::shared_ptr( new CustomPayloadPacket(CustomPayloadPacket::TRADER_SELECTION_PACKET, rawOutput.toByteArray()))); } } return handled; @@ -203,7 +203,7 @@ void IUIScene_TradingMenu::updateDisplay() ByteArrayOutputStream rawOutput; DataOutputStream output(&rawOutput); output.writeInt(firstValidTrade); - Minecraft::GetInstance()->getConnection(getPad())->send(shared_ptr( new CustomPayloadPacket(CustomPayloadPacket::TRADER_SELECTION_PACKET, rawOutput.toByteArray()))); + Minecraft::GetInstance()->getConnection(getPad())->send(std::shared_ptr( new CustomPayloadPacket(CustomPayloadPacket::TRADER_SELECTION_PACKET, rawOutput.toByteArray()))); } } @@ -234,7 +234,7 @@ void IUIScene_TradingMenu::updateDisplay() { MerchantRecipe *activeRecipe = m_activeOffers.at(selectedShopItem).first; - wstring wsTemp; + std::wstring wsTemp; // 4J-PB - need to get the villager type here wsTemp = app.GetString(IDS_VILLAGER_OFFERS_ITEM); @@ -244,12 +244,12 @@ void IUIScene_TradingMenu::updateDisplay() setTitle(wsTemp.c_str()); - vector unformattedStrings; - wstring offerDescription = GetItemDescription(activeRecipe->getSellItem(), unformattedStrings); + std::vector unformattedStrings; + std::wstring offerDescription = GetItemDescription(activeRecipe->getSellItem(), unformattedStrings); setOfferDescription(offerDescription, unformattedStrings); - shared_ptr buyAItem = activeRecipe->getBuyAItem(); - shared_ptr buyBItem = activeRecipe->getBuyBItem(); + std::shared_ptr buyAItem = activeRecipe->getBuyAItem(); + std::shared_ptr buyBItem = activeRecipe->getBuyBItem(); setRequest1Item(buyAItem); setRequest2Item(buyBItem); @@ -262,7 +262,7 @@ void IUIScene_TradingMenu::updateDisplay() bool canMake = true; - shared_ptr player = Minecraft::GetInstance()->localplayers[getPad()]; + std::shared_ptr player = Minecraft::GetInstance()->localplayers[getPad()]; int buyAMatches = player->inventory->countMatches(buyAItem); if(buyAMatches > 0) { @@ -321,10 +321,10 @@ bool IUIScene_TradingMenu::canMake(MerchantRecipe *recipe) { if(recipe->isDeprecated()) return false; - shared_ptr buyAItem = recipe->getBuyAItem(); - shared_ptr buyBItem = recipe->getBuyBItem(); + std::shared_ptr buyAItem = recipe->getBuyAItem(); + std::shared_ptr buyBItem = recipe->getBuyBItem(); - shared_ptr player = Minecraft::GetInstance()->localplayers[getPad()]; + std::shared_ptr player = Minecraft::GetInstance()->localplayers[getPad()]; int buyAMatches = player->inventory->countMatches(buyAItem); if(buyAMatches > 0) { @@ -349,28 +349,28 @@ bool IUIScene_TradingMenu::canMake(MerchantRecipe *recipe) } -void IUIScene_TradingMenu::setRequest1Item(shared_ptr item) +void IUIScene_TradingMenu::setRequest1Item(std::shared_ptr item) { } -void IUIScene_TradingMenu::setRequest2Item(shared_ptr item) +void IUIScene_TradingMenu::setRequest2Item(std::shared_ptr item) { } -void IUIScene_TradingMenu::setTradeItem(int index, shared_ptr item) +void IUIScene_TradingMenu::setTradeItem(int index, std::shared_ptr item) { } -wstring IUIScene_TradingMenu::GetItemDescription(shared_ptr item, vector &unformattedStrings) +std::wstring IUIScene_TradingMenu::GetItemDescription(std::shared_ptr item, std::vector &unformattedStrings) { if(item == NULL) return L""; - wstring desc = L""; - vector *strings = item->getHoverTextOnly(nullptr, false, unformattedStrings); + std::wstring desc = L""; + std::vector *strings = item->getHoverTextOnly(nullptr, false, unformattedStrings); bool firstLine = true; for(AUTO_VAR(it, strings->begin()); it != strings->end(); ++it) { - wstring thisString = *it; + std::wstring thisString = *it; if(!firstLine) { desc.append( L"
" ); diff --git a/Minecraft.Client/Build/Common/UI/IUIScene_TradingMenu.h b/Minecraft.Client/Build/Common/UI/IUIScene_TradingMenu.h index 8dfd6aa33..509faced2 100644 --- a/Minecraft.Client/Build/Common/UI/IUIScene_TradingMenu.h +++ b/Minecraft.Client/Build/Common/UI/IUIScene_TradingMenu.h @@ -7,8 +7,8 @@ class IUIScene_TradingMenu { protected: MerchantMenu *m_menu; - shared_ptr m_merchant; - vector< pair > m_activeOffers; + std::shared_ptr m_merchant; + std::vector< pair > m_activeOffers; int m_validOffersCount; int m_selectedSlot; @@ -32,27 +32,27 @@ protected: virtual void showScrollRightArrow(bool show) = 0; virtual void showScrollLeftArrow(bool show) = 0; virtual void moveSelector(bool right) = 0; - virtual void setRequest1Name(const wstring &name) = 0; - virtual void setRequest2Name(const wstring &name) = 0; - virtual void setTitle(const wstring &name) = 0; + virtual void setRequest1Name(const std::wstring &name) = 0; + virtual void setRequest2Name(const std::wstring &name) = 0; + virtual void setTitle(const std::wstring &name) = 0; virtual void setRequest1RedBox(bool show) = 0; virtual void setRequest2RedBox(bool show) = 0; virtual void setTradeRedBox(int index, bool show) = 0; - virtual void setOfferDescription(const wstring &name, vector &unformattedStrings) = 0; + virtual void setOfferDescription(const std::wstring &name, std::vector &unformattedStrings) = 0; - virtual void setRequest1Item(shared_ptr item); - virtual void setRequest2Item(shared_ptr item); - virtual void setTradeItem(int index, shared_ptr item); + virtual void setRequest1Item(std::shared_ptr item); + virtual void setRequest2Item(std::shared_ptr item); + virtual void setTradeItem(int index, std::shared_ptr item); private: void updateDisplay(); bool canMake(MerchantRecipe *recipe); - wstring GetItemDescription(shared_ptr item, vector &unformattedStrings); + std::wstring GetItemDescription(std::shared_ptr item, std::vector &unformattedStrings); public: - shared_ptr getMerchant(); + std::shared_ptr getMerchant(); virtual int getPad() = 0; }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/UI/UIBitmapFont.h b/Minecraft.Client/Build/Common/UI/UIBitmapFont.h index 62b708fbb..3eefc962a 100644 --- a/Minecraft.Client/Build/Common/UI/UIBitmapFont.h +++ b/Minecraft.Client/Build/Common/UI/UIBitmapFont.h @@ -13,7 +13,7 @@ class CFontData; // | XC_LANGUAGE_PORTUGUESE // | XC_LANGUAGE_BRAZILIAN; -using namespace std; +//using namespace std; class UIAbstractBitmapFont { diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_Chat.cpp b/Minecraft.Client/Build/Common/UI/UIComponent_Chat.cpp index e3e041e3e..d84fb3662 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_Chat.cpp +++ b/Minecraft.Client/Build/Common/UI/UIComponent_Chat.cpp @@ -18,7 +18,7 @@ UIComponent_Chat::UIComponent_Chat(int iPad, void *initData, UILayer *parentLaye addTimer(0, 100); } -wstring UIComponent_Chat::getMoviePath() +std::wstring UIComponent_Chat::getMoviePath() { switch( m_parentLayer->getViewport() ) { diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_Chat.h b/Minecraft.Client/Build/Common/UI/UIComponent_Chat.h index d18352ccd..a96fe8a06 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_Chat.h +++ b/Minecraft.Client/Build/Common/UI/UIComponent_Chat.h @@ -44,7 +44,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: virtual EUIScene getSceneType() { return eUIComponent_Chat;} diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIConsole.cpp b/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIConsole.cpp index 7bdc0fc57..2227dd82d 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIConsole.cpp +++ b/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIConsole.cpp @@ -10,7 +10,7 @@ UIComponent_DebugUIConsole::UIComponent_DebugUIConsole(int iPad, void *initData, m_bTextChanged = false; } -wstring UIComponent_DebugUIConsole::getMoviePath() +std::wstring UIComponent_DebugUIConsole::getMoviePath() { return L"DebugUIConsoleComponent"; } diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIConsole.h b/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIConsole.h index 177754f55..e018c7024 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIConsole.h +++ b/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIConsole.h @@ -31,7 +31,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: virtual EUIScene getSceneType() { return eUIComponent_DebugUIConsole;} diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIMarketingGuide.cpp b/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIMarketingGuide.cpp index eb9db0be5..5001d9198 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIMarketingGuide.cpp +++ b/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIMarketingGuide.cpp @@ -27,7 +27,7 @@ UIComponent_DebugUIMarketingGuide::UIComponent_DebugUIMarketingGuide(int iPad, v IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSetPlatform , 1 , value ); } -wstring UIComponent_DebugUIMarketingGuide::getMoviePath() +std::wstring UIComponent_DebugUIMarketingGuide::getMoviePath() { return L"DebugUIMarketingGuide"; } \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIMarketingGuide.h b/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIMarketingGuide.h index 2c6511734..f7847e846 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIMarketingGuide.h +++ b/Minecraft.Client/Build/Common/UI/UIComponent_DebugUIMarketingGuide.h @@ -18,7 +18,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: virtual EUIScene getSceneType() { return eUIComponent_DebugUIMarketingGuide;} diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_Logo.cpp b/Minecraft.Client/Build/Common/UI/UIComponent_Logo.cpp index 6cbbeee8e..8c30c787a 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_Logo.cpp +++ b/Minecraft.Client/Build/Common/UI/UIComponent_Logo.cpp @@ -8,7 +8,7 @@ UIComponent_Logo::UIComponent_Logo(int iPad, void *initData, UILayer *parentLaye initialiseMovie(); } -wstring UIComponent_Logo::getMoviePath() +std::wstring UIComponent_Logo::getMoviePath() { switch( m_parentLayer->getViewport() ) { diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_Logo.h b/Minecraft.Client/Build/Common/UI/UIComponent_Logo.h index 1a8cf8190..08398cbd5 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_Logo.h +++ b/Minecraft.Client/Build/Common/UI/UIComponent_Logo.h @@ -9,7 +9,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: virtual EUIScene getSceneType() { return eUIComponent_Logo;} diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_MenuBackground.cpp b/Minecraft.Client/Build/Common/UI/UIComponent_MenuBackground.cpp index cf7ba0d99..54a9ddadb 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_MenuBackground.cpp +++ b/Minecraft.Client/Build/Common/UI/UIComponent_MenuBackground.cpp @@ -9,7 +9,7 @@ UIComponent_MenuBackground::UIComponent_MenuBackground(int iPad, void *initData, initialiseMovie(); } -wstring UIComponent_MenuBackground::getMoviePath() +std::wstring UIComponent_MenuBackground::getMoviePath() { switch( m_parentLayer->getViewport() ) { case C4JRender::VIEWPORT_TYPE_SPLIT_TOP: diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_MenuBackground.h b/Minecraft.Client/Build/Common/UI/UIComponent_MenuBackground.h index ac0b9d2f1..f62dbd50e 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_MenuBackground.h +++ b/Minecraft.Client/Build/Common/UI/UIComponent_MenuBackground.h @@ -11,7 +11,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: virtual EUIScene getSceneType() { return eUIComponent_MenuBackground;} diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_Panorama.cpp b/Minecraft.Client/Build/Common/UI/UIComponent_Panorama.cpp index 41565139a..217827574 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_Panorama.cpp +++ b/Minecraft.Client/Build/Common/UI/UIComponent_Panorama.cpp @@ -16,7 +16,7 @@ UIComponent_Panorama::UIComponent_Panorama(int iPad, void *initData, UILayer *pa while(!m_hasTickedOnce) tick(); } -wstring UIComponent_Panorama::getMoviePath() +std::wstring UIComponent_Panorama::getMoviePath() { switch( m_parentLayer->getViewport() ) { diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_Panorama.h b/Minecraft.Client/Build/Common/UI/UIComponent_Panorama.h index 99dc115c4..5788355ec 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_Panorama.h +++ b/Minecraft.Client/Build/Common/UI/UIComponent_Panorama.h @@ -19,7 +19,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: virtual EUIScene getSceneType() { return eUIComponent_Panorama;} diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_PressStartToPlay.cpp b/Minecraft.Client/Build/Common/UI/UIComponent_PressStartToPlay.cpp index b712e8f7e..dbdc39a50 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_PressStartToPlay.cpp +++ b/Minecraft.Client/Build/Common/UI/UIComponent_PressStartToPlay.cpp @@ -22,12 +22,12 @@ UIComponent_PressStartToPlay::UIComponent_PressStartToPlay(int iPad, void *initD m_labelTrialTimer.setVisible(false); #ifdef __ORBIS__ - wstring text = app.GetString(IDS_PRESS_X_TO_JOIN); + std::wstring text = app.GetString(IDS_PRESS_X_TO_JOIN); text = replaceAll(text, L"{*CONTROLLER_VK_A*}", app.GetVKReplacement(VK_PAD_A) ); m_labelPressStart.init(text.c_str()); #elif defined _XBOX_ONE - wstring text = app.GetString(IDS_PRESS_START_TO_JOIN); + std::wstring text = app.GetString(IDS_PRESS_START_TO_JOIN); text = replaceAll(text, L"{*CONTROLLER_VK_START*}", app.GetVKReplacement(VK_PAD_START) ); m_labelPressStart.init(text.c_str()); #else @@ -38,7 +38,7 @@ UIComponent_PressStartToPlay::UIComponent_PressStartToPlay(int iPad, void *initD m_playerDisplayName.setVisible(false); } -wstring UIComponent_PressStartToPlay::getMoviePath() +std::wstring UIComponent_PressStartToPlay::getMoviePath() { return L"PressStartToPlay"; } @@ -104,7 +104,7 @@ void UIComponent_PressStartToPlay::showPressStart(int iPad, bool show) } } -void UIComponent_PressStartToPlay::setTrialTimer(const wstring &label) +void UIComponent_PressStartToPlay::setTrialTimer(const std::wstring &label) { m_trialTimer = label; if(!ui.IsExpectingOrReloadingSkin() && hasMovie()) @@ -122,7 +122,7 @@ void UIComponent_PressStartToPlay::showTrialTimer(bool show) } } -void UIComponent_PressStartToPlay::setAutosaveTimer(const wstring &label) +void UIComponent_PressStartToPlay::setAutosaveTimer(const std::wstring &label) { m_autosaveTimer = label; if(!ui.IsExpectingOrReloadingSkin() && hasMovie()) diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_PressStartToPlay.h b/Minecraft.Client/Build/Common/UI/UIComponent_PressStartToPlay.h index a29b6016f..8141b9f07 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_PressStartToPlay.h +++ b/Minecraft.Client/Build/Common/UI/UIComponent_PressStartToPlay.h @@ -9,8 +9,8 @@ private: bool m_showingAutosaveTimer; bool m_showingTrialTimer; bool m_showingPressStart[XUSER_MAX_COUNT]; - wstring m_trialTimer; - wstring m_autosaveTimer; + std::wstring m_trialTimer; + std::wstring m_autosaveTimer; protected: UIControl_Label m_labelTrialTimer, m_labelPressStart, m_playerDisplayName; @@ -33,7 +33,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: virtual EUIScene getSceneType() { return eUIComponent_PressStartToPlay;} @@ -51,9 +51,9 @@ public: virtual void handleTimerComplete(int id); void showPressStart(int iPad, bool show); - void setTrialTimer(const wstring &label); + void setTrialTimer(const std::wstring &label); void showTrialTimer(bool show); - void setAutosaveTimer(const wstring &label); + void setAutosaveTimer(const std::wstring &label); void showAutosaveTimer(bool show); void showSaveIcon(bool show); void showPlayerDisplayName(bool show); diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_Tooltips.cpp b/Minecraft.Client/Build/Common/UI/UIComponent_Tooltips.cpp index bb3db8e7b..7ae7e1fc2 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_Tooltips.cpp +++ b/Minecraft.Client/Build/Common/UI/UIComponent_Tooltips.cpp @@ -34,7 +34,7 @@ UIComponent_Tooltips::UIComponent_Tooltips(int iPad, void *initData, UILayer *pa #endif } -wstring UIComponent_Tooltips::getMoviePath() +std::wstring UIComponent_Tooltips::getMoviePath() { switch( m_parentLayer->getViewport() ) { @@ -306,7 +306,7 @@ bool UIComponent_Tooltips::_SetTooltip(unsigned int iToolTip, int iTextID) return changed; } -void UIComponent_Tooltips::_SetTooltip(unsigned int iToolTipId, const wstring &label, bool show, bool force) +void UIComponent_Tooltips::_SetTooltip(unsigned int iToolTipId, const std::wstring &label, bool show, bool force) { if(!force && !show && !m_tooltipValues[iToolTipId].show) { diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_Tooltips.h b/Minecraft.Client/Build/Common/UI/UIComponent_Tooltips.h index 4b4c82685..8e2c61dd3 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_Tooltips.h +++ b/Minecraft.Client/Build/Common/UI/UIComponent_Tooltips.h @@ -60,7 +60,7 @@ protected: UI_MAP_NAME( m_funcUpdateLayout, L"UpdateLayout") UI_END_MAP_ELEMENTS_AND_NAMES() - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); virtual F64 getSafeZoneHalfWidth(); @@ -99,7 +99,7 @@ public: private: bool _SetTooltip(unsigned int iToolTip, int iTextID); - void _SetTooltip(unsigned int iToolTipId, const wstring &label, bool show, bool force = false); + void _SetTooltip(unsigned int iToolTipId, const std::wstring &label, bool show, bool force = false); void _Relayout(); bool m_overrideSFX[XUSER_MAX_COUNT][ACTION_MAX_MENU]; diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_TutorialPopup.cpp b/Minecraft.Client/Build/Common/UI/UIComponent_TutorialPopup.cpp index a6f6bb8d4..5b60179d3 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_TutorialPopup.cpp +++ b/Minecraft.Client/Build/Common/UI/UIComponent_TutorialPopup.cpp @@ -25,7 +25,7 @@ UIComponent_TutorialPopup::UIComponent_TutorialPopup(int iPad, void *initData, U m_labelDescription.init(L""); } -wstring UIComponent_TutorialPopup::getMoviePath() +std::wstring UIComponent_TutorialPopup::getMoviePath() { switch( m_parentLayer->getViewport() ) { @@ -69,7 +69,7 @@ void UIComponent_TutorialPopup::SetTutorialDescription(TutorialPopupInfo *info) { m_interactScene = info->interactScene; - wstring parsed = _SetIcon(info->icon, info->iAuxVal, info->isFoil, info->desc); + std::wstring parsed = _SetIcon(info->icon, info->iAuxVal, info->isFoil, info->desc); parsed = _SetImage( parsed ); parsed = ParseDescription(m_iPad, parsed); @@ -125,7 +125,7 @@ void UIComponent_TutorialPopup::handleTimerComplete(int id) } } -void UIComponent_TutorialPopup::_SetDescription(UIScene *interactScene, const wstring &desc, const wstring &title, bool allowFade, bool isReminder) +void UIComponent_TutorialPopup::_SetDescription(UIScene *interactScene, const std::wstring &desc, const std::wstring &title, bool allowFade, bool isReminder) { m_interactScene = interactScene; app.DebugPrintf("Setting m_interactScene to %08x\n", m_interactScene); @@ -158,7 +158,7 @@ void UIComponent_TutorialPopup::_SetDescription(UIScene *interactScene, const ws if(isReminder) { - wstring text(app.GetString( IDS_TUTORIAL_REMINDER )); + std::wstring text(app.GetString( IDS_TUTORIAL_REMINDER )); text.append( desc ); stripWhitespaceForHtml( text ); // set the text colour @@ -172,7 +172,7 @@ void UIComponent_TutorialPopup::_SetDescription(UIScene *interactScene, const ws } else { - wstring text(desc); + std::wstring text(desc); stripWhitespaceForHtml( text ); // set the text colour wchar_t formatting[40]; @@ -199,9 +199,9 @@ void UIComponent_TutorialPopup::_SetDescription(UIScene *interactScene, const ws } } -wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWSTR desc) +std::wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWSTR desc) { - wstring temp(desc); + std::wstring temp(desc); bool isFixedIcon = false; @@ -209,13 +209,13 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, if( icon != TUTORIAL_NO_ICON ) { m_iconIsFoil = false; - m_iconItem = shared_ptr(new ItemInstance(icon,1,iAuxVal)); + m_iconItem = std::shared_ptr(new ItemInstance(icon,1,iAuxVal)); } else { m_iconItem = nullptr; - wstring openTag(L"{*ICON*}"); - wstring closeTag(L"{*/ICON*}"); + std::wstring openTag(L"{*ICON*}"); + std::wstring closeTag(L"{*/ICON*}"); int iconTagStartPos = (int)temp.find(openTag); int iconStartPos = iconTagStartPos + (int)openTag.length(); if( iconTagStartPos > 0 && iconStartPos < (int)temp.length() ) @@ -224,9 +224,9 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, if(iconEndPos > iconStartPos && iconEndPos < (int)temp.length() ) { - wstring id = temp.substr(iconStartPos, iconEndPos - iconStartPos); + std::wstring id = temp.substr(iconStartPos, iconEndPos - iconStartPos); - vector idAndAux = stringSplit(id,L':'); + std::vector idAndAux = stringSplit(id,L':'); int iconId = _fromString(idAndAux[0]); @@ -238,86 +238,86 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, { iAuxVal = 0; } - m_iconItem = shared_ptr(new ItemInstance(iconId,1,iAuxVal)); + m_iconItem = std::shared_ptr(new ItemInstance(iconId,1,iAuxVal)); temp.replace(iconTagStartPos, iconEndPos - iconTagStartPos + closeTag.length(), L""); } } // remove any icon text - else if(temp.find(L"{*CraftingTableIcon*}")!=wstring::npos) + else if(temp.find(L"{*CraftingTableIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Tile::workBench_Id,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Tile::workBench_Id,1,0)); } - else if(temp.find(L"{*SticksIcon*}")!=wstring::npos) + else if(temp.find(L"{*SticksIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Item::stick_Id,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Item::stick_Id,1,0)); } - else if(temp.find(L"{*PlanksIcon*}")!=wstring::npos) + else if(temp.find(L"{*PlanksIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Tile::wood_Id,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Tile::wood_Id,1,0)); } - else if(temp.find(L"{*WoodenShovelIcon*}")!=wstring::npos) + else if(temp.find(L"{*WoodenShovelIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Item::shovel_wood_Id,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Item::shovel_wood_Id,1,0)); } - else if(temp.find(L"{*WoodenHatchetIcon*}")!=wstring::npos) + else if(temp.find(L"{*WoodenHatchetIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Item::hatchet_wood_Id,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Item::hatchet_wood_Id,1,0)); } - else if(temp.find(L"{*WoodenPickaxeIcon*}")!=wstring::npos) + else if(temp.find(L"{*WoodenPickaxeIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Item::pickAxe_wood_Id,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Item::pickAxe_wood_Id,1,0)); } - else if(temp.find(L"{*FurnaceIcon*}")!=wstring::npos) + else if(temp.find(L"{*FurnaceIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Tile::furnace_Id,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Tile::furnace_Id,1,0)); } - else if(temp.find(L"{*WoodenDoorIcon*}")!=wstring::npos) + else if(temp.find(L"{*WoodenDoorIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Item::door_wood,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Item::door_wood,1,0)); } - else if(temp.find(L"{*TorchIcon*}")!=wstring::npos) + else if(temp.find(L"{*TorchIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Tile::torch_Id,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Tile::torch_Id,1,0)); } - else if(temp.find(L"{*BoatIcon*}")!=wstring::npos) + else if(temp.find(L"{*BoatIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Item::boat_Id,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Item::boat_Id,1,0)); } - else if(temp.find(L"{*FishingRodIcon*}")!=wstring::npos) + else if(temp.find(L"{*FishingRodIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Item::fishingRod_Id,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Item::fishingRod_Id,1,0)); } - else if(temp.find(L"{*FishIcon*}")!=wstring::npos) + else if(temp.find(L"{*FishIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Item::fish_raw_Id,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Item::fish_raw_Id,1,0)); } - else if(temp.find(L"{*MinecartIcon*}")!=wstring::npos) + else if(temp.find(L"{*MinecartIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Item::minecart_Id,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Item::minecart_Id,1,0)); } - else if(temp.find(L"{*RailIcon*}")!=wstring::npos) + else if(temp.find(L"{*RailIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Tile::rail_Id,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Tile::rail_Id,1,0)); } - else if(temp.find(L"{*PoweredRailIcon*}")!=wstring::npos) + else if(temp.find(L"{*PoweredRailIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Tile::goldenRail_Id,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Tile::goldenRail_Id,1,0)); } - else if(temp.find(L"{*StructuresIcon*}")!=wstring::npos) + else if(temp.find(L"{*StructuresIcon*}")!=std::wstring::npos) { isFixedIcon = true; setupIconHolder(e_ICON_TYPE_STRUCTURES); } - else if(temp.find(L"{*ToolsIcon*}")!=wstring::npos) + else if(temp.find(L"{*ToolsIcon*}")!=std::wstring::npos) { isFixedIcon = true; setupIconHolder(e_ICON_TYPE_TOOLS); } - else if(temp.find(L"{*StoneIcon*}")!=wstring::npos) + else if(temp.find(L"{*StoneIcon*}")!=std::wstring::npos) { - m_iconItem = shared_ptr(new ItemInstance(Tile::rock_Id,1,0)); + m_iconItem = std::shared_ptr(new ItemInstance(Tile::rock_Id,1,0)); } else { @@ -330,14 +330,14 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, return temp; } -wstring UIComponent_TutorialPopup::_SetImage(wstring &desc) +std::wstring UIComponent_TutorialPopup::_SetImage(std::wstring &desc) { // 4J Stu - Unused #if 0 BOOL imageShowAtStart = m_image.IsShown(); - wstring openTag(L"{*IMAGE*}"); - wstring closeTag(L"{*/IMAGE*}"); + std::wstring openTag(L"{*IMAGE*}"); + std::wstring closeTag(L"{*/IMAGE*}"); int imageTagStartPos = (int)desc.find(openTag); int imageStartPos = imageTagStartPos + (int)openTag.length(); if( imageTagStartPos > 0 && imageStartPos < (int)desc.length() ) @@ -346,7 +346,7 @@ wstring UIComponent_TutorialPopup::_SetImage(wstring &desc) if(imageEndPos > imageStartPos && imageEndPos < (int)desc.length() ) { - wstring id = desc.substr(imageStartPos, imageEndPos - imageStartPos); + std::wstring id = desc.substr(imageStartPos, imageEndPos - imageStartPos); m_image.SetImagePath( id.c_str() ); m_image.SetShow( TRUE ); @@ -385,7 +385,7 @@ wstring UIComponent_TutorialPopup::_SetImage(wstring &desc) } -wstring UIComponent_TutorialPopup::ParseDescription(int iPad, wstring &text) +std::wstring UIComponent_TutorialPopup::ParseDescription(int iPad, std::wstring &text) { text = replaceAll(text, L"{*CraftingTableIcon*}", L""); text = replaceAll(text, L"{*SticksIcon*}", L""); @@ -408,7 +408,7 @@ wstring UIComponent_TutorialPopup::ParseDescription(int iPad, wstring &text) bool exitScreenshot = false; size_t pos = text.find(L"{*EXIT_PICTURE*}"); - if(pos != wstring::npos) exitScreenshot = true; + if(pos != std::wstring::npos) exitScreenshot = true; text = replaceAll(text, L"{*EXIT_PICTURE*}", L""); m_controlExitScreenshot.setVisible(exitScreenshot); /* diff --git a/Minecraft.Client/Build/Common/UI/UIComponent_TutorialPopup.h b/Minecraft.Client/Build/Common/UI/UIComponent_TutorialPopup.h index 36f78300d..59d038278 100644 --- a/Minecraft.Client/Build/Common/UI/UIComponent_TutorialPopup.h +++ b/Minecraft.Client/Build/Common/UI/UIComponent_TutorialPopup.h @@ -15,7 +15,7 @@ private: bool m_lastSceneMovedLeft; bool m_bAllowFade; Tutorial *m_tutorial; - shared_ptr m_iconItem; + std::shared_ptr m_iconItem; bool m_iconIsFoil; //int m_iLocalPlayerC; @@ -57,7 +57,7 @@ protected: UI_MAP_NAME( m_funcSetupIconHolder, L"SetupIconHolder") UI_END_MAP_ELEMENTS_AND_NAMES() - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: virtual EUIScene getSceneType() { return eUIComponent_TutorialPopup;} @@ -91,10 +91,10 @@ protected: void handleTimerComplete(int id); private: - void _SetDescription(UIScene *interactScene, const wstring &desc, const wstring &title, bool allowFade, bool isReminder); - wstring _SetIcon(int icon, int iAuxVal, bool isFoil, LPCWSTR desc); - wstring _SetImage(wstring &desc); - wstring ParseDescription(int iPad, wstring &text); + void _SetDescription(UIScene *interactScene, const std::wstring &desc, const std::wstring &title, bool allowFade, bool isReminder); + std::wstring _SetIcon(int icon, int iAuxVal, bool isFoil, LPCWSTR desc); + std::wstring _SetImage(std::wstring &desc); + std::wstring ParseDescription(int iPad, std::wstring &text); void UpdateInteractScenePosition(bool visible); void setupIconHolder(EIcons icon); diff --git a/Minecraft.Client/Build/Common/UI/UIControl.cpp b/Minecraft.Client/Build/Common/UI/UIControl.cpp index 0fb3608c6..743117842 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl.cpp @@ -147,7 +147,7 @@ bool UIControl::getVisible() return bVisible; } -IggyName UIControl::registerFastName(const wstring &name) +IggyName UIControl::registerFastName(const std::wstring &name) { return m_parentScene->registerFastName(name); } diff --git a/Minecraft.Client/Build/Common/UI/UIControl.h b/Minecraft.Client/Build/Common/UI/UIControl.h index 3b4ef050a..b9e26f0c5 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl.h +++ b/Minecraft.Client/Build/Common/UI/UIControl.h @@ -88,5 +88,5 @@ public: virtual bool hasFocus() { return false; } protected: - IggyName registerFastName(const wstring &name); + IggyName registerFastName(const std::wstring &name); }; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_Base.cpp b/Minecraft.Client/Build/Common/UI/UIControl_Base.cpp index d04592776..70c8ff440 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_Base.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_Base.cpp @@ -45,7 +45,7 @@ void UIControl_Base::tick() } } -void UIControl_Base::setLabel(const wstring &label, bool instant, bool force) +void UIControl_Base::setLabel(const std::wstring &label, bool instant, bool force) { if( force || ((!m_label.empty() || !label.empty()) && m_label.compare(label) != 0) ) m_bLabelChanged = true; m_label = label; @@ -69,7 +69,7 @@ void UIControl_Base::setLabel(const wstring &label, bool instant, bool force) void UIControl_Base::setLabel(const string &label) { - wstring wlabel = convStringToWstring(label); + std::wstring wlabel = convStringToWstring(label); setLabel(wlabel); } @@ -80,7 +80,7 @@ const wchar_t* UIControl_Base::getLabel() if(result.type == IGGY_DATATYPE_string_UTF16) { - m_label = wstring( (wchar_t *)result.string16.string, result.string16.length); + m_label = std::wstring( (wchar_t *)result.string16.string, result.string16.length); } return m_label.c_str(); diff --git a/Minecraft.Client/Build/Common/UI/UIControl_Base.h b/Minecraft.Client/Build/Common/UI/UIControl_Base.h index e70997c3e..f71f11b17 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_Base.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_Base.h @@ -12,7 +12,7 @@ protected: IggyName m_funcCheckLabelWidths; bool m_bLabelChanged; - wstring m_label; + std::wstring m_label; public: UIControl_Base(); @@ -20,7 +20,7 @@ public: virtual void tick(); - virtual void setLabel(const wstring &label, bool instant = false, bool force = false); + virtual void setLabel(const std::wstring &label, bool instant = false, bool force = false); virtual void setLabel(const string &label); const wchar_t* getLabel(); virtual void setAllPossibleLabels(int labelCount, wchar_t labels[][256]); diff --git a/Minecraft.Client/Build/Common/UI/UIControl_BitmapIcon.cpp b/Minecraft.Client/Build/Common/UI/UIControl_BitmapIcon.cpp index c2c56bf9c..04ca4207d 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_BitmapIcon.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_BitmapIcon.cpp @@ -13,7 +13,7 @@ bool UIControl_BitmapIcon::setupControl(UIScene *scene, IggyValuePath *parent, c return success; } -void UIControl_BitmapIcon::setTextureName(const wstring &iconName) +void UIControl_BitmapIcon::setTextureName(const std::wstring &iconName) { IggyDataValue result; IggyDataValue value[1]; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_BitmapIcon.h b/Minecraft.Client/Build/Common/UI/UIControl_BitmapIcon.h index 9b2fe0a87..a06b51e06 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_BitmapIcon.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_BitmapIcon.h @@ -10,5 +10,5 @@ private: public: virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName); - void setTextureName(const wstring &iconName); + void setTextureName(const std::wstring &iconName); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/UI/UIControl_Button.cpp b/Minecraft.Client/Build/Common/UI/UIControl_Button.cpp index ec4efde8d..0fbf1dcd5 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_Button.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_Button.cpp @@ -17,7 +17,7 @@ bool UIControl_Button::setupControl(UIScene *scene, IggyValuePath *parent, const return success; } -void UIControl_Button::init(const wstring &label, int id) +void UIControl_Button::init(const std::wstring &label, int id) { m_label = label; m_id = id; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_Button.h b/Minecraft.Client/Build/Common/UI/UIControl_Button.h index 367a48d7f..49d2f41d3 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_Button.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_Button.h @@ -12,7 +12,7 @@ public: virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName); - void init(const wstring &label, int id); + void init(const std::wstring &label, int id); virtual void ReInit(); void setEnable(bool enable); diff --git a/Minecraft.Client/Build/Common/UI/UIControl_ButtonList.cpp b/Minecraft.Client/Build/Common/UI/UIControl_ButtonList.cpp index 7e3bcd78a..5148e27a6 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_ButtonList.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_ButtonList.cpp @@ -70,7 +70,7 @@ void UIControl_ButtonList::addItem(const string &label) addItem(label, m_itemCount); } -void UIControl_ButtonList::addItem(const wstring &label) +void UIControl_ButtonList::addItem(const std::wstring &label) { addItem(label, m_itemCount); } @@ -93,7 +93,7 @@ void UIControl_ButtonList::addItem(const string &label, int data) ++m_itemCount; } -void UIControl_ButtonList::addItem(const wstring &label, int data) +void UIControl_ButtonList::addItem(const std::wstring &label, int data) { IggyDataValue result; IggyDataValue value[2]; @@ -143,7 +143,7 @@ void UIControl_ButtonList::updateChildFocus(int iChild) m_iCurrentSelection = iChild; } -void UIControl_ButtonList::setButtonLabel(int iButtonId, const wstring &label) +void UIControl_ButtonList::setButtonLabel(int iButtonId, const std::wstring &label) { IggyDataValue result; IggyDataValue value[2]; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_ButtonList.h b/Minecraft.Client/Build/Common/UI/UIControl_ButtonList.h index a3c5da3a7..19e1cbd72 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_ButtonList.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_ButtonList.h @@ -20,10 +20,10 @@ public: void clearList(); - void addItem(const wstring &label); + void addItem(const std::wstring &label); void addItem(const string &label); - void addItem(const wstring &label, int data); + void addItem(const std::wstring &label, int data); void addItem(const string &label, int data); void removeItem(int index); @@ -35,7 +35,7 @@ public: void updateChildFocus(int iChild); - void setButtonLabel(int iButtonId, const wstring &label); + void setButtonLabel(int iButtonId, const std::wstring &label); #ifdef __PSVITA__ void SetTouchFocus(S32 iX, S32 iY, bool bRepeat); diff --git a/Minecraft.Client/Build/Common/UI/UIControl_CheckBox.cpp b/Minecraft.Client/Build/Common/UI/UIControl_CheckBox.cpp index 23490d2ce..ec1a32404 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_CheckBox.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_CheckBox.cpp @@ -21,7 +21,7 @@ bool UIControl_CheckBox::setupControl(UIScene *scene, IggyValuePath *parent, con return success; } -void UIControl_CheckBox::init(const wstring &label, int id, bool checked) +void UIControl_CheckBox::init(const std::wstring &label, int id, bool checked) { m_label = label; m_id = id; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_CheckBox.h b/Minecraft.Client/Build/Common/UI/UIControl_CheckBox.h index 924e9c688..91d0ffd58 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_CheckBox.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_CheckBox.h @@ -14,7 +14,7 @@ public: virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName); - void init(const wstring &label, int id, bool checked); + void init(const std::wstring &label, int id, bool checked); bool IsChecked(); bool IsEnabled(); diff --git a/Minecraft.Client/Build/Common/UI/UIControl_DLCList.cpp b/Minecraft.Client/Build/Common/UI/UIControl_DLCList.cpp index 374197c09..1c33d5b1e 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_DLCList.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_DLCList.cpp @@ -34,7 +34,7 @@ void UIControl_DLCList::addItem(const string &label, bool showTick, int iId) ++m_itemCount; } -void UIControl_DLCList::addItem(const wstring &label, bool showTick, int iId) +void UIControl_DLCList::addItem(const std::wstring &label, bool showTick, int iId) { IggyDataValue result; IggyDataValue value[3]; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_DLCList.h b/Minecraft.Client/Build/Common/UI/UIControl_DLCList.h index 9c917cbfb..6bb0d41aa 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_DLCList.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_DLCList.h @@ -12,6 +12,6 @@ public: using UIControl_ButtonList::addItem; void addItem(const string &label, bool showTick, int iId); - void addItem(const wstring &label, bool showTick, int iId); + void addItem(const std::wstring &label, bool showTick, int iId); void showTick(int iId, bool showTick); }; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_DynamicLabel.cpp b/Minecraft.Client/Build/Common/UI/UIControl_DynamicLabel.cpp index 93806f929..858247a86 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_DynamicLabel.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_DynamicLabel.cpp @@ -20,7 +20,7 @@ bool UIControl_DynamicLabel::setupControl(UIScene *scene, IggyValuePath *parent, return success; } -void UIControl_DynamicLabel::addText(const wstring &text, bool bLastEntry) +void UIControl_DynamicLabel::addText(const std::wstring &text, bool bLastEntry) { IggyDataValue result; IggyDataValue value[2]; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_DynamicLabel.h b/Minecraft.Client/Build/Common/UI/UIControl_DynamicLabel.h index 902c706d2..3434ea957 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_DynamicLabel.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_DynamicLabel.h @@ -12,7 +12,7 @@ public: virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName); - virtual void addText(const wstring &text, bool bLastEntry); + virtual void addText(const std::wstring &text, bool bLastEntry); virtual void ReInit(); diff --git a/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentBook.cpp b/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentBook.cpp index 89cbd8b48..e37f889fd 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentBook.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentBook.cpp @@ -100,7 +100,7 @@ void UIControl_EnchantmentBook::tickBook() { UIScene_EnchantingMenu *m_containerScene = (UIScene_EnchantingMenu *)m_parentScene; EnchantmentMenu *menu = m_containerScene->getMenu(); - shared_ptr current = menu->getSlot(0)->getItem(); + std::shared_ptr current = menu->getSlot(0)->getItem(); if (!ItemInstance::matches(current, last)) { last = current; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentBook.h b/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentBook.h index cbe2cf2bf..5cd78a89a 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentBook.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentBook.h @@ -19,7 +19,7 @@ private: //BOOL m_bDirty; //float m_fScale,m_fAlpha; //int m_iPad; - shared_ptr last; + std::shared_ptr last; //float m_fScreenWidth,m_fScreenHeight; //float m_fRawWidth,m_fRawHeight; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentButton.cpp b/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentButton.cpp index 955d0d718..a9d07af66 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentButton.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentButton.cpp @@ -93,7 +93,7 @@ void UIControl_EnchantmentButton::render(IggyCustomDrawCallbackRegion *region) glEnable(GL_ALPHA_TEST); glAlphaFunc(GL_GREATER, 0.1f); Minecraft *pMinecraft = Minecraft::GetInstance(); - wstring line = _toString(cost); + std::wstring line = _toString(cost); Font *font = pMinecraft->altFont; //int col = 0x685E4A; unsigned int col = m_textColour; @@ -191,15 +191,15 @@ UIControl_EnchantmentButton::EnchantmentNames UIControl_EnchantmentButton::Encha UIControl_EnchantmentButton::EnchantmentNames::EnchantmentNames() { - wstring allWords = L"the elder scrolls klaatu berata niktu xyzzy bless curse light darkness fire air earth water hot dry cold wet ignite snuff embiggen twist shorten stretch fiddle destroy imbue galvanize enchant free limited range of towards inside sphere cube self other ball mental physical grow shrink demon elemental spirit animal creature beast humanoid undead fresh stale "; + std::wstring allWords = L"the elder scrolls klaatu berata niktu xyzzy bless curse light darkness fire air earth water hot dry cold wet ignite snuff embiggen twist shorten stretch fiddle destroy imbue galvanize enchant free limited range of towards inside sphere cube self other ball mental physical grow shrink demon elemental spirit animal creature beast humanoid undead fresh stale "; std::wistringstream iss(allWords); std::copy(std::istream_iterator< std::wstring, wchar_t, std::char_traits >(iss), std::istream_iterator< std::wstring, wchar_t, std::char_traits >(),std::back_inserter(words)); } -wstring UIControl_EnchantmentButton::EnchantmentNames::getRandomName() +std::wstring UIControl_EnchantmentButton::EnchantmentNames::getRandomName() { int wordCount = random.nextInt(2) + 3; - wstring word = L""; + std::wstring word = L""; for (int i = 0; i < wordCount; i++) { if (i > 0) word += L" "; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentButton.h b/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentButton.h index 9b8a3c8f3..8ccff4526 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentButton.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_EnchantmentButton.h @@ -16,7 +16,7 @@ private: EState m_lastState; int m_lastCost; int m_index; - wstring m_enchantmentString; + std::wstring m_enchantmentString; bool m_bHasFocus; IggyName m_funcChangeState; @@ -30,12 +30,12 @@ private: private: Random random; - vector words; + std::vector words; EnchantmentNames(); public: - wstring getRandomName(); + std::wstring getRandomName(); }; public: diff --git a/Minecraft.Client/Build/Common/UI/UIControl_Label.cpp b/Minecraft.Client/Build/Common/UI/UIControl_Label.cpp index ad620ba8c..472918b6e 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_Label.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_Label.cpp @@ -17,7 +17,7 @@ bool UIControl_Label::setupControl(UIScene *scene, IggyValuePath *parent, const return success; } -void UIControl_Label::init(const wstring &label) +void UIControl_Label::init(const std::wstring &label) { m_label = label; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_Label.h b/Minecraft.Client/Build/Common/UI/UIControl_Label.h index aa0f3f14c..34e28c182 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_Label.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_Label.h @@ -9,7 +9,7 @@ public: virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName); - void init(const wstring &label); + void init(const std::wstring &label); void init(const string &label); virtual void ReInit(); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/UI/UIControl_LeaderboardList.cpp b/Minecraft.Client/Build/Common/UI/UIControl_LeaderboardList.cpp index e404a8b07..fd0c33963 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_LeaderboardList.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_LeaderboardList.cpp @@ -48,7 +48,7 @@ void UIControl_LeaderboardList::clearList() IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_funcResetLeaderboard , 0 , NULL ); } -void UIControl_LeaderboardList::setupTitles(const wstring &rank, const wstring &gamertag) +void UIControl_LeaderboardList::setupTitles(const std::wstring &rank, const std::wstring &gamertag) { IggyDataValue result; IggyDataValue value[2]; @@ -111,7 +111,7 @@ void UIControl_LeaderboardList::setColumnIcon(int iColumn, int iType) IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_funcSetColumnIcon , 2 , value ); } -void UIControl_LeaderboardList::addDataSet(bool bLast, int iId, int iRank, const wstring &gamertag, bool bDisplayMessage, const wstring &col0, const wstring &col1, const wstring &col2, const wstring &col3, const wstring &col4, const wstring &col5, const wstring &col6) +void UIControl_LeaderboardList::addDataSet(bool bLast, int iId, int iRank, const std::wstring &gamertag, bool bDisplayMessage, const std::wstring &col0, const std::wstring &col1, const std::wstring &col2, const std::wstring &col3, const std::wstring &col4, const std::wstring &col5, const std::wstring &col6) { IggyDataValue result; IggyDataValue value[12]; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_LeaderboardList.h b/Minecraft.Client/Build/Common/UI/UIControl_LeaderboardList.h index e102ddd75..f74378451 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_LeaderboardList.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_LeaderboardList.h @@ -39,10 +39,10 @@ public: void clearList(); - void setupTitles(const wstring &rank, const wstring &gamertag); + void setupTitles(const std::wstring &rank, const std::wstring &gamertag); void initLeaderboard(int iFirstFocus, int iTotalEntries, int iNumColumns); void setColumnIcon(int iColumn, int iType); - void addDataSet(bool bLast, int iId, int iRank, const wstring &gamertag, bool bDisplayMessage, const wstring &col0, const wstring &col1, const wstring &col2, const wstring &col3, const wstring &col4, const wstring &col5, const wstring &col6); + void addDataSet(bool bLast, int iId, int iRank, const std::wstring &gamertag, bool bDisplayMessage, const std::wstring &col0, const std::wstring &col1, const std::wstring &col2, const std::wstring &col3, const std::wstring &col4, const std::wstring &col5, const std::wstring &col6); #ifdef __PSVITA__ void SetTouchFocus(S32 iX, S32 iY, bool bRepeat); diff --git a/Minecraft.Client/Build/Common/UI/UIControl_PlayerList.cpp b/Minecraft.Client/Build/Common/UI/UIControl_PlayerList.cpp index c12311557..4af008729 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_PlayerList.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_PlayerList.cpp @@ -14,7 +14,7 @@ bool UIControl_PlayerList::setupControl(UIScene *scene, IggyValuePath *parent, c return success; } -void UIControl_PlayerList::addItem(const wstring &label, int iPlayerIcon, int iVOIPIcon) +void UIControl_PlayerList::addItem(const std::wstring &label, int iPlayerIcon, int iVOIPIcon) { IggyDataValue result; IggyDataValue value[4]; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_PlayerList.h b/Minecraft.Client/Build/Common/UI/UIControl_PlayerList.h index 8647d9500..ce31ef21d 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_PlayerList.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_PlayerList.h @@ -11,7 +11,7 @@ public: virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName); using UIControl_ButtonList::addItem; - void addItem(const wstring &label, int iPlayerIcon, int iVOIPIcon); + void addItem(const std::wstring &label, int iPlayerIcon, int iVOIPIcon); void setPlayerIcon(int iId, int iPlayerIcon); void setVOIPIcon(int iId, int iVOIPIcon); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/UI/UIControl_PlayerSkinPreview.cpp b/Minecraft.Client/Build/Common/UI/UIControl_PlayerSkinPreview.cpp index 5aa953738..3ce250ba8 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_PlayerSkinPreview.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_PlayerSkinPreview.cpp @@ -105,7 +105,7 @@ void UIControl_PlayerSkinPreview::tick() } } -void UIControl_PlayerSkinPreview::SetTexture(const wstring &url, TEXTURE_NAME backupTexture) +void UIControl_PlayerSkinPreview::SetTexture(const std::wstring &url, TEXTURE_NAME backupTexture) { m_customTextureUrl = url; m_backupTexture = backupTexture; @@ -221,7 +221,7 @@ void UIControl_PlayerSkinPreview::render(IggyCustomDrawCallbackRegion *region) if (renderer != NULL) { // 4J-PB - any additional parts to turn on for this player (skin dependent) - //vector *pAdditionalModelParts=mob->GetAdditionalModelParts(); + //std::vector *pAdditionalModelParts=mob->GetAdditionalModelParts(); if(m_pvAdditionalModelParts && m_pvAdditionalModelParts->size()!=0) { @@ -473,7 +473,7 @@ void UIControl_PlayerSkinPreview::render(EntityRenderer *renderer, double x, dou model->holdingLeftHand = false; } -bool UIControl_PlayerSkinPreview::bindTexture(const wstring& urlTexture, int backupTexture) +bool UIControl_PlayerSkinPreview::bindTexture(const std::wstring& urlTexture, int backupTexture) { Textures *t = Minecraft::GetInstance()->textures; @@ -493,7 +493,7 @@ bool UIControl_PlayerSkinPreview::bindTexture(const wstring& urlTexture, int bac } } -bool UIControl_PlayerSkinPreview::bindTexture(const wstring& urlTexture, const wstring& backupTexture) +bool UIControl_PlayerSkinPreview::bindTexture(const std::wstring& urlTexture, const std::wstring& backupTexture) { Textures *t = Minecraft::GetInstance()->textures; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_PlayerSkinPreview.h b/Minecraft.Client/Build/Common/UI/UIControl_PlayerSkinPreview.h index 18ab3cecf..b493acc04 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_PlayerSkinPreview.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_PlayerSkinPreview.h @@ -26,9 +26,9 @@ private: BOOL m_bDirty; float m_fScale,m_fAlpha; - wstring m_customTextureUrl; + std::wstring m_customTextureUrl; TEXTURE_NAME m_backupTexture; - wstring m_capeTextureUrl; + std::wstring m_capeTextureUrl; unsigned int m_uiAnimOverrideBitmask; float m_fScreenWidth,m_fScreenHeight; @@ -51,8 +51,8 @@ private: float m_swingTime; ESkinPreviewAnimations m_currentAnimation; - //vector *m_pvAdditionalBoxes; - vector *m_pvAdditionalModelParts; + //std::vector *m_pvAdditionalBoxes; + std::vector *m_pvAdditionalModelParts; public: enum ESkinPreviewFacing { @@ -67,8 +67,8 @@ public: void render(IggyCustomDrawCallbackRegion *region); - void SetTexture(const wstring &url, TEXTURE_NAME backupTexture = TN_MOB_CHAR); - void SetCapeTexture(const wstring &url) { m_capeTextureUrl = url; } + void SetTexture(const std::wstring &url, TEXTURE_NAME backupTexture = TN_MOB_CHAR); + void SetCapeTexture(const std::wstring &url) { m_capeTextureUrl = url; } void ResetRotation() { m_xRot = 0; m_yRot = 0; } void IncrementYRotation() { m_yRot = (m_yRot+4); if(m_yRot >= 180) m_yRot = -180; } void DecrementYRotation() { m_yRot = (m_yRot-4); if(m_yRot <= -180) m_yRot = 180; } @@ -85,6 +85,6 @@ public: private: void render(EntityRenderer *renderer, double x, double y, double z, float rot, float a); - bool bindTexture(const wstring& urlTexture, int backupTexture); - bool bindTexture(const wstring& urlTexture, const wstring& backupTexture); + bool bindTexture(const std::wstring& urlTexture, int backupTexture); + bool bindTexture(const std::wstring& urlTexture, const std::wstring& backupTexture); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/UI/UIControl_Progress.cpp b/Minecraft.Client/Build/Common/UI/UIControl_Progress.cpp index 6d55c637b..1c9aa640e 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_Progress.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_Progress.cpp @@ -23,7 +23,7 @@ bool UIControl_Progress::setupControl(UIScene *scene, IggyValuePath *parent, con return success; } -void UIControl_Progress::init(const wstring &label, int id, int min, int max, int current) +void UIControl_Progress::init(const std::wstring &label, int id, int min, int max, int current) { m_label = label; m_id = id; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_Progress.h b/Minecraft.Client/Build/Common/UI/UIControl_Progress.h index 8398a1880..9ef40b55a 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_Progress.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_Progress.h @@ -17,7 +17,7 @@ public: virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName); - void init(const wstring &label, int id, int min, int max, int current); + void init(const std::wstring &label, int id, int min, int max, int current); virtual void ReInit(); void setProgress(int current); diff --git a/Minecraft.Client/Build/Common/UI/UIControl_SaveList.cpp b/Minecraft.Client/Build/Common/UI/UIControl_SaveList.cpp index 70464fd63..0a7394f7d 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_SaveList.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_SaveList.cpp @@ -13,7 +13,7 @@ bool UIControl_SaveList::setupControl(UIScene *scene, IggyValuePath *parent, con return success; } -void UIControl_SaveList::addItem(const wstring &label) +void UIControl_SaveList::addItem(const std::wstring &label) { addItem(label, L""); } @@ -23,7 +23,7 @@ void UIControl_SaveList::addItem(const string &label) addItem(label, L""); } -void UIControl_SaveList::addItem(const wstring &label, int data) +void UIControl_SaveList::addItem(const std::wstring &label, int data) { addItem(label, L"", data); } @@ -33,19 +33,19 @@ void UIControl_SaveList::addItem(const string &label, int data) addItem(label, L"", data); } -void UIControl_SaveList::addItem(const string &label, const wstring &iconName) +void UIControl_SaveList::addItem(const string &label, const std::wstring &iconName) { addItem(label, iconName, m_itemCount); ++m_itemCount; } -void UIControl_SaveList::addItem(const wstring &label, const wstring &iconName) +void UIControl_SaveList::addItem(const std::wstring &label, const std::wstring &iconName) { addItem(label, iconName, m_itemCount); ++m_itemCount; } -void UIControl_SaveList::addItem(const string &label, const wstring &iconName, int data) +void UIControl_SaveList::addItem(const string &label, const std::wstring &iconName, int data) { IggyDataValue result; IggyDataValue value[3]; @@ -67,7 +67,7 @@ void UIControl_SaveList::addItem(const string &label, const wstring &iconName, i IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_addNewItemFunc , 3 , value ); } -void UIControl_SaveList::addItem(const wstring &label, const wstring &iconName, int data) +void UIControl_SaveList::addItem(const std::wstring &label, const std::wstring &iconName, int data) { IggyDataValue result; IggyDataValue value[3]; @@ -89,7 +89,7 @@ void UIControl_SaveList::addItem(const wstring &label, const wstring &iconName, IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath(), m_addNewItemFunc , 3 , value ); } -void UIControl_SaveList::setTextureName(int iId, const wstring &iconName) +void UIControl_SaveList::setTextureName(int iId, const std::wstring &iconName) { IggyDataValue result; IggyDataValue value[2]; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_SaveList.h b/Minecraft.Client/Build/Common/UI/UIControl_SaveList.h index 7c72fea9c..4eab1a303 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_SaveList.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_SaveList.h @@ -12,18 +12,18 @@ public: using UIControl_ButtonList::addItem; - void addItem(const wstring &label); + void addItem(const std::wstring &label); void addItem(const string &label); - void addItem(const wstring &label, int data); + void addItem(const std::wstring &label, int data); void addItem(const string &label, int data); - void addItem(const string &label, const wstring &iconName); - void addItem(const wstring &label, const wstring &iconName); - void setTextureName(int iId, const wstring &iconName); + void addItem(const string &label, const std::wstring &iconName); + void addItem(const std::wstring &label, const std::wstring &iconName); + void setTextureName(int iId, const std::wstring &iconName); private: - void addItem(const string &label, const wstring &iconName, int data); - void addItem(const wstring &label, const wstring &iconName, int data); + void addItem(const string &label, const std::wstring &iconName, int data); + void addItem(const std::wstring &label, const std::wstring &iconName, int data); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/UI/UIControl_Slider.cpp b/Minecraft.Client/Build/Common/UI/UIControl_Slider.cpp index bff6a5b7e..5d09a452d 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_Slider.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_Slider.cpp @@ -22,7 +22,7 @@ bool UIControl_Slider::setupControl(UIScene *scene, IggyValuePath *parent, const return success; } -void UIControl_Slider::init(const wstring &label, int id, int min, int max, int current) +void UIControl_Slider::init(const std::wstring &label, int id, int min, int max, int current) { m_label = label; m_id = id; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_Slider.h b/Minecraft.Client/Build/Common/UI/UIControl_Slider.h index 0b57c2f1f..57f426fff 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_Slider.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_Slider.h @@ -10,7 +10,7 @@ private: int m_max; int m_current; - vector m_allPossibleLabels; + std::vector m_allPossibleLabels; // 4J-TomK - function for setting slider position on touch IggyName m_funcSetRelativeSliderPos; @@ -21,7 +21,7 @@ public: virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName); - void init(const wstring &label, int id, int min, int max, int current); + void init(const std::wstring &label, int id, int min, int max, int current); void handleSliderMove(int newValue); void SetSliderTouchPos(float fTouchPos); diff --git a/Minecraft.Client/Build/Common/UI/UIControl_SpaceIndicatorBar.cpp b/Minecraft.Client/Build/Common/UI/UIControl_SpaceIndicatorBar.cpp index fdfc7ff4a..709197669 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_SpaceIndicatorBar.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_SpaceIndicatorBar.cpp @@ -24,7 +24,7 @@ bool UIControl_SpaceIndicatorBar::setupControl(UIScene *scene, IggyValuePath *pa return success; } -void UIControl_SpaceIndicatorBar::init(const wstring &label, int id, __int64 min, __int64 max) +void UIControl_SpaceIndicatorBar::init(const std::wstring &label, int id, __int64 min, __int64 max) { m_label = label; m_id = id; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_SpaceIndicatorBar.h b/Minecraft.Client/Build/Common/UI/UIControl_SpaceIndicatorBar.h index 39f9a746e..d3a3edbd9 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_SpaceIndicatorBar.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_SpaceIndicatorBar.h @@ -11,14 +11,14 @@ private: __int64 m_currentSave, m_currentTotal; float m_currentOffset; - vector > m_sizeAndOffsets; + std::vector > m_sizeAndOffsets; public: UIControl_SpaceIndicatorBar(); virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName); - void init(const wstring &label, int id, __int64 min, __int64 max); + void init(const std::wstring &label, int id, __int64 min, __int64 max); virtual void ReInit(); void reset(); diff --git a/Minecraft.Client/Build/Common/UI/UIControl_TextInput.cpp b/Minecraft.Client/Build/Common/UI/UIControl_TextInput.cpp index 619872864..b61f2fe7e 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_TextInput.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_TextInput.cpp @@ -20,7 +20,7 @@ bool UIControl_TextInput::setupControl(UIScene *scene, IggyValuePath *parent, co return success; } -void UIControl_TextInput::init(const wstring &label, int id) +void UIControl_TextInput::init(const std::wstring &label, int id) { m_label = label; m_id = id; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_TextInput.h b/Minecraft.Client/Build/Common/UI/UIControl_TextInput.h index d4023884e..b33c120f9 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_TextInput.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_TextInput.h @@ -13,7 +13,7 @@ public: virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName); - void init(const wstring &label, int id); + void init(const std::wstring &label, int id); void ReInit(); virtual void setFocus(bool focus); diff --git a/Minecraft.Client/Build/Common/UI/UIControl_TexturePackList.cpp b/Minecraft.Client/Build/Common/UI/UIControl_TexturePackList.cpp index 95e776973..794c29291 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_TexturePackList.cpp +++ b/Minecraft.Client/Build/Common/UI/UIControl_TexturePackList.cpp @@ -23,7 +23,7 @@ bool UIControl_TexturePackList::setupControl(UIScene *scene, IggyValuePath *pare return success; } -void UIControl_TexturePackList::init(const wstring &label, int id) +void UIControl_TexturePackList::init(const std::wstring &label, int id) { m_label = label; m_id = id; @@ -55,7 +55,7 @@ void UIControl_TexturePackList::init(const wstring &label, int id) #endif } -void UIControl_TexturePackList::addPack(int id, const wstring &textureName) +void UIControl_TexturePackList::addPack(int id, const std::wstring &textureName) { IggyDataValue result; IggyDataValue value[2]; diff --git a/Minecraft.Client/Build/Common/UI/UIControl_TexturePackList.h b/Minecraft.Client/Build/Common/UI/UIControl_TexturePackList.h index ce476fb18..e6281e353 100644 --- a/Minecraft.Client/Build/Common/UI/UIControl_TexturePackList.h +++ b/Minecraft.Client/Build/Common/UI/UIControl_TexturePackList.h @@ -13,9 +13,9 @@ public: virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName); - void init(const wstring &label, int id); + void init(const std::wstring &label, int id); - void addPack(int id, const wstring &textureName); + void addPack(int id, const std::wstring &textureName); void selectSlot(int id); void clearSlots(); diff --git a/Minecraft.Client/Build/Common/UI/UIController.cpp b/Minecraft.Client/Build/Common/UI/UIController.cpp index f5ed2c407..ecd54ccf7 100644 --- a/Minecraft.Client/Build/Common/UI/UIController.cpp +++ b/Minecraft.Client/Build/Common/UI/UIController.cpp @@ -125,7 +125,7 @@ extern "C" void __real_free(void *t); #endif __int64 UIController::iggyAllocCount = 0; -static unordered_map allocations; +static std::unordered_map allocations; static void * RADLINK AllocateFunction ( void * alloc_callback_user_data , size_t size_requested , size_t * size_returned ) { UIController *controller = (UIController *)alloc_callback_user_data; @@ -419,7 +419,7 @@ void UIController::tick() void UIController::loadSkins() { - wstring platformSkinPath = L""; + std::wstring platformSkinPath = L""; #ifdef __PS3__ platformSkinPath = L"skinPS3.swf"; @@ -508,7 +508,7 @@ void UIController::loadSkins() #endif // HD platforms } -IggyLibrary UIController::loadSkin(const wstring &skinPath, const wstring &skinName) +IggyLibrary UIController::loadSkin(const std::wstring &skinPath, const std::wstring &skinName) { IggyLibrary lib = IGGY_INVALID_LIBRARY; // 4J Stu - We need to load the platformskin before the normal skin, as the normal skin requires some elements from the platform skin @@ -650,7 +650,7 @@ void UIController::CleanUpSkinReload() m_queuedMessageBoxData.clear(); } -byteArray UIController::getMovieData(const wstring &filename) +byteArray UIController::getMovieData(const std::wstring &filename) { // Cache everything we load in the current tick __int64 targetTime = System::currentTimeMillis() + (1000LL * 60); @@ -1383,7 +1383,7 @@ void RADLINK UIController::TextureSubstitutionDestroyCallback ( void * user_call t->releaseTexture( id ); } -void UIController::registerSubstitutionTexture(const wstring &textureName, PBYTE pbData, DWORD dwLength) +void UIController::registerSubstitutionTexture(const std::wstring &textureName, PBYTE pbData, DWORD dwLength) { // Remove it if it already exists unregisterSubstitutionTexture(textureName,false); @@ -1391,7 +1391,7 @@ void UIController::registerSubstitutionTexture(const wstring &textureName, PBYTE m_substitutionTextures[textureName] = byteArray(pbData, dwLength); } -void UIController::unregisterSubstitutionTexture(const wstring &textureName, bool deleteData) +void UIController::unregisterSubstitutionTexture(const std::wstring &textureName, bool deleteData) { AUTO_VAR(it,m_substitutionTextures.find(textureName)); @@ -2027,7 +2027,7 @@ void UIController::DisplayGamertag(unsigned int iPad, bool show) } } -void UIController::SetSelectedItem(unsigned int iPad, const wstring &name) +void UIController::SetSelectedItem(unsigned int iPad, const std::wstring &name) { EUIGroup group; diff --git a/Minecraft.Client/Build/Common/UI/UIController.h b/Minecraft.Client/Build/Common/UI/UIController.h index ef064f80c..8b9128cf4 100644 --- a/Minecraft.Client/Build/Common/UI/UIController.h +++ b/Minecraft.Client/Build/Common/UI/UIController.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "IUIController.h" #include "UIEnums.h" #include "UIGroup.h" @@ -52,7 +52,7 @@ private: } UIELEMENT; // E3 - Fine for now, but we need to make this better! - vector m_TouchBoxes[eUIGroup_COUNT][eUILayer_COUNT][eUIScene_COUNT]; + std::vector m_TouchBoxes[eUIGroup_COUNT][eUILayer_COUNT][eUIScene_COUNT]; bool m_bTouchscreenPressed; #endif // 4J Stu - These should be in the order that they reference each other (i.e. they can only reference one with a lower value in the enum) @@ -113,14 +113,14 @@ private: static DWORD m_dwTrialTimerLimitSecs; - unordered_map m_substitutionTextures; + std::unordered_map m_substitutionTextures; typedef struct _CachedMovieData { byteArray m_ba; __int64 m_expiry; } CachedMovieData; - unordered_map m_cachedMovieData; + std::unordered_map m_cachedMovieData; typedef struct _QueuedMessageBoxData { @@ -128,7 +128,7 @@ private: int iPad; EUILayer layer; } QueuedMessageBoxData; - vector m_queuedMessageBoxData; + std::vector m_queuedMessageBoxData; unsigned int m_winUserIndex; //bool m_bSysUIShowing; @@ -139,7 +139,7 @@ private: D3D11_RECT m_customRenderingClearRect; - unordered_map m_registeredCallbackScenes; // A collection of scenes and unique id's that are used in async callbacks so we can safely handle when they get destroyed + std::unordered_map m_registeredCallbackScenes; // A collection of scenes and unique id's that are used in async callbacks so we can safely handle when they get destroyed CRITICAL_SECTION m_registeredCallbackScenesCS;; public: @@ -188,7 +188,7 @@ public: private: void loadSkins(); - IggyLibrary loadSkin(const wstring &skinPath, const wstring &skinName); + IggyLibrary loadSkin(const std::wstring &skinPath, const std::wstring &skinName); public: void ReloadSkin(); @@ -201,7 +201,7 @@ private: static int reloadSkinThreadProc(void* lpParam); public: - byteArray getMovieData(const wstring &filename); + byteArray getMovieData(const std::wstring &filename); // INPUT private: @@ -256,8 +256,8 @@ protected: virtual void destroySubstitutionTexture(void *destroyCallBackData, GDrawTexture *handle) {} public: - void registerSubstitutionTexture(const wstring &textureName, PBYTE pbData, DWORD dwLength); - void unregisterSubstitutionTexture(const wstring &textureName, bool deleteData); + void registerSubstitutionTexture(const std::wstring &textureName, PBYTE pbData, DWORD dwLength); + void unregisterSubstitutionTexture(const std::wstring &textureName, bool deleteData); public: // NAVIGATION @@ -302,7 +302,7 @@ public: virtual void PlayUISFX(ESoundEffect eSound); virtual void DisplayGamertag(unsigned int iPad, bool show); - virtual void SetSelectedItem(unsigned int iPad, const wstring &name); + virtual void SetSelectedItem(unsigned int iPad, const std::wstring &name); virtual void UpdateSelectedItemPos(unsigned int iPad); virtual void HandleDLCMountingComplete(); diff --git a/Minecraft.Client/Build/Common/UI/UIFontData.cpp b/Minecraft.Client/Build/Common/UI/UIFontData.cpp index c68e84974..24fc7c4f0 100644 --- a/Minecraft.Client/Build/Common/UI/UIFontData.cpp +++ b/Minecraft.Client/Build/Common/UI/UIFontData.cpp @@ -143,7 +143,7 @@ unsigned short SFontData::Codepoints[FONTSIZE] = CFontData::CFontData() { - m_unicodeMap = unordered_map(); + m_unicodeMap = std::unordered_map(); m_sFontData = NULL; m_kerningTable = NULL; @@ -181,7 +181,7 @@ CFontData::CFontData(SFontData &sFontData, int *pbRawImage) // CREATE UNICODE MAP // for (unsigned int i = 0; i < sFontData.m_uiGlyphCount; i++) { - unordered_map::value_type pair(sFontData.Codepoints[i], i); + std::unordered_map::value_type pair(sFontData.Codepoints[i], i); m_unicodeMap.insert( pair ); } @@ -291,7 +291,7 @@ SFontData *CFontData::getFontData() unsigned short CFontData::getGlyphId(unsigned int unicodepoint) { - unordered_map::iterator out = m_unicodeMap.find(unicodepoint); + std::unordered_map::iterator out = m_unicodeMap.find(unicodepoint); if (out != m_unicodeMap.end()) return out->second; return 0; diff --git a/Minecraft.Client/Build/Common/UI/UIFontData.h b/Minecraft.Client/Build/Common/UI/UIFontData.h index b7e38ffa0..16194e66e 100644 --- a/Minecraft.Client/Build/Common/UI/UIFontData.h +++ b/Minecraft.Client/Build/Common/UI/UIFontData.h @@ -2,7 +2,7 @@ #include -using namespace std; +//using namespace std; #define _DEBUG_BLOCK_CHARS 0 @@ -20,7 +20,7 @@ public: string m_strFontName; // Filename of the glyph archive. - wstring m_wstrFilename; + std::wstring m_wstrFilename; // Number of glyphs in the archive. unsigned int m_uiGlyphCount; @@ -82,7 +82,7 @@ protected: SFontData *m_sFontData; // Map Unicodepoints to glyph ids. - unordered_map m_unicodeMap; + std::unordered_map m_unicodeMap; // Kerning value for each glyph. unsigned short *m_kerningTable; diff --git a/Minecraft.Client/Build/Common/UI/UILayer.cpp b/Minecraft.Client/Build/Common/UI/UILayer.cpp index 8bbbae10e..a56932dcf 100644 --- a/Minecraft.Client/Build/Common/UI/UILayer.cpp +++ b/Minecraft.Client/Build/Common/UI/UILayer.cpp @@ -17,7 +17,7 @@ UILayer::UILayer(UIGroup *parent) void UILayer::tick() { // Delete old scenes - deleting a scene can cause a new scene to be deleted, so we need to make a copy of the scenes that we are going to try and destroy this tick - vectorscenesToDeleteCopy; + std::vectorscenesToDeleteCopy; for( AUTO_VAR(it,m_scenesToDelete.begin()); it != m_scenesToDelete.end(); it++) { UIScene *scene = (*it); @@ -620,7 +620,7 @@ void UILayer::removeScene(UIScene *scene) void UILayer::closeAllScenes() { - vector temp; + std::vector temp; temp.insert(temp.end(), m_sceneStack.begin(), m_sceneStack.end()); m_sceneStack.clear(); for(AUTO_VAR(it, temp.begin()); it != temp.end(); ++it) diff --git a/Minecraft.Client/Build/Common/UI/UILayer.h b/Minecraft.Client/Build/Common/UI/UILayer.h index 2840f23f2..13b3b9890 100644 --- a/Minecraft.Client/Build/Common/UI/UILayer.h +++ b/Minecraft.Client/Build/Common/UI/UILayer.h @@ -1,6 +1,6 @@ #pragma once #include "UIEnums.h" -using namespace std; +//using namespace std; class UIScene; class UIGroup; @@ -8,15 +8,15 @@ class UIGroup; class UILayer { private: - vector m_sceneStack; // Operates as a stack mainly, but we may wish to iterate over all elements - vector m_components; // Other componenents in this scene that to do not conform the the user nav stack, and cannot take focus - vector m_scenesToDelete; // A list of scenes to delete - vector m_scenesToDestroy; // A list of scenes where we want to dump the swf + std::vector m_sceneStack; // Operates as a stack mainly, but we may wish to iterate over all elements + std::vector m_components; // Other componenents in this scene that to do not conform the the user nav stack, and cannot take focus + std::vector m_scenesToDelete; // A list of scenes to delete + std::vector m_scenesToDestroy; // A list of scenes where we want to dump the swf #ifdef __ORBIS__ - unordered_map,std::hash> m_componentRefCount; + std::unordered_map,std::hash> m_componentRefCount; #else - unordered_map > m_componentRefCount; + std::unordered_map > m_componentRefCount; #endif public: diff --git a/Minecraft.Client/Build/Common/UI/UIScene.cpp b/Minecraft.Client/Build/Common/UI/UIScene.cpp index d8af0cf37..0bf88b93f 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene.cpp @@ -267,7 +267,7 @@ extern CRITICAL_SECTION s_loadSkinCS; void UIScene::loadMovie() { EnterCriticalSection(&UIController::ms_reloadSkinCS); // MGH - added to prevent crash loading Iggy movies while the skins were being reloaded - wstring moviePath = getMoviePath(); + std::wstring moviePath = getMoviePath(); #ifdef __PS3__ if(RenderManager.IsWidescreen()) @@ -386,7 +386,7 @@ void UIScene::loadMovie() } -void UIScene::getDebugMemoryUseRecursive(const wstring &moviePath, IggyMemoryUseInfo &memoryInfo) +void UIScene::getDebugMemoryUseRecursive(const std::wstring &moviePath, IggyMemoryUseInfo &memoryInfo) { rrbool res; IggyMemoryUseInfo internalMemoryInfo; @@ -497,7 +497,7 @@ void UIScene::tickTimers() } } -IggyName UIScene::registerFastName(const wstring &name) +IggyName UIScene::registerFastName(const std::wstring &name) { IggyName var; AUTO_VAR(it,m_fastNames.find(name)); @@ -597,7 +597,7 @@ void UIScene::customDraw(IggyCustomDrawCallbackRegion *region) app.DebugPrintf("Handling custom draw for scene with no override!\n"); } -void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, shared_ptr item, float fAlpha, bool isFoil, bool bDecorations) +void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, std::shared_ptr item, float fAlpha, bool isFoil, bool bDecorations) { if (item!= NULL) { @@ -608,7 +608,7 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iP //Make sure that pMinecraft->player is the correct player so that player specific rendering // eg clock and compass, are rendered correctly Minecraft *pMinecraft=Minecraft::GetInstance(); - shared_ptr oldPlayer = pMinecraft->player; + std::shared_ptr oldPlayer = pMinecraft->player; if( iPad >= 0 && iPad < XUSER_MAX_COUNT ) pMinecraft->player = pMinecraft->localplayers[iPad]; // Setup GDraw, normal game render states and matrices @@ -688,7 +688,7 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iP //Make sure that pMinecraft->player is the correct player so that player specific rendering // eg clock and compass, are rendered correctly - shared_ptr oldPlayer = pMinecraft->player; + std::shared_ptr oldPlayer = pMinecraft->player; if( iPad >= 0 && iPad < XUSER_MAX_COUNT ) pMinecraft->player = pMinecraft->localplayers[iPad]; _customDrawSlotControl(customDrawRegion, iPad, item, fAlpha, isFoil, bDecorations, false); @@ -701,7 +701,7 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iP } } -void UIScene::_customDrawSlotControl(CustomDrawData *region, int iPad, shared_ptr item, float fAlpha, bool isFoil, bool bDecorations, bool usingCommandBuffer) +void UIScene::_customDrawSlotControl(CustomDrawData *region, int iPad, std::shared_ptr item, float fAlpha, bool isFoil, bool bDecorations, bool usingCommandBuffer) { Minecraft *pMinecraft=Minecraft::GetInstance(); @@ -1161,13 +1161,13 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16 * call) } } -void UIScene::registerSubstitutionTexture(const wstring &textureName, PBYTE pbData, DWORD dwLength, bool deleteData) +void UIScene::registerSubstitutionTexture(const std::wstring &textureName, PBYTE pbData, DWORD dwLength, bool deleteData) { m_registeredTextures[textureName] = deleteData;; ui.registerSubstitutionTexture(textureName, pbData, dwLength); } -bool UIScene::hasRegisteredSubstitutionTexture(const wstring &textureName) +bool UIScene::hasRegisteredSubstitutionTexture(const std::wstring &textureName) { AUTO_VAR(it, m_registeredTextures.find( textureName ) ); diff --git a/Minecraft.Client/Build/Common/UI/UIScene.h b/Minecraft.Client/Build/Common/UI/UIScene.h index 823c510c7..315229390 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene.h +++ b/Minecraft.Client/Build/Common/UI/UIScene.h @@ -1,7 +1,7 @@ #pragma once // 4J-PB - remove the inherits via dominance warnings #pragma warning( disable : 4250 ) -using namespace std; +//using namespace std; // A scene map directly to an Iggy movie (or more accurately a collection of different sized movies) #include "UIEnums.h" @@ -49,8 +49,8 @@ private: IggyName m_funcSetAlpha; ItemRenderer *m_pItemRenderer; - unordered_map m_fastNames; - unordered_map m_registeredTextures; + std::unordered_map m_fastNames; + std::unordered_map m_registeredTextures; typedef struct _TimerInfo { @@ -58,7 +58,7 @@ private: int targetTime; bool running; } TimerInfo; - unordered_map m_timers; + std::unordered_map m_timers; int m_iFocusControl, m_iFocusChild; float m_lastOpacity; @@ -86,7 +86,7 @@ protected: int m_movieWidth, m_movieHeight; int m_renderWidth, m_renderHeight; - vector m_controls; + std::vector m_controls; protected: UILayer *m_parentLayer; @@ -109,7 +109,7 @@ public: #ifdef __PSVITA__ UILayer *GetParentLayer() {return m_parentLayer;} EUIGroup GetParentLayerGroup() {return m_parentLayer->m_parentGroup->GetGroup();} - vector *GetControls() {return &m_controls;} + std::vector *GetControls() {return &m_controls;} #endif protected: @@ -117,14 +117,14 @@ protected: virtual F64 getSafeZoneHalfWidth(); void setSafeZone(S32 top, S32 bottom, S32 left, S32 right); void doHorizontalResizeCheck(); - virtual wstring getMoviePath() = 0; + virtual std::wstring getMoviePath() = 0; virtual bool mapElementsAndNames(); void initialiseMovie(); void loadMovie(); private: - void getDebugMemoryUseRecursive(const wstring &moviePath, IggyMemoryUseInfo &memoryInfo); + void getDebugMemoryUseRecursive(const std::wstring &moviePath, IggyMemoryUseInfo &memoryInfo); public: void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic); @@ -138,7 +138,7 @@ public: virtual void tick(); - IggyName registerFastName(const wstring &name); + IggyName registerFastName(const std::wstring &name); #ifdef __PSVITA__ void SetFocusToElement(int iID); void UpdateSceneControls(); @@ -187,7 +187,7 @@ public: protected: //void customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, int iID, int iCount, int iAuxVal, float fAlpha, bool isFoil, bool bDecorations); - void customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, shared_ptr item, float fAlpha, bool isFoil, bool bDecorations); + void customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, std::shared_ptr item, float fAlpha, bool isFoil, bool bDecorations); bool m_cacheSlotRenders; bool m_needsCacheRendered; @@ -196,14 +196,14 @@ private: typedef struct _CachedSlotDrawData { CustomDrawData *customDrawRegion; - shared_ptr item; + std::shared_ptr item; float fAlpha; bool isFoil; bool bDecorations; } CachedSlotDrawData; - vector m_cachedSlotDraw; + std::vector m_cachedSlotDraw; - void _customDrawSlotControl(CustomDrawData *region, int iPad, shared_ptr item, float fAlpha, bool isFoil, bool bDecorations, bool usingCommandBuffer); + void _customDrawSlotControl(CustomDrawData *region, int iPad, std::shared_ptr item, float fAlpha, bool isFoil, bool bDecorations, bool usingCommandBuffer); public: // INPUT @@ -251,8 +251,8 @@ public: #ifdef _XBOX_ONE virtual void HandleDLCLicenseChange() {} #endif - void registerSubstitutionTexture(const wstring &textureName, PBYTE pbData, DWORD dwLength, bool deleteData = false); - bool hasRegisteredSubstitutionTexture(const wstring &textureName); + void registerSubstitutionTexture(const std::wstring &textureName, PBYTE pbData, DWORD dwLength, bool deleteData = false); + bool hasRegisteredSubstitutionTexture(const std::wstring &textureName); virtual void handleUnlockFullVersion() {} diff --git a/Minecraft.Client/Build/Common/UI/UIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_AbstractContainerMenu.cpp index fb7c0c28a..7fc8bc2cc 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_AbstractContainerMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_AbstractContainerMenu.cpp @@ -221,7 +221,7 @@ void UIScene_AbstractContainerMenu::customDraw(IggyCustomDrawCallbackRegion *reg Minecraft *pMinecraft = Minecraft::GetInstance(); if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL) return; - shared_ptr item = nullptr; + std::shared_ptr item = nullptr; if(wcscmp((wchar_t *)region->name,L"pointerIcon")==0) { m_cacheSlotRenders = false; @@ -259,7 +259,7 @@ void UIScene_AbstractContainerMenu::handleInput(int iPad, int key, bool repeat, } } -void UIScene_AbstractContainerMenu::SetPointerText(const wstring &description, vector &unformattedStrings, bool newSlot) +void UIScene_AbstractContainerMenu::SetPointerText(const std::wstring &description, std::vector &unformattedStrings, bool newSlot) { //app.DebugPrintf("Setting pointer text\n"); m_cursorPath.setLabel(description,false,newSlot); @@ -287,7 +287,7 @@ void UIScene_AbstractContainerMenu::setFocusToPointer(int iPad) m_focusSection = eSectionNone; } -shared_ptr UIScene_AbstractContainerMenu::getSlotItem(ESceneSection eSection, int iSlot) +std::shared_ptr UIScene_AbstractContainerMenu::getSlotItem(ESceneSection eSection, int iSlot) { Slot *slot = m_menu->getSlot( getSectionStartOffset(eSection) + iSlot ); if(slot) return slot->getItem(); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_AbstractContainerMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_AbstractContainerMenu.h index b98b37637..56be30a44 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_AbstractContainerMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_AbstractContainerMenu.h @@ -45,8 +45,8 @@ protected: virtual bool doesSectionTreeHaveFocus(ESceneSection eSection) { return false; } virtual void setSectionFocus(ESceneSection eSection, int iPad); void setFocusToPointer(int iPad); - void SetPointerText(const wstring &description, vector &unformattedStrings, bool newSlot); - virtual shared_ptr getSlotItem(ESceneSection eSection, int iSlot); + void SetPointerText(const std::wstring &description, std::vector &unformattedStrings, bool newSlot); + virtual std::shared_ptr getSlotItem(ESceneSection eSection, int iSlot); virtual bool isSlotEmpty(ESceneSection eSection, int iSlot); virtual void adjustPointerForSafeZone(); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_AnvilMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_AnvilMenu.cpp index 99df06ac3..85f70630f 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_AnvilMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_AnvilMenu.cpp @@ -37,7 +37,7 @@ UIScene_AnvilMenu::UIScene_AnvilMenu(int iPad, void *_initData, UILayer *parentL m_slotListResult.addSlots(RepairMenu::RESULT_SLOT, 1); bool expensive = false; - wstring m_costString = L""; + std::wstring m_costString = L""; if(m_repairMenu->cost > 0) { @@ -71,7 +71,7 @@ UIScene_AnvilMenu::UIScene_AnvilMenu(int iPad, void *_initData, UILayer *parentL app.SetRichPresenceContext(iPad, CONTEXT_GAME_STATE_ANVIL); } -wstring UIScene_AnvilMenu::getMoviePath() +std::wstring UIScene_AnvilMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { @@ -346,7 +346,7 @@ void UIScene_AnvilMenu::handleEditNamePressed() #endif } -void UIScene_AnvilMenu::setEditNameValue(const wstring &name) +void UIScene_AnvilMenu::setEditNameValue(const std::wstring &name) { m_textInputAnvil.setLabel(name); } @@ -355,7 +355,7 @@ void UIScene_AnvilMenu::setEditNameEditable(bool enabled) { } -void UIScene_AnvilMenu::setCostLabel(const wstring &label, bool canAfford) +void UIScene_AnvilMenu::setCostLabel(const std::wstring &label, bool canAfford) { IggyDataValue result; IggyDataValue value[2]; diff --git a/Minecraft.Client/Build/Common/UI/UIScene_AnvilMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_AnvilMenu.h index de262d9e4..8261091be 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_AnvilMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_AnvilMenu.h @@ -41,7 +41,7 @@ protected: UI_MAP_NAME(m_funcSetCostLabel, L"SetCostLabel") UI_END_MAP_ELEMENTS_AND_NAMES() - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); virtual void handleReload(); virtual void tick(); @@ -57,10 +57,10 @@ protected: static int KeyboardCompleteCallback(LPVOID lpParam,bool bRes); virtual void handleEditNamePressed(); - virtual void setEditNameValue(const wstring &name); + virtual void setEditNameValue(const std::wstring &name); virtual void setEditNameEditable(bool enabled); virtual void handleDestroy(); - void setCostLabel(const wstring &label, bool canAfford); + void setCostLabel(const std::wstring &label, bool canAfford); void showCross(bool show); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/UI/UIScene_BrewingStandMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_BrewingStandMenu.cpp index 59eb68494..d4d190fb0 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_BrewingStandMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_BrewingStandMenu.cpp @@ -43,7 +43,7 @@ UIScene_BrewingStandMenu::UIScene_BrewingStandMenu(int iPad, void *_initData, UI app.SetRichPresenceContext(iPad, CONTEXT_GAME_STATE_BREWING); } -wstring UIScene_BrewingStandMenu::getMoviePath() +std::wstring UIScene_BrewingStandMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_BrewingStandMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_BrewingStandMenu.h index 5441a1acb..d8a47c5fe 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_BrewingStandMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_BrewingStandMenu.h @@ -8,7 +8,7 @@ class InventoryMenu; class UIScene_BrewingStandMenu : public UIScene_AbstractContainerMenu, public IUIScene_BrewingMenu { private: - shared_ptr m_brewingStand; + std::shared_ptr m_brewingStand; public: UIScene_BrewingStandMenu(int iPad, void *initData, UILayer *parentLayer); @@ -33,7 +33,7 @@ protected: UI_END_MAP_CHILD_ELEMENTS() UI_END_MAP_ELEMENTS_AND_NAMES() - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); virtual void handleReload(); virtual void tick(); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_ConnectingProgress.cpp b/Minecraft.Client/Build/Common/UI/UIScene_ConnectingProgress.cpp index e9d1acbba..aa9c66a76 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_ConnectingProgress.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_ConnectingProgress.cpp @@ -74,7 +74,7 @@ void UIScene_ConnectingProgress::tick() } } -wstring UIScene_ConnectingProgress::getMoviePath() +std::wstring UIScene_ConnectingProgress::getMoviePath() { if(app.GetLocalPlayerCount() > 1 && !m_parentLayer->IsFullscreenGroup()) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_ConnectingProgress.h b/Minecraft.Client/Build/Common/UI/UIScene_ConnectingProgress.h index 2c52284c4..19a5eedd8 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_ConnectingProgress.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_ConnectingProgress.h @@ -46,7 +46,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); #ifdef _DURANGO virtual long long getDefaultGtcButtons() { return 0; } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_ContainerMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_ContainerMenu.cpp index a2828a4fe..386f0ce92 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_ContainerMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_ContainerMenu.cpp @@ -40,7 +40,7 @@ UIScene_ContainerMenu::UIScene_ContainerMenu(int iPad, void *_initData, UILayer if(initData) delete initData; } -wstring UIScene_ContainerMenu::getMoviePath() +std::wstring UIScene_ContainerMenu::getMoviePath() { if(m_bLargeChest) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_ContainerMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_ContainerMenu.h index f2ad743c2..02eb01d53 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_ContainerMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_ContainerMenu.h @@ -26,7 +26,7 @@ protected: UI_END_MAP_CHILD_ELEMENTS() UI_END_MAP_ELEMENTS_AND_NAMES() - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); virtual void handleReload(); virtual int getSectionColumns(ESceneSection eSection); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_ControlsMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_ControlsMenu.cpp index de9d6f18c..a1b619207 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_ControlsMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_ControlsMenu.cpp @@ -107,7 +107,7 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void *initData, UILayer *pa PositionAllText(m_iPad); } -wstring UIScene_ControlsMenu::getMoviePath() +std::wstring UIScene_ControlsMenu::getMoviePath() { #ifdef __ORBIS__ if(InputManager.UsingRemoteVita()) diff --git a/Minecraft.Client/Build/Common/UI/UIScene_ControlsMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_ControlsMenu.h index 538207fe0..e714f042d 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_ControlsMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_ControlsMenu.h @@ -124,7 +124,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_CraftingMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_CraftingMenu.cpp index def563d84..4bd45608c 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_CraftingMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_CraftingMenu.cpp @@ -224,7 +224,7 @@ EUIScene UIScene_CraftingMenu::getSceneType() } } -wstring UIScene_CraftingMenu::getMoviePath() +std::wstring UIScene_CraftingMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { @@ -435,7 +435,7 @@ void UIScene_CraftingMenu::customDraw(IggyCustomDrawCallbackRegion *region) Minecraft *pMinecraft = Minecraft::GetInstance(); if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL) return; - shared_ptr item = nullptr; + std::shared_ptr item = nullptr; int slotId = -1; float alpha = 1.0f; bool decorations = true; @@ -606,21 +606,21 @@ void UIScene_CraftingMenu::hideAllIngredientsSlots() } } -void UIScene_CraftingMenu::setCraftHSlotItem(int iPad, int iIndex, shared_ptr item, unsigned int uiAlpha) +void UIScene_CraftingMenu::setCraftHSlotItem(int iPad, int iIndex, std::shared_ptr item, unsigned int uiAlpha) { m_hSlotsInfo[iIndex].item = item; m_hSlotsInfo[iIndex].alpha = uiAlpha; m_hSlotsInfo[iIndex].show = true; } -void UIScene_CraftingMenu::setCraftVSlotItem(int iPad, int iIndex, shared_ptr item, unsigned int uiAlpha) +void UIScene_CraftingMenu::setCraftVSlotItem(int iPad, int iIndex, std::shared_ptr item, unsigned int uiAlpha) { m_vSlotsInfo[iIndex].item = item; m_vSlotsInfo[iIndex].alpha = uiAlpha; m_vSlotsInfo[iIndex].show = true; } -void UIScene_CraftingMenu::setCraftingOutputSlotItem(int iPad, shared_ptr item) +void UIScene_CraftingMenu::setCraftingOutputSlotItem(int iPad, std::shared_ptr item) { m_craftingOutputSlotInfo.item = item; m_craftingOutputSlotInfo.alpha = 31; @@ -632,7 +632,7 @@ void UIScene_CraftingMenu::setCraftingOutputSlotRedBox(bool show) m_slotListCraftingOutput.showSlotRedBox(0,show); } -void UIScene_CraftingMenu::setIngredientSlotItem(int iPad, int index, shared_ptr item) +void UIScene_CraftingMenu::setIngredientSlotItem(int iPad, int index, std::shared_ptr item) { m_ingredientsSlotsInfo[index].item = item; m_ingredientsSlotsInfo[index].alpha = 31; @@ -644,7 +644,7 @@ void UIScene_CraftingMenu::setIngredientSlotRedBox(int index, bool show) m_slotListIngredientsLayout.showSlotRedBox(index,show); } -void UIScene_CraftingMenu::setIngredientDescriptionItem(int iPad, int index, shared_ptr item) +void UIScene_CraftingMenu::setIngredientDescriptionItem(int iPad, int index, std::shared_ptr item) { m_ingredientsInfo[index].item = item; m_ingredientsInfo[index].alpha = 31; diff --git a/Minecraft.Client/Build/Common/UI/UIScene_CraftingMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_CraftingMenu.h index 44a39d615..04318c582 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_CraftingMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_CraftingMenu.h @@ -32,7 +32,7 @@ class UIScene_CraftingMenu : public UIScene, public IUIScene_CraftingMenu private: typedef struct _SlotInfo { - shared_ptr item; + std::shared_ptr item; unsigned int alpha; bool show; @@ -171,7 +171,7 @@ protected: UI_END_MAP_CHILD_ELEMENTS() UI_END_MAP_ELEMENTS_AND_NAMES() - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); virtual void handleReload(); virtual bool allowRepeat(int key); @@ -182,13 +182,13 @@ protected: virtual void hideAllHSlots(); virtual void hideAllVSlots(); virtual void hideAllIngredientsSlots(); - virtual void setCraftHSlotItem(int iPad, int iIndex, shared_ptr item, unsigned int uiAlpha); - virtual void setCraftVSlotItem(int iPad, int iIndex, shared_ptr item, unsigned int uiAlpha); - virtual void setCraftingOutputSlotItem(int iPad, shared_ptr item); + virtual void setCraftHSlotItem(int iPad, int iIndex, std::shared_ptr item, unsigned int uiAlpha); + virtual void setCraftVSlotItem(int iPad, int iIndex, std::shared_ptr item, unsigned int uiAlpha); + virtual void setCraftingOutputSlotItem(int iPad, std::shared_ptr item); virtual void setCraftingOutputSlotRedBox(bool show); - virtual void setIngredientSlotItem(int iPad, int index, shared_ptr item); + virtual void setIngredientSlotItem(int iPad, int index, std::shared_ptr item); virtual void setIngredientSlotRedBox(int index, bool show); - virtual void setIngredientDescriptionItem(int iPad, int index, shared_ptr item); + virtual void setIngredientDescriptionItem(int iPad, int index, std::shared_ptr item); virtual void setIngredientDescriptionRedBox(int index, bool show); virtual void setIngredientDescriptionText(int index, LPCWSTR text); virtual void setShowCraftHSlot(int iIndex, bool show); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_CreateWorldMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_CreateWorldMenu.cpp index bb44c9b02..dede6c4a5 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_CreateWorldMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_CreateWorldMenu.cpp @@ -261,7 +261,7 @@ void UIScene_CreateWorldMenu::updateComponents() m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,false); } -wstring UIScene_CreateWorldMenu::getMoviePath() +std::wstring UIScene_CreateWorldMenu::getMoviePath() { return L"CreateWorldMenu"; } @@ -1083,13 +1083,13 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD app.ClearTerrainFeaturePosition(); // create the world and launch - wstring wWorldName = pClass->m_worldName; + std::wstring wWorldName = pClass->m_worldName; StorageManager.ResetSaveData(); // Make our next save default to the name of the level StorageManager.SetSaveTitle((wchar_t *)wWorldName.c_str()); - wstring wSeed; + std::wstring wSeed; if(!pClass->m_MoreOptionsParams.seed.empty() ) { wSeed=pClass->m_MoreOptionsParams.seed; diff --git a/Minecraft.Client/Build/Common/UI/UIScene_CreateWorldMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_CreateWorldMenu.h index ebb383e85..be1f60dd4 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_CreateWorldMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_CreateWorldMenu.h @@ -20,8 +20,8 @@ private: static int m_iDifficultyTitleSettingA[4]; - wstring m_worldName; - wstring m_seed; + std::wstring m_worldName; + std::wstring m_seed; UIControl m_controlMainPanel; UIControl_Label m_labelWorldName, m_labelSeed, m_labelRandomSeed; @@ -78,7 +78,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); virtual void handleTimerComplete(int id); virtual void handleGainFocus(bool navBack); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_CreativeMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_CreativeMenu.cpp index ac941d43f..b4588e7ef 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_CreativeMenu.cpp @@ -21,7 +21,7 @@ UIScene_CreativeMenu::UIScene_CreativeMenu(int iPad, void *_initData, UILayer *p InventoryScreenInput *initData = (InventoryScreenInput *)_initData; - shared_ptr creativeContainer = shared_ptr(new SimpleContainer( 0, TabSpec::MAX_SIZE )); + std::shared_ptr creativeContainer = std::shared_ptr(new SimpleContainer( 0, TabSpec::MAX_SIZE )); itemPickerMenu = new ItemPickerMenu(creativeContainer, initData->player->inventory); Initialize( initData->iPad, itemPickerMenu, false, -1, eSectionInventoryCreativeUsing, eSectionInventoryCreativeMax, initData->bNavigateBack); @@ -63,7 +63,7 @@ UIScene_CreativeMenu::UIScene_CreativeMenu(int iPad, void *_initData, UILayer *p #endif } -wstring UIScene_CreativeMenu::getMoviePath() +std::wstring UIScene_CreativeMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_CreativeMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_CreativeMenu.h index 6fbec2ba8..a10459aff 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_CreativeMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_CreativeMenu.h @@ -56,7 +56,7 @@ protected: UI_MAP_NAME(m_funcSetScrollBar, L"SetScrollBar") UI_END_MAP_ELEMENTS_AND_NAMES() - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); virtual void handleReload(); virtual int getSectionColumns(ESceneSection eSection); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_Credits.cpp b/Minecraft.Client/Build/Common/UI/UIScene_Credits.cpp index 3bdb02e15..fcb4fa8c2 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_Credits.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_Credits.cpp @@ -530,7 +530,7 @@ UIScene_Credits::UIScene_Credits(int iPad, void *initData, UILayer *parentLayer) } } -wstring UIScene_Credits::getMoviePath() +std::wstring UIScene_Credits::getMoviePath() { return L"Credits"; } @@ -637,7 +637,7 @@ void UIScene_Credits::handleInput(int iPad, int key, bool repeat, bool pressed, } } -void UIScene_Credits::setNextLabel(const wstring &label, ECreditTextTypes size) +void UIScene_Credits::setNextLabel(const std::wstring &label, ECreditTextTypes size) { IggyDataValue result; IggyDataValue value[3]; diff --git a/Minecraft.Client/Build/Common/UI/UIScene_Credits.h b/Minecraft.Client/Build/Common/UI/UIScene_Credits.h index 015170e5a..9e449063c 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_Credits.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_Credits.h @@ -59,7 +59,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT @@ -68,6 +68,6 @@ public: virtual void handleRequestMoreData(F64 startIndex, bool up); private: - void setNextLabel(const wstring &label, ECreditTextTypes size); + void setNextLabel(const std::wstring &label, ECreditTextTypes size); void addImage(ECreditIcons icon); }; diff --git a/Minecraft.Client/Build/Common/UI/UIScene_DLCMainMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_DLCMainMenu.cpp index 52e705d40..cee003b53 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_DLCMainMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_DLCMainMenu.cpp @@ -73,7 +73,7 @@ UIScene_DLCMainMenu::~UIScene_DLCMainMenu() #endif } -wstring UIScene_DLCMainMenu::getMoviePath() +std::wstring UIScene_DLCMainMenu::getMoviePath() { return L"DLCMainMenu"; } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_DLCMainMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_DLCMainMenu.h index 15272fe19..7fc7cf609 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_DLCMainMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_DLCMainMenu.h @@ -41,7 +41,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_DLCOffersMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_DLCOffersMenu.cpp index 4622c8720..e65100d46 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_DLCOffersMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_DLCOffersMenu.cpp @@ -115,7 +115,7 @@ int UIScene_DLCOffersMenu::ExitDLCOffersMenu(void *pParam,int iPad,C4JStorage::E return 0; } -wstring UIScene_DLCOffersMenu::getMoviePath() +std::wstring UIScene_DLCOffersMenu::getMoviePath() { return L"DLCOffersMenu"; } @@ -226,7 +226,7 @@ void UIScene_DLCOffersMenu::handlePress(F64 controlId, F64 childId) #if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) // buy the DLC - vector::iterator it = m_pvProductInfo->begin(); + std::vector::iterator it = m_pvProductInfo->begin(); string teststring; for(int i=0;i::iterator it = m_pvProductInfo->begin(); + std::vector::iterator it = m_pvProductInfo->begin(); string teststring; for(int i=0;isize(); } - vector::iterator it = m_pvProductInfo->begin(); + std::vector::iterator it = m_pvProductInfo->begin(); string teststring; bool bFirstItemSet=false; for(int i=0;i::iterator it = m_pvProductInfo->begin(); + std::vector::iterator it = m_pvProductInfo->begin(); for(int i=0;i::iterator it = m_pvProductInfo->begin(); + std::vector::iterator it = m_pvProductInfo->begin(); string teststring; for(int i=0;ieDLCType==(eDLCContentType)m_iProductInfoIndex) { - wstring wstrTemp=xOffer.wszOfferName; + std::wstring wstrTemp=xOffer.wszOfferName; // 4J-PB - Rog requested we remove the Minecraft at the start of the name. It's required for the Bing search, but gets in the way here app.DebugPrintf("Adding %ls at %d\n",wstrTemp.c_str(), i); @@ -790,7 +790,7 @@ void UIScene_DLCOffersMenu::GetDLCInfo( int iOfferC, bool bUpdateOnly ) // set the default text wchar_t formatting[40]; - wstring wstrTemp = app.GetString(IDS_NO_DLCOFFERS); + std::wstring wstrTemp = app.GetString(IDS_NO_DLCOFFERS); // swprintf(formatting, 40, L"", m_bIsSD?12:14); // wstrTemp = formatting + wstrTemp; @@ -885,7 +885,7 @@ bool UIScene_DLCOffersMenu::UpdateDisplay(MARKETPLACE_CONTENTOFFER_INFO& xOffer) else { wchar_t formatting[40]; - wstring wstrTemp = app.GetString(IDS_NO_DLCOFFERS); + std::wstring wstrTemp = app.GetString(IDS_NO_DLCOFFERS); m_labelHTMLSellText.setLabel(wstrTemp.c_str()); m_labelPriceTag.setVisible(false); } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_DLCOffersMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_DLCOffersMenu.h index c5fcac7e5..637244720 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_DLCOffersMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_DLCOffersMenu.h @@ -43,7 +43,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT @@ -80,7 +80,7 @@ private: } SORTINDEXSTRUCT; - vector m_vIconRetrieval; + vector m_vIconRetrieval; bool m_bSelectionChanged; #endif diff --git a/Minecraft.Client/Build/Common/UI/UIScene_DeathMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_DeathMenu.cpp index cfecabfdd..dcd7602f8 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_DeathMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_DeathMenu.cpp @@ -39,7 +39,7 @@ UIScene_DeathMenu::~UIScene_DeathMenu() } } -wstring UIScene_DeathMenu::getMoviePath() +std::wstring UIScene_DeathMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_DeathMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_DeathMenu.h index 7285e413e..0c36246e4 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_DeathMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_DeathMenu.h @@ -29,7 +29,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_DebugCreateSchematic.cpp b/Minecraft.Client/Build/Common/UI/UIScene_DebugCreateSchematic.cpp index 32ea3d0ea..ce1ed2eb5 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_DebugCreateSchematic.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_DebugCreateSchematic.cpp @@ -36,7 +36,7 @@ UIScene_DebugCreateSchematic::UIScene_DebugCreateSchematic(int iPad, void *initD m_data = new ConsoleSchematicFile::XboxSchematicInitParam(); } -wstring UIScene_DebugCreateSchematic::getMoviePath() +std::wstring UIScene_DebugCreateSchematic::getMoviePath() { return L"DebugCreateSchematic"; } @@ -144,7 +144,7 @@ int UIScene_DebugCreateSchematic::KeyboardCompleteCallback(LPVOID lpParam,bool b if(pchText[0]!=0) { - wstring value = (wchar_t *)pchText; + std::wstring value = (wchar_t *)pchText; int iVal = 0; if(!value.empty()) iVal = _fromString( value ); switch(pClass->m_keyboardCallbackControl) diff --git a/Minecraft.Client/Build/Common/UI/UIScene_DebugCreateSchematic.h b/Minecraft.Client/Build/Common/UI/UIScene_DebugCreateSchematic.h index 3863d271c..80ec8d057 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_DebugCreateSchematic.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_DebugCreateSchematic.h @@ -57,7 +57,7 @@ protected: UI_MAP_ELEMENT( m_labelTitle, "LabelTitle") UI_END_MAP_ELEMENTS_AND_NAMES() - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_DebugOptions.cpp b/Minecraft.Client/Build/Common/UI/UIScene_DebugOptions.cpp index 649a67f28..32a309f28 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_DebugOptions.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_DebugOptions.cpp @@ -39,12 +39,12 @@ UIScene_DebugOptionsMenu::UIScene_DebugOptionsMenu(int iPad, void *initData, UIL IggyValuePath *root = IggyPlayerRootPath ( getMovie() ); for(m_iTotalCheckboxElements = 0; m_iTotalCheckboxElements < eDebugSetting_Max && m_iTotalCheckboxElements < 21; ++m_iTotalCheckboxElements) { - wstring label(m_DebugCheckboxTextA[m_iTotalCheckboxElements]); + std::wstring label(m_DebugCheckboxTextA[m_iTotalCheckboxElements]); m_checkboxes[m_iTotalCheckboxElements].init(label,m_iTotalCheckboxElements,(uiDebugBitmask&(1< item = shared_ptr( new ItemInstance(itemId,1,0) ); + std::shared_ptr item = std::shared_ptr( new ItemInstance(itemId,1,0) ); if(item != NULL) customDrawSlotControl(region,m_iPad,item,1.0f,false,false); } } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_DebugOverlay.h b/Minecraft.Client/Build/Common/UI/UIScene_DebugOverlay.h index 9a0e1cd8b..3fcacaac0 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_DebugOverlay.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_DebugOverlay.h @@ -22,9 +22,9 @@ private: eControl_Items, }; - vector m_itemIds; - vector m_mobFactories; - vector< pair > m_enchantmentIdAndLevels; + std::vector m_itemIds; + std::vector m_mobFactories; + std::vector< pair > m_enchantmentIdAndLevels; public: UIScene_DebugOverlay(int iPad, void *initData, UILayer *parentLayer); @@ -49,7 +49,7 @@ protected: UI_MAP_ELEMENT( m_buttonSetCamera, "setCamera") UI_END_MAP_ELEMENTS_AND_NAMES() - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: virtual void customDraw(IggyCustomDrawCallbackRegion *region); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_DebugSetCamera.cpp b/Minecraft.Client/Build/Common/UI/UIScene_DebugSetCamera.cpp index b638e9a97..d83f83f90 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_DebugSetCamera.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_DebugSetCamera.cpp @@ -57,7 +57,7 @@ UIScene_DebugSetCamera::UIScene_DebugSetCamera(int iPad, void *initData, UILayer m_labelYRotElev.init(L"Y-Rot & Elevation (Degs)"); } -wstring UIScene_DebugSetCamera::getMoviePath() +std::wstring UIScene_DebugSetCamera::getMoviePath() { return L"DebugSetCamera"; } @@ -125,7 +125,7 @@ int UIScene_DebugSetCamera::KeyboardCompleteCallback(LPVOID lpParam,bool bRes) if(pchText[0]!=0) { - wstring value = (wchar_t *)pchText; + std::wstring value = (wchar_t *)pchText; double val = 0; if(!value.empty()) val = _fromString( value ); switch(pClass->m_keyboardCallbackControl) diff --git a/Minecraft.Client/Build/Common/UI/UIScene_DebugSetCamera.h b/Minecraft.Client/Build/Common/UI/UIScene_DebugSetCamera.h index 38db1258b..926a54040 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_DebugSetCamera.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_DebugSetCamera.h @@ -53,7 +53,7 @@ protected: UI_MAP_ELEMENT( m_labelYRotElev, "LabelYRotElev") UI_END_MAP_ELEMENTS_AND_NAMES() - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_DispenserMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_DispenserMenu.cpp index 8e5899f5e..f024873c4 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_DispenserMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_DispenserMenu.cpp @@ -32,7 +32,7 @@ UIScene_DispenserMenu::UIScene_DispenserMenu(int iPad, void *_initData, UILayer delete initData; } -wstring UIScene_DispenserMenu::getMoviePath() +std::wstring UIScene_DispenserMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_DispenserMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_DispenserMenu.h index 6661c7a15..3e9c58f9b 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_DispenserMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_DispenserMenu.h @@ -26,7 +26,7 @@ protected: UI_END_MAP_CHILD_ELEMENTS() UI_END_MAP_ELEMENTS_AND_NAMES() - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); virtual void handleReload(); virtual int getSectionColumns(ESceneSection eSection); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_EULA.cpp b/Minecraft.Client/Build/Common/UI/UIScene_EULA.cpp index 735eb3f6c..4bc8265fc 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_EULA.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_EULA.cpp @@ -14,7 +14,7 @@ UIScene_EULA::UIScene_EULA(int iPad, void *initData, UILayer *parentLayer) : UIS m_buttonConfirm.init(app.GetString(IDS_TOOLTIPS_ACCEPT),eControl_Confirm); #if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) - wstring EULA = app.GetString(IDS_EULA); + std::wstring EULA = app.GetString(IDS_EULA); EULA.append(L"\r\n"); #if defined(__PS3__) @@ -44,13 +44,13 @@ UIScene_EULA::UIScene_EULA(int iPad, void *initData, UILayer *parentLayer) : UIS } #endif #else - wstring EULA = L""; + std::wstring EULA = L""; #endif - vector paragraphs; + std::vector paragraphs; int lastIndex = 0; for ( int index = EULA.find(L"\r\n", lastIndex, 2); - index != wstring::npos; + index != std::wstring::npos; index = EULA.find(L"\r\n", lastIndex, 2) ) { @@ -92,7 +92,7 @@ UIScene_EULA::~UIScene_EULA() m_parentLayer->removeComponent(eUIComponent_Logo); } -wstring UIScene_EULA::getMoviePath() +std::wstring UIScene_EULA::getMoviePath() { return L"EULA"; } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_EULA.h b/Minecraft.Client/Build/Common/UI/UIScene_EULA.h index 4715b1126..d1188d935 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_EULA.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_EULA.h @@ -32,7 +32,7 @@ public: virtual void updateTooltips(); protected: - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_EnchantingMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_EnchantingMenu.cpp index 5a3016dea..796862cc3 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_EnchantingMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_EnchantingMenu.cpp @@ -37,7 +37,7 @@ UIScene_EnchantingMenu::UIScene_EnchantingMenu(int iPad, void *_initData, UILaye delete initData; } -wstring UIScene_EnchantingMenu::getMoviePath() +std::wstring UIScene_EnchantingMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_EnchantingMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_EnchantingMenu.h index 89ccd1209..e1e5dc62f 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_EnchantingMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_EnchantingMenu.h @@ -38,7 +38,7 @@ protected: UI_END_MAP_CHILD_ELEMENTS() UI_END_MAP_ELEMENTS_AND_NAMES() - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); virtual void handleReload(); virtual int getSectionColumns(ESceneSection eSection); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_EndPoem.cpp b/Minecraft.Client/Build/Common/UI/UIScene_EndPoem.cpp index 967623160..2f6d23704 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_EndPoem.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_EndPoem.cpp @@ -18,7 +18,7 @@ UIScene_EndPoem::UIScene_EndPoem(int iPad, void *initData, UILayer *parentLayer) // 4J Stu - Don't need these, the AS handles the scrolling and makes it look nice #if 0 - wstring halfScreenLineBreaks; + std::wstring halfScreenLineBreaks; if(RenderManager.IsHiDef()) { @@ -49,7 +49,7 @@ UIScene_EndPoem::UIScene_EndPoem(int iPad, void *initData, UILayer *parentLayer) Minecraft *pMinecraft = Minecraft::GetInstance(); - wstring playerName = L""; + std::wstring playerName = L""; if(pMinecraft->localplayers[ui.GetWinUserIndex()] != NULL) { playerName = escapeXML( pMinecraft->localplayers[ui.GetWinUserIndex()]->getDisplayName() ); @@ -74,10 +74,10 @@ UIScene_EndPoem::UIScene_EndPoem(int iPad, void *initData, UILayer *parentLayer) // 4J-JEV: Find paragraph start and end points. - m_paragraphs = vector(); + m_paragraphs = std::vector(); int lastIndex = 0; for ( int index = 0; - index != wstring::npos; + index != std::wstring::npos; index = noiseString.find(L"

", index+12, 12) ) { @@ -90,7 +90,7 @@ UIScene_EndPoem::UIScene_EndPoem(int iPad, void *initData, UILayer *parentLayer) //m_htmlPoem.init(noiseString.c_str()); //m_htmlPoem.startAutoScroll(); - //wstring result = m_htmlControl.GetText(); + //std::wstring result = m_htmlControl.GetText(); //wcout << result.c_str(); @@ -105,7 +105,7 @@ UIScene_EndPoem::UIScene_EndPoem(int iPad, void *initData, UILayer *parentLayer) m_requestedLabel = 0; } -wstring UIScene_EndPoem::getMoviePath() +std::wstring UIScene_EndPoem::getMoviePath() { return L"EndPoem"; } @@ -121,7 +121,7 @@ void UIScene_EndPoem::tick() if( m_requestedLabel >= 0 && m_requestedLabel < m_paragraphs.size()) { - wstring label = m_paragraphs[m_requestedLabel]; + std::wstring label = m_paragraphs[m_requestedLabel]; IggyDataValue result; IggyDataValue value[3]; @@ -201,13 +201,13 @@ void UIScene_EndPoem::updateNoise() int length = 0; wchar_t replacements[64]; - wstring replaceString = L""; + std::wstring replaceString = L""; wchar_t randomChar = L'a'; Random *random = pMinecraft->font->random; bool darken = false; - wstring tag = L"{*NOISE*}"; + std::wstring tag = L"{*NOISE*}"; AUTO_VAR(it, m_noiseLengths.begin()); int found=(int)noiseString.find(tag); @@ -221,7 +221,7 @@ void UIScene_EndPoem::updateNoise() { randomChar = SharedConstants::acceptableLetters[random->nextInt((int)SharedConstants::acceptableLetters.length())]; - wstring randomCharStr = L""; + std::wstring randomCharStr = L""; randomCharStr.push_back(randomChar); if(randomChar == L'<') { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_EndPoem.h b/Minecraft.Client/Build/Common/UI/UIScene_EndPoem.h index 75024f683..dc1a7aa8f 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_EndPoem.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_EndPoem.h @@ -5,13 +5,13 @@ class UIScene_EndPoem : public UIScene { private: - wstring noNoiseString; - wstring noiseString; - vector m_noiseLengths; + std::wstring noNoiseString; + std::wstring noiseString; + std::vector m_noiseLengths; bool m_bIgnoreInput; int m_requestedLabel; - vector m_paragraphs; + std::vector m_paragraphs; IggyName m_funcSetNextLabel; UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene) @@ -25,7 +25,7 @@ public: virtual void updateTooltips(); protected: - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: virtual void tick(); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_FullscreenProgress.cpp b/Minecraft.Client/Build/Common/UI/UIScene_FullscreenProgress.cpp index 07e728355..85b3068dc 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_FullscreenProgress.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_FullscreenProgress.cpp @@ -47,7 +47,7 @@ UIScene_FullscreenProgress::UIScene_FullscreenProgress(int iPad, void *initData, m_progressBar.init(L"",0,0,100,0); // set the tip - wstring wsText= app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip())); + std::wstring wsText= app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip())); wchar_t startTags[64]; swprintf(startTags,64,L"

",app.GetHTMLColour(eHTMLColor_White)); @@ -86,7 +86,7 @@ UIScene_FullscreenProgress::~UIScene_FullscreenProgress() delete m_CompletionData; } -wstring UIScene_FullscreenProgress::getMoviePath() +std::wstring UIScene_FullscreenProgress::getMoviePath() { return L"FullscreenProgress"; } @@ -146,7 +146,7 @@ void UIScene_FullscreenProgress::tick() } else { - wstring& wstrText = pMinecraft->progressRenderer->getProgressString(); + std::wstring& wstrText = pMinecraft->progressRenderer->getProgressString(); m_progressBar.setLabel(wstrText.c_str()); } @@ -350,7 +350,7 @@ void UIScene_FullscreenProgress::handleTimerComplete(int id) case TIMER_FULLSCREEN_TIPS: { // display the next tip - wstring wsText=app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip())); + std::wstring wsText=app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip())); wchar_t startTags[64]; swprintf(startTags,64,L"

",app.GetHTMLColour(eHTMLColor_White)); wsText= startTags + wsText + L"

"; diff --git a/Minecraft.Client/Build/Common/UI/UIScene_FullscreenProgress.h b/Minecraft.Client/Build/Common/UI/UIScene_FullscreenProgress.h index aeb428c3d..2ecb71ea2 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_FullscreenProgress.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_FullscreenProgress.h @@ -24,7 +24,7 @@ private: LPVOID m_completeFuncParam; bool m_bWaitForThreadToDelete; - wstring m_titleText, m_statusText; + std::wstring m_titleText, m_statusText; int m_lastTitle, m_lastStatus, m_lastProgress; int m_cancelText; bool m_bWasCancelled; @@ -52,7 +52,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); virtual long long getDefaultGtcButtons() { return 0; } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_FurnaceMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_FurnaceMenu.cpp index 92fec78b6..493e8944f 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_FurnaceMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_FurnaceMenu.cpp @@ -41,7 +41,7 @@ UIScene_FurnaceMenu::UIScene_FurnaceMenu(int iPad, void *_initData, UILayer *par delete initData; } -wstring UIScene_FurnaceMenu::getMoviePath() +std::wstring UIScene_FurnaceMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_FurnaceMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_FurnaceMenu.h index dcea967e1..ecbe01254 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_FurnaceMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_FurnaceMenu.h @@ -8,7 +8,7 @@ class InventoryMenu; class UIScene_FurnaceMenu : public UIScene_AbstractContainerMenu, public IUIScene_FurnaceMenu { private: - shared_ptr m_furnace; + std::shared_ptr m_furnace; public: UIScene_FurnaceMenu(int iPad, void *initData, UILayer *parentLayer); @@ -34,7 +34,7 @@ protected: UI_END_MAP_CHILD_ELEMENTS() UI_END_MAP_ELEMENTS_AND_NAMES() - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); virtual void handleReload(); virtual void tick(); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_HUD.cpp b/Minecraft.Client/Build/Common/UI/UIScene_HUD.cpp index aed555e1c..613dca534 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_HUD.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_HUD.cpp @@ -55,7 +55,7 @@ UIScene_HUD::UIScene_HUD(int iPad, void *initData, UILayer *parentLayer) : UISce addTimer(0, 100); } -wstring UIScene_HUD::getMoviePath() +std::wstring UIScene_HUD::getMoviePath() { switch( m_parentLayer->getViewport() ) { @@ -161,7 +161,7 @@ void UIScene_HUD::tick() } else { - shared_ptr boss = EnderDragonRenderer::bossInstance; + std::shared_ptr boss = EnderDragonRenderer::bossInstance; // 4J Stu - Don't clear this here as it's wiped for other players //EnderDragonRenderer::bossInstance = nullptr; m_ticksWithNoBoss = 0; @@ -191,7 +191,7 @@ void UIScene_HUD::customDraw(IggyCustomDrawCallbackRegion *region) else { Slot *invSlot = pMinecraft->localplayers[m_iPad]->inventoryMenu->getSlot(InventoryMenu::USE_ROW_SLOT_START + slot); - shared_ptr item = invSlot->getItem(); + std::shared_ptr item = invSlot->getItem(); if(item != NULL) { unsigned char ucAlpha=app.GetGameSettings(ProfileManager.GetPrimaryPad(),eGameSetting_InterfaceOpacity); @@ -530,7 +530,7 @@ void UIScene_HUD::SetDragonHealth(float health) } } -void UIScene_HUD::SetDragonLabel(const wstring &label) +void UIScene_HUD::SetDragonLabel(const std::wstring &label) { IggyDataValue result; IggyDataValue value[1]; @@ -557,7 +557,7 @@ void UIScene_HUD::ShowDragonHealth(bool show) } } -void UIScene_HUD::SetSelectedLabel(const wstring &label) +void UIScene_HUD::SetSelectedLabel(const std::wstring &label) { // 4J Stu - Timing here is kept the same as on Xbox360, even though we do it differently now and do the fade out in Flash rather than directly setting opacity if(!label.empty()) m_uiSelectedItemOpacityCountDown = SharedConstants::TICKS_PER_SECOND * 3; @@ -730,7 +730,7 @@ void UIScene_HUD::ShowDisplayName(bool show) m_labelDisplayName.setVisible(show); } -void UIScene_HUD::SetDisplayName(const wstring &displayName) +void UIScene_HUD::SetDisplayName(const std::wstring &displayName) { if(displayName.compare(m_displayName) != 0) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_HUD.h b/Minecraft.Client/Build/Common/UI/UIScene_HUD.h index cd0d88061..3aca1d118 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_HUD.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_HUD.h @@ -31,7 +31,7 @@ private: unsigned int m_uiSelectedItemOpacityCountDown; - wstring m_displayName; + std::wstring m_displayName; protected: UIControl_Label m_labelChatText[CHAT_LINES_COUNT]; @@ -114,7 +114,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: virtual EUIScene getSceneType() { return eUIScene_HUD;} @@ -153,17 +153,17 @@ private: void SetFoodSaturationLevel(int iSaturation); void SetDragonHealth(float health); - void SetDragonLabel(const wstring &label); + void SetDragonLabel(const std::wstring &label); void ShowDragonHealth(bool show); void HideSelectedLabel(); - void SetDisplayName(const wstring &displayName); + void SetDisplayName(const std::wstring &displayName); void SetTooltipsEnabled(bool bEnabled); public: - void SetSelectedLabel(const wstring &label); + void SetSelectedLabel(const std::wstring &label); void ShowDisplayName(bool show); void handleGameTick(); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_HelpAndOptionsMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_HelpAndOptionsMenu.cpp index 14a1a7fb1..3024de692 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_HelpAndOptionsMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_HelpAndOptionsMenu.cpp @@ -83,7 +83,7 @@ UIScene_HelpAndOptionsMenu::~UIScene_HelpAndOptionsMenu() { } -wstring UIScene_HelpAndOptionsMenu::getMoviePath() +std::wstring UIScene_HelpAndOptionsMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_HelpAndOptionsMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_HelpAndOptionsMenu.h index 203011d37..d8e8cf249 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_HelpAndOptionsMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_HelpAndOptionsMenu.h @@ -37,7 +37,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: virtual void handleReload(); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_HowToPlay.cpp b/Minecraft.Client/Build/Common/UI/UIScene_HowToPlay.cpp index 55a990bfa..aca89ae19 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_HowToPlay.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_HowToPlay.cpp @@ -70,7 +70,7 @@ UIScene_HowToPlay::UIScene_HowToPlay(int iPad, void *initData, UILayer *parentLa // Setup all the Iggy references we need for this scene initialiseMovie(); - wstring inventoryString = app.GetString(IDS_INVENTORY); + std::wstring inventoryString = app.GetString(IDS_INVENTORY); m_labels[ eHowToPlay_LabelCTItem].init(app.GetString(IDS_ITEM_HATCHET_WOOD)); m_labels[ eHowToPlay_LabelCTGroup].init(app.GetString(IDS_GROUPNAME_TOOLS)); m_labels[ eHowToPlay_LabelCTInventory3x3].init(inventoryString); @@ -95,8 +95,8 @@ UIScene_HowToPlay::UIScene_HowToPlay(int iPad, void *initData, UILayer *parentLa m_labels[ eHowToPlay_LabelBInventory].init(inventoryString); m_labels[ eHowToPlay_LabelAnvil_Inventory].init(inventoryString.c_str()); - wstring wsTemp = app.GetString(IDS_REPAIR_COST); - wsTemp.replace( wsTemp.find(L"%d"), 2, wstring(L"8") ); + std::wstring wsTemp = app.GetString(IDS_REPAIR_COST); + wsTemp.replace( wsTemp.find(L"%d"), 2, std::wstring(L"8") ); m_labels[ eHowToPlay_LabelAnvil_Cost].init(wsTemp.c_str()); m_labels[ eHowToPlay_LabelAnvil_ARepairAndName].init(app.GetString(IDS_REPAIR_AND_NAME)); @@ -120,7 +120,7 @@ UIScene_HowToPlay::UIScene_HowToPlay(int iPad, void *initData, UILayer *parentLa StartPage( eStartPage ); } -wstring UIScene_HowToPlay::getMoviePath() +std::wstring UIScene_HowToPlay::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { @@ -263,7 +263,7 @@ void UIScene_HowToPlay::StartPage( EHowToPlayPage ePage ) SHowToPlayPageDef* pDef = &( gs_aPageDefs[ m_eCurrPage ] ); // Replace button identifiers in the text with actual button images. - wstring replacedText = app.FormatHTMLString(m_iPad, app.GetString( pDef->m_iTextStringID )); + std::wstring replacedText = app.FormatHTMLString(m_iPad, app.GetString( pDef->m_iTextStringID )); // 4J-PB - replace the title with the platform specific title, and the platform name // replacedText = replaceAll(replacedText,L"{*TITLE_UPDATE_NAME*}",app.GetString(IDS_TITLE_UPDATE_NAME)); #ifndef _WINDOWS64 @@ -279,15 +279,15 @@ void UIScene_HowToPlay::StartPage( EHowToPlayPage ePage ) stripWhitespaceForHtml( replacedText, true ); // Set the text colour - wstring finalText(replacedText.c_str() ); + std::wstring finalText(replacedText.c_str() ); wchar_t startTags[64]; swprintf(startTags,64,L"",app.GetHTMLColour(eHTMLColor_White)); finalText = startTags + finalText; - vector paragraphs; + std::vector paragraphs; int lastIndex = 0; for ( int index = finalText.find(L"\r\n", lastIndex, 2); - index != wstring::npos; + index != std::wstring::npos; index = finalText.find(L"\r\n", lastIndex, 2) ) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_HowToPlay.h b/Minecraft.Client/Build/Common/UI/UIScene_HowToPlay.h index cff07256d..93ab75b2f 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_HowToPlay.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_HowToPlay.h @@ -110,7 +110,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: virtual void handleReload(); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_HowToPlayMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_HowToPlayMenu.cpp index b1925931f..0886695b0 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_HowToPlayMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_HowToPlayMenu.cpp @@ -98,7 +98,7 @@ UIScene_HowToPlayMenu::UIScene_HowToPlayMenu(int iPad, void *initData, UILayer * } } -wstring UIScene_HowToPlayMenu::getMoviePath() +std::wstring UIScene_HowToPlayMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_HowToPlayMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_HowToPlayMenu.h index 5a60cdd02..5dfae4c14 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_HowToPlayMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_HowToPlayMenu.h @@ -57,7 +57,7 @@ public: virtual void handleReload(); protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_InGameHostOptionsMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_InGameHostOptionsMenu.cpp index b692c7544..291ef6dfe 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_InGameHostOptionsMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_InGameHostOptionsMenu.cpp @@ -31,7 +31,7 @@ UIScene_InGameHostOptionsMenu::UIScene_InGameHostOptionsMenu(int iPad, void *ini } } -wstring UIScene_InGameHostOptionsMenu::getMoviePath() +std::wstring UIScene_InGameHostOptionsMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { @@ -66,10 +66,10 @@ void UIScene_InGameHostOptionsMenu::handleInput(int iPad, int key, bool repeat, if(hostOptions != app.GetGameHostOption(eGameHostOption_All) ) { Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr player = pMinecraft->localplayers[m_iPad]; + std::shared_ptr player = pMinecraft->localplayers[m_iPad]; if(player->connection) { - player->connection->send( shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, hostOptions) ) ); + player->connection->send( std::shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, hostOptions) ) ); } } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_InGameHostOptionsMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_InGameHostOptionsMenu.h index 247114124..a88dbd5b4 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_InGameHostOptionsMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_InGameHostOptionsMenu.h @@ -29,7 +29,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_InGameInfoMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_InGameInfoMenu.cpp index a51ee4e32..78144b9da 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_InGameInfoMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_InGameInfoMenu.cpp @@ -32,7 +32,7 @@ UIScene_InGameInfoMenu::UIScene_InGameInfoMenu(int iPad, void *initData, UILayer m_players[i] = player->GetSmallId(); ++m_playersCount; - wstring playerName = L""; + std::wstring playerName = L""; #ifndef _CONTENT_PACKAGE if(app.DebugSettingsOn() && (app.GetGameSettingsDebugMask()&(1L<IsHost() == TRUE; Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; + std::shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; if(!m_isHostPlayer && !localPlayer->isModerator() ) { removeControl( &m_buttonGameOptions, false ); @@ -98,7 +98,7 @@ UIScene_InGameInfoMenu::UIScene_InGameInfoMenu(int iPad, void *initData, UILayer #endif } -wstring UIScene_InGameInfoMenu::getMoviePath() +std::wstring UIScene_InGameInfoMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { @@ -131,7 +131,7 @@ void UIScene_InGameInfoMenu::updateTooltips() int keyA = -1; Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; + std::shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; bool isOp = m_isHostPlayer || localPlayer->isModerator(); bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0; @@ -208,7 +208,7 @@ void UIScene_InGameInfoMenu::handleReload() m_players[i] = player->GetSmallId(); ++m_playersCount; - wstring playerName = L""; + std::wstring playerName = L""; #ifndef _CONTENT_PACKAGE if(app.DebugSettingsOn() && (app.GetGameSettingsDebugMask()&(1L<IsHost() == TRUE; Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; + std::shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; if(!m_isHostPlayer && !localPlayer->isModerator() ) { removeControl( &m_buttonGameOptions, false ); @@ -311,7 +311,7 @@ void UIScene_InGameInfoMenu::tick() m_playerList.setPlayerIcon( i, (int)app.GetPlayerColour( m_players[i] ) ); } - wstring playerName = L""; + std::wstring playerName = L""; #ifndef _CONTENT_PACKAGE if(app.DebugSettingsOn() && (app.GetGameSettingsDebugMask()&(1L< localPlayer = pMinecraft->localplayers[m_iPad]; + std::shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; bool isOp = m_isHostPlayer || localPlayer->isModerator(); bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0; @@ -512,7 +512,7 @@ void UIScene_InGameInfoMenu::OnPlayerChanged(void *callbackParam, INetworkPlayer scene->m_players[scene->m_playersCount] = pPlayer->GetSmallId(); ++scene->m_playersCount; - wstring playerName = L""; + std::wstring playerName = L""; #ifndef _CONTENT_PACKAGE if(app.DebugSettingsOn() && (app.GetGameSettingsDebugMask()&(1L< localPlayer = pMinecraft->localplayers[iPad]; + std::shared_ptr localPlayer = pMinecraft->localplayers[iPad]; if(localPlayer->connection) { - localPlayer->connection->send( shared_ptr( new KickPlayerPacket(smallId) ) ); + localPlayer->connection->send( std::shared_ptr( new KickPlayerPacket(smallId) ) ); } } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_InGameInfoMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_InGameInfoMenu.h index 94966fa35..9bed08c6b 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_InGameInfoMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_InGameInfoMenu.h @@ -16,7 +16,7 @@ private: BYTE m_players[MINECRAFT_NET_MAX_PLAYERS]; // An array of QNet small-id's char m_playersVoiceState[MINECRAFT_NET_MAX_PLAYERS]; short m_playersColourState[MINECRAFT_NET_MAX_PLAYERS]; - wstring m_playerNames[MINECRAFT_NET_MAX_PLAYERS]; + std::wstring m_playerNames[MINECRAFT_NET_MAX_PLAYERS]; UIControl_Button m_buttonGameOptions; UIControl_PlayerList m_playerList; @@ -38,7 +38,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp index a3805f13f..b0c160bb7 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp @@ -215,7 +215,7 @@ UIScene_InGamePlayerOptionsMenu::UIScene_InGamePlayerOptionsMenu(int iPad, void #endif } -wstring UIScene_InGamePlayerOptionsMenu::getMoviePath() +std::wstring UIScene_InGamePlayerOptionsMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { @@ -316,10 +316,10 @@ void UIScene_InGamePlayerOptionsMenu::handleInput(int iPad, int key, bool repeat { // Send update settings packet to server Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr player = pMinecraft->localplayers[m_iPad]; + std::shared_ptr player = pMinecraft->localplayers[m_iPad]; if(player->connection) { - player->connection->send( shared_ptr( new PlayerInfoPacket( m_networkSmallId, -1, m_playerPrivileges) ) ); + player->connection->send( std::shared_ptr( new PlayerInfoPacket( m_networkSmallId, -1, m_playerPrivileges) ) ); } } navigateBack(); @@ -366,10 +366,10 @@ int UIScene_InGamePlayerOptionsMenu::KickPlayerReturned(void *pParam,int iPad,C4 if(result==C4JStorage::EMessage_ResultAccept) { Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr localPlayer = pMinecraft->localplayers[iPad]; + std::shared_ptr localPlayer = pMinecraft->localplayers[iPad]; if(localPlayer->connection) { - localPlayer->connection->send( shared_ptr( new KickPlayerPacket(smallId) ) ); + localPlayer->connection->send( std::shared_ptr( new KickPlayerPacket(smallId) ) ); } // Fix for #61494 - [CRASH]: TU7: Code: Multiplayer: Title may crash while kicking a player from an online game. diff --git a/Minecraft.Client/Build/Common/UI/UIScene_InGamePlayerOptionsMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_InGamePlayerOptionsMenu.h index 78e30f6e5..670da1d4e 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_InGamePlayerOptionsMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_InGamePlayerOptionsMenu.h @@ -64,7 +64,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); virtual void handleCheckboxToggled(F64 controlId, bool selected); virtual void handleTimerComplete(int id); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_InGameSaveManagementMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_InGameSaveManagementMenu.cpp index e6d544918..8d0a94a67 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_InGameSaveManagementMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_InGameSaveManagementMenu.cpp @@ -168,7 +168,7 @@ void UIScene_InGameSaveManagementMenu::handleGainFocus(bool navBack) } } -wstring UIScene_InGameSaveManagementMenu::getMoviePath() +std::wstring UIScene_InGameSaveManagementMenu::getMoviePath() { return L"SaveMenu"; } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_InGameSaveManagementMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_InGameSaveManagementMenu.h index 3f9ace3a9..904eee00c 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_InGameSaveManagementMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_InGameSaveManagementMenu.h @@ -48,7 +48,7 @@ private: int m_iState; - vector *m_saves; + std::vector *m_saves; bool m_bIgnoreInput; bool m_bAllLoaded; @@ -92,7 +92,7 @@ private: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: diff --git a/Minecraft.Client/Build/Common/UI/UIScene_Intro.cpp b/Minecraft.Client/Build/Common/UI/UIScene_Intro.cpp index 25b57cc40..b34da34c5 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_Intro.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_Intro.cpp @@ -55,7 +55,7 @@ UIScene_Intro::UIScene_Intro(int iPad, void *initData, UILayer *parentLayer) : U #endif } -wstring UIScene_Intro::getMoviePath() +std::wstring UIScene_Intro::getMoviePath() { return L"Intro"; } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_Intro.h b/Minecraft.Client/Build/Common/UI/UIScene_Intro.h index dbdc72613..2c595c368 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_Intro.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_Intro.h @@ -32,7 +32,7 @@ public: protected: - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); #ifdef _DURANGO virtual long long getDefaultGtcButtons() { return 0; } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_InventoryMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_InventoryMenu.cpp index 35f0d7480..90459f049 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_InventoryMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_InventoryMenu.cpp @@ -52,7 +52,7 @@ UIScene_InventoryMenu::UIScene_InventoryMenu(int iPad, void *_initData, UILayer addTimer(INVENTORY_UPDATE_EFFECTS_TIMER_ID,INVENTORY_UPDATE_EFFECTS_TIMER_TIME); } -wstring UIScene_InventoryMenu::getMoviePath() +std::wstring UIScene_InventoryMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { @@ -251,11 +251,11 @@ void UIScene_InventoryMenu::updateEffectsDisplay() { // Update with the current effects Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr player = pMinecraft->localplayers[m_iPad]; + std::shared_ptr player = pMinecraft->localplayers[m_iPad]; if(player == NULL) return; - vector *activeEffects = player->getActiveEffects(); + std::vector *activeEffects = player->getActiveEffects(); // 4J - TomK setup time update value array size to update the active effects int iValue = 0; @@ -267,10 +267,10 @@ void UIScene_InventoryMenu::updateEffectsDisplay() if(effect->getDuration() >= m_bEffectTime[effect->getId()]) { - wstring effectString = app.GetString( effect->getDescriptionId() );//I18n.get(effect.getDescriptionId()).trim(); + std::wstring effectString = app.GetString( effect->getDescriptionId() );//I18n.get(effect.getDescriptionId()).trim(); if (effect->getAmplifier() > 0) { - wstring potencyString = L""; + std::wstring potencyString = L""; switch(effect->getAmplifier()) { case 1: diff --git a/Minecraft.Client/Build/Common/UI/UIScene_InventoryMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_InventoryMenu.h index 40ec78429..eb8f0c8f6 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_InventoryMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_InventoryMenu.h @@ -31,7 +31,7 @@ protected: UI_END_MAP_CHILD_ELEMENTS() UI_END_MAP_ELEMENTS_AND_NAMES() - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); virtual void handleReload(); virtual int getSectionColumns(ESceneSection eSection); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_JoinMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_JoinMenu.cpp index 66604e90c..4deab9944 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_JoinMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_JoinMenu.cpp @@ -246,7 +246,7 @@ void UIScene_JoinMenu::updateComponents() m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,true); } -wstring UIScene_JoinMenu::getMoviePath() +std::wstring UIScene_JoinMenu::getMoviePath() { return L"JoinMenu"; } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_JoinMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_JoinMenu.h index 817360efc..a97ee5a3e 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_JoinMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_JoinMenu.h @@ -75,7 +75,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_Keyboard.cpp b/Minecraft.Client/Build/Common/UI/UIScene_Keyboard.cpp index 530f7b754..004eb0e75 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_Keyboard.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_Keyboard.cpp @@ -24,7 +24,7 @@ UIScene_Keyboard::UIScene_Keyboard(int iPad, void *initData, UILayer *parentLaye m_ButtonBackspace.init(L"Backspace", -1); // Initialise function keyboard Buttons and set alternative symbol button string - wstring label = L"Abc"; + std::wstring label = L"Abc"; IggyStringUTF16 stringVal; stringVal.string = (IggyUTF16*)label.c_str(); stringVal.length = label.length(); @@ -46,7 +46,7 @@ UIScene_Keyboard::~UIScene_Keyboard() m_parentLayer->removeComponent(eUIComponent_MenuBackground); } -wstring UIScene_Keyboard::getMoviePath() +std::wstring UIScene_Keyboard::getMoviePath() { if(app.GetLocalPlayerCount() > 1 && !m_parentLayer->IsFullscreenGroup()) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_Keyboard.h b/Minecraft.Client/Build/Common/UI/UIScene_Keyboard.h index f4e4c899d..f731669a4 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_Keyboard.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_Keyboard.h @@ -56,7 +56,7 @@ protected: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); private: void KeyboardDonePressed(); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp index 0852d0ba4..d16af5c17 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp @@ -94,7 +94,7 @@ UIScene_LaunchMoreOptionsMenu::UIScene_LaunchMoreOptionsMenu(int iPad, void *ini // set the default text #ifdef _LARGE_WORLDS - wstring wsText=L""; + std::wstring wsText=L""; if(m_params->bGenerateOptions) { wsText = app.GetString(IDS_GAMEOPTION_SEED); @@ -104,7 +104,7 @@ UIScene_LaunchMoreOptionsMenu::UIScene_LaunchMoreOptionsMenu(int iPad, void *ini wsText = app.GetString(IDS_GAMEOPTION_ONLINE); } #else - wstring wsText=app.GetString(IDS_GAMEOPTION_ONLINE); + std::wstring wsText=app.GetString(IDS_GAMEOPTION_ONLINE); #endif EHTMLFontSize size = eHTMLSize_Normal; if(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen()) @@ -161,7 +161,7 @@ void UIScene_LaunchMoreOptionsMenu::updateComponents() #endif } -wstring UIScene_LaunchMoreOptionsMenu::getMoviePath() +std::wstring UIScene_LaunchMoreOptionsMenu::getMoviePath() { return L"LaunchMoreOptionsMenu"; } @@ -360,7 +360,7 @@ void UIScene_LaunchMoreOptionsMenu::handleFocusChange(F64 controlId, F64 childId #endif }; - wstring wsText=app.GetString(stringId); + std::wstring wsText=app.GetString(stringId); EHTMLFontSize size = eHTMLSize_Normal; if(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen()) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_LaunchMoreOptionsMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_LaunchMoreOptionsMenu.h index 62d75115c..ef4fe9e93 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_LaunchMoreOptionsMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_LaunchMoreOptionsMenu.h @@ -107,7 +107,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: virtual void tick(); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_LeaderboardsMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_LeaderboardsMenu.cpp index 327b7838a..d831e3668 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_LeaderboardsMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_LeaderboardsMenu.cpp @@ -154,7 +154,7 @@ void UIScene_LeaderboardsMenu::updateComponents() m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,false); } -wstring UIScene_LeaderboardsMenu::getMoviePath() +std::wstring UIScene_LeaderboardsMenu::getMoviePath() { return L"LeaderboardMenu"; } @@ -731,7 +731,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry(LeaderboardManager::ReadScor #ifdef __PS3__ // m_name can be unicode characters somehow for Japan - should use m_onlineID - wstring wstr=convStringToWstring(statsRow->m_uid.getOnlineID()); + std::wstring wstr=convStringToWstring(statsRow->m_uid.getOnlineID()); swprintf(leaderboardEntry->m_gamerTag, XUSER_NAME_SIZE, L"%ls",wstr.c_str()); #else memcpy(leaderboardEntry->m_gamerTag, statsRow->m_name.data(), statsRow->m_name.size() * sizeof(wchar_t)); @@ -969,7 +969,7 @@ void UIScene_LeaderboardsMenu::customDraw(IggyCustomDrawCallbackRegion *region) } else { - shared_ptr item = shared_ptr( new ItemInstance(TitleIcons[m_currentLeaderboard][slotId], 1, 0) ); + std::shared_ptr item = std::shared_ptr( new ItemInstance(TitleIcons[m_currentLeaderboard][slotId], 1, 0) ); customDrawSlotControl(region,m_iPad,item,1.0f,false,false); } } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_LeaderboardsMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_LeaderboardsMenu.h index 728992ce7..4d92cef00 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_LeaderboardsMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_LeaderboardsMenu.h @@ -50,7 +50,7 @@ private: struct Leaderboard { DWORD m_totalEntryCount; //Either total number of entries in leaderboard, or total number of results for a friends query - vector m_entries; + std::vector m_entries; DWORD m_numColumns; }; @@ -102,7 +102,7 @@ private: int GetEntryStartIndex(); protected: - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: void handleReload(); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_LoadMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_LoadMenu.cpp index 398709c0d..ff8000f40 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_LoadMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_LoadMenu.cpp @@ -386,7 +386,7 @@ void UIScene_LoadMenu::updateComponents() } } -wstring UIScene_LoadMenu::getMoviePath() +std::wstring UIScene_LoadMenu::getMoviePath() { return L"LoadMenu"; } @@ -932,7 +932,7 @@ void UIScene_LoadMenu::handleTimerComplete(int id) if(pDLCInfo) { // retrieve the image - if we haven't already - wstring textureName = filenametowstring(pDLCInfo->chImageURL); + std::wstring textureName = filenametostd::wstring(pDLCInfo->chImageURL); if(hasRegisteredSubstitutionTexture(textureName)==false) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_LoadMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_LoadMenu.h index e45fa09c9..11ace0c2b 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_LoadMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_LoadMenu.h @@ -70,7 +70,7 @@ private: PBYTE m_pbThumbnailData; unsigned int m_uiThumbnailSize; - wstring m_thumbnailName; + std::wstring m_thumbnailName; bool m_bRebuildTouchBoxes; public: @@ -89,7 +89,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_LoadOrJoinMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_LoadOrJoinMenu.cpp index 2bbf7566a..6d21c0155 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_LoadOrJoinMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_LoadOrJoinMenu.cpp @@ -28,7 +28,7 @@ #ifdef SONY_REMOTE_STORAGE_DOWNLOAD unsigned long UIScene_LoadOrJoinMenu::m_ulFileSize=0L; -wstring UIScene_LoadOrJoinMenu::m_wstrStageText=L""; +std::wstring UIScene_LoadOrJoinMenu::m_wstrStageText=L""; #endif @@ -44,7 +44,7 @@ wstring UIScene_LoadOrJoinMenu::m_wstrStageText=L""; UIScene_LoadOrJoinMenu::ESaveTransferFiles UIScene_LoadOrJoinMenu::s_eSaveTransferFile; unsigned long UIScene_LoadOrJoinMenu::s_ulFileSize=0L; byteArray UIScene_LoadOrJoinMenu::s_transferData = byteArray(); -wstring UIScene_LoadOrJoinMenu::m_wstrStageText=L""; +std::wstring UIScene_LoadOrJoinMenu::m_wstrStageText=L""; #ifdef _DEBUG_MENUS_ENABLED C4JStorage::SAVETRANSFER_FILE_DETAILS UIScene_LoadOrJoinMenu::m_debugTransferDetails; @@ -539,7 +539,7 @@ void UIScene_LoadOrJoinMenu::handleLoseFocus() killTimer(JOIN_LOAD_ONLINE_TIMER_ID); } -wstring UIScene_LoadOrJoinMenu::getMoviePath() +std::wstring UIScene_LoadOrJoinMenu::getMoviePath() { return L"LoadOrJoinMenu"; } @@ -850,7 +850,7 @@ void UIScene_LoadOrJoinMenu::GetSaveInfo() for(unsigned int i=0;iat(i)->getName(); + std::wstring wName = m_saves->at(i)->getName(); wchar_t *name = new wchar_t[wName.size()+1]; for(unsigned int j = 0; j < wName.size(); ++j) { @@ -1844,7 +1844,7 @@ void UIScene_LoadOrJoinMenu::handleTimerComplete(int id) if(pDLCInfo) { // retrieve the image - if we haven't already - wstring textureName = filenametowstring(pDLCInfo->chImageURL); + std::wstring textureName = filenametostd::wstring(pDLCInfo->chImageURL); if(hasRegisteredSubstitutionTexture(textureName)==false) { @@ -2199,7 +2199,7 @@ int UIScene_LoadOrJoinMenu::TexturePackDialogReturned(void *pParam,int iPad,C4JS { if (ProfileManager.IsSignedInLive(iPad)) { - wstring ProductId; + std::wstring ProductId; app.GetDLCFullOfferIDForPackID(pClass->m_initData->selectedSession->data.texturePackParentId,ProductId); StorageManager.InstallOffer(1,(WCHAR *)ProductId.c_str(),NULL,NULL); @@ -3062,10 +3062,10 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter ) ByteArrayInputStream bais(UIScene_LoadOrJoinMenu::s_transferData); DataInputStream dis(&bais); - wstring saveTitle = dis.readUTF(); + std::wstring saveTitle = dis.readUTF(); StorageManager.SetSaveTitle(saveTitle.c_str()); - wstring saveUniqueName = dis.readUTF(); + std::wstring saveUniqueName = dis.readUTF(); // 4J Stu - Don't set this any more. We added it so that we could share the ban list data for this save // However if the player downloads the same save multiple times, it will overwrite the previous version @@ -3204,7 +3204,7 @@ void UIScene_LoadOrJoinMenu::RequestFileSize( SaveTransferStateContainer *pClass { ZeroMemory(&m_debugTransferDetails, sizeof(C4JStorage::SAVETRANSFER_FILE_DETAILS) ); - File targetFile( wstring(L"FakeTMSPP\\").append(filename) ); + File targetFile( std::wstring(L"FakeTMSPP\\").append(filename) ); if(targetFile.exists()) m_debugTransferDetails.ulFileLen = targetFile.length(); SaveTransferReturned(pClass,&m_debugTransferDetails); @@ -3238,7 +3238,7 @@ void UIScene_LoadOrJoinMenu::RequestFileData( SaveTransferStateContainer *pClass #ifdef _DEBUG_MENUS_ENABLED if(app.GetLoadSavesFromFolderEnabled()) { - File targetFile( wstring(L"FakeTMSPP\\").append(filename) ); + File targetFile( std::wstring(L"FakeTMSPP\\").append(filename) ); if(targetFile.exists()) { HANDLE hSaveFile = CreateFile( targetFile.getPath().c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, NULL); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_LoadOrJoinMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_LoadOrJoinMenu.h index 01d94b05c..02f850978 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_LoadOrJoinMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_LoadOrJoinMenu.h @@ -77,9 +77,9 @@ private: int m_iMashUpButtonsC; int m_iState; - vector *m_currentSessions; - vector m_generators; - vector *m_saves; + std::vector *m_currentSessions; + std::vector m_generators; + std::vector *m_saves; bool m_bIgnoreInput; bool m_bAllLoaded; @@ -141,7 +141,7 @@ private: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: @@ -197,7 +197,7 @@ private: static ESaveTransferFiles s_eSaveTransferFile; static unsigned long s_ulFileSize; static byteArray s_transferData; - static wstring m_wstrStageText; + static std::wstring m_wstrStageText; LoadMenuInitData *m_loadMenuInitData; #ifdef _DEBUG_MENUS_ENABLED @@ -249,7 +249,7 @@ private: }; eSaveTransferState m_eSaveTransferState; static unsigned long m_ulFileSize; - static wstring m_wstrStageText; + static std::wstring m_wstrStageText; int m_iProgress; char m_downloadedUniqueFilename[64];//SCE_SAVE_DATA_DIRNAME_DATA_MAXSIZE]; bool m_saveTransferDownloadCancelled; diff --git a/Minecraft.Client/Build/Common/UI/UIScene_MainMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_MainMenu.cpp index dfd485a4b..eac1997d0 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_MainMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_MainMenu.cpp @@ -77,7 +77,7 @@ UIScene_MainMenu::UIScene_MainMenu(int iPad, void *initData, UILayer *parentLaye m_splash = L""; - wstring filename = L"splashes.txt"; + std::wstring filename = L"splashes.txt"; if( app.hasArchiveFile(filename) ) { byteArray splashesArray = app.getArchiveFile(filename); @@ -85,7 +85,7 @@ UIScene_MainMenu::UIScene_MainMenu(int iPad, void *initData, UILayer *parentLaye InputStreamReader isr( &bais ); BufferedReader br( &isr ); - wstring line = L""; + std::wstring line = L""; while ( !(line = br.readLine()).empty() ) { line = trimString( line ); @@ -218,7 +218,7 @@ void UIScene_MainMenu::handleGainFocus(bool navBack) m_splash = m_splashes.at( splashIndex ); } -wstring UIScene_MainMenu::getMoviePath() +std::wstring UIScene_MainMenu::getMoviePath() { return L"MainMenu"; } @@ -2008,7 +2008,7 @@ void UIScene_MainMenu::LoadTrial(void) param->saveData = NULL; param->settings = app.GetGameHostOption( eGameHostOption_Tutorial ) | app.GetGameHostOption(eGameHostOption_DisableSaving); - vector *generators = app.getLevelGenerators(); + std::vector *generators = app.getLevelGenerators(); if (generators->empty()) { app.DebugPrintf("LoadTrial: no level generators available, cannot start tutorial\n"); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_MainMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_MainMenu.h index f1b358dab..d562736b5 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_MainMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_MainMenu.h @@ -59,8 +59,8 @@ private: float m_fScreenWidth,m_fScreenHeight; float m_fRawWidth,m_fRawHeight; - vector m_splashes; - wstring m_splash; + std::vector m_splashes; + std::wstring m_splash; enum eSplashIndexes { eSplashHappyBirthdayEx = 0, @@ -109,7 +109,7 @@ protected: void customDrawSplash(IggyCustomDrawCallbackRegion *region); - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: virtual void tick(); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_MessageBox.cpp b/Minecraft.Client/Build/Common/UI/UIScene_MessageBox.cpp index b0f8c6415..e3f11e1cb 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_MessageBox.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_MessageBox.cpp @@ -59,7 +59,7 @@ UIScene_MessageBox::~UIScene_MessageBox() m_parentLayer->removeComponent(eUIComponent_MenuBackground); } -wstring UIScene_MessageBox::getMoviePath() +std::wstring UIScene_MessageBox::getMoviePath() { if(app.GetLocalPlayerCount() > 1 && !m_parentLayer->IsFullscreenGroup()) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_MessageBox.h b/Minecraft.Client/Build/Common/UI/UIScene_MessageBox.h index 3c349dea7..38d850d03 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_MessageBox.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_MessageBox.h @@ -45,7 +45,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); virtual void updateTooltips(); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_PauseMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_PauseMenu.cpp index 82fdb60ab..eb97a43fc 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_PauseMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_PauseMenu.cpp @@ -127,7 +127,7 @@ UIScene_PauseMenu::~UIScene_PauseMenu() m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,false); } -wstring UIScene_PauseMenu::getMoviePath() +std::wstring UIScene_PauseMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { @@ -1198,7 +1198,7 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J // retrieve the store name for the skin pack DLCPack *pDLCPack=pDLCTexPack->getDLCInfoParentPack();//tPack->getDLCPack(); - const char *pchPackName=wstringtofilename(pDLCPack->getName()); + const char *pchPackName=std::wstringtofilename(pDLCPack->getName()); app.DebugPrintf("Texture Pack - %s\n",pchPackName); SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo((char *)pchPackName); @@ -1277,7 +1277,7 @@ int UIScene_PauseMenu::BuyTexturePack_SignInReturned(void *pParam,bool bContinue // retrieve the store name for the skin pack DLCPack *pDLCPack=pDLCTexPack->getDLCInfoParentPack();//tPack->getDLCPack(); - const char *pchPackName=wstringtofilename(pDLCPack->getName()); + const char *pchPackName=std::wstringtofilename(pDLCPack->getName()); app.DebugPrintf("Texture Pack - %s\n",pchPackName); SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo((char *)pchPackName); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_PauseMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_PauseMenu.h index f1bd53aab..d1bb6ee66 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_PauseMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_PauseMenu.h @@ -76,7 +76,7 @@ protected: void updateControlsVisibility(); // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_QuadrantSignin.cpp b/Minecraft.Client/Build/Common/UI/UIScene_QuadrantSignin.cpp index 0c822b3d6..80e94034f 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_QuadrantSignin.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_QuadrantSignin.cpp @@ -71,7 +71,7 @@ UIScene_QuadrantSignin::~UIScene_QuadrantSignin() m_parentLayer->removeComponent(eUIComponent_MenuBackground); } -wstring UIScene_QuadrantSignin::getMoviePath() +std::wstring UIScene_QuadrantSignin::getMoviePath() { return L"QuadrantSignin"; } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_QuadrantSignin.h b/Minecraft.Client/Build/Common/UI/UIScene_QuadrantSignin.h index b500fcc33..bc9bb4325 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_QuadrantSignin.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_QuadrantSignin.h @@ -91,7 +91,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_ReinstallMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_ReinstallMenu.cpp index fb7a1a5b4..eef2bb84a 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_ReinstallMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_ReinstallMenu.cpp @@ -17,7 +17,7 @@ UIScene_ReinstallMenu::UIScene_ReinstallMenu(int iPad, void *initData, UILayer * #endif } -wstring UIScene_ReinstallMenu::getMoviePath() +std::wstring UIScene_ReinstallMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_ReinstallMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_ReinstallMenu.h index 54c20a6e8..2a833e9ef 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_ReinstallMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_ReinstallMenu.h @@ -36,7 +36,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SaveMessage.cpp b/Minecraft.Client/Build/Common/UI/UIScene_SaveMessage.cpp index 4a59279c8..f38e60cf8 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SaveMessage.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_SaveMessage.cpp @@ -48,7 +48,7 @@ UIScene_SaveMessage::~UIScene_SaveMessage() m_parentLayer->removeComponent(eUIComponent_Logo); } -wstring UIScene_SaveMessage::getMoviePath() +std::wstring UIScene_SaveMessage::getMoviePath() { return L"SaveMessage"; } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SaveMessage.h b/Minecraft.Client/Build/Common/UI/UIScene_SaveMessage.h index cedc8c8fa..88b84e22b 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SaveMessage.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_SaveMessage.h @@ -37,7 +37,7 @@ public: virtual void updateTooltips(); protected: - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SettingsAudioMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_SettingsAudioMenu.cpp index e6733eedd..6351f4e0b 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SettingsAudioMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_SettingsAudioMenu.cpp @@ -28,7 +28,7 @@ UIScene_SettingsAudioMenu::~UIScene_SettingsAudioMenu() { } -wstring UIScene_SettingsAudioMenu::getMoviePath() +std::wstring UIScene_SettingsAudioMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SettingsAudioMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_SettingsAudioMenu.h index 6c48b22bc..28b176dd2 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SettingsAudioMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_SettingsAudioMenu.h @@ -28,7 +28,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SettingsControlMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_SettingsControlMenu.cpp index 3d6d00f74..b0ea3c0b1 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SettingsControlMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_SettingsControlMenu.cpp @@ -28,7 +28,7 @@ UIScene_SettingsControlMenu::~UIScene_SettingsControlMenu() { } -wstring UIScene_SettingsControlMenu::getMoviePath() +std::wstring UIScene_SettingsControlMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SettingsControlMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_SettingsControlMenu.h index 6d3b864c6..2094dc389 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SettingsControlMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_SettingsControlMenu.h @@ -27,7 +27,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SettingsGraphicsMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_SettingsGraphicsMenu.cpp index 16bc39ccd..f867d170d 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SettingsGraphicsMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_SettingsGraphicsMenu.cpp @@ -60,7 +60,7 @@ UIScene_SettingsGraphicsMenu::~UIScene_SettingsGraphicsMenu() { } -wstring UIScene_SettingsGraphicsMenu::getMoviePath() +std::wstring UIScene_SettingsGraphicsMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SettingsGraphicsMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_SettingsGraphicsMenu.h index e9c4905cd..0995ffc7c 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SettingsGraphicsMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_SettingsGraphicsMenu.h @@ -36,7 +36,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SettingsMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_SettingsMenu.cpp index 5f5b1651d..70c643f61 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SettingsMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_SettingsMenu.cpp @@ -37,7 +37,7 @@ UIScene_SettingsMenu::~UIScene_SettingsMenu() { } -wstring UIScene_SettingsMenu::getMoviePath() +std::wstring UIScene_SettingsMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SettingsMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_SettingsMenu.h index 7f5fe169a..5d575a82a 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SettingsMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_SettingsMenu.h @@ -34,7 +34,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SettingsOptionsMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_SettingsOptionsMenu.cpp index 0021d1341..d1554f564 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SettingsOptionsMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_SettingsOptionsMenu.cpp @@ -75,7 +75,7 @@ UIScene_SettingsOptionsMenu::UIScene_SettingsOptionsMenu(int iPad, void *initDat m_sliderDifficulty.setAllPossibleLabels(4,difficultyLabels); m_sliderDifficulty.init(difficultyLabels[ucValue],eControl_Difficulty,0,3,ucValue); - wstring wsText=app.GetString(m_iDifficultySettingA[app.GetGameSettings(m_iPad,eGameSetting_Difficulty)]); + std::wstring wsText=app.GetString(m_iDifficultySettingA[app.GetGameSettings(m_iPad,eGameSetting_Difficulty)]); EHTMLFontSize size = eHTMLSize_Normal; if(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen()) { @@ -142,7 +142,7 @@ UIScene_SettingsOptionsMenu::~UIScene_SettingsOptionsMenu() { } -wstring UIScene_SettingsOptionsMenu::getMoviePath() +std::wstring UIScene_SettingsOptionsMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { @@ -238,7 +238,7 @@ void UIScene_SettingsOptionsMenu::handleSliderMove(F64 sliderId, F64 currentValu app.SetGameSettings(m_iPad,eGameSetting_Difficulty,value); - wstring wsText=app.GetString(m_iDifficultySettingA[value]); + std::wstring wsText=app.GetString(m_iDifficultySettingA[value]); EHTMLFontSize size = eHTMLSize_Normal; if(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen()) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SettingsOptionsMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_SettingsOptionsMenu.h index 265a0790c..7a66166de 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SettingsOptionsMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_SettingsOptionsMenu.h @@ -47,7 +47,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SettingsUIMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_SettingsUIMenu.cpp index 4f37bb184..8cdc2ef72 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SettingsUIMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_SettingsUIMenu.cpp @@ -77,7 +77,7 @@ UIScene_SettingsUIMenu::~UIScene_SettingsUIMenu() { } -wstring UIScene_SettingsUIMenu::getMoviePath() +std::wstring UIScene_SettingsUIMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SettingsUIMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_SettingsUIMenu.h index 8968bbe79..9f9dac782 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SettingsUIMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_SettingsUIMenu.h @@ -43,7 +43,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SignEntryMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_SignEntryMenu.cpp index e31f4064e..201136635 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SignEntryMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_SignEntryMenu.cpp @@ -56,7 +56,7 @@ UIScene_SignEntryMenu::~UIScene_SignEntryMenu() m_parentLayer->removeComponent(eUIComponent_MenuBackground); } -wstring UIScene_SignEntryMenu::getMoviePath() +std::wstring UIScene_SignEntryMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { @@ -84,7 +84,7 @@ void UIScene_SignEntryMenu::tick() // Set the sign text here so we on;y call the verify once it has been set, not while we're typing in to it for(int i=0;i<4;i++) { - wstring temp=m_textInputLines[i].getLabel(); + std::wstring temp=m_textInputLines[i].getLabel(); m_sign->SetMessage(i,temp); } @@ -94,10 +94,10 @@ void UIScene_SignEntryMenu::tick() // need to send the new data if (pMinecraft->level->isClientSide) { - shared_ptr player = pMinecraft->localplayers[m_iPad]; + std::shared_ptr player = pMinecraft->localplayers[m_iPad]; if(player != NULL && player->connection && player->connection->isStarted()) { - player->connection->send( shared_ptr( new SignUpdatePacket(m_sign->x, m_sign->y, m_sign->z, m_sign->IsVerified(), m_sign->IsCensored(), m_sign->GetMessages()) ) ); + player->connection->send( std::shared_ptr( new SignUpdatePacket(m_sign->x, m_sign->y, m_sign->z, m_sign->IsVerified(), m_sign->IsCensored(), m_sign->GetMessages()) ) ); } } ui.CloseUIScenes(m_iPad); @@ -116,7 +116,7 @@ void UIScene_SignEntryMenu::handleInput(int iPad, int key, bool repeat, bool pre if(pressed) { // user backed out, so wipe the sign - wstring temp=L""; + std::wstring temp=L""; for(int i=0;i<4;i++) { diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SignEntryMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_SignEntryMenu.h index 28b37d531..d2535ce78 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SignEntryMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_SignEntryMenu.h @@ -17,7 +17,7 @@ private: eControl_Confirm }; - shared_ptr m_sign; + std::shared_ptr m_sign; int m_iEditingLine; bool m_bConfirmed; bool m_bIgnoreInput; @@ -45,7 +45,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SkinSelectMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_SkinSelectMenu.cpp index faf32fc3d..7f0692888 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SkinSelectMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_SkinSelectMenu.cpp @@ -143,7 +143,7 @@ void UIScene_SkinSelectMenu::updateComponents() m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,false); } -wstring UIScene_SkinSelectMenu::getMoviePath() +std::wstring UIScene_SkinSelectMenu::getMoviePath() { if(app.GetLocalPlayerCount() > 1) { @@ -746,8 +746,8 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged() { BOOL showPrevious = FALSE, showNext = FALSE; DWORD previousIndex = 0, nextIndex = 0; - wstring skinName = L""; - wstring skinOrigin = L""; + std::wstring skinName = L""; + std::wstring skinOrigin = L""; bool bSkinIsFree=false; bool bLicensed=false; DLCSkinFile *skinFile=NULL; @@ -872,7 +872,7 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged() { // add the boxes to the humanoid model, but only if we've not done this already - vector *pAdditionalModelParts = app.GetAdditionalModelParts(skinFile->getSkinID()); + std::vector *pAdditionalModelParts = app.GetAdditionalModelParts(skinFile->getSkinID()); if(pAdditionalModelParts==NULL) { pAdditionalModelParts = app.SetAdditionalSkinBoxes(skinFile->getSkinID(),m_vAdditionalSkinBoxes); @@ -892,9 +892,9 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged() nextIndex = getNextSkinIndex(m_skinIndex); previousIndex = getPreviousSkinIndex(m_skinIndex); - wstring otherSkinPath = L""; - wstring otherCapePath = L""; - vector *othervAdditionalSkinBoxes=NULL; + std::wstring otherSkinPath = L""; + std::wstring otherCapePath = L""; + std::vector *othervAdditionalSkinBoxes=NULL; wchar_t chars[256]; // turn off all displays @@ -986,7 +986,7 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged() } if(othervAdditionalSkinBoxes && othervAdditionalSkinBoxes->size()!=0) { - vector *pAdditionalModelParts = app.GetAdditionalModelParts(skinFile->getSkinID()); + std::vector *pAdditionalModelParts = app.GetAdditionalModelParts(skinFile->getSkinID()); if(pAdditionalModelParts==NULL) { pAdditionalModelParts = app.SetAdditionalSkinBoxes(skinFile->getSkinID(),othervAdditionalSkinBoxes); @@ -1057,7 +1057,7 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged() } if(othervAdditionalSkinBoxes && othervAdditionalSkinBoxes->size()!=0) { - vector *pAdditionalModelParts = app.GetAdditionalModelParts(skinFile->getSkinID()); + std::vector *pAdditionalModelParts = app.GetAdditionalModelParts(skinFile->getSkinID()); if(pAdditionalModelParts==NULL) { pAdditionalModelParts = app.SetAdditionalSkinBoxes(skinFile->getSkinID(),othervAdditionalSkinBoxes); @@ -1358,7 +1358,7 @@ void UIScene_SkinSelectMenu::setCharacterLocked(bool locked) IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSetCharacterLocked , 1 , value ); } -void UIScene_SkinSelectMenu::setLeftLabel(const wstring &label) +void UIScene_SkinSelectMenu::setLeftLabel(const std::wstring &label) { if(label.compare(m_leftLabel) != 0) { @@ -1377,7 +1377,7 @@ void UIScene_SkinSelectMenu::setLeftLabel(const wstring &label) } } -void UIScene_SkinSelectMenu::setCentreLabel(const wstring &label) +void UIScene_SkinSelectMenu::setCentreLabel(const std::wstring &label) { if(label.compare(m_centreLabel) != 0) { @@ -1396,7 +1396,7 @@ void UIScene_SkinSelectMenu::setCentreLabel(const wstring &label) } } -void UIScene_SkinSelectMenu::setRightLabel(const wstring &label) +void UIScene_SkinSelectMenu::setRightLabel(const std::wstring &label) { if(label.compare(m_rightLabel) != 0) { @@ -1664,8 +1664,8 @@ int UIScene_SkinSelectMenu::UnlockSkinReturned(void *pParam,int iPad,C4JStorage: // need to get info on the pack to see if the user has already downloaded it // retrieve the store name for the skin pack - wstring wStrPackName=pScene->m_currentPack->getName(); - const char *pchPackName=wstringtofilename(wStrPackName); + std::wstring wStrPackName=pScene->m_currentPack->getName(); + const char *pchPackName=std::wstringtofilename(wStrPackName); SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo((char *)pchPackName); if (pSONYDLCInfo != NULL) diff --git a/Minecraft.Client/Build/Common/UI/UIScene_SkinSelectMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_SkinSelectMenu.h index 7a69b02b4..a8ab918f1 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_SkinSelectMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_SkinSelectMenu.h @@ -102,8 +102,8 @@ private: DLCPack *m_currentPack; DWORD m_packIndex, m_skinIndex; DWORD m_originalSkinId; - wstring m_currentSkinPath, m_selectedSkinPath, m_selectedCapePath; - vector *m_vAdditionalSkinBoxes; + std::wstring m_currentSkinPath, m_selectedSkinPath, m_selectedCapePath; + std::vector *m_vAdditionalSkinBoxes; bool m_bSlidingSkins, m_bAnimatingMove; ESkinSelectNavigation m_currentNavigation; @@ -112,7 +112,7 @@ private: DWORD m_currentPackCount; bool m_bIgnoreInput; bool m_bSkinIndexChanged; - wstring m_leftLabel, m_centreLabel, m_rightLabel; + std::wstring m_leftLabel, m_centreLabel, m_rightLabel; S32 m_iTouchXStart; bool m_bTouchScrolled; @@ -134,7 +134,7 @@ public: protected: // TODO: This should be pure virtual in this class - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT @@ -157,9 +157,9 @@ private: void setCharacterSelected(bool selected); void setCharacterLocked(bool locked); - void setLeftLabel(const wstring &label); - void setCentreLabel(const wstring &label); - void setRightLabel(const wstring &label); + void setLeftLabel(const std::wstring &label); + void setCentreLabel(const std::wstring &label); + void setRightLabel(const std::wstring &label); virtual void HandleDLCMountingComplete(); virtual void HandleDLCInstalled(); diff --git a/Minecraft.Client/Build/Common/UI/UIScene_TeleportMenu.cpp b/Minecraft.Client/Build/Common/UI/UIScene_TeleportMenu.cpp index 2f4ecb409..07866bff7 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_TeleportMenu.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_TeleportMenu.cpp @@ -46,7 +46,7 @@ UIScene_TeleportMenu::UIScene_TeleportMenu(int iPad, void *initData, UILayer *pa m_players[m_playersCount] = player->GetSmallId(); ++m_playersCount; - wstring playerName = L""; + std::wstring playerName = L""; #ifndef _CONTENT_PACKAGE if(app.DebugSettingsOn() && (app.GetGameSettingsDebugMask()&(1L< 1) { @@ -136,7 +136,7 @@ void UIScene_TeleportMenu::handleReload() m_players[m_playersCount] = player->GetSmallId(); ++m_playersCount; - wstring playerName = L""; + std::wstring playerName = L""; #ifndef _CONTENT_PACKAGE if(app.DebugSettingsOn() && (app.GetGameSettingsDebugMask()&(1L< packet; + std::shared_ptr packet; if(m_teleportToPlayer) { packet = TeleportCommand::preparePacket(thisPlayer->GetUID(),selectedPlayer->GetUID()); @@ -307,7 +307,7 @@ void UIScene_TeleportMenu::OnPlayerChanged(void *callbackParam, INetworkPlayer * scene->m_players[scene->m_playersCount] = pPlayer->GetSmallId(); ++scene->m_playersCount; - wstring playerName = L""; + std::wstring playerName = L""; #ifndef _CONTENT_PACKAGE if(app.DebugSettingsOn() && (app.GetGameSettingsDebugMask()&(1L< 1) { @@ -147,7 +147,7 @@ void UIScene_TradingMenu::customDraw(IggyCustomDrawCallbackRegion *region) Minecraft *pMinecraft = Minecraft::GetInstance(); if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL) return; - shared_ptr item = nullptr; + std::shared_ptr item = nullptr; int slotId = -1; swscanf((wchar_t*)region->name,L"slot_%d",&slotId); @@ -223,17 +223,17 @@ void UIScene_TradingMenu::moveSelector(bool right) IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcMoveSelector , 1 , value ); } -void UIScene_TradingMenu::setTitle(const wstring &name) +void UIScene_TradingMenu::setTitle(const std::wstring &name) { m_labelTrading.setLabel(name); } -void UIScene_TradingMenu::setRequest1Name(const wstring &name) +void UIScene_TradingMenu::setRequest1Name(const std::wstring &name) { m_labelRequest1.setLabel(name); } -void UIScene_TradingMenu::setRequest2Name(const wstring &name) +void UIScene_TradingMenu::setRequest2Name(const std::wstring &name) { m_labelRequest2.setLabel(name); } @@ -253,7 +253,7 @@ void UIScene_TradingMenu::setTradeRedBox(int index, bool show) m_slotListTrades.showSlotRedBox(index,show); } -void UIScene_TradingMenu::setOfferDescription(const wstring &name, vector &unformattedStrings) +void UIScene_TradingMenu::setOfferDescription(const std::wstring &name, std::vector &unformattedStrings) { IggyDataValue result; IggyDataValue value[1]; diff --git a/Minecraft.Client/Build/Common/UI/UIScene_TradingMenu.h b/Minecraft.Client/Build/Common/UI/UIScene_TradingMenu.h index 08263a1cc..794e353a1 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_TradingMenu.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_TradingMenu.h @@ -50,7 +50,7 @@ protected: UI_MAP_NAME(m_funcSetOfferDescription, L"SetOfferDescription") UI_END_MAP_ELEMENTS_AND_NAMES() - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); virtual void updateTooltips(); virtual void handleDestroy(); virtual void handleReload(); @@ -64,15 +64,15 @@ protected: virtual void showScrollRightArrow(bool show); virtual void showScrollLeftArrow(bool show); virtual void moveSelector(bool right); - virtual void setTitle(const wstring &name); - virtual void setRequest1Name(const wstring &name); - virtual void setRequest2Name(const wstring &name); + virtual void setTitle(const std::wstring &name); + virtual void setRequest1Name(const std::wstring &name); + virtual void setRequest2Name(const std::wstring &name); virtual void setRequest1RedBox(bool show); virtual void setRequest2RedBox(bool show); virtual void setTradeRedBox(int index, bool show); - virtual void setOfferDescription(const wstring &name, vector &unformattedStrings); + virtual void setOfferDescription(const std::wstring &name, std::vector &unformattedStrings); int getPad() { return m_iPad; } }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/UI/UIScene_TrialExitUpsell.cpp b/Minecraft.Client/Build/Common/UI/UIScene_TrialExitUpsell.cpp index 3894bc0f8..0df8d1987 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_TrialExitUpsell.cpp +++ b/Minecraft.Client/Build/Common/UI/UIScene_TrialExitUpsell.cpp @@ -9,7 +9,7 @@ UIScene_TrialExitUpsell::UIScene_TrialExitUpsell(int iPad, void *initData, UILay initialiseMovie(); } -wstring UIScene_TrialExitUpsell::getMoviePath() +std::wstring UIScene_TrialExitUpsell::getMoviePath() { return L"TrialExitUpsell"; } diff --git a/Minecraft.Client/Build/Common/UI/UIScene_TrialExitUpsell.h b/Minecraft.Client/Build/Common/UI/UIScene_TrialExitUpsell.h index 79e9edf5b..802a89eb4 100644 --- a/Minecraft.Client/Build/Common/UI/UIScene_TrialExitUpsell.h +++ b/Minecraft.Client/Build/Common/UI/UIScene_TrialExitUpsell.h @@ -20,7 +20,7 @@ public: virtual void updateTooltips(); protected: - virtual wstring getMoviePath(); + virtual std::wstring getMoviePath(); public: // INPUT diff --git a/Minecraft.Client/Build/Common/UI/UIStructs.h b/Minecraft.Client/Build/Common/UI/UIStructs.h index 611dd9ed3..d59a666fa 100644 --- a/Minecraft.Client/Build/Common/UI/UIStructs.h +++ b/Minecraft.Client/Build/Common/UI/UIStructs.h @@ -31,8 +31,8 @@ typedef struct _UIVec2D // Brewing typedef struct _BrewingScreenInput { - shared_ptr inventory; - shared_ptr brewingStand; + std::shared_ptr inventory; + std::shared_ptr brewingStand; int iPad; bool bSplitscreen; } BrewingScreenInput; @@ -40,8 +40,8 @@ typedef struct _BrewingScreenInput // Chest typedef struct _ContainerScreenInput { - shared_ptr inventory; - shared_ptr container; + std::shared_ptr inventory; + std::shared_ptr container; int iPad; bool bSplitscreen; } ContainerScreenInput; @@ -49,8 +49,8 @@ typedef struct _ContainerScreenInput // Dispenser typedef struct _TrapScreenInput { - shared_ptr inventory; - shared_ptr trap; + std::shared_ptr inventory; + std::shared_ptr trap; int iPad; bool bSplitscreen; } TrapScreenInput; @@ -58,7 +58,7 @@ typedef struct _TrapScreenInput // Inventory and creative inventory typedef struct _InventoryScreenInput { - shared_ptr player; + std::shared_ptr player; bool bNavigateBack; // If we came here from the crafting screen, go back to it, rather than closing the xui menus int iPad; bool bSplitscreen; @@ -67,7 +67,7 @@ typedef struct _InventoryScreenInput // Enchanting typedef struct _EnchantingScreenInput { - shared_ptr inventory; + std::shared_ptr inventory; Level *level; int x; int y; @@ -79,8 +79,8 @@ typedef struct _EnchantingScreenInput // Furnace typedef struct _FurnaceScreenInput { - shared_ptr inventory; - shared_ptr furnace; + std::shared_ptr inventory; + std::shared_ptr furnace; int iPad; bool bSplitscreen; } FurnaceScreenInput; @@ -88,7 +88,7 @@ typedef struct _FurnaceScreenInput // Crafting typedef struct _CraftingPanelScreenInput { - shared_ptr player; + std::shared_ptr player; int iContainerType; // RECIPE_TYPE_2x2 or RECIPE_TYPE_3x3 bool bSplitscreen; int iPad; @@ -101,8 +101,8 @@ CraftingPanelScreenInput; // Trading typedef struct _TradingScreenInput { - shared_ptr inventory; - shared_ptr trader; + std::shared_ptr inventory; + std::shared_ptr trader; Level *level; int iPad; bool bSplitscreen; @@ -112,7 +112,7 @@ TradingScreenInput; // Anvil typedef struct _AnvilScreenInput { - shared_ptr inventory; + std::shared_ptr inventory; Level *level; int x; int y; @@ -125,7 +125,7 @@ AnvilScreenInput; // Sign typedef struct _SignEntryScreenInput { - shared_ptr sign; + std::shared_ptr sign; int iPad; } SignEntryScreenInput; @@ -259,7 +259,7 @@ typedef struct _LaunchMoreOptionsMenuInitData DWORD dwTexturePack; - wstring seed; + std::wstring seed; int worldSize; bool bDisableSaving; diff --git a/Minecraft.Client/Build/Common/UI/UITTFFont.cpp b/Minecraft.Client/Build/Common/UI/UITTFFont.cpp index e51ecdd34..f20714aed 100644 --- a/Minecraft.Client/Build/Common/UI/UITTFFont.cpp +++ b/Minecraft.Client/Build/Common/UI/UITTFFont.cpp @@ -9,7 +9,7 @@ UITTFFont::UITTFFont(const string &path, S32 fallbackCharacter) app.DebugPrintf("UITTFFont opening %s\n",path.c_str()); #if defined(_UNICODE) && !defined(__linux__) - wstring wPath = convStringToWstring(path); + std::wstring wPath = convStringToWstring(path); 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, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); diff --git a/Minecraft.Client/Build/Common/XUI/SlotProgressControl.cpp b/Minecraft.Client/Build/Common/XUI/SlotProgressControl.cpp index 10a0474f8..17eba5d60 100644 --- a/Minecraft.Client/Build/Common/XUI/SlotProgressControl.cpp +++ b/Minecraft.Client/Build/Common/XUI/SlotProgressControl.cpp @@ -21,7 +21,7 @@ int SlotProgressControl::GetValue() { SlotControlUserDataContainer* pUserDataContainer = (SlotControlUserDataContainer*)pvUserData; - shared_ptr item = shared_ptr(); + std::shared_ptr item = std::shared_ptr(); if( pUserDataContainer->slot != NULL ) { @@ -69,7 +69,7 @@ void SlotProgressControl::GetRange(int *pnRangeMin, int *pnRangeMax) { SlotControlUserDataContainer* pUserDataContainer = (SlotControlUserDataContainer*)pvUserData; - shared_ptr item = shared_ptr(); + std::shared_ptr item = std::shared_ptr(); if( pUserDataContainer->slot != NULL ) { diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_4JList.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_4JList.cpp index d0493d649..87e05247f 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_4JList.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_4JList.cpp @@ -231,8 +231,8 @@ bool CXuiCtrl4JList::AlphabeticSortFn(const void *a, const void *b) CXuiCtrl4JList::LIST_ITEM_INFO *SaveDetailsA=(CXuiCtrl4JList::LIST_ITEM_INFO *)a; CXuiCtrl4JList::LIST_ITEM_INFO *SaveDetailsB=(CXuiCtrl4JList::LIST_ITEM_INFO *)b; - wstring wstr1=SaveDetailsA->pwszText; - wstring wstr2=SaveDetailsB->pwszText; + std::wstring wstr1=SaveDetailsA->pwszText; + std::wstring wstr2=SaveDetailsB->pwszText; if(wstr1.compare(wstr2)<0) { return true; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_BrewProgress.h b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_BrewProgress.h index 2f057a763..471c54eb9 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_BrewProgress.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_BrewProgress.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "XUI_Ctrl_ProgressCtrlBase.h" diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_BubblesProgress.h b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_BubblesProgress.h index 4950cf72a..55f8e3917 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_BubblesProgress.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_BubblesProgress.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "XUI_Ctrl_ProgressCtrlBase.h" diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_BurnProgress.h b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_BurnProgress.h index 1c403e325..1ba70b909 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_BurnProgress.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_BurnProgress.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "XUI_Ctrl_ProgressCtrlBase.h" diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp index 4833b9fad..591893a96 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp @@ -92,7 +92,7 @@ void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCo XuiElementSetShow(m_hObj,bShow); } -void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow) +void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow) { if(item == NULL) SetIcon(iPad, 0,0,0,0,0,false,false,bShow); else diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h index 5cf7a7f41..0a46227be 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h @@ -16,7 +16,7 @@ public: virtual ~CXuiCtrlCraftIngredientSlot() { }; void SetRedBox(BOOL bVal); void SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha, bool bDecorations, bool isFoil = false, BOOL bShow=TRUE); - void SetIcon(int iPad, shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow=TRUE); + void SetIcon(int iPad, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow=TRUE); void SetDescription(LPCWSTR Desc); protected: @@ -31,7 +31,7 @@ protected: HRESULT OnInit(XUIMessageInit* pInitData, BOOL& rfHandled); private: - shared_ptr m_item; + std::shared_ptr m_item; int m_iID; int m_iAuxVal; int m_iCount; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantButton.h b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantButton.h index 0b414d69c..948fc5760 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantButton.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantButton.h @@ -25,7 +25,7 @@ private: int m_iPad; int m_index; int m_lastCost; - wstring m_costString; + std::wstring m_costString; CXuiSceneEnchant *m_containerScene; float m_fScreenWidth,m_fScreenHeight; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp index c1823ab77..79158d84f 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp @@ -306,7 +306,7 @@ HRESULT CXuiCtrlEnchantmentBook::OnRender(XUIMessageRender *pRenderData, BOOL &b void CXuiCtrlEnchantmentBook::tickBook() { EnchantmentMenu *menu = m_containerScene->getMenu(); - shared_ptr current = menu->getSlot(0)->getItem(); + std::shared_ptr current = menu->getSlot(0)->getItem(); if (!ItemInstance::matches(current, last)) { last = current; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentBook.h b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentBook.h index bfd572bec..f08a98b05 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentBook.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentBook.h @@ -1,7 +1,7 @@ #pragma once #include "../../../../Minecraft.World/Util/Random.h" -using namespace std; +//using namespace std; class CXuiSceneEnchant; class BookModel; @@ -42,7 +42,7 @@ private: float m_fScale,m_fAlpha; int m_iPad; CXuiSceneEnchant *m_containerScene; - shared_ptr last; + std::shared_ptr last; float m_fScreenWidth,m_fScreenHeight; float m_fRawWidth,m_fRawHeight; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentButtonText.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentButtonText.cpp index 0feed592e..95e2f388f 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentButtonText.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentButtonText.cpp @@ -124,7 +124,7 @@ HRESULT CXuiCtrlEnchantmentButtonText::OnRender(XUIMessageRender *pRenderData, B glColor4f(1, 1, 1, 1); if (cost != 0) { - wstring line = _toString(cost); + std::wstring line = _toString(cost); Font *font = pMinecraft->altFont; //int col = 0x685E4A; unsigned int col = m_textColour; @@ -167,15 +167,15 @@ CXuiCtrlEnchantmentButtonText::EnchantmentNames CXuiCtrlEnchantmentButtonText::E CXuiCtrlEnchantmentButtonText::EnchantmentNames::EnchantmentNames() { - wstring allWords = L"the elder scrolls klaatu berata niktu xyzzy bless curse light darkness fire air earth water hot dry cold wet ignite snuff embiggen twist shorten stretch fiddle destroy imbue galvanize enchant free limited range of towards inside sphere cube self other ball mental physical grow shrink demon elemental spirit animal creature beast humanoid undead fresh stale "; + std::wstring allWords = L"the elder scrolls klaatu berata niktu xyzzy bless curse light darkness fire air earth water hot dry cold wet ignite snuff embiggen twist shorten stretch fiddle destroy imbue galvanize enchant free limited range of towards inside sphere cube self other ball mental physical grow shrink demon elemental spirit animal creature beast humanoid undead fresh stale "; std::wistringstream iss(allWords); std::copy(std::istream_iterator< std::wstring, wchar_t, std::char_traits >(iss), std::istream_iterator< std::wstring, wchar_t, std::char_traits >(),std::back_inserter(words)); } -wstring CXuiCtrlEnchantmentButtonText::EnchantmentNames::getRandomName() +std::wstring CXuiCtrlEnchantmentButtonText::EnchantmentNames::getRandomName() { int wordCount = random.nextInt(2) + 3; - wstring word = L""; + std::wstring word = L""; for (int i = 0; i < wordCount; i++) { if (i > 0) word += L" "; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentButtonText.h b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentButtonText.h index c28b29ed1..efdc1ed7f 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentButtonText.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_EnchantmentButtonText.h @@ -24,7 +24,7 @@ private: float m_fRawWidth,m_fRawHeight; int m_lastCost; - wstring m_enchantmentString; + std::wstring m_enchantmentString; unsigned int m_textColour, m_textFocusColour, m_textDisabledColour; @@ -35,11 +35,11 @@ private: private: Random random; - vector words; + std::vector words; EnchantmentNames(); public: - wstring getRandomName(); + std::wstring getRandomName(); }; }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_FireProgress.h b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_FireProgress.h index 595072efb..216b5a7d6 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_FireProgress.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_FireProgress.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "XUI_Ctrl_ProgressCtrlBase.h" diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftPlayer.h b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftPlayer.h index fa28d6b83..70692bfe9 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftPlayer.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftPlayer.h @@ -3,7 +3,7 @@ #include #include -using namespace std; +//using namespace std; class TileRenderer; class ItemRenderer; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.cpp index b718d574f..e35567a1c 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.cpp @@ -74,7 +74,7 @@ HRESULT CXuiCtrlMinecraftSkinPreview::OnInit(XUIMessageInit* pInitData, BOOL& rf return hr; } -void CXuiCtrlMinecraftSkinPreview::SetTexture(const wstring &url, TEXTURE_NAME backupTexture) +void CXuiCtrlMinecraftSkinPreview::SetTexture(const std::wstring &url, TEXTURE_NAME backupTexture) { m_customTextureUrl = url; m_backupTexture = backupTexture; @@ -252,7 +252,7 @@ HRESULT CXuiCtrlMinecraftSkinPreview::OnRender(XUIMessageRender *pRenderData, BO if (renderer != NULL) { // 4J-PB - any additional parts to turn on for this player (skin dependent) - //vector *pAdditionalModelParts=mob->GetAdditionalModelParts(); + //std::vector *pAdditionalModelParts=mob->GetAdditionalModelParts(); if(m_pvAdditionalModelParts && m_pvAdditionalModelParts->size()!=0) { @@ -510,7 +510,7 @@ void CXuiCtrlMinecraftSkinPreview::render(EntityRenderer *renderer, double x, do model->holdingLeftHand = false; } -bool CXuiCtrlMinecraftSkinPreview::bindTexture(const wstring& urlTexture, int backupTexture) +bool CXuiCtrlMinecraftSkinPreview::bindTexture(const std::wstring& urlTexture, int backupTexture) { Textures *t = Minecraft::GetInstance()->textures; @@ -530,7 +530,7 @@ bool CXuiCtrlMinecraftSkinPreview::bindTexture(const wstring& urlTexture, int ba } } -bool CXuiCtrlMinecraftSkinPreview::bindTexture(const wstring& urlTexture, const wstring& backupTexture) +bool CXuiCtrlMinecraftSkinPreview::bindTexture(const std::wstring& urlTexture, const std::wstring& backupTexture) { Textures *t = Minecraft::GetInstance()->textures; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.h b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.h index 75871d694..88bd0458a 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSkinPreview.h @@ -6,7 +6,7 @@ //#include "../../Xbox/DLC/DLCSkinFile.h" #include "../../../Rendering/Models/Model.h" -using namespace std; +//using namespace std; class EntityRenderer; @@ -42,8 +42,8 @@ public: CXuiCtrlMinecraftSkinPreview(); virtual ~CXuiCtrlMinecraftSkinPreview() { }; - void SetTexture(const wstring &url, TEXTURE_NAME backupTexture = TN_MOB_CHAR); - void SetCapeTexture(const wstring &url) { m_capeTextureUrl = url; } + void SetTexture(const std::wstring &url, TEXTURE_NAME backupTexture = TN_MOB_CHAR); + void SetCapeTexture(const std::wstring &url) { m_capeTextureUrl = url; } void ResetRotation() { m_xRot = 0; m_yRot = 0; } void IncrementYRotation() { m_yRot = (m_yRot+4); if(m_yRot >= 180) m_yRot = -180; } void DecrementYRotation() { m_yRot = (m_yRot-4); if(m_yRot <= -180) m_yRot = 180; } @@ -70,15 +70,15 @@ protected: private: void render(EntityRenderer *renderer, double x, double y, double z, float rot, float a); - bool bindTexture(const wstring& urlTexture, int backupTexture); - bool bindTexture(const wstring& urlTexture, const wstring& backupTexture); + bool bindTexture(const std::wstring& urlTexture, int backupTexture); + bool bindTexture(const std::wstring& urlTexture, const std::wstring& backupTexture); BOOL m_bDirty; float m_fScale,m_fAlpha; - wstring m_customTextureUrl; + std::wstring m_customTextureUrl; TEXTURE_NAME m_backupTexture; - wstring m_capeTextureUrl; + std::wstring m_capeTextureUrl; unsigned int m_uiAnimOverrideBitmask; float m_fScreenWidth,m_fScreenHeight; @@ -101,6 +101,6 @@ private: float m_swingTime; ESkinPreviewAnimations m_currentAnimation; - //vector *m_pvAdditionalBoxes; - vector *m_pvAdditionalModelParts; + //std::vector *m_pvAdditionalBoxes; + std::vector *m_pvAdditionalModelParts; }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp index b32098213..ceeb8057f 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp @@ -188,7 +188,7 @@ HRESULT CXuiCtrlMinecraftSlot::OnRender(XUIMessageRender *pRenderData, BOOL &bHa { HXUIDC hDC = pRenderData->hDC; CXuiControl xuiControl(m_hObj); - if(m_item == NULL) m_item = shared_ptr( new ItemInstance(m_iID, m_iCount, m_iAuxVal) ); + if(m_item == NULL) m_item = std::shared_ptr( new ItemInstance(m_iID, m_iCount, m_iAuxVal) ); // build and render with the game call @@ -253,7 +253,7 @@ HRESULT CXuiCtrlMinecraftSlot::OnRender(XUIMessageRender *pRenderData, BOOL &bHa //Make sure that pMinecraft->player is the correct player so that player specific rendering // eg clock and compass, are rendered correctly - shared_ptr oldPlayer = pMinecraft->player; + std::shared_ptr oldPlayer = pMinecraft->player; if( m_iPad >= 0 && m_iPad < XUSER_MAX_COUNT ) pMinecraft->player = pMinecraft->localplayers[m_iPad]; @@ -343,7 +343,7 @@ void CXuiCtrlMinecraftSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCount, i XuiElementSetShow(m_hObj,bShow); } -void CXuiCtrlMinecraftSlot::SetIcon(int iPad, shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow) +void CXuiCtrlMinecraftSlot::SetIcon(int iPad, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow) { m_item = item; m_isFoil = item->isFoil(); diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSlot.h b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSlot.h index 5dafec53a..1f337f692 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSlot.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MinecraftSlot.h @@ -3,7 +3,7 @@ #include #include -using namespace std; +//using namespace std; class TileRenderer; class ItemRenderer; @@ -23,7 +23,7 @@ public: void renderGuiItem(Font *font, Textures *textures,ItemInstance *item, int x, int y); void RenderItem(); void SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha,bool bDecorations,BOOL bShow, bool isFoil); - void SetIcon(int iPad, shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow=TRUE); + void SetIcon(int iPad, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow=TRUE); protected: @@ -38,7 +38,7 @@ protected: HRESULT OnRender(XUIMessageRender *pRenderData, BOOL &rfHandled); private: - shared_ptr m_item; + std::shared_ptr m_item; BOOL m_bDirty; INT m_iPassThroughDataAssociation; INT m_iPassThroughIdAssociation; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MobEffect.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MobEffect.cpp index 0e87be823..d22823689 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MobEffect.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MobEffect.cpp @@ -60,12 +60,12 @@ void CXuiCtrlMobEffect::setIcon(MobEffect::EMobEffectIcon icon) m_icon = icon; } -void CXuiCtrlMobEffect::setName(const wstring &name) +void CXuiCtrlMobEffect::setName(const std::wstring &name) { m_name = name; } -void CXuiCtrlMobEffect::setDuration(const wstring &duration) +void CXuiCtrlMobEffect::setDuration(const std::wstring &duration) { m_duration = duration; } \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MobEffect.h b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MobEffect.h index 860d780e6..3f73f8517 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MobEffect.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_MobEffect.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../../../../Minecraft.World/Entities/MobEffect.h" @@ -19,13 +19,13 @@ protected: public: void setIcon(MobEffect::EMobEffectIcon icon); - void setName(const wstring &name); - void setDuration(const wstring &duration); + void setName(const std::wstring &name); + void setDuration(const std::wstring &duration); private: MobEffect::EMobEffectIcon m_icon; - wstring m_name; - wstring m_duration; + std::wstring m_name; + std::wstring m_duration; static LPCWSTR iconFrameNames[MobEffect::e_MobEffectIcon_COUNT]; }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.cpp index ff204392c..e3e752567 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.cpp @@ -36,7 +36,7 @@ HRESULT CXuiCtrlSlotItemCtrlBase::OnDestroy( HXUIOBJ hObj ) HRESULT CXuiCtrlSlotItemCtrlBase::OnCustomMessage_GetSlotItem(HXUIOBJ hObj, CustomMessage_GetSlotItem_Struct *pData, BOOL& bHandled) { - shared_ptr item = shared_ptr(); + std::shared_ptr item = std::shared_ptr(); void* pvUserData; XuiElementGetUserData( hObj, &pvUserData ); @@ -49,7 +49,7 @@ HRESULT CXuiCtrlSlotItemCtrlBase::OnCustomMessage_GetSlotItem(HXUIOBJ hObj, Cust } else if(pUserDataContainer->m_iPad >= 0 && pUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); + std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); if(player != NULL) item = player->inventory->getCarried(); } @@ -119,14 +119,14 @@ bool CXuiCtrlSlotItemCtrlBase::isEmpty( HXUIOBJ hObj ) } else if(pUserDataContainer->m_iPad >= 0 && pUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); + std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); if(player != NULL) return player->inventory->getCarried() == NULL; } return true; } -wstring CXuiCtrlSlotItemCtrlBase::GetItemDescription( HXUIOBJ hObj, vector &unformattedStrings ) +std::wstring CXuiCtrlSlotItemCtrlBase::GetItemDescription( HXUIOBJ hObj, std::vector &unformattedStrings ) { void* pvUserData; XuiElementGetUserData( hObj, &pvUserData ); @@ -134,12 +134,12 @@ wstring CXuiCtrlSlotItemCtrlBase::GetItemDescription( HXUIOBJ hObj, vectorslot != NULL) { - wstring desc = L""; - vector *strings = pUserDataContainer->slot->getItem()->getHoverText(Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad], false, unformattedStrings); + std::wstring desc = L""; + std::vector *strings = pUserDataContainer->slot->getItem()->getHoverText(Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad], false, unformattedStrings); bool firstLine = true; for(AUTO_VAR(it, strings->begin()); it != strings->end(); ++it) { - wstring thisString = *it; + std::wstring thisString = *it; if(!firstLine) { desc.append( L"
" ); @@ -167,10 +167,10 @@ wstring CXuiCtrlSlotItemCtrlBase::GetItemDescription( HXUIOBJ hObj, vectorm_iPad >= 0 && pUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); + std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); if(player != NULL) { - shared_ptr item = player->inventory->getCarried(); + std::shared_ptr item = player->inventory->getCarried(); if(item != NULL) return app.GetString( item->getDescriptionId() ); } @@ -178,7 +178,7 @@ wstring CXuiCtrlSlotItemCtrlBase::GetItemDescription( HXUIOBJ hObj, vector CXuiCtrlSlotItemCtrlBase::getItemInstance( HXUIOBJ hObj ) +std::shared_ptr CXuiCtrlSlotItemCtrlBase::getItemInstance( HXUIOBJ hObj ) { void* pvUserData; XuiElementGetUserData( hObj, &pvUserData ); @@ -190,7 +190,7 @@ shared_ptr CXuiCtrlSlotItemCtrlBase::getItemInstance( HXUIOBJ hObj } else if(pUserDataContainer->m_iPad >= 0 && pUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); + std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); if(player != NULL) return player->inventory->getCarried(); } @@ -268,7 +268,7 @@ int CXuiCtrlSlotItemCtrlBase::GetObjectCount( HXUIOBJ hObj ) } else if(pUserDataContainer->m_iPad >= 0 && pUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); + std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); if(player != NULL && player->inventory->getCarried() != NULL) { iCount = player->inventory->getCarried()->count; @@ -309,7 +309,7 @@ bool CXuiCtrlSlotItemCtrlBase::IsSameItemAs( HXUIOBJ hThisObj, HXUIOBJ hOtherObj } else if(pThisUserDataContainer->m_iPad >= 0 && pThisUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pThisUserDataContainer->m_iPad] ); + std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pThisUserDataContainer->m_iPad] ); if(player != NULL && player->inventory->getCarried() != NULL) { iThisID = player->inventory->getCarried()->id; @@ -336,7 +336,7 @@ bool CXuiCtrlSlotItemCtrlBase::IsSameItemAs( HXUIOBJ hThisObj, HXUIOBJ hOtherObj } else if(pOtherUserDataContainer->m_iPad >= 0 && pOtherUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pOtherUserDataContainer->m_iPad] ); + std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pOtherUserDataContainer->m_iPad] ); if(player != NULL && player->inventory->getCarried() != NULL) { iOtherID = player->inventory->getCarried()->id; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h index 2fd217494..c2423d829 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; class Slot; class ItemInstance; @@ -47,9 +47,9 @@ public: bool isEmpty( HXUIOBJ hObj ); - wstring GetItemDescription( HXUIOBJ hObj, vector &unformattedStrings ); + std::wstring GetItemDescription( HXUIOBJ hObj, std::vector &unformattedStrings ); - shared_ptr getItemInstance( HXUIOBJ hObj ); + std::shared_ptr getItemInstance( HXUIOBJ hObj ); Slot *getSlot( HXUIOBJ hObj ); // 4J WESTY : Pointer Prototype : Added to support prototype only. diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SplashPulser.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SplashPulser.cpp index 7cd96d26a..9c5c757c6 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SplashPulser.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SplashPulser.cpp @@ -41,7 +41,7 @@ HRESULT CXuiCtrlSplashPulser::OnRender(XUIMessageRender *pRenderData, BOOL &bHan Minecraft *pMinecraft=Minecraft::GetInstance(); Font *font = pMinecraft->font; - wstring splash( GetText() ); + std::wstring splash( GetText() ); // build and render with the game call diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SplashPulser.h b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SplashPulser.h index 504cf4c5a..959bb0e55 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SplashPulser.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Ctrl_SplashPulser.h @@ -3,7 +3,7 @@ #include #include -using namespace std; +//using namespace std; //----------------------------------------------------------------------------- // CXuiCtrlSplashPulser class diff --git a/Minecraft.Client/Build/Common/XUI/XUI_CustomMessages.h b/Minecraft.Client/Build/Common/XUI/XUI_CustomMessages.h index 888f8ad00..ae7a0fda3 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_CustomMessages.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_CustomMessages.h @@ -14,7 +14,7 @@ typedef struct { - shared_ptr item; + std::shared_ptr item; // Legacy values for compatibility int iDataBitField; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_DLCOffers.cpp b/Minecraft.Client/Build/Common/XUI/XUI_DLCOffers.cpp index d23245495..5521a8a43 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_DLCOffers.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_DLCOffers.cpp @@ -18,7 +18,7 @@ #define TIMER_ID_NAVIGATE_BACK 2 // Constants -//const wstring CScene_DLCOffers::DEFAULT_BANNER = L"Graphics/banner.png"; +//const std::wstring CScene_DLCOffers::DEFAULT_BANNER = L"Graphics/banner.png"; // DLC Main @@ -364,7 +364,7 @@ HRESULT CScene_DLCOffers::GetDLCInfo( int iOfferC, bool bUpdateOnly ) //if(Offer.dwOfferType==app.GetDLCContentType((eDLCContentType)m_iType)) if(pDLC->eDLCType==(eDLCContentType)m_iType) { - wstring wstrTemp=xOffer.wszOfferName; + std::wstring wstrTemp=xOffer.wszOfferName; // If the string starts with Minecraft, removed that @@ -493,7 +493,7 @@ HRESULT CScene_DLCOffers::GetDLCInfo( int iOfferC, bool bUpdateOnly ) } wchar_t formatting[40]; - wstring wstrTemp = xOffer.wszSellText; + std::wstring wstrTemp = xOffer.wszSellText; swprintf(formatting, 40, L"", m_bIsSD?12:14); wstrTemp = formatting + wstrTemp; @@ -503,7 +503,7 @@ HRESULT CScene_DLCOffers::GetDLCInfo( int iOfferC, bool bUpdateOnly ) // set the price info m_PriceTag.SetShow(TRUE); // swprintf(formatting, 40, L"%d",xOffer.dwPointsPrice); -// wstrTemp=wstring(formatting); +// wstrTemp=std::wstring(formatting); // m_PriceTag.SetText(wstrTemp.c_str()); m_PriceTag.SetText(xOffer.wszCurrencyPrice); @@ -517,7 +517,7 @@ HRESULT CScene_DLCOffers::GetDLCInfo( int iOfferC, bool bUpdateOnly ) // set the default text wchar_t formatting[40]; - wstring wstrTemp = app.GetString(IDS_NO_DLCOFFERS); + std::wstring wstrTemp = app.GetString(IDS_NO_DLCOFFERS); swprintf(formatting, 40, L"", m_bIsSD?12:14); wstrTemp = formatting + wstrTemp; @@ -681,16 +681,16 @@ HRESULT CScene_DLCOffers::OnNotifySelChanged(HXUIOBJ hObjSource, XUINotifySelCha wchar_t formatting[40]; - wstring wstrTemp=xOffer.wszSellText; + std::wstring wstrTemp=xOffer.wszSellText; swprintf(formatting, 40, L"",m_bIsSD?12:14); - wstrTemp = wstring(formatting) + wstrTemp; + wstrTemp = std::wstring(formatting) + wstrTemp; m_SellText.SetText(wstrTemp.c_str()); // set the price info m_PriceTag.SetShow(TRUE); // swprintf(formatting, 40, L"%d",xOffer.dwPointsPrice); -// wstrTemp=wstring(formatting); +// wstrTemp=std::wstring(formatting); // m_PriceTag.SetText(wstrTemp.c_str()); m_PriceTag.SetText(xOffer.wszCurrencyPrice); diff --git a/Minecraft.Client/Build/Common/XUI/XUI_DLCOffers.h b/Minecraft.Client/Build/Common/XUI/XUI_DLCOffers.h index 0717846ee..e913fbcb0 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_DLCOffers.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_DLCOffers.h @@ -55,7 +55,7 @@ private: class CScene_DLCOffers : public CXuiSceneImpl { protected: - //static const wstring DEFAULT_BANNER; + //static const std::wstring DEFAULT_BANNER; // Control and Element wrapper objects. CXuiList m_List; @@ -120,7 +120,7 @@ public: private: - //vector offerIndexes; + //std::vector offerIndexes; CScene_DLCMain *pMain; bool m_bIgnorePress; int m_iPad; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_DebugItemEditor.cpp b/Minecraft.Client/Build/Common/XUI/XUI_DebugItemEditor.cpp index 7cfcb0286..6f378305c 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_DebugItemEditor.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_DebugItemEditor.cpp @@ -59,8 +59,8 @@ HRESULT CScene_DebugItemEditor::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfH m_slot->set(m_item); Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr player = pMinecraft->localplayers[m_iPad]; - if(player != NULL && player->connection) player->connection->send( shared_ptr( new ContainerSetSlotPacket(m_menu->containerId, m_slot->index, m_item) ) ); + std::shared_ptr player = pMinecraft->localplayers[m_iPad]; + if(player != NULL && player->connection) player->connection->send( std::shared_ptr( new ContainerSetSlotPacket(m_menu->containerId, m_slot->index, m_item) ) ); } // kill the crafting xui app.NavigateBack(m_iPad); @@ -76,11 +76,11 @@ HRESULT CScene_DebugItemEditor::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfH HRESULT CScene_DebugItemEditor::OnNotifyValueChanged( HXUIOBJ hObjSource, XUINotifyValueChanged *pNotifyValueChangedData, BOOL &bHandled) { - if(m_item == NULL) m_item = shared_ptr( new ItemInstance(0,1,0) ); + if(m_item == NULL) m_item = std::shared_ptr( new ItemInstance(0,1,0) ); if(hObjSource == m_itemId) { int id = 0; - wstring value = m_itemId.GetText(); + std::wstring value = m_itemId.GetText(); if(!value.empty()) id = _fromString( value ); // TODO Proper validation of the valid item ids @@ -89,21 +89,21 @@ HRESULT CScene_DebugItemEditor::OnNotifyValueChanged( HXUIOBJ hObjSource, XUINot else if(hObjSource == m_itemAuxValue) { int auxVal = 0; - wstring value = m_itemAuxValue.GetText(); + std::wstring value = m_itemAuxValue.GetText(); if(!value.empty()) auxVal = _fromString( value ); if(auxVal >= 0) m_item->setAuxValue( auxVal ); } else if(hObjSource == m_itemCount) { int count = 0; - wstring value = m_itemCount.GetText(); + std::wstring value = m_itemCount.GetText(); if(!value.empty()) count = _fromString( value ); if(count > 0 && count <= Item::items[m_item->id]->getMaxStackSize()) m_item->count = count; } else if(hObjSource == m_item4JData) { int data = 0; - wstring value = m_item4JData.GetText(); + std::wstring value = m_item4JData.GetText(); if(!value.empty()) data = _fromString( value ); m_item->set4JData(data); } diff --git a/Minecraft.Client/Build/Common/XUI/XUI_DebugItemEditor.h b/Minecraft.Client/Build/Common/XUI/XUI_DebugItemEditor.h index facc0f683..0f969254f 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_DebugItemEditor.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_DebugItemEditor.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../media/xuiscene_debug_item_editor.h" #include "XUI_Ctrl_CraftIngredientSlot.h" @@ -18,7 +18,7 @@ public: } ItemEditorInput; private: int m_iPad; - shared_ptr m_item; + std::shared_ptr m_item; Slot *m_slot; AbstractContainerMenu *m_menu; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_DebugOverlay.cpp b/Minecraft.Client/Build/Common/XUI/XUI_DebugOverlay.cpp index 458dc8955..935a56b7e 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_DebugOverlay.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_DebugOverlay.cpp @@ -294,7 +294,7 @@ void CScene_DebugOverlay::SetSpawnToPlayerPos() #ifndef _CONTENT_PACKAGE void CScene_DebugOverlay::SaveLimitedFile(int chunkRadius) { - unordered_map newFileCache; + std::unordered_map newFileCache; Minecraft *pMinecraft = Minecraft::GetInstance(); @@ -305,7 +305,7 @@ void CScene_DebugOverlay::SaveLimitedFile(int chunkRadius) // TODO Make this only happen for the new save //SetSpawnToPlayerPos(); - FileEntry *origFileEntry = currentSave->createFile( wstring( L"level.dat" ) ); + FileEntry *origFileEntry = currentSave->createFile( std::wstring( L"level.dat" ) ); byteArray levelData( origFileEntry->getFileSize() ); DWORD bytesRead; currentSave->setFilePointer(origFileEntry,0,NULL,FILE_BEGIN); @@ -316,7 +316,7 @@ void CScene_DebugOverlay::SaveLimitedFile(int chunkRadius) &bytesRead // number of bytes read ); - FileEntry *newFileEntry = newSave.createFile( wstring( L"level.dat" ) ); + FileEntry *newFileEntry = newSave.createFile( std::wstring( L"level.dat" ) ); DWORD bytesWritten; newSave.writeFile( newFileEntry, levelData.data, // data buffer @@ -363,9 +363,9 @@ void CScene_DebugOverlay::SaveLimitedFile(int chunkRadius) } #endif -RegionFile *CScene_DebugOverlay::getRegionFile(unordered_map &newFileCache, ConsoleSaveFile *saveFile, const wstring &prefix, int chunkX, int chunkZ) // 4J - TODO was synchronized +RegionFile *CScene_DebugOverlay::getRegionFile(std::unordered_map &newFileCache, ConsoleSaveFile *saveFile, const std::wstring &prefix, int chunkX, int chunkZ) // 4J - TODO was synchronized { - File file( prefix + wstring(L"r.") + _toString(chunkX>>5) + L"." + _toString(chunkZ>>5) + L".mcr" ); + File file( prefix + std::wstring(L"r.") + _toString(chunkX>>5) + L"." + _toString(chunkZ>>5) + L".mcr" ); RegionFile *ref = NULL; AUTO_VAR(it, newFileCache.find(file)); @@ -383,7 +383,7 @@ RegionFile *CScene_DebugOverlay::getRegionFile(unordered_map &newFileCache, ConsoleSaveFile *saveFile, const wstring &prefix, int chunkX, int chunkZ) +DataOutputStream *CScene_DebugOverlay::getChunkDataOutputStream(std::unordered_map &newFileCache, ConsoleSaveFile *saveFile, const std::wstring &prefix, int chunkX, int chunkZ) { RegionFile *r = getRegionFile(newFileCache, saveFile, prefix, chunkX, chunkZ); return r->getChunkDataOutputStream(chunkX & 31, chunkZ & 31); diff --git a/Minecraft.Client/Build/Common/XUI/XUI_DebugOverlay.h b/Minecraft.Client/Build/Common/XUI/XUI_DebugOverlay.h index 15dd6e897..210b5b9d9 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_DebugOverlay.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_DebugOverlay.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../media/xuiscene_debugoverlay.h" #define DEBUG_OVERLAY_UPDATE_TIME_PERIOD 10000 @@ -18,9 +18,9 @@ private: CXuiControl m_resetTutorial, m_createSchematic, m_toggleRain, m_toggleThunder, m_setCamera; CXuiControl m_setDay, m_setNight; CXuiSlider m_chunkRadius, m_setTime,m_setFov; - vector m_itemIds; - vector m_mobFactories; - vector m_enchantmentIds; + std::vector m_itemIds; + std::vector m_mobFactories; + std::vector m_enchantmentIds; protected: // Message map. Here we tie messages to message handlers. @@ -65,8 +65,8 @@ private: #ifndef _CONTENT_PACKAGE void SaveLimitedFile(int chunkRadius); #endif - RegionFile *getRegionFile(unordered_map &newFileCache, ConsoleSaveFile *saveFile, const wstring &prefix, int chunkX, int chunkZ); + RegionFile *getRegionFile(std::unordered_map &newFileCache, ConsoleSaveFile *saveFile, const std::wstring &prefix, int chunkX, int chunkZ); - DataOutputStream *getChunkDataOutputStream(unordered_map &newFileCache, ConsoleSaveFile *saveFile, const wstring &prefix, int chunkX, int chunkZ); + DataOutputStream *getChunkDataOutputStream(std::unordered_map &newFileCache, ConsoleSaveFile *saveFile, const std::wstring &prefix, int chunkX, int chunkZ); #endif }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/XUI/XUI_DebugSchematicCreator.cpp b/Minecraft.Client/Build/Common/XUI/XUI_DebugSchematicCreator.cpp index fee23f35a..f1e44ce7c 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_DebugSchematicCreator.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_DebugSchematicCreator.cpp @@ -57,7 +57,7 @@ HRESULT CScene_DebugSchematicCreator::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINo else if(m_data->endZ < 0 && m_data->endZ%2 ==0) m_data->endZ+=1; - wstring value = m_name.GetText(); + std::wstring value = m_name.GetText(); if(!value.empty()) { swprintf(m_data->name,64,L"%ls", value.c_str()); @@ -110,7 +110,7 @@ HRESULT CScene_DebugSchematicCreator::OnNotifyValueChanged( HXUIOBJ hObjSource, if(hObjSource == m_startX) { int iVal = 0; - wstring value = m_startX.GetText(); + std::wstring value = m_startX.GetText(); if(!value.empty()) iVal = _fromString( value ); if( iVal >= (LEVEL_MAX_WIDTH * -16) || iVal < (LEVEL_MAX_WIDTH * 16)) @@ -121,7 +121,7 @@ HRESULT CScene_DebugSchematicCreator::OnNotifyValueChanged( HXUIOBJ hObjSource, else if(hObjSource == m_startY) { int iVal = 0; - wstring value = m_startY.GetText(); + std::wstring value = m_startY.GetText(); if(!value.empty()) iVal = _fromString( value ); if( iVal >= (LEVEL_MAX_WIDTH * -16) || iVal < (LEVEL_MAX_WIDTH * 16)) @@ -132,7 +132,7 @@ HRESULT CScene_DebugSchematicCreator::OnNotifyValueChanged( HXUIOBJ hObjSource, else if(hObjSource == m_startZ) { int iVal = 0; - wstring value = m_startZ.GetText(); + std::wstring value = m_startZ.GetText(); if(!value.empty()) iVal = _fromString( value ); if( iVal >= (LEVEL_MAX_WIDTH * -16) || iVal < (LEVEL_MAX_WIDTH * 16)) @@ -143,7 +143,7 @@ HRESULT CScene_DebugSchematicCreator::OnNotifyValueChanged( HXUIOBJ hObjSource, else if(hObjSource == m_endX) { int iVal = 0; - wstring value = m_endX.GetText(); + std::wstring value = m_endX.GetText(); if(!value.empty()) iVal = _fromString( value ); if( iVal >= (LEVEL_MAX_WIDTH * -16) || iVal < (LEVEL_MAX_WIDTH * 16)) @@ -154,7 +154,7 @@ HRESULT CScene_DebugSchematicCreator::OnNotifyValueChanged( HXUIOBJ hObjSource, else if(hObjSource == m_endY) { int iVal = 0; - wstring value = m_endY.GetText(); + std::wstring value = m_endY.GetText(); if(!value.empty()) iVal = _fromString( value ); if( iVal >= (LEVEL_MAX_WIDTH * -16) || iVal < (LEVEL_MAX_WIDTH * 16)) @@ -165,7 +165,7 @@ HRESULT CScene_DebugSchematicCreator::OnNotifyValueChanged( HXUIOBJ hObjSource, else if(hObjSource == m_endZ) { int iVal = 0; - wstring value = m_endZ.GetText(); + std::wstring value = m_endZ.GetText(); if(!value.empty()) iVal = _fromString( value ); if( iVal >= (LEVEL_MAX_WIDTH * -16) || iVal < (LEVEL_MAX_WIDTH * 16)) diff --git a/Minecraft.Client/Build/Common/XUI/XUI_DebugSetCamera.cpp b/Minecraft.Client/Build/Common/XUI/XUI_DebugSetCamera.cpp index 93bc257d8..b61478b84 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_DebugSetCamera.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_DebugSetCamera.cpp @@ -109,7 +109,7 @@ HRESULT CScene_DebugSetCamera::OnNotifyValueChanged( HXUIOBJ hObjSource, XUINoti if (hObjSource == m_camX) { double iVal = 0; - wstring value = m_camX.GetText(); + std::wstring value = m_camX.GetText(); if(!value.empty()) iVal = _fromString( value ); currentPosition->m_camX = iVal; bHandled = TRUE; @@ -117,7 +117,7 @@ HRESULT CScene_DebugSetCamera::OnNotifyValueChanged( HXUIOBJ hObjSource, XUINoti else if (hObjSource == m_camY) { double iVal = 0; - wstring value = m_camY.GetText(); + std::wstring value = m_camY.GetText(); if(!value.empty()) iVal = _fromString( value ); currentPosition->m_camY = iVal - 1.62; bHandled = TRUE; @@ -125,7 +125,7 @@ HRESULT CScene_DebugSetCamera::OnNotifyValueChanged( HXUIOBJ hObjSource, XUINoti else if (hObjSource == m_camZ) { double iVal = 0; - wstring value = m_camZ.GetText(); + std::wstring value = m_camZ.GetText(); if(!value.empty()) iVal = _fromString( value ); currentPosition->m_camZ = iVal; bHandled = TRUE; @@ -133,7 +133,7 @@ HRESULT CScene_DebugSetCamera::OnNotifyValueChanged( HXUIOBJ hObjSource, XUINoti else if (hObjSource == m_yRot) { double iVal = 0; - wstring value = m_yRot.GetText(); + std::wstring value = m_yRot.GetText(); if(!value.empty()) iVal = _fromString( value ); currentPosition->m_yRot = iVal; bHandled = TRUE; @@ -141,7 +141,7 @@ HRESULT CScene_DebugSetCamera::OnNotifyValueChanged( HXUIOBJ hObjSource, XUINoti else if (hObjSource == m_elevation) { double iVal = 0; - wstring value = m_elevation.GetText(); + std::wstring value = m_elevation.GetText(); if(!value.empty()) iVal = _fromString( value ); currentPosition->m_elev = iVal; bHandled = TRUE; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_DebugTips.cpp b/Minecraft.Client/Build/Common/XUI/XUI_DebugTips.cpp index b3452a63a..851d8043a 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_DebugTips.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_DebugTips.cpp @@ -18,7 +18,7 @@ HRESULT CScene_DebugTips::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) // Display the tooltips //ui.SetTooltips( m_iPad, IDS_TOOLTIPS_SELECT); // display the next tip - wstring wsText=app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip())); + std::wstring wsText=app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip())); wchar_t startTags[64]; swprintf(startTags,64,L"
",app.GetHTMLColour(eHTMLColor_White)); wsText= startTags + wsText + L"
"; @@ -41,7 +41,7 @@ HRESULT CScene_DebugTips::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled // next tip // display the next tip - wstring wsText=app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip())); + std::wstring wsText=app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip())); wchar_t startTags[64]; swprintf(startTags,64,L"
",app.GetHTMLColour(eHTMLColor_White)); wsText= startTags + wsText + L"
"; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_FullscreenProgress.cpp b/Minecraft.Client/Build/Common/XUI/XUI_FullscreenProgress.cpp index 1628780c1..a9626f962 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_FullscreenProgress.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_FullscreenProgress.cpp @@ -53,7 +53,7 @@ HRESULT CScene_FullscreenProgress::OnInit( XUIMessageInit* pInitData, BOOL& bHan pMinecraft->progressRenderer->progressStage(-1); // set the tip - wstring wsText=app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip())); + std::wstring wsText=app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip())); wchar_t startTags[64]; swprintf(startTags,64,L"
",app.GetHTMLColour(eHTMLColor_White)); wsText= startTags + wsText + L"
"; @@ -359,7 +359,7 @@ HRESULT CScene_FullscreenProgress::OnTimer( XUIMessageTimer *pTimer, BOOL& bHand case TIMER_FULLSCREEN_TIPS: { // display the next tip - wstring wsText=app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip())); + std::wstring wsText=app.FormatHTMLString(m_iPad,app.GetString(app.GetNextTip())); wchar_t startTags[64]; swprintf(startTags,64,L"
",app.GetHTMLColour(eHTMLColor_White)); wsText= startTags + wsText + L"
"; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_HelpHowToPlay.cpp b/Minecraft.Client/Build/Common/XUI/XUI_HelpHowToPlay.cpp index c01ea68c9..77672ba82 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_HelpHowToPlay.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_HelpHowToPlay.cpp @@ -48,7 +48,7 @@ HRESULT CScene_HowToPlay::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) MapChildControls(); - wstring wsTemp, inventoryString = app.GetString(IDS_INVENTORY); + std::wstring wsTemp, inventoryString = app.GetString(IDS_INVENTORY); XuiControlSetText(m_aLabelControls[ eHowToPlay_LabelCTItem],app.GetString(IDS_ITEM_HATCHET_WOOD)); XuiControlSetText(m_aLabelControls[ eHowToPlay_LabelCTGroup],app.GetString(IDS_GROUPNAME_TOOLS)); XuiControlSetText(m_aLabelControls[ eHowToPlay_LabelCTInventory3x3],inventoryString.c_str()); @@ -74,7 +74,7 @@ HRESULT CScene_HowToPlay::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) XuiControlSetText(m_aLabelControls[ eHowToPlay_LabelAnvil_Inventory], inventoryString.c_str()); wsTemp = app.GetString(IDS_REPAIR_COST); - wsTemp.replace( wsTemp.find(L"%d"), 2, wstring(L"8") ); + wsTemp.replace( wsTemp.find(L"%d"), 2, std::wstring(L"8") ); XuiControlSetText(m_aLabelControls[ eHowToPlay_LabelAnvil_Cost], wsTemp.c_str()); XuiControlSetText(m_aLabelControls[ eHowToPlay_LabelAnvil_ARepairAndName], app.GetString(IDS_REPAIR_AND_NAME)); @@ -176,7 +176,7 @@ void CScene_HowToPlay::StartPage( EHowToPlayPage ePage ) if ( pDef->m_iTextControlIndex != eHowToPlay_TextNone ) { // Replace button identifiers in the text with actual button images. - wstring replacedText = app.FormatHTMLString(m_iPad, app.GetString( pDef->m_iTextStringID )); + std::wstring replacedText = app.FormatHTMLString(m_iPad, app.GetString( pDef->m_iTextStringID )); // 4J-PB - replace the title with the platform specific title, and the platform name replacedText = replaceAll(replacedText,L"{*PLATFORM_NAME*}",app.GetString(IDS_PLATFORM_NAME)); @@ -184,7 +184,7 @@ void CScene_HowToPlay::StartPage( EHowToPlayPage ePage ) replacedText = replaceAll(replacedText,L"{*DISABLES_ACHIEVEMENTS*}",app.GetString(IDS_HOST_OPTION_DISABLES_ACHIEVEMENTS)); // Set the text colour - wstring finalText(replacedText.c_str() ); + std::wstring finalText(replacedText.c_str() ); wchar_t startTags[64]; swprintf(startTags,64,L"",app.GetHTMLColour(eHTMLColor_White)); finalText = startTags + finalText; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_InGameHostOptions.cpp b/Minecraft.Client/Build/Common/XUI/XUI_InGameHostOptions.cpp index ff7020390..d1a188d63 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_InGameHostOptions.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_InGameHostOptions.cpp @@ -75,10 +75,10 @@ HRESULT CScene_InGameHostOptions::OnKeyDown(XUIMessageInput* pInputData, BOOL& r if(hostOptions != app.GetGameHostOption(eGameHostOption_All) ) { Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr player = pMinecraft->localplayers[m_iPad]; + std::shared_ptr player = pMinecraft->localplayers[m_iPad]; if(player != NULL && player->connection) { - player->connection->send( shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, hostOptions) ) ); + player->connection->send( std::shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, hostOptions) ) ); } } diff --git a/Minecraft.Client/Build/Common/XUI/XUI_InGameInfo.cpp b/Minecraft.Client/Build/Common/XUI/XUI_InGameInfo.cpp index 461ab00c5..c51fcd3f4 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_InGameInfo.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_InGameInfo.cpp @@ -58,7 +58,7 @@ HRESULT CScene_InGameInfo::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) if(thisPlayer != NULL) m_isHostPlayer = thisPlayer->IsHost() == TRUE; Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; + std::shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; if(!m_isHostPlayer && !localPlayer->isModerator() ) { m_gameOptionsButton.SetEnable(FALSE); @@ -183,7 +183,7 @@ HRESULT CScene_InGameInfo::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId( m_players[ playersList.GetCurSel() ] ); Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; + std::shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; bool isOp = m_isHostPlayer || localPlayer->isModerator(); bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0; @@ -465,7 +465,7 @@ void CScene_InGameInfo::updateTooltips() int keyA = -1; Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; + std::shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; bool isOp = m_isHostPlayer || localPlayer->isModerator(); bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0; @@ -526,10 +526,10 @@ int CScene_InGameInfo::KickPlayerReturned(void *pParam,int iPad,C4JStorage::EMes if(result==C4JStorage::EMessage_ResultAccept) { Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr localPlayer = pMinecraft->localplayers[iPad]; + std::shared_ptr localPlayer = pMinecraft->localplayers[iPad]; if(localPlayer != NULL && localPlayer->connection) { - localPlayer->connection->send( shared_ptr( new KickPlayerPacket(smallId) ) ); + localPlayer->connection->send( std::shared_ptr( new KickPlayerPacket(smallId) ) ); } } diff --git a/Minecraft.Client/Build/Common/XUI/XUI_InGameInfo.h b/Minecraft.Client/Build/Common/XUI/XUI_InGameInfo.h index 8b685aaf7..b0802e4c7 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_InGameInfo.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_InGameInfo.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../media/xuiscene_ingameinfo.h" #include "XUI_CustomMessages.h" diff --git a/Minecraft.Client/Build/Common/XUI/XUI_InGamePlayerOptions.cpp b/Minecraft.Client/Build/Common/XUI/XUI_InGamePlayerOptions.cpp index 3f11e5595..d9566a028 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_InGamePlayerOptions.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_InGamePlayerOptions.cpp @@ -277,10 +277,10 @@ HRESULT CScene_InGamePlayerOptions::OnKeyDown(XUIMessageInput* pInputData, BOOL& { // Send update settings packet to server Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr player = pMinecraft->localplayers[m_iPad]; + std::shared_ptr player = pMinecraft->localplayers[m_iPad]; if(player != NULL && player->connection) { - player->connection->send( shared_ptr( new PlayerInfoPacket( m_networkSmallId, -1, m_playerPrivileges) ) ); + player->connection->send( std::shared_ptr( new PlayerInfoPacket( m_networkSmallId, -1, m_playerPrivileges) ) ); } } @@ -336,10 +336,10 @@ int CScene_InGamePlayerOptions::KickPlayerReturned(void *pParam,int iPad,C4JStor if(result==C4JStorage::EMessage_ResultAccept) { Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr localPlayer = pMinecraft->localplayers[iPad]; + std::shared_ptr localPlayer = pMinecraft->localplayers[iPad]; if(localPlayer != NULL && localPlayer->connection) { - localPlayer->connection->send( shared_ptr( new KickPlayerPacket(smallId) ) ); + localPlayer->connection->send( std::shared_ptr( new KickPlayerPacket(smallId) ) ); } // Fix for #61494 - [CRASH]: TU7: Code: Multiplayer: Title may crash while kicking a player from an online game. diff --git a/Minecraft.Client/Build/Common/XUI/XUI_MainMenu.cpp b/Minecraft.Client/Build/Common/XUI/XUI_MainMenu.cpp index 278dec9fa..237ce9945 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_MainMenu.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_MainMenu.cpp @@ -88,7 +88,7 @@ HRESULT CScene_Main::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) InputStreamReader *isr = new InputStreamReader( bais ); BufferedReader *br = new BufferedReader( isr ); - wstring line = L""; + std::wstring line = L""; while ( !(line = br->readLine()).empty() ) { line = trimString( line ); @@ -350,7 +350,7 @@ HRESULT CScene_Main::OnTransitionStart( XUIMessageTransition *pTransition, BOOL& //splashIndex = 197; // Very long string //splashIndex = 296; // Coloured //splashIndex = 297; // Noise - wstring splash = m_splashes.at( splashIndex ); + std::wstring splash = m_splashes.at( splashIndex ); m_Subtitle.SetText(splash.c_str()); m_SubtitleMCFont.SetText(splash.c_str()); @@ -910,7 +910,7 @@ void CScene_Main::LoadTrial(void) param->saveData = NULL; param->settings = app.GetGameHostOption( eGameHostOption_Tutorial ); - vector *generators = app.getLevelGenerators(); + std::vector *generators = app.getLevelGenerators(); if (generators->empty()) { app.DebugPrintf("XUI LoadTrial: no level generators available, cannot start tutorial\n"); @@ -1239,7 +1239,7 @@ int CScene_Main::TMSReadFileListReturned(void *pParam,int iPad,C4JStorage::PTMSP // push the file details in to a unordered map if they are not already in there // for(int i=0;iiCount;i++) // { -// app.PutTMSPP_FileSize(filenametowstring(pTmsFileList->FileDetailsA[i].szFilename),pTmsFileList->FileDetailsA[i].iFileSize); +// app.PutTMSPP_FileSize(filenametostd::wstring(pTmsFileList->FileDetailsA[i].szFilename),pTmsFileList->FileDetailsA[i].iFileSize); // } return 0; } @@ -1251,7 +1251,7 @@ int CScene_Main::TMSFileWriteReturned(void *pParam,int iPad,int iResult) // push the file details in to a unordered map if they are not already in there // for(int i=0;iiCount;i++) // { - // app.PutTMSPP_FileSize(filenametowstring(pTmsFileList->FileDetailsA[i].szFilename),pTmsFileList->FileDetailsA[i].iFileSize); + // app.PutTMSPP_FileSize(filenametostd::wstring(pTmsFileList->FileDetailsA[i].szFilename),pTmsFileList->FileDetailsA[i].iFileSize); // } return 0; } @@ -1263,7 +1263,7 @@ int CScene_Main::TMSFileReadReturned(void *pParam,int iPad,C4JStorage::PTMSPP_FI // push the file details in to a unordered map if they are not already in there // for(int i=0;iiCount;i++) // { - // app.PutTMSPP_FileSize(filenametowstring(pTmsFileList->FileDetailsA[i].szFilename),pTmsFileList->FileDetailsA[i].iFileSize); + // app.PutTMSPP_FileSize(filenametostd::wstring(pTmsFileList->FileDetailsA[i].szFilename),pTmsFileList->FileDetailsA[i].iFileSize); // } return 0; } diff --git a/Minecraft.Client/Build/Common/XUI/XUI_MainMenu.h b/Minecraft.Client/Build/Common/XUI/XUI_MainMenu.h index 2e4279e42..cc451808b 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_MainMenu.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_MainMenu.h @@ -19,7 +19,7 @@ class CScene_Main : public CXuiSceneImpl { private: static Random *random; - vector m_splashes; + std::vector m_splashes; D3DXVECTOR3 m_vPosExitGame; bool m_bIgnorePress; float m_fSubtitleHeight, m_fSubtitleWidth; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_MultiGameCreate.cpp b/Minecraft.Client/Build/Common/XUI/XUI_MultiGameCreate.cpp index dfa05cba5..f1c66a041 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_MultiGameCreate.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_MultiGameCreate.cpp @@ -136,7 +136,7 @@ HRESULT CScene_MultiGameCreate::OnInit( XUIMessageInit* pInitData, BOOL& bHandle m_EditWorldName.SetTextLimit(XCONTENT_MAX_DISPLAYNAME_LENGTH); - wstring wWorldName = m_EditWorldName.GetText(); + std::wstring wWorldName = m_EditWorldName.GetText(); // set the caret to the end of the default text m_EditWorldName.SetCaretPosition((int)wWorldName.length()); @@ -627,7 +627,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyValueChanged (HXUIOBJ hObjSource, XUINot if(hObjSource == m_EditWorldName) { // Enable the done button when we have all of the necessary information - wstring wWorldName = m_EditWorldName.GetText(); + std::wstring wWorldName = m_EditWorldName.GetText(); BOOL bHasWorldName = ( wWorldName.length()!=0); m_NewWorld.SetEnable(bHasWorldName); } @@ -883,7 +883,7 @@ void CScene_MultiGameCreate::CreateGame(CScene_MultiGameCreate* pClass, DWORD dw app.ClearTerrainFeaturePosition(); // create the world and launch - wstring wWorldName = pClass->m_EditWorldName.GetText(); + std::wstring wWorldName = pClass->m_EditWorldName.GetText(); StorageManager.ResetSaveData(); // Make our next save default to the name of the level @@ -891,7 +891,7 @@ void CScene_MultiGameCreate::CreateGame(CScene_MultiGameCreate* pClass, DWORD dw BOOL bHasSeed = (pClass->m_EditSeed.GetText() != NULL); - wstring wSeed; + std::wstring wSeed; if(bHasSeed) { wSeed=pClass->m_EditSeed.GetText(); diff --git a/Minecraft.Client/Build/Common/XUI/XUI_MultiGameInfo.h b/Minecraft.Client/Build/Common/XUI/XUI_MultiGameInfo.h index 32a3d095a..d2b9b2446 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_MultiGameInfo.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_MultiGameInfo.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include #ifndef __linux__ #include diff --git a/Minecraft.Client/Build/Common/XUI/XUI_MultiGameJoinLoad.cpp b/Minecraft.Client/Build/Common/XUI/XUI_MultiGameJoinLoad.cpp index a2237716a..8fe6966e1 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_MultiGameJoinLoad.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_MultiGameJoinLoad.cpp @@ -342,7 +342,7 @@ HRESULT CScene_MultiGameJoinLoad::GetSaveInfo( ) for(unsigned int i=0;iat(i)->getName(); + std::wstring wName = m_saves->at(i)->getName(); wchar_t *name = new wchar_t[wName.size()+1]; for(unsigned int j = 0; j < wName.size(); ++j) { @@ -1424,7 +1424,7 @@ void CScene_MultiGameJoinLoad::UpdateGamesList(DWORD dwNumResults, IQNetGameSear { sessionInfo->data = *(GameSessionData *)pxnqi->pbData; - wstring gamerName = convStringToWstring(sessionInfo->data.hostName); + std::wstring gamerName = convStringToWstring(sessionInfo->data.hostName); swprintf(sessionInfo->displayLabel,L"%ls's Game", gamerName.c_str() ); } else @@ -2190,7 +2190,7 @@ void CScene_MultiGameJoinLoad::UploadFile(CScene_MultiGameJoinLoad *pClass, char { File targetFileDir(L"GAME:\\FakeTMSPP"); if(!targetFileDir.exists()) targetFileDir.mkdir(); - string path = string( wstringtofilename( targetFileDir.getPath() ) ).append("\\").append(filename); + string path = string( std::wstringtofilename( targetFileDir.getPath() ) ).append("\\").append(filename); HANDLE hSaveFile = CreateFile( path.c_str(), GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_FLAG_RANDOM_ACCESS, NULL); DWORD numberOfBytesWritten = 0; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_MultiGameJoinLoad.h b/Minecraft.Client/Build/Common/XUI/XUI_MultiGameJoinLoad.h index b7d5ddc0f..3c1082afa 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_MultiGameJoinLoad.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_MultiGameJoinLoad.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include #include "../Media/xuiscene_multi_joinload.h" #include "XUI_CustomMessages.h" @@ -135,7 +135,7 @@ private: bool m_bIgnoreInput; - vector *m_saves; + std::vector *m_saves; int m_iSaveInfoC; int m_iDefaultButtonsC; @@ -145,14 +145,14 @@ private: bool m_bMultiplayerAllowed; bool m_bKillSaveInfoEnumerate; - vector currentSessions; + std::vector currentSessions; bool m_bReady; bool m_bRetrievingSaveInfo; //bool m_bSaveRenamed; WCHAR m_wchNewName[XCONTENT_MAX_DISPLAYNAME_LENGTH]; unsigned char m_szSeed[50]; - vector *m_generators; + std::vector *m_generators; JoinMenuInitData *m_initData; UINT m_DefaultMinecraftIconSize; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_MultiGameLaunchMoreOptions.cpp b/Minecraft.Client/Build/Common/XUI/XUI_MultiGameLaunchMoreOptions.cpp index 2c164ff37..62ecd1dc8 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_MultiGameLaunchMoreOptions.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_MultiGameLaunchMoreOptions.cpp @@ -213,7 +213,7 @@ HRESULT CScene_MultiGameLaunchMoreOptions::OnNotifySetFocus( HXUIOBJ hObjSource, stringId = IDS_GAMEOPTION_RESET_NETHER; } - wstring wsText=app.GetString(stringId); + std::wstring wsText=app.GetString(stringId); int size = 14; if(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen()) { diff --git a/Minecraft.Client/Build/Common/XUI/XUI_MultiGameLaunchMoreOptions.h b/Minecraft.Client/Build/Common/XUI/XUI_MultiGameLaunchMoreOptions.h index 1e5ebd029..cdf17bd45 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_MultiGameLaunchMoreOptions.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_MultiGameLaunchMoreOptions.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../Media/xuiscene_multi_launch_more_options.h" class CScene_MultiGameLaunchMoreOptions : public CXuiSceneImpl diff --git a/Minecraft.Client/Build/Common/XUI/XUI_NewUpdateMessage.cpp b/Minecraft.Client/Build/Common/XUI/XUI_NewUpdateMessage.cpp index 41ac335d2..31d94b0e1 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_NewUpdateMessage.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_NewUpdateMessage.cpp @@ -17,11 +17,11 @@ HRESULT CScene_NewUpdateMessage::OnInit( XUIMessageInit* pInitData, BOOL& bHandl // set the text in the XuiHTMLMessage wchar_t formatting[40]; - wstring wstrTemp = app.GetString(IDS_TITLEUPDATE); + std::wstring wstrTemp = app.GetString(IDS_TITLEUPDATE); swprintf(formatting, 40, L"", m_bIsSD?12:14); wstrTemp = formatting + wstrTemp; - wstring wsText=app.FormatHTMLString(m_iPad,wstrTemp); + std::wstring wsText=app.FormatHTMLString(m_iPad,wstrTemp); m_HTMLText.SetText(wsText.c_str()); m_HTMLText.SetShow(TRUE); diff --git a/Minecraft.Client/Build/Common/XUI/XUI_PartnernetPassword.cpp b/Minecraft.Client/Build/Common/XUI/XUI_PartnernetPassword.cpp index a320fdf49..8d6fa1eb8 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_PartnernetPassword.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_PartnernetPassword.cpp @@ -37,7 +37,7 @@ HRESULT CScene_PartnernetPassword::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotif if(hObjPressed==m_OK) { // create the world and launch - wstring wPassword = m_PartnernetPassword.GetText(); + std::wstring wPassword = m_PartnernetPassword.GetText(); if(wPassword==L"5183") { app.NavigateBack(pNotifyPressData->UserIndex); diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_AbstractContainer.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Scene_AbstractContainer.cpp index 9c75520e9..1542df707 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_AbstractContainer.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_AbstractContainer.cpp @@ -306,7 +306,7 @@ void CXuiSceneAbstractContainer::GetItemScreenData( ESceneSection eSection, int } } -shared_ptr CXuiSceneAbstractContainer::getSlotItem(ESceneSection eSection, int iSlot) +std::shared_ptr CXuiSceneAbstractContainer::getSlotItem(ESceneSection eSection, int iSlot) { CXuiCtrlSlotItemListItem* pCXuiCtrlSlotItem; GetSectionSlotList( eSection )->GetCXuiCtrlSlotItem( iSlot, &( pCXuiCtrlSlotItem ) ); @@ -377,7 +377,7 @@ void CXuiSceneAbstractContainer::setFocusToPointer(int iPad) m_pointerControl->SetFocus( iPad ); } -void CXuiSceneAbstractContainer::SetPointerText(const wstring &description, vector &unformattedStrings, bool newSlot) +void CXuiSceneAbstractContainer::SetPointerText(const std::wstring &description, std::vector &unformattedStrings, bool newSlot) { if(description.empty()) { @@ -388,7 +388,7 @@ void CXuiSceneAbstractContainer::SetPointerText(const wstring &description, vect } bool smallPointer = m_bSplitscreen || (!RenderManager.IsHiDef() && !RenderManager.IsWidescreen()); - wstring desc = L"(smallPointer ? 12 :14) + L"\">" + description + L""; + std::wstring desc = L"(smallPointer ? 12 :14) + L"\">" + description + L""; XUIRect tempXuiRect, xuiRect; HRESULT hr; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_AbstractContainer.h b/Minecraft.Client/Build/Common/XUI/XUI_Scene_AbstractContainer.h index 6311032ee..11aa15786 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_AbstractContainer.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_AbstractContainer.h @@ -76,8 +76,8 @@ public: virtual void setSectionFocus(ESceneSection eSection, int iPad); void setSectionSelectedSlot(ESceneSection eSection, int x, int y); void setFocusToPointer(int iPad); - void SetPointerText(const wstring &description, vector &unformattedStrings, bool newSlot); - virtual shared_ptr getSlotItem(ESceneSection eSection, int iSlot); + void SetPointerText(const std::wstring &description, std::vector &unformattedStrings, bool newSlot); + virtual std::shared_ptr getSlotItem(ESceneSection eSection, int iSlot); virtual bool isSlotEmpty(ESceneSection eSection, int iSlot); virtual void adjustPointerForSafeZone(); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Anvil.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Anvil.cpp index 8f06d3119..8d585eab5 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Anvil.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Anvil.cpp @@ -83,23 +83,23 @@ HRESULT CXuiSceneAnvil::OnNotifyValueChanged (HXUIOBJ hObjSource, XUINotifyValue { if(hObjSource == m_editName) { - wstring newValue = m_editName.GetText(); + std::wstring newValue = m_editName.GetText(); LPCWSTR szText=newValue.c_str(); stripWhitespaceForHtml(newValue); // strip leading spaces - wstring b; + std::wstring b; int start = (int)newValue.find_first_not_of(L" "); int end = (int)newValue.find_last_not_of(L" "); - if( start == wstring::npos ) + if( start == std::wstring::npos ) { // the string is all space newValue=L""; } else { - if( end == wstring::npos ) end = (int)newValue.size()-1; + if( end == std::wstring::npos ) end = (int)newValue.size()-1; b = newValue.substr(start,(end-start)+1); newValue=b; } @@ -209,9 +209,9 @@ void CXuiSceneAnvil::handleEditNamePressed() //m_editName.RequestKeyboard(m_iPad); } -void CXuiSceneAnvil::setEditNameValue(const wstring &name) +void CXuiSceneAnvil::setEditNameValue(const std::wstring &name) { - wstring parsedName = parseXMLSpecials(name); + std::wstring parsedName = parseXMLSpecials(name); m_editName.SetText(parsedName.c_str()); m_editName.SetCaretPosition(parsedName.length()); } @@ -220,7 +220,7 @@ void CXuiSceneAnvil::setEditNameEditable(bool enabled) { } -void CXuiSceneAnvil::setCostLabel(const wstring &label, bool canAfford) +void CXuiSceneAnvil::setCostLabel(const std::wstring &label, bool canAfford) { if(canAfford) { diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Anvil.h b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Anvil.h index 0aaa1764a..b62d1edb9 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Anvil.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Anvil.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../Media/xuiscene_anvil.h" #include "XUI_Scene_AbstractContainer.h" #include "../UI/IUIScene_AnvilMenu.h" @@ -81,8 +81,8 @@ private: protected: virtual void handleEditNamePressed(); - virtual void setEditNameValue(const wstring &name); + virtual void setEditNameValue(const std::wstring &name); virtual void setEditNameEditable(bool enabled); - virtual void setCostLabel(const wstring &label, bool canAfford); + virtual void setCostLabel(const std::wstring &label, bool canAfford); virtual void showCross(bool show); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Base.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Base.cpp index a8e63aab6..fadfc3849 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Base.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Base.cpp @@ -215,7 +215,7 @@ void CXuiSceneBase::_TickAllBaseScenes() } else { - shared_ptr boss = EnderDragonRenderer::bossInstance; + std::shared_ptr boss = EnderDragonRenderer::bossInstance; EnderDragonRenderer::bossInstance = nullptr; m_ticksWithNoBoss = 0; @@ -1609,7 +1609,7 @@ HRESULT CXuiSceneBase::_DisplayGamertag( unsigned int iPad, BOOL bDisplay ) { if(Minecraft::GetInstance() != NULL && Minecraft::GetInstance()->localplayers[iPad]!=NULL) { - wstring wsGamertag = convStringToWstring( ProfileManager.GetGamertag(iPad)); + std::wstring wsGamertag = convStringToWstring( ProfileManager.GetGamertag(iPad)); XuiControlSetText(m_hGamerTagA[iPad],wsGamertag.c_str()); } @@ -1666,7 +1666,7 @@ HRESULT CXuiSceneBase::_DisplayGamertag( unsigned int iPad, BOOL bDisplay ) return S_OK; } -void CXuiSceneBase::_SetSelectedItem( unsigned int iPad, const wstring& name) +void CXuiSceneBase::_SetSelectedItem( unsigned int iPad, const std::wstring& name) { if(app.GetGameSettings(eGameSetting_Hints) == 0 || name.empty()) { @@ -2217,7 +2217,7 @@ HRESULT CXuiSceneBase::DisplayGamertag( unsigned int iPad, BOOL bDisplay ) return S_OK; } -void CXuiSceneBase::SetSelectedItem( unsigned int iPad, const wstring &name) +void CXuiSceneBase::SetSelectedItem( unsigned int iPad, const std::wstring &name) { CXuiSceneBase::Instance->_SetSelectedItem(iPad,name); } diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Base.h b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Base.h index a9aaa445a..3c3115e92 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Base.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Base.h @@ -364,7 +364,7 @@ private: HRESULT _PlayUISFX(ESoundEffect eSound); void _SetEmptyQuadrantLogo(int iPad,EBaseScenePosition ePos); HRESULT _DisplayGamertag( unsigned int iPad, BOOL bDisplay ); - void _SetSelectedItem( unsigned int iPad, const wstring& name); + void _SetSelectedItem( unsigned int iPad, const std::wstring& name); void _HideAllGameUIElements(); bool _GetBaseSceneSafeZone( unsigned int iPad, D3DXVECTOR2 &origin, float &width, float &height); @@ -420,7 +420,7 @@ public: static HRESULT PlayUISFX(ESoundEffect eSound); static void SetEmptyQuadrantLogo(int iSection); static HRESULT DisplayGamertag( unsigned int iPad, BOOL bDisplay ); - static void SetSelectedItem( unsigned int iPad, const wstring &name); + static void SetSelectedItem( unsigned int iPad, const std::wstring &name); static void HideAllGameUIElements(); // Returns details on the fully transformed (ie screen space) base scene position, adjusted for safe zones diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_BrewingStand.h b/Minecraft.Client/Build/Common/XUI/XUI_Scene_BrewingStand.h index 96b414650..b089f2af9 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_BrewingStand.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_BrewingStand.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../Media/xuiscene_brewingstand.h" #include "XUI_Scene_AbstractContainer.h" #include "../UI/IUIScene_BrewingMenu.h" diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Container.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Container.cpp index 3e4a6f72b..4a94a17a3 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Container.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Container.cpp @@ -35,7 +35,7 @@ HRESULT CXuiSceneContainer::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) ContainerMenu* menu = new ContainerMenu( initData->inventory, initData->container ); - shared_ptr container = initData->container; + std::shared_ptr container = initData->container; m_iPad=initData->iPad; m_bSplitscreen=initData->bSplitscreen; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_CraftingPanel.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Scene_CraftingPanel.cpp index 505b24aba..c53e5272f 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_CraftingPanel.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_CraftingPanel.cpp @@ -417,21 +417,21 @@ void CXuiSceneCraftingPanel::hideAllIngredientsSlots() } } -void CXuiSceneCraftingPanel::setCraftHSlotItem(int iPad, int iIndex, shared_ptr item, unsigned int uiAlpha) +void CXuiSceneCraftingPanel::setCraftHSlotItem(int iPad, int iIndex, std::shared_ptr item, unsigned int uiAlpha) { m_pHSlotsBrushImageControl[iIndex]->SetIcon(iPad, item, 9, uiAlpha, false); //m_pHSlotsBrushImageControl[iIndex]->SetPassThroughDataAssociation(MAKE_SLOTDISPLAY_ITEM_BITMASK(item->id,item->getAuxValue(),item->isFoil()),MAKE_SLOTDISPLAY_DATA_BITMASK (iPad, uiAlpha, false, item->GetCount(), 9,0) ); //m_pHSlotsBrushImageControl[iIndex]->SetShow(TRUE); } -void CXuiSceneCraftingPanel::setCraftVSlotItem(int iPad, int iIndex, shared_ptr item, unsigned int uiAlpha) +void CXuiSceneCraftingPanel::setCraftVSlotItem(int iPad, int iIndex, std::shared_ptr item, unsigned int uiAlpha) { m_pVSlotsBrushImageControl[iIndex]->SetIcon(iPad, item, 9, uiAlpha, false); //m_pVSlotsBrushImageControl[iIndex]->SetPassThroughDataAssociation(MAKE_SLOTDISPLAY_ITEM_BITMASK(item->id,item->getAuxValue(),item->isFoil()),MAKE_SLOTDISPLAY_DATA_BITMASK (iPad, uiAlpha, false, item->GetCount(), 9,0) ); //m_pVSlotsBrushImageControl[iIndex]->SetShow(TRUE); } -void CXuiSceneCraftingPanel::setCraftingOutputSlotItem(int iPad, shared_ptr item) +void CXuiSceneCraftingPanel::setCraftingOutputSlotItem(int iPad, std::shared_ptr item) { if(item == NULL) { @@ -448,7 +448,7 @@ void CXuiSceneCraftingPanel::setCraftingOutputSlotRedBox(bool show) m_pCraftingOutput->SetRedBox(show?TRUE:FALSE); } -void CXuiSceneCraftingPanel::setIngredientSlotItem(int iPad, int index, shared_ptr item) +void CXuiSceneCraftingPanel::setIngredientSlotItem(int iPad, int index, std::shared_ptr item) { if(item == NULL) { @@ -465,7 +465,7 @@ void CXuiSceneCraftingPanel::setIngredientSlotRedBox(int index, bool show) m_pCraftingIngredientA[index]->SetRedBox(show?TRUE:FALSE); } -void CXuiSceneCraftingPanel::setIngredientDescriptionItem(int iPad, int index, shared_ptr item) +void CXuiSceneCraftingPanel::setIngredientDescriptionItem(int iPad, int index, std::shared_ptr item) { m_pCraftIngredientDescA[index]->SetIcon(iPad, item->id,item->getAuxValue(),item->GetCount(),8,31,TRUE,item->isFoil(),FALSE); } diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_CraftingPanel.h b/Minecraft.Client/Build/Common/XUI/XUI_Scene_CraftingPanel.h index 5eec55653..ff93c0a42 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_CraftingPanel.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_CraftingPanel.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../media/xuiscene_craftingpanel_2x2.h" #include "XUI_Ctrl_MinecraftSlot.h" @@ -182,13 +182,13 @@ protected: virtual void hideAllHSlots(); virtual void hideAllVSlots(); virtual void hideAllIngredientsSlots(); - virtual void setCraftHSlotItem(int iPad, int iIndex, shared_ptr item, unsigned int uiAlpha); - virtual void setCraftVSlotItem(int iPad, int iIndex, shared_ptr item, unsigned int uiAlpha); - virtual void setCraftingOutputSlotItem(int iPad, shared_ptr item); + virtual void setCraftHSlotItem(int iPad, int iIndex, std::shared_ptr item, unsigned int uiAlpha); + virtual void setCraftVSlotItem(int iPad, int iIndex, std::shared_ptr item, unsigned int uiAlpha); + virtual void setCraftingOutputSlotItem(int iPad, std::shared_ptr item); virtual void setCraftingOutputSlotRedBox(bool show); - virtual void setIngredientSlotItem(int iPad, int index, shared_ptr item); + virtual void setIngredientSlotItem(int iPad, int index, std::shared_ptr item); virtual void setIngredientSlotRedBox(int index, bool show); - virtual void setIngredientDescriptionItem(int iPad, int index, shared_ptr item); + virtual void setIngredientDescriptionItem(int iPad, int index, std::shared_ptr item); virtual void setIngredientDescriptionRedBox(int index, bool show); virtual void setIngredientDescriptionText(int index, LPCWSTR text); virtual void setShowCraftHSlot(int iIndex, bool show); diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Enchant.h b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Enchant.h index 038f5dd0f..8bc0dfdf1 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Enchant.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Enchant.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../Media/xuiscene_enchant.h" diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Furnace.h b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Furnace.h index 8c965e8bf..6c0930d12 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Furnace.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Furnace.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../Media/xuiscene_furnace.h" #include "XUI_Scene_AbstractContainer.h" #include "../UI/IUIScene_FurnaceMenu.h" diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory.cpp index debbdd2c2..702ce9f54 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory.cpp @@ -154,11 +154,11 @@ void CXuiSceneInventory::updateEffectsDisplay() { // Update with the current effects Minecraft *pMinecraft = Minecraft::GetInstance(); - shared_ptr player = pMinecraft->localplayers[m_iPad]; + std::shared_ptr player = pMinecraft->localplayers[m_iPad]; if(player == NULL) return; - vector *activeEffects = player->getActiveEffects(); + std::vector *activeEffects = player->getActiveEffects(); // Work out how to arrange the effects int effectCount = (int)activeEffects->size(); @@ -194,10 +194,10 @@ void CXuiSceneInventory::updateEffectsDisplay() m_hEffectDisplayA[i]->setIcon(mobEffect->getIcon()); } - wstring effectString = app.GetString( effect->getDescriptionId() );//I18n.get(effect.getDescriptionId()).trim(); + std::wstring effectString = app.GetString( effect->getDescriptionId() );//I18n.get(effect.getDescriptionId()).trim(); if (effect->getAmplifier() > 0) { - wstring potencyString = L""; + std::wstring potencyString = L""; switch(effect->getAmplifier()) { case 1: @@ -220,7 +220,7 @@ void CXuiSceneInventory::updateEffectsDisplay() } m_hEffectDisplayA[i]->setName(effectString); - wstring durationString = MobEffect::formatDuration(effect); + std::wstring durationString = MobEffect::formatDuration(effect); m_hEffectDisplayA[i]->setDuration(durationString); ++it; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory.h b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory.h index 6cccad7fa..9fb452b47 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../Media/xuiscene_inventory.h" #include "XUI_Scene_AbstractContainer.h" #include "XUI_CustomMessages.h" diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory_Creative.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory_Creative.cpp index 7b29096f7..f6038cbae 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory_Creative.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory_Creative.cpp @@ -60,7 +60,7 @@ HRESULT CXuiSceneInventoryCreative::OnInit( XUIMessageInit *pInitData, BOOL &bHa initData->player->awardStat(GenericStats::openInventory(), GenericStats::param_noArgs()); // 4J JEV - Item Picker Menu - shared_ptr creativeContainer = shared_ptr(new SimpleContainer( 0, TabSpec::MAX_SIZE + 9 )); + std::shared_ptr creativeContainer = std::shared_ptr(new SimpleContainer( 0, TabSpec::MAX_SIZE + 9 )); itemPickerMenu = new ItemPickerMenu(creativeContainer, initData->player->inventory); // 4J JEV - InitDataAssociations. @@ -176,7 +176,7 @@ void CXuiSceneInventoryCreative::updateTabHighlightAndText(ECreativeInventoryTab } m_hTabGroupA[tab].SetShow(TRUE); - wstring wsText=app.GetString(specs[tab]->m_descriptionId); + std::wstring wsText=app.GetString(specs[tab]->m_descriptionId); m_GroupDescription.SetText(wsText.c_str()); m_GroupDescription.SetShow(TRUE); } diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory_Creative.h b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory_Creative.h index d8e2f5733..60fc45ed5 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory_Creative.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Inventory_Creative.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../Media/xuiscene_inventory_creative.h" #include "XUI_Scene_AbstractContainer.h" diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Trading.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Trading.cpp index 0b863e4a2..192b04fef 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Trading.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Trading.cpp @@ -215,17 +215,17 @@ void CXuiSceneTrading::moveSelector(bool right) m_tradingSelector.SetPosition(&vec); } -void CXuiSceneTrading::setTitle(const wstring &name) +void CXuiSceneTrading::setTitle(const std::wstring &name) { XuiControlSetText(m_villagerText,name.c_str()); } -void CXuiSceneTrading::setRequest1Name(const wstring &name) +void CXuiSceneTrading::setRequest1Name(const std::wstring &name) { m_request1Label.SetText(name.c_str()); } -void CXuiSceneTrading::setRequest2Name(const wstring &name) +void CXuiSceneTrading::setRequest2Name(const std::wstring &name) { m_request2Label.SetText(name.c_str()); } @@ -245,22 +245,22 @@ void CXuiSceneTrading::setTradeRedBox(int index, bool show) m_tradeHSlots[index]->SetRedBox(show?TRUE:FALSE); } -void CXuiSceneTrading::setRequest1Item(shared_ptr item) +void CXuiSceneTrading::setRequest1Item(std::shared_ptr item) { m_request1Control->SetIcon(getPad(), item, 12, 31, true); } -void CXuiSceneTrading::setRequest2Item(shared_ptr item) +void CXuiSceneTrading::setRequest2Item(std::shared_ptr item) { m_request2Control->SetIcon(getPad(), item, 12, 31, true); } -void CXuiSceneTrading::setTradeItem(int index, shared_ptr item) +void CXuiSceneTrading::setTradeItem(int index, std::shared_ptr item) { m_tradeHSlots[index]->SetIcon(getPad(), item, 12, 31, true); } -void CXuiSceneTrading::setOfferDescription(const wstring &name, vector &unformattedStrings) +void CXuiSceneTrading::setOfferDescription(const std::wstring &name, std::vector &unformattedStrings) { if(name.empty()) { @@ -270,7 +270,7 @@ void CXuiSceneTrading::setOfferDescription(const wstring &name, vector } bool smallPointer = m_bSplitscreen || (!RenderManager.IsHiDef() && !RenderManager.IsWidescreen()); - wstring desc = L"(smallPointer ? 12 :14) + L"\">" + name + L""; + std::wstring desc = L"(smallPointer ? 12 :14) + L"\">" + name + L""; XUIRect tempXuiRect, xuiRect; HRESULT hr; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Trading.h b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Trading.h index 5916f713c..fe6022951 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Trading.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Trading.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../Media/xuiscene_trading.h" #include "../UI/IUIScene_TradingMenu.h" @@ -112,17 +112,17 @@ protected: virtual void showScrollRightArrow(bool show); virtual void showScrollLeftArrow(bool show); virtual void moveSelector(bool right); - virtual void setRequest1Name(const wstring &name); - virtual void setRequest2Name(const wstring &name); - virtual void setTitle(const wstring &name); + virtual void setRequest1Name(const std::wstring &name); + virtual void setRequest2Name(const std::wstring &name); + virtual void setTitle(const std::wstring &name); virtual void setRequest1RedBox(bool show); virtual void setRequest2RedBox(bool show); virtual void setTradeRedBox(int index, bool show); - virtual void setRequest1Item(shared_ptr item); - virtual void setRequest2Item(shared_ptr item); - virtual void setTradeItem(int index, shared_ptr item); + virtual void setRequest1Item(std::shared_ptr item); + virtual void setRequest2Item(std::shared_ptr item); + virtual void setTradeItem(int index, std::shared_ptr item); - virtual void setOfferDescription(const wstring &name, vector &unformattedStrings); + virtual void setOfferDescription(const std::wstring &name, std::vector &unformattedStrings); }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Trap.h b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Trap.h index 233825afc..9a6119f1a 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Trap.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Trap.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../Media/xuiscene_trap.h" #include "XUI_Scene_AbstractContainer.h" #include "../UI/IUIScene_DispenserMenu.h" diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Win.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Win.cpp index 1235c13e8..0144074bb 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Win.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Win.cpp @@ -30,7 +30,7 @@ HRESULT CScene_Win::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) // Display the tooltips ui.SetTooltips( m_iPad, -1, IDS_TOOLTIPS_CONTINUE); - wstring halfScreenLineBreaks; + std::wstring halfScreenLineBreaks; if(RenderManager.IsHiDef()) { @@ -81,7 +81,7 @@ HRESULT CScene_Win::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) m_htmlControl.SetText(noiseString.c_str()); - //wstring result = m_htmlControl.GetText(); + //std::wstring result = m_htmlControl.GetText(); //wcout << result.c_str(); @@ -197,13 +197,13 @@ void CScene_Win::updateNoise() int length = 0; wchar_t replacements[64]; - wstring replaceString = L""; + std::wstring replaceString = L""; wchar_t randomChar = L'a'; Random *random = pMinecraft->font->random; bool darken = false; - wstring tag = L"{*NOISE*}"; + std::wstring tag = L"{*NOISE*}"; AUTO_VAR(it, m_noiseLengths.begin()); int found=(int)noiseString.find_first_of(L"{"); @@ -217,7 +217,7 @@ void CScene_Win::updateNoise() { randomChar = SharedConstants::acceptableLetters[random->nextInt((int)SharedConstants::acceptableLetters.length())]; - wstring randomCharStr = L""; + std::wstring randomCharStr = L""; randomCharStr.push_back(randomChar); if(randomChar == L'<') { diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Win.h b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Win.h index 7a5e9da09..a498cd316 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Scene_Win.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Scene_Win.h @@ -44,11 +44,11 @@ private: bool m_bIgnoreInput; int m_iPad; D3DXVECTOR3 m_OriginalPosition; - wstring noNoiseString; - wstring noiseString; + std::wstring noNoiseString; + std::wstring noiseString; int m_scrollDir; - vector m_noiseLengths; + std::vector m_noiseLengths; void updateNoise(); diff --git a/Minecraft.Client/Build/Common/XUI/XUI_SettingsOptions.cpp b/Minecraft.Client/Build/Common/XUI/XUI_SettingsOptions.cpp index b9ae1f973..758eef3d9 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_SettingsOptions.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_SettingsOptions.cpp @@ -80,7 +80,7 @@ HRESULT CScene_SettingsOptions::OnInit( XUIMessageInit* pInitData, BOOL& bHandle m_SliderA[SLIDER_SETTINGS_DIFFICULTY].SetText(TempString); - wstring wsText=app.GetString(m_iDifficultySettingA[app.GetGameSettings(m_iPad,eGameSetting_Difficulty)]); + std::wstring wsText=app.GetString(m_iDifficultySettingA[app.GetGameSettings(m_iPad,eGameSetting_Difficulty)]); int size = 14; if(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen()) { @@ -138,7 +138,7 @@ HRESULT CScene_SettingsOptions::OnInit( XUIMessageInit* pInitData, BOOL& bHandle } else { - wstring wsText=app.GetString(m_iDifficultySettingA[app.GetGameSettings(m_iPad,eGameSetting_Difficulty)]); + std::wstring wsText=app.GetString(m_iDifficultySettingA[app.GetGameSettings(m_iPad,eGameSetting_Difficulty)]); int size = 14; if(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen()) { @@ -284,7 +284,7 @@ HRESULT CScene_SettingsOptions::OnNotifyValueChanged( HXUIOBJ hObjSource, XUINot swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[pNotifyValueChanged->nValue])); m_SliderA[SLIDER_SETTINGS_DIFFICULTY].SetText(TempString); - wstring wsText=app.GetString(m_iDifficultySettingA[pNotifyValueChanged->nValue]); + std::wstring wsText=app.GetString(m_iDifficultySettingA[pNotifyValueChanged->nValue]); int size = 14; if(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen()) { diff --git a/Minecraft.Client/Build/Common/XUI/XUI_SignEntry.cpp b/Minecraft.Client/Build/Common/XUI/XUI_SignEntry.cpp index 5a7e9cde2..f84e4281d 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_SignEntry.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_SignEntry.cpp @@ -64,7 +64,7 @@ HRESULT CScene_SignEntry::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* p // Set the sign text here so we on;y call the verify once it has been set, not while we're typing in to it for(int i=0;i<4;i++) { - wstring temp=m_signRows[i].GetText(); + std::wstring temp=m_signRows[i].GetText(); m_sign->SetMessage(i,temp); } @@ -74,10 +74,10 @@ HRESULT CScene_SignEntry::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* p // need to send the new data if (pMinecraft->level->isClientSide) { - shared_ptr player = pMinecraft->localplayers[pNotifyPressData->UserIndex]; + std::shared_ptr player = pMinecraft->localplayers[pNotifyPressData->UserIndex]; if(player != NULL && player->connection && player->connection->isStarted()) { - player->connection->send( shared_ptr( new SignUpdatePacket(m_sign->x, m_sign->y, m_sign->z, m_sign->IsVerified(), m_sign->IsCensored(), m_sign->GetMessages()) ) ); + player->connection->send( std::shared_ptr( new SignUpdatePacket(m_sign->x, m_sign->y, m_sign->z, m_sign->IsVerified(), m_sign->IsCensored(), m_sign->GetMessages()) ) ); } } app.CloseXuiScenes(pNotifyPressData->UserIndex); @@ -94,7 +94,7 @@ HRESULT CScene_SignEntry::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled case VK_PAD_B: case VK_ESCAPE: // user backed out, so wipe the sign - wstring temp=L""; + std::wstring temp=L""; for(int i=0;i<4;i++) { diff --git a/Minecraft.Client/Build/Common/XUI/XUI_SignEntry.h b/Minecraft.Client/Build/Common/XUI/XUI_SignEntry.h index 4f8c44d26..c8d5aae28 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_SignEntry.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_SignEntry.h @@ -43,7 +43,7 @@ public: XUI_IMPLEMENT_CLASS( CScene_SignEntry, L"CScene_SignEntry", XUI_CLASS_SCENE ) private: - shared_ptr m_sign; + std::shared_ptr m_sign; D3DXVECTOR3 m_OriginalPosition; }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/XUI/XUI_SkinSelect.cpp b/Minecraft.Client/Build/Common/XUI/XUI_SkinSelect.cpp index d3275680e..9114b553f 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_SkinSelect.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_SkinSelect.cpp @@ -622,8 +622,8 @@ void CScene_SkinSelect::handleSkinIndexChanged() { BOOL showPrevious = FALSE, showNext = FALSE; DWORD previousIndex = 0, nextIndex = 0; - wstring skinName = L""; - wstring skinOrigin = L""; + std::wstring skinName = L""; + std::wstring skinOrigin = L""; bool bSkinIsFree=false; bool bLicensed=false; DLCSkinFile *skinFile=NULL; @@ -752,7 +752,7 @@ void CScene_SkinSelect::handleSkinIndexChanged() if(m_vAdditionalSkinBoxes && m_vAdditionalSkinBoxes->size()!=0) { // add the boxes to the humanoid model, but only if we've not done this already - vector *pAdditionalModelParts = app.GetAdditionalModelParts(skinFile->getSkinID()); + std::vector *pAdditionalModelParts = app.GetAdditionalModelParts(skinFile->getSkinID()); if(pAdditionalModelParts==NULL) { pAdditionalModelParts = app.SetAdditionalSkinBoxes(skinFile->getSkinID(),m_vAdditionalSkinBoxes); @@ -772,9 +772,9 @@ void CScene_SkinSelect::handleSkinIndexChanged() nextIndex = getNextSkinIndex(m_skinIndex); previousIndex = getPreviousSkinIndex(m_skinIndex); - wstring otherSkinPath = L""; - wstring otherCapePath = L""; - vector *othervAdditionalSkinBoxes=NULL; + std::wstring otherSkinPath = L""; + std::wstring otherCapePath = L""; + std::vector *othervAdditionalSkinBoxes=NULL; wchar_t chars[256]; // turn off all displays @@ -866,7 +866,7 @@ void CScene_SkinSelect::handleSkinIndexChanged() } if(othervAdditionalSkinBoxes && othervAdditionalSkinBoxes->size()!=0) { - vector *pAdditionalModelParts = app.GetAdditionalModelParts(skinFile->getSkinID()); + std::vector *pAdditionalModelParts = app.GetAdditionalModelParts(skinFile->getSkinID()); if(pAdditionalModelParts==NULL) { pAdditionalModelParts = app.SetAdditionalSkinBoxes(skinFile->getSkinID(),othervAdditionalSkinBoxes); @@ -938,7 +938,7 @@ void CScene_SkinSelect::handleSkinIndexChanged() } if(othervAdditionalSkinBoxes && othervAdditionalSkinBoxes->size()!=0) { - vector *pAdditionalModelParts = app.GetAdditionalModelParts(skinFile->getSkinID()); + std::vector *pAdditionalModelParts = app.GetAdditionalModelParts(skinFile->getSkinID()); if(pAdditionalModelParts==NULL) { pAdditionalModelParts = app.SetAdditionalSkinBoxes(skinFile->getSkinID(),othervAdditionalSkinBoxes); diff --git a/Minecraft.Client/Build/Common/XUI/XUI_SkinSelect.h b/Minecraft.Client/Build/Common/XUI/XUI_SkinSelect.h index 4c2e062ad..9b1f41d04 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_SkinSelect.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_SkinSelect.h @@ -109,9 +109,9 @@ protected: int m_iPad; D3DXVECTOR3 m_OriginalPosition; - wstring m_currentSkinPath, m_selectedSkinPath, m_selectedCapePath; - vector *m_vAdditionalSkinBoxes; - //vector *m_vAdditionalModelParts; + std::wstring m_currentSkinPath, m_selectedSkinPath, m_selectedCapePath; + std::vector *m_vAdditionalSkinBoxes; + //std::vector *m_vAdditionalModelParts; DWORD m_originalSkinId; DLCPack *m_currentPack; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_SocialPost.cpp b/Minecraft.Client/Build/Common/XUI/XUI_SocialPost.cpp index 1a0214cac..73730e98a 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_SocialPost.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_SocialPost.cpp @@ -44,8 +44,8 @@ HRESULT CScene_SocialPost::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) m_EditCaption.SetTitleAndText(IDS_NAME_CAPTION,IDS_NAME_CAPTION_TEXT); m_EditDesc.SetTitleAndText(IDS_NAME_DESC,IDS_NAME_DESC_TEXT); - wstring wCaption = m_EditCaption.GetText(); - wstring wDesc = m_EditDesc.GetText(); + std::wstring wCaption = m_EditCaption.GetText(); + std::wstring wDesc = m_EditDesc.GetText(); // set the caret to the end of the default text m_EditCaption.SetCaretPosition((int)wCaption.length()); @@ -67,16 +67,16 @@ HRESULT CScene_SocialPost::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) HRESULT CScene_SocialPost::OnNotifyValueChanged (HXUIOBJ hObjSource, XUINotifyValueChanged* pValueChangedData, BOOL& rfHandled) -{ wstring wCaption = m_EditCaption.GetText(); -wstring wDesc = m_EditDesc.GetText(); +{ std::wstring wCaption = m_EditCaption.GetText(); +std::wstring wDesc = m_EditDesc.GetText(); if(/*(hObjSource == m_EditTitle) || */(hObjSource == m_EditCaption) || (hObjSource == m_EditDesc)) { // Enable the done button when we have all of the necessary information - //wstring wTitle = m_EditTitle.GetText(); - wstring wCaption = m_EditCaption.GetText(); - wstring wDesc = m_EditDesc.GetText(); + //std::wstring wTitle = m_EditTitle.GetText(); + std::wstring wCaption = m_EditCaption.GetText(); + std::wstring wDesc = m_EditDesc.GetText(); BOOL bHasAllText = /*( wTitle.length()!=0) &&*/ (wCaption.length()!=0) && (wDesc.length()!=0); m_OK.SetEnable(bHasAllText); diff --git a/Minecraft.Client/Build/Common/XUI/XUI_SocialPost.h b/Minecraft.Client/Build/Common/XUI/XUI_SocialPost.h index 5d39e41eb..24b6f7e6d 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_SocialPost.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_SocialPost.h @@ -13,7 +13,7 @@ class CScene_SocialPost : public CXuiSceneImpl CXuiCtrl4JEdit m_EditCaption; CXuiCtrl4JEdit m_EditDesc; CXuiControl m_text, m_LabelCaption, m_LabelDescription; - wstring m_wTitle; + std::wstring m_wTitle; // Message map. Here we tie messages to message handlers. XUI_BEGIN_MSG_MAP() diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Teleport.cpp b/Minecraft.Client/Build/Common/XUI/XUI_Teleport.cpp index 40e1384cf..9b7c445e5 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Teleport.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_Teleport.cpp @@ -108,7 +108,7 @@ HRESULT CScene_Teleport::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pN INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId( m_players[ playersList.GetCurSel() ] ); INetworkPlayer *thisPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(m_iPad); - shared_ptr packet; + std::shared_ptr packet; if(m_teleportToPlayer) { packet = TeleportCommand::preparePacket(thisPlayer->GetUID(),selectedPlayer->GetUID()); diff --git a/Minecraft.Client/Build/Common/XUI/XUI_Teleport.h b/Minecraft.Client/Build/Common/XUI/XUI_Teleport.h index cf60eab0d..49543af61 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_Teleport.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_Teleport.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; #include "../media/xuiscene_teleportmenu.h" #include "XUI_CustomMessages.h" diff --git a/Minecraft.Client/Build/Common/XUI/XUI_TextEntry.cpp b/Minecraft.Client/Build/Common/XUI/XUI_TextEntry.cpp index 6a7caeb0c..4c4c763fc 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_TextEntry.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_TextEntry.cpp @@ -56,7 +56,7 @@ HRESULT CScene_TextEntry::OnNotifyValueChanged (HXUIOBJ hObjSource, XUINotifyVal if(pText) { - wstring wText = pText; + std::wstring wText = pText; InterpretString(wText); } @@ -80,7 +80,7 @@ HRESULT CScene_TextEntry::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled if(pText) { - wstring wText = pText; + std::wstring wText = pText; InterpretString(wText); } @@ -99,9 +99,9 @@ HRESULT CScene_TextEntry::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled return S_OK; } -HRESULT CScene_TextEntry::InterpretString(wstring &wsText) +HRESULT CScene_TextEntry::InterpretString(std::wstring &wsText) { - wstring wsFormat; + std::wstring wsFormat; WCHAR wchCommand[40]; int iCommand=-1; WCHAR wchSep[2]; @@ -158,7 +158,7 @@ HRESULT CScene_TextEntry::InterpretString(wstring &wsText) app.DebugPrintf("eCommand_Give, item=%d count=%d\n",iItem,iCount); Minecraft *pMinecraft=Minecraft::GetInstance(); for(int i=0;ilocalplayers[m_iPad]->drop(); // shared_ptr(new ItemInstance( iItem, 1, 0 )) ); + pMinecraft->localplayers[m_iPad]->drop(); // std::shared_ptr(new ItemInstance( iItem, 1, 0 )) ); } break; diff --git a/Minecraft.Client/Build/Common/XUI/XUI_TextEntry.h b/Minecraft.Client/Build/Common/XUI/XUI_TextEntry.h index 884ec678e..f7a865234 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_TextEntry.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_TextEntry.h @@ -48,7 +48,7 @@ protected: HRESULT OnNotifyValueChanged (HXUIOBJ hObjSource, XUINotifyValueChanged* pValueChangedData, BOOL& rfHandled); HRESULT OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled); - HRESULT InterpretString(wstring &wsText); + HRESULT InterpretString(std::wstring &wsText); HRESULT Init_Commands(); public: @@ -60,5 +60,5 @@ private: int m_iPad; WCHAR m_wchInitialChar; static CommandParams CommandA[eCommand_MAX]; - unordered_map m_CommandSet; + std::unordered_map m_CommandSet; }; \ No newline at end of file diff --git a/Minecraft.Client/Build/Common/XUI/XUI_TransferToXboxOne.h b/Minecraft.Client/Build/Common/XUI/XUI_TransferToXboxOne.h index dc80495cf..300d187c2 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_TransferToXboxOne.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_TransferToXboxOne.h @@ -1,5 +1,5 @@ #pragma once -using namespace std; +//using namespace std; //#include #include "../Media/xuiscene_TransferToXboxOne.h" diff --git a/Minecraft.Client/Build/Common/XUI/XUI_TutorialPopup.cpp b/Minecraft.Client/Build/Common/XUI/XUI_TutorialPopup.cpp index 7a0926d0c..68e74ade1 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_TutorialPopup.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_TutorialPopup.cpp @@ -171,7 +171,7 @@ HRESULT CScene_TutorialPopup::_SetDescription(CXuiScene *interactScene, LPCWSTR if(isReminder) { - wstring text(app.GetString( IDS_TUTORIAL_REMINDER )); + std::wstring text(app.GetString( IDS_TUTORIAL_REMINDER )); text.append( desc ); // set the text colour wchar_t formatting[40]; @@ -182,7 +182,7 @@ HRESULT CScene_TutorialPopup::_SetDescription(CXuiScene *interactScene, LPCWSTR } else { - wstring text(desc); + std::wstring text(desc); // set the text colour wchar_t formatting[40]; swprintf(formatting, 40, L"",app.GetHTMLColour(eHTMLColor_White),m_textFontSize); @@ -264,7 +264,7 @@ HRESULT CScene_TutorialPopup::SetDescription(int iPad, TutorialPopupInfo *info) if (FAILED(hr)) return hr; - wstring parsed = pThis->_SetIcon(info->icon, info->iAuxVal, info->isFoil, info->desc); + std::wstring parsed = pThis->_SetIcon(info->icon, info->iAuxVal, info->isFoil, info->desc); parsed = pThis->_SetImage( parsed ); parsed = CScene_TutorialPopup::ParseDescription(iPad, parsed); if(parsed.empty()) @@ -280,24 +280,24 @@ HRESULT CScene_TutorialPopup::SetDescription(int iPad, TutorialPopupInfo *info) return hr; } -wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWSTR desc) +std::wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWSTR desc) { - wstring temp(desc); + std::wstring temp(desc); BOOL iconShowAtStart = m_pCraftingPic->IsShown(); if( icon != TUTORIAL_NO_ICON ) { bool itemIsFoil = false; - itemIsFoil = (shared_ptr(new ItemInstance(icon,1,iAuxVal)))->isFoil(); + itemIsFoil = (std::shared_ptr(new ItemInstance(icon,1,iAuxVal)))->isFoil(); if(!itemIsFoil) itemIsFoil = isFoil; m_pCraftingPic->SetIcon(m_iPad, icon,iAuxVal,1,10,31,false,itemIsFoil); } else { - wstring openTag(L"{*ICON*}"); - wstring closeTag(L"{*/ICON*}"); + std::wstring openTag(L"{*ICON*}"); + std::wstring closeTag(L"{*/ICON*}"); int iconTagStartPos = (int)temp.find(openTag); int iconStartPos = iconTagStartPos + (int)openTag.length(); if( iconTagStartPos > 0 && iconStartPos < (int)temp.length() ) @@ -306,9 +306,9 @@ wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWS if(iconEndPos > iconStartPos && iconEndPos < (int)temp.length() ) { - wstring id = temp.substr(iconStartPos, iconEndPos - iconStartPos); + std::wstring id = temp.substr(iconStartPos, iconEndPos - iconStartPos); - vector idAndAux = stringSplit(id,L':'); + std::vector idAndAux = stringSplit(id,L':'); int iconId = _fromString(idAndAux[0]); @@ -322,7 +322,7 @@ wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWS } bool itemIsFoil = false; - itemIsFoil = (shared_ptr(new ItemInstance(iconId,1,iAuxVal)))->isFoil(); + itemIsFoil = (std::shared_ptr(new ItemInstance(iconId,1,iAuxVal)))->isFoil(); if(!itemIsFoil) itemIsFoil = isFoil; m_pCraftingPic->SetIcon(m_iPad, iconId,iAuxVal,1,10,31,false,itemIsFoil); @@ -332,75 +332,75 @@ wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWS } // remove any icon text - else if(temp.find(L"{*CraftingTableIcon*}")!=wstring::npos) + else if(temp.find(L"{*CraftingTableIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Tile::workBench->id,0,1,10,31,false); } - else if(temp.find(L"{*SticksIcon*}")!=wstring::npos) + else if(temp.find(L"{*SticksIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Item::stick->id,0,1,10,31,false); } - else if(temp.find(L"{*PlanksIcon*}")!=wstring::npos) + else if(temp.find(L"{*PlanksIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Tile::wood->id,0,1,10,31,false); } - else if(temp.find(L"{*WoodenShovelIcon*}")!=wstring::npos) + else if(temp.find(L"{*WoodenShovelIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Item::shovel_wood->id,0,1,10,31,false); } - else if(temp.find(L"{*WoodenHatchetIcon*}")!=wstring::npos) + else if(temp.find(L"{*WoodenHatchetIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Item::hatchet_wood->id,0,1,10,31,false); } - else if(temp.find(L"{*WoodenPickaxeIcon*}")!=wstring::npos) + else if(temp.find(L"{*WoodenPickaxeIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Item::pickAxe_wood->id,0,1,10,31,false); } - else if(temp.find(L"{*FurnaceIcon*}")!=wstring::npos) + else if(temp.find(L"{*FurnaceIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Tile::furnace_Id,0,1,10,31,false); } - else if(temp.find(L"{*WoodenDoorIcon*}")!=wstring::npos) + else if(temp.find(L"{*WoodenDoorIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Item::door_wood->id,0,1,10,31,false); } - else if(temp.find(L"{*TorchIcon*}")!=wstring::npos) + else if(temp.find(L"{*TorchIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Tile::torch_Id,0,1,10,31,false); } - else if(temp.find(L"{*BoatIcon*}")!=wstring::npos) + else if(temp.find(L"{*BoatIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Item::boat_Id,0,1,10,31,false); } - else if(temp.find(L"{*FishingRodIcon*}")!=wstring::npos) + else if(temp.find(L"{*FishingRodIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Item::fishingRod_Id,0,1,10,31,false); } - else if(temp.find(L"{*FishIcon*}")!=wstring::npos) + else if(temp.find(L"{*FishIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Item::fish_raw_Id,0,1,10,31,false); } - else if(temp.find(L"{*MinecartIcon*}")!=wstring::npos) + else if(temp.find(L"{*MinecartIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Item::minecart_Id,0,1,10,31,false); } - else if(temp.find(L"{*RailIcon*}")!=wstring::npos) + else if(temp.find(L"{*RailIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Tile::rail_Id,0,1,10,31,false); } - else if(temp.find(L"{*PoweredRailIcon*}")!=wstring::npos) + else if(temp.find(L"{*PoweredRailIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Tile::goldenRail_Id,0,1,10,31,false); } - else if(temp.find(L"{*StructuresIcon*}")!=wstring::npos) + else if(temp.find(L"{*StructuresIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, XZP_ICON_STRUCTURES,0,1,10,31,false); } - else if(temp.find(L"{*ToolsIcon*}")!=wstring::npos) + else if(temp.find(L"{*ToolsIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, XZP_ICON_TOOLS,0,1,10,31,false); } - else if(temp.find(L"{*StoneIcon*}")!=wstring::npos) + else if(temp.find(L"{*StoneIcon*}")!=std::wstring::npos) { m_pCraftingPic->SetIcon(m_iPad, Tile::rock_Id,0,1,10,31,false); } @@ -436,13 +436,13 @@ wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWS return temp; } -wstring CScene_TutorialPopup::_SetImage(wstring &desc) +std::wstring CScene_TutorialPopup::_SetImage(std::wstring &desc) { BOOL imageShowAtStart = m_image.IsShown(); - wstring openTag(L"{*IMAGE*}"); - wstring closeTag(L"{*/IMAGE*}"); + std::wstring openTag(L"{*IMAGE*}"); + std::wstring closeTag(L"{*/IMAGE*}"); int imageTagStartPos = (int)desc.find(openTag); int imageStartPos = imageTagStartPos + (int)openTag.length(); if( imageTagStartPos > 0 && imageStartPos < (int)desc.length() ) @@ -451,7 +451,7 @@ wstring CScene_TutorialPopup::_SetImage(wstring &desc) if(imageEndPos > imageStartPos && imageEndPos < (int)desc.length() ) { - wstring id = desc.substr(imageStartPos, imageEndPos - imageStartPos); + std::wstring id = desc.substr(imageStartPos, imageEndPos - imageStartPos); m_image.SetImagePath( id.c_str() ); m_image.SetShow( TRUE ); @@ -490,7 +490,7 @@ wstring CScene_TutorialPopup::_SetImage(wstring &desc) } -wstring CScene_TutorialPopup::ParseDescription(int iPad, wstring &text) +std::wstring CScene_TutorialPopup::ParseDescription(int iPad, std::wstring &text) { text = replaceAll(text, L"{*CraftingTableIcon*}", L""); text = replaceAll(text, L"{*SticksIcon*}", L""); diff --git a/Minecraft.Client/Build/Common/XUI/XUI_TutorialPopup.h b/Minecraft.Client/Build/Common/XUI/XUI_TutorialPopup.h index 657167594..fc2124131 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_TutorialPopup.h +++ b/Minecraft.Client/Build/Common/XUI/XUI_TutorialPopup.h @@ -62,15 +62,15 @@ public: private: HRESULT _SetDescription(CXuiScene *interactScene, LPCWSTR desc, LPCWSTR title, bool allowFade, bool isReminder); - wstring _SetIcon(int icon, int iAuxVal, bool isFoil, LPCWSTR desc); - wstring _SetImage(wstring &desc); + std::wstring _SetIcon(int icon, int iAuxVal, bool isFoil, LPCWSTR desc); + std::wstring _SetImage(std::wstring &desc); HRESULT _SetVisible(bool show); bool _IsSceneVisible(); void UpdateInteractScenePosition(bool visible); public: static HRESULT SetDescription(int iPad, TutorialPopupInfo *info); - static wstring ParseDescription(int iPad, wstring &text); + static std::wstring ParseDescription(int iPad, std::wstring &text); static HRESULT SetSceneVisible(int iPad, bool show); static bool IsSceneVisible(int iPad); diff --git a/Minecraft.Client/Build/Common/XUI/XUI_debug.cpp b/Minecraft.Client/Build/Common/XUI/XUI_debug.cpp index 592d3c5b9..d9ae01496 100644 --- a/Minecraft.Client/Build/Common/XUI/XUI_debug.cpp +++ b/Minecraft.Client/Build/Common/XUI/XUI_debug.cpp @@ -186,7 +186,7 @@ HRESULT CScene_Debug::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) #ifdef _DEBUG // testing the upload of the player custom skin -// wstring wsTemp; +// std::wstring wsTemp; // // wsTemp=L"Deadmau5_Skin.png"; // app.UploadFileToGlobalStorage(m_iPad,C4JStorage::eGlobalStorage_TitleUser,&wsTemp);