From 119bff351450ea16ffda550b6e0f67379b29f708 Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 17:37:16 +0700 Subject: Revert "shared_ptr -> std::shared_ptr" This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5. --- Minecraft.Client/AbstractContainerScreen.cpp | 8 +- Minecraft.Client/AbstractContainerScreen.h | 2 +- Minecraft.Client/ArrowRenderer.cpp | 6 +- Minecraft.Client/ArrowRenderer.h | 2 +- Minecraft.Client/BlazeModel.cpp | 18 +- Minecraft.Client/BlazeModel.h | 4 +- Minecraft.Client/BlazeRenderer.cpp | 6 +- Minecraft.Client/BlazeRenderer.h | 2 +- Minecraft.Client/BoatModel.cpp | 12 +- Minecraft.Client/BoatModel.h | 2 +- Minecraft.Client/BoatRenderer.cpp | 6 +- Minecraft.Client/BoatRenderer.h | 2 +- Minecraft.Client/BookModel.cpp | 4 +- Minecraft.Client/BookModel.h | 4 +- Minecraft.Client/Camera.cpp | 8 +- Minecraft.Client/Camera.h | 8 +- Minecraft.Client/ChestRenderer.cpp | 4 +- Minecraft.Client/ChestRenderer.h | 4 +- Minecraft.Client/ChickenModel.cpp | 14 +- Minecraft.Client/ChickenModel.h | 2 +- Minecraft.Client/ChickenRenderer.cpp | 8 +- Minecraft.Client/ChickenRenderer.h | 4 +- Minecraft.Client/Chunk.cpp | 72 +-- Minecraft.Client/Chunk.h | 12 +- Minecraft.Client/ClientConnection.cpp | 514 ++++++++-------- Minecraft.Client/ClientConnection.h | 138 ++--- .../Common/Audio/Consoles_SoundEngine.h | 2 +- Minecraft.Client/Common/Audio/SoundEngine.cpp | 98 +-- Minecraft.Client/Common/Audio/SoundEngine.h | 10 +- Minecraft.Client/Common/Consoles_App.cpp | 32 +- Minecraft.Client/Common/Consoles_App.h | 24 +- .../GameRules/AddEnchantmentRuleDefinition.cpp | 4 +- .../GameRules/AddEnchantmentRuleDefinition.h | 2 +- .../Common/GameRules/AddItemRuleDefinition.cpp | 4 +- .../Common/GameRules/AddItemRuleDefinition.h | 2 +- .../Common/GameRules/CollectItemRuleDefinition.cpp | 6 +- .../Common/GameRules/CollectItemRuleDefinition.h | 8 +- .../Common/GameRules/CompleteAllRuleDefinition.cpp | 8 +- .../Common/GameRules/CompleteAllRuleDefinition.h | 2 +- .../GameRules/CompoundGameRuleDefinition.cpp | 8 +- .../Common/GameRules/CompoundGameRuleDefinition.h | 4 +- .../Common/GameRules/ConsoleSchematicFile.cpp | 28 +- .../Common/GameRules/ConsoleSchematicFile.h | 4 +- Minecraft.Client/Common/GameRules/GameRule.cpp | 6 +- Minecraft.Client/Common/GameRules/GameRule.h | 2 +- .../Common/GameRules/GameRuleDefinition.h | 6 +- .../GameRules/UpdatePlayerRuleDefinition.cpp | 4 +- .../Common/GameRules/UpdatePlayerRuleDefinition.h | 6 +- .../XboxStructureActionPlaceContainer.cpp | 6 +- .../GameRules/XboxStructureActionPlaceSpawner.cpp | 2 +- .../Common/Network/GameNetworkManager.cpp | 12 +- .../Common/Tutorial/ChangeStateConstraint.cpp | 20 +- .../Common/Tutorial/CompleteUsingItemTask.cpp | 4 +- .../Common/Tutorial/CompleteUsingItemTask.h | 2 +- Minecraft.Client/Common/Tutorial/CraftTask.cpp | 2 +- Minecraft.Client/Common/Tutorial/CraftTask.h | 2 +- .../Common/Tutorial/DiggerItemHint.cpp | 4 +- Minecraft.Client/Common/Tutorial/DiggerItemHint.h | 4 +- Minecraft.Client/Common/Tutorial/PickupTask.cpp | 2 +- Minecraft.Client/Common/Tutorial/PickupTask.h | 2 +- .../Common/Tutorial/ProcedureCompoundTask.cpp | 8 +- .../Common/Tutorial/ProcedureCompoundTask.h | 8 +- Minecraft.Client/Common/Tutorial/TakeItemHint.cpp | 2 +- Minecraft.Client/Common/Tutorial/TakeItemHint.h | 2 +- Minecraft.Client/Common/Tutorial/Tutorial.cpp | 20 +- Minecraft.Client/Common/Tutorial/Tutorial.h | 22 +- Minecraft.Client/Common/Tutorial/TutorialHint.cpp | 14 +- Minecraft.Client/Common/Tutorial/TutorialHint.h | 12 +- Minecraft.Client/Common/Tutorial/TutorialMode.cpp | 10 +- Minecraft.Client/Common/Tutorial/TutorialMode.h | 4 +- Minecraft.Client/Common/Tutorial/TutorialTask.h | 14 +- Minecraft.Client/Common/Tutorial/UseItemTask.cpp | 2 +- Minecraft.Client/Common/Tutorial/UseItemTask.h | 2 +- Minecraft.Client/Common/Tutorial/UseTileTask.cpp | 2 +- Minecraft.Client/Common/Tutorial/UseTileTask.h | 2 +- .../Common/UI/IUIScene_AbstractContainerMenu.cpp | 82 +-- .../Common/UI/IUIScene_AbstractContainerMenu.h | 22 +- Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp | 6 +- Minecraft.Client/Common/UI/IUIScene_AnvilMenu.h | 8 +- .../Common/UI/IUIScene_CraftingMenu.cpp | 112 ++-- Minecraft.Client/Common/UI/IUIScene_CraftingMenu.h | 18 +- .../Common/UI/IUIScene_CreativeMenu.cpp | 70 +-- Minecraft.Client/Common/UI/IUIScene_CreativeMenu.h | 16 +- .../Common/UI/IUIScene_TradingMenu.cpp | 44 +- Minecraft.Client/Common/UI/IUIScene_TradingMenu.h | 14 +- .../Common/UI/UIComponent_TutorialPopup.cpp | 44 +- .../Common/UI/UIComponent_TutorialPopup.h | 2 +- .../Common/UI/UIControl_EnchantmentBook.cpp | 4 +- .../Common/UI/UIControl_EnchantmentBook.h | 2 +- Minecraft.Client/Common/UI/UIScene.cpp | 8 +- Minecraft.Client/Common/UI/UIScene.h | 6 +- .../Common/UI/UIScene_AbstractContainerMenu.cpp | 24 +- .../Common/UI/UIScene_AbstractContainerMenu.h | 6 +- .../Common/UI/UIScene_BrewingStandMenu.h | 2 +- .../Common/UI/UIScene_CraftingMenu.cpp | 26 +- Minecraft.Client/Common/UI/UIScene_CraftingMenu.h | 14 +- .../Common/UI/UIScene_CreativeMenu.cpp | 8 +- .../Common/UI/UIScene_DebugOverlay.cpp | 4 +- Minecraft.Client/Common/UI/UIScene_FurnaceMenu.h | 2 +- Minecraft.Client/Common/UI/UIScene_HUD.cpp | 26 +- .../Common/UI/UIScene_InGameHostOptionsMenu.cpp | 6 +- .../Common/UI/UIScene_InGameInfoMenu.cpp | 28 +- .../Common/UI/UIScene_InGamePlayerOptionsMenu.cpp | 18 +- .../Common/UI/UIScene_InventoryMenu.cpp | 6 +- .../Common/UI/UIScene_LeaderboardsMenu.cpp | 40 +- .../Common/UI/UIScene_SignEntryMenu.cpp | 6 +- Minecraft.Client/Common/UI/UIScene_SignEntryMenu.h | 2 +- .../Common/UI/UIScene_TeleportMenu.cpp | 14 +- Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp | 10 +- Minecraft.Client/Common/UI/UIStructs.h | 46 +- .../Common/XUI/SlotProgressControl.cpp | 8 +- .../Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp | 12 +- .../Common/XUI/XUI_Ctrl_CraftIngredientSlot.h | 4 +- .../Common/XUI/XUI_Ctrl_EnchantmentBook.cpp | 8 +- .../Common/XUI/XUI_Ctrl_EnchantmentBook.h | 2 +- .../Common/XUI/XUI_Ctrl_MinecraftSlot.cpp | 20 +- .../Common/XUI/XUI_Ctrl_MinecraftSlot.h | 4 +- .../Common/XUI/XUI_Ctrl_SlotItemCtrlBase.cpp | 34 +- .../Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h | 10 +- Minecraft.Client/Common/XUI/XUI_CustomMessages.h | 4 +- .../Common/XUI/XUI_DebugItemEditor.cpp | 12 +- Minecraft.Client/Common/XUI/XUI_DebugItemEditor.h | 4 +- .../Common/XUI/XUI_InGameHostOptions.cpp | 8 +- Minecraft.Client/Common/XUI/XUI_InGameInfo.cpp | 26 +- .../Common/XUI/XUI_InGamePlayerOptions.cpp | 24 +- .../Common/XUI/XUI_Scene_AbstractContainer.cpp | 24 +- .../Common/XUI/XUI_Scene_AbstractContainer.h | 6 +- Minecraft.Client/Common/XUI/XUI_Scene_Base.cpp | 2 +- .../Common/XUI/XUI_Scene_Container.cpp | 10 +- .../Common/XUI/XUI_Scene_CraftingPanel.cpp | 38 +- .../Common/XUI/XUI_Scene_CraftingPanel.h | 16 +- .../Common/XUI/XUI_Scene_Inventory.cpp | 10 +- .../Common/XUI/XUI_Scene_Inventory_Creative.cpp | 18 +- Minecraft.Client/Common/XUI/XUI_Scene_Trading.cpp | 18 +- Minecraft.Client/Common/XUI/XUI_Scene_Trading.h | 10 +- Minecraft.Client/Common/XUI/XUI_SignEntry.cpp | 12 +- Minecraft.Client/Common/XUI/XUI_SignEntry.h | 2 +- Minecraft.Client/Common/XUI/XUI_Teleport.cpp | 12 +- Minecraft.Client/Common/XUI/XUI_TextEntry.cpp | 14 +- Minecraft.Client/Common/XUI/XUI_TutorialPopup.cpp | 18 +- Minecraft.Client/ConnectScreen.cpp | 2 +- Minecraft.Client/ContainerScreen.cpp | 2 +- Minecraft.Client/ContainerScreen.h | 6 +- Minecraft.Client/CowModel.h | 4 +- Minecraft.Client/CowRenderer.cpp | 2 +- Minecraft.Client/CowRenderer.h | 2 +- Minecraft.Client/CraftingScreen.cpp | 2 +- Minecraft.Client/CraftingScreen.h | 2 +- Minecraft.Client/CreativeMode.cpp | 10 +- Minecraft.Client/CreativeMode.h | 8 +- Minecraft.Client/CreeperModel.cpp | 2 +- Minecraft.Client/CreeperModel.h | 2 +- Minecraft.Client/CreeperRenderer.cpp | 14 +- Minecraft.Client/CreeperRenderer.h | 8 +- Minecraft.Client/CritParticle.cpp | 10 +- Minecraft.Client/CritParticle.h | 8 +- Minecraft.Client/DefaultRenderer.cpp | 2 +- Minecraft.Client/DefaultRenderer.h | 2 +- Minecraft.Client/DemoLevel.cpp | 2 +- Minecraft.Client/DemoLevel.h | 2 +- Minecraft.Client/DemoMode.cpp | 6 +- Minecraft.Client/DemoMode.h | 6 +- Minecraft.Client/DerivedServerLevel.cpp | 2 +- Minecraft.Client/DerivedServerLevel.h | 2 +- Minecraft.Client/DirtyChunkSorter.cpp | 2 +- Minecraft.Client/DirtyChunkSorter.h | 6 +- Minecraft.Client/DistanceChunkSorter.cpp | 4 +- Minecraft.Client/DistanceChunkSorter.h | 4 +- Minecraft.Client/DragonModel.cpp | 18 +- Minecraft.Client/DragonModel.h | 4 +- .../Durango/Network/ChatIntegrationLayer.cpp | 152 ++--- .../Durango/Network/ChatIntegrationLayer.h | 60 +- .../Durango/Sentient/DurangoTelemetry.cpp | 26 +- Minecraft.Client/EnchantTableRenderer.cpp | 4 +- Minecraft.Client/EnchantTableRenderer.h | 2 +- Minecraft.Client/EnderChestRenderer.cpp | 4 +- Minecraft.Client/EnderChestRenderer.h | 2 +- Minecraft.Client/EnderCrystalModel.cpp | 4 +- Minecraft.Client/EnderCrystalModel.h | 2 +- Minecraft.Client/EnderCrystalRenderer.cpp | 6 +- Minecraft.Client/EnderCrystalRenderer.h | 2 +- Minecraft.Client/EnderDragonRenderer.cpp | 28 +- Minecraft.Client/EnderDragonRenderer.h | 12 +- Minecraft.Client/EndermanRenderer.cpp | 18 +- Minecraft.Client/EndermanRenderer.h | 6 +- Minecraft.Client/EntityRenderDispatcher.cpp | 16 +- Minecraft.Client/EntityRenderDispatcher.h | 10 +- Minecraft.Client/EntityRenderer.cpp | 22 +- Minecraft.Client/EntityRenderer.h | 10 +- Minecraft.Client/EntityTileRenderer.cpp | 4 +- Minecraft.Client/EntityTileRenderer.h | 4 +- Minecraft.Client/EntityTracker.cpp | 48 +- Minecraft.Client/EntityTracker.h | 22 +- Minecraft.Client/ExperienceOrbRenderer.cpp | 4 +- Minecraft.Client/ExperienceOrbRenderer.h | 2 +- Minecraft.Client/FallingTileRenderer.cpp | 4 +- Minecraft.Client/FallingTileRenderer.h | 2 +- Minecraft.Client/FireballRenderer.cpp | 8 +- Minecraft.Client/FireballRenderer.h | 4 +- Minecraft.Client/FishingHookRenderer.cpp | 4 +- Minecraft.Client/FishingHookRenderer.h | 4 +- Minecraft.Client/FurnaceScreen.cpp | 2 +- Minecraft.Client/FurnaceScreen.h | 4 +- Minecraft.Client/GameMode.cpp | 38 +- Minecraft.Client/GameMode.h | 30 +- Minecraft.Client/GameRenderer.cpp | 46 +- Minecraft.Client/GameRenderer.h | 4 +- Minecraft.Client/GhastModel.cpp | 2 +- Minecraft.Client/GhastModel.h | 2 +- Minecraft.Client/GhastRenderer.cpp | 6 +- Minecraft.Client/GhastRenderer.h | 2 +- Minecraft.Client/GiantMobRenderer.cpp | 4 +- Minecraft.Client/GiantMobRenderer.h | 2 +- Minecraft.Client/Gui.cpp | 8 +- Minecraft.Client/HumanoidMobRenderer.cpp | 12 +- Minecraft.Client/HumanoidMobRenderer.h | 6 +- Minecraft.Client/HumanoidModel.cpp | 32 +- Minecraft.Client/HumanoidModel.h | 6 +- Minecraft.Client/InventoryScreen.cpp | 2 +- Minecraft.Client/InventoryScreen.h | 2 +- Minecraft.Client/ItemFrameRenderer.cpp | 28 +- Minecraft.Client/ItemFrameRenderer.h | 6 +- Minecraft.Client/ItemInHandRenderer.cpp | 24 +- Minecraft.Client/ItemInHandRenderer.h | 4 +- Minecraft.Client/ItemRenderer.cpp | 52 +- Minecraft.Client/ItemRenderer.h | 20 +- Minecraft.Client/ItemSpriteRenderer.cpp | 2 +- Minecraft.Client/ItemSpriteRenderer.h | 2 +- Minecraft.Client/LavaSlimeModel.cpp | 24 +- Minecraft.Client/LavaSlimeModel.h | 6 +- Minecraft.Client/LavaSlimeRenderer.cpp | 14 +- Minecraft.Client/LavaSlimeRenderer.h | 4 +- Minecraft.Client/LevelRenderer.cpp | 150 ++--- Minecraft.Client/LevelRenderer.h | 24 +- Minecraft.Client/LightningBoltRenderer.cpp | 4 +- Minecraft.Client/LightningBoltRenderer.h | 2 +- Minecraft.Client/LocalPlayer.cpp | 82 +-- Minecraft.Client/LocalPlayer.h | 22 +- Minecraft.Client/MinecartModel.cpp | 14 +- Minecraft.Client/MinecartModel.h | 2 +- Minecraft.Client/MinecartRenderer.cpp | 4 +- Minecraft.Client/MinecartRenderer.h | 2 +- Minecraft.Client/Minecraft.cpp | 98 +-- Minecraft.Client/Minecraft.h | 10 +- Minecraft.Client/MinecraftServer.cpp | 38 +- Minecraft.Client/Minimap.cpp | 8 +- Minecraft.Client/Minimap.h | 2 +- Minecraft.Client/MobRenderer.cpp | 58 +- Minecraft.Client/MobRenderer.h | 30 +- Minecraft.Client/MobSpawnerRenderer.cpp | 6 +- Minecraft.Client/MobSpawnerRenderer.h | 4 +- Minecraft.Client/Model.h | 4 +- Minecraft.Client/MultiPlayerGameMode.cpp | 88 +-- Minecraft.Client/MultiPlayerGameMode.h | 28 +- Minecraft.Client/MultiPlayerLevel.cpp | 50 +- Minecraft.Client/MultiPlayerLevel.h | 26 +- Minecraft.Client/MultiPlayerLocalPlayer.cpp | 56 +- Minecraft.Client/MultiPlayerLocalPlayer.h | 6 +- Minecraft.Client/MushroomCowRenderer.cpp | 12 +- Minecraft.Client/MushroomCowRenderer.h | 4 +- Minecraft.Client/OzelotModel.cpp | 6 +- Minecraft.Client/OzelotModel.h | 4 +- Minecraft.Client/OzelotRenderer.cpp | 8 +- Minecraft.Client/OzelotRenderer.h | 4 +- Minecraft.Client/PS3/PS3Extras/Ps3Types.h | 4 +- .../boost_1_53_0/boost/archive/binary_iarchive.hpp | 22 +- .../boost/archive/binary_wiarchive.hpp | 26 +- .../boost/archive/polymorphic_iarchive.hpp | 6 +- .../boost/archive/polymorphic_oarchive.hpp | 2 +- .../boost/archive/shared_ptr_helper.hpp | 46 +- .../boost_1_53_0/boost/archive/text_iarchive.hpp | 28 +- .../boost_1_53_0/boost/archive/text_wiarchive.hpp | 18 +- .../boost_1_53_0/boost/archive/xml_iarchive.hpp | 22 +- .../boost_1_53_0/boost/archive/xml_wiarchive.hpp | 30 +- .../boost_1_53_0/boost/asio/detail/config.hpp | 2 +- .../boost_1_53_0/boost/asio/detail/shared_ptr.hpp | 6 +- .../boost_1_53_0/boost/asio/detail/socket_ops.hpp | 4 +- .../boost_1_53_0/boost/asio/io_service.hpp | 8 +- .../boost/asio/ip/basic_resolver_iterator.hpp | 4 +- .../boost/asio/ssl/detail/impl/openssl_init.ipp | 10 +- .../boost/asio/ssl/detail/openssl_init.hpp | 6 +- .../boost_1_53_0/boost/config/compiler/gcc.hpp | 28 +- .../boost/config/compiler/sunpro_cc.hpp | 22 +- .../boost_1_53_0/boost/config/platform/win32.hpp | 14 +- .../boost/date_time/gregorian/greg_month.hpp | 12 +- .../date_time/local_time/custom_time_zone.hpp | 10 +- .../boost/date_time/local_time/local_date_time.hpp | 40 +- .../date_time/local_time/local_time_types.hpp | 14 +- .../boost/date_time/local_time/posix_time_zone.hpp | 10 +- .../boost/date_time/local_time/tz_database.hpp | 10 +- .../boost/date_time/microsec_time_clock.hpp | 4 +- .../boost_1_53_0/boost/date_time/time_clock.hpp | 4 +- .../boost_1_53_0/boost/date_time/tz_db_base.hpp | 170 +++--- .../boost/exception/detail/exception_ptr.hpp | 10 +- .../boost_1_53_0/boost/exception/exception.hpp | 6 +- .../boost/exception/get_error_info.hpp | 4 +- .../boost_1_53_0/boost/exception/info.hpp | 14 +- .../boost_1_53_0/boost/filesystem/operations.hpp | 98 +-- .../boost_1_53_0/boost/filesystem/path.hpp | 70 +-- .../boost_1_53_0/boost/format/alt_sstream.hpp | 74 +-- .../boost/functional/hash/extensions.hpp | 6 +- .../PS3Extras/boost_1_53_0/boost/get_pointer.hpp | 6 +- .../boost/gil/extension/io/io_error.hpp | 8 +- .../boost/gil/extension/io/jpeg_dynamic_io.hpp | 10 +- .../boost/gil/extension/io/jpeg_io.hpp | 8 +- .../boost/gil/extension/io/png_dynamic_io.hpp | 10 +- .../boost/graph/detail/self_avoiding_walk.hpp | 108 ++-- .../graph/distributed/detail/mpi_process_group.ipp | 130 ++-- .../boost/graph/distributed/mpi_process_group.hpp | 140 ++--- .../boost_1_53_0/boost/graph/distributed/queue.hpp | 12 +- .../graph/distributed/rmat_graph_generator.hpp | 16 +- .../graph/distributed/vertex_list_adaptor.hpp | 62 +- .../boost/graph/erdos_renyi_generator.hpp | 8 +- .../boost/graph/gursoy_atun_layout.hpp | 92 +-- .../boost/graph/incremental_components.hpp | 28 +- .../boost/graph/mcgregor_common_subgraphs.hpp | 128 ++-- .../boost_1_53_0/boost/graph/metric_tsp_approx.hpp | 2 +- .../boost/graph/parallel/distribution.hpp | 92 +-- .../graph/planar_detail/boyer_myrvold_impl.hpp | 658 ++++++++++----------- .../boost/graph/planar_detail/face_handles.hpp | 94 +-- .../boost_1_53_0/boost/graph/plod_generator.hpp | 46 +- .../boost/graph/rmat_graph_generator.hpp | 14 +- .../boost_1_53_0/boost/graph/topology.hpp | 88 +-- .../boost/interprocess/interprocess_fwd.hpp | 2 +- .../smart_ptr/enable_shared_from_this.hpp | 14 +- .../boost/interprocess/smart_ptr/shared_ptr.hpp | 116 ++-- .../boost/interprocess/smart_ptr/weak_ptr.hpp | 38 +- .../boost_1_53_0/boost/iostreams/chain.hpp | 24 +- .../boost/iostreams/code_converter.hpp | 74 +-- .../boost_1_53_0/boost/iostreams/device/file.hpp | 30 +- .../boost/iostreams/device/file_descriptor.hpp | 18 +- .../boost/iostreams/device/mapped_file.hpp | 80 +-- .../boost/iostreams/filter/symmetric.hpp | 14 +- .../boost_1_53_0/boost/iostreams/invert.hpp | 42 +- .../boost/iterator/indirect_iterator.hpp | 12 +- .../boost_1_53_0/boost/locale/boundary/index.hpp | 118 ++-- .../boost_1_53_0/boost/locale/generator.hpp | 34 +- .../boost_1_53_0/boost/mpi/communicator.hpp | 146 ++--- .../boost/mpi/detail/communicator_sc.hpp | 12 +- .../boost_1_53_0/boost/mpi/graph_communicator.hpp | 64 +- .../PS3/PS3Extras/boost_1_53_0/boost/mpi/group.hpp | 24 +- .../boost_1_53_0/boost/mpi/intercommunicator.hpp | 10 +- .../PS3Extras/boost_1_53_0/boost/mpi/request.hpp | 12 +- .../boost/mpi/skeleton_and_content.hpp | 4 +- .../PS3/PS3Extras/boost_1_53_0/boost/pointee.hpp | 18 +- .../boost/program_options/detail/config_file.hpp | 36 +- .../boost/program_options/options_description.hpp | 60 +- .../boost/program_options/variables_map.hpp | 38 +- .../boost/property_map/dynamic_property_map.hpp | 18 +- .../parallel/distributed_property_map.hpp | 60 +- .../property_map/parallel/global_index_map.hpp | 10 +- .../parallel/impl/distributed_property_map.ipp | 42 +- .../boost/property_map/vector_property_map.hpp | 50 +- .../boost/ptr_container/clone_allocator.hpp | 16 +- .../boost/python/converter/registered.hpp | 24 +- .../boost/python/converter/registrations.hpp | 12 +- .../boost/python/converter/registry.hpp | 6 +- .../python/converter/shared_ptr_from_python.hpp | 20 +- .../python/converter/shared_ptr_to_python.hpp | 8 +- .../boost/python/detail/is_shared_ptr.hpp | 8 +- .../boost/python/detail/value_is_shared_ptr.hpp | 8 +- .../boost_1_53_0/boost/python/instance_holder.hpp | 8 +- .../boost/python/object/find_instance.hpp | 6 +- .../boost/python/object/inheritance.hpp | 4 +- .../boost/python/to_python_indirect.hpp | 14 +- .../boost_1_53_0/boost/python/to_python_value.hpp | 28 +- .../PS3/PS3Extras/boost_1_53_0/boost/regex/icu.hpp | 286 ++++----- .../boost/regex/pending/object_cache.hpp | 26 +- .../boost_1_53_0/boost/regex/v4/basic_regex.hpp | 156 ++--- .../boost/regex/v4/cpp_regex_traits.hpp | 88 +-- .../boost_1_53_0/boost/regex/v4/match_results.hpp | 16 +- .../boost_1_53_0/boost/regex/v4/regex_iterator.hpp | 34 +- .../boost/regex/v4/regex_token_iterator.hpp | 44 +- .../boost/regex/v4/regex_workaround.hpp | 42 +- .../boost/regex/v4/u32regex_iterator.hpp | 28 +- .../boost/regex/v4/u32regex_token_iterator.hpp | 40 +- .../boost/regex/v4/w32_regex_traits.hpp | 46 +- .../boost/serialization/detail/shared_ptr_132.hpp | 110 ++-- .../serialization/detail/shared_ptr_nmt_132.hpp | 44 +- .../boost/serialization/shared_ptr.hpp | 34 +- .../boost/serialization/shared_ptr_132.hpp | 44 +- .../boost_1_53_0/boost/serialization/weak_ptr.hpp | 8 +- .../boost/shared_container_iterator.hpp | 8 +- .../PS3Extras/boost_1_53_0/boost/shared_ptr.hpp | 6 +- .../boost_1_53_0/boost/signals/connection.hpp | 4 +- .../boost/signals/detail/named_slot_map.hpp | 16 +- .../boost/signals/detail/signal_base.hpp | 10 +- .../PS3Extras/boost_1_53_0/boost/signals/slot.hpp | 12 +- .../boost_1_53_0/boost/signals2/connection.hpp | 22 +- .../boost_1_53_0/boost/signals2/deconstruct.hpp | 78 +-- .../boost/signals2/deconstruct_ptr.hpp | 16 +- .../boost/signals2/detail/foreign_ptr.hpp | 8 +- .../boost/signals2/detail/signal_template.hpp | 34 +- .../boost/signals2/postconstructible.hpp | 6 +- .../boost/signals2/predestructible.hpp | 4 +- .../boost/signals2/shared_connection_block.hpp | 8 +- .../boost_1_53_0/boost/signals2/signal.hpp | 2 +- .../boost_1_53_0/boost/signals2/signal_base.hpp | 4 +- .../boost_1_53_0/boost/signals2/slot_base.hpp | 4 +- .../boost_1_53_0/boost/signals2/trackable.hpp | 6 +- .../PS3/PS3Extras/boost_1_53_0/boost/smart_ptr.hpp | 2 +- .../boost/smart_ptr/allocate_shared_array.hpp | 46 +- .../boost/smart_ptr/detail/shared_ptr_nmt.hpp | 44 +- .../boost/smart_ptr/detail/sp_if_array.hpp | 14 +- .../boost/smart_ptr/detail/spinlock_pool.hpp | 26 +- .../boost/smart_ptr/enable_shared_from_raw.hpp | 34 +- .../boost/smart_ptr/enable_shared_from_this.hpp | 16 +- .../boost/smart_ptr/make_shared_array.hpp | 46 +- .../boost/smart_ptr/make_shared_object.hpp | 334 +++++------ .../boost_1_53_0/boost/smart_ptr/owner_less.hpp | 8 +- .../boost_1_53_0/boost/smart_ptr/scoped_ptr.hpp | 2 +- .../boost_1_53_0/boost/smart_ptr/shared_array.hpp | 6 +- .../boost_1_53_0/boost/smart_ptr/shared_ptr.hpp | 202 +++---- .../boost_1_53_0/boost/smart_ptr/weak_ptr.hpp | 16 +- .../classic/core/non_terminal/impl/grammar.ipp | 2 +- .../core/non_terminal/impl/object_with_id.ipp | 8 +- .../spirit/home/classic/dynamic/stored_rule.hpp | 8 +- .../spirit/home/classic/iterator/file_iterator.hpp | 2 +- .../home/classic/iterator/impl/file_iterator.ipp | 18 +- .../boost/spirit/home/classic/utility/chset.hpp | 6 +- .../spirit/home/classic/utility/impl/chset.ipp | 18 +- .../boost/spirit/home/karma/string/symbols.hpp | 6 +- .../boost/spirit/home/phoenix/operator/member.hpp | 16 +- .../boost/spirit/home/qi/string/symbols.hpp | 4 +- .../home/qi/operator/detail/keywords.hpp | 46 +- .../boost/statechart/processor_container.hpp | 8 +- .../boost_1_53_0/boost/test/parameterized_test.hpp | 18 +- .../boost_1_53_0/boost/test/predicate_result.hpp | 8 +- .../boost/test/unit_test_suite_impl.hpp | 44 +- .../boost_1_53_0/boost/test/utils/callback.hpp | 18 +- .../test/utils/runtime/cla/basic_parameter.hpp | 14 +- .../test/utils/runtime/cla/char_parameter.hpp | 12 +- .../boost/test/utils/runtime/cla/fwd.hpp | 10 +- .../boost/test/utils/runtime/cla/parameter.hpp | 12 +- .../boost/test/utils/runtime/cla/parser.hpp | 8 +- .../utils/runtime/file/config_file_iterator.hpp | 10 +- .../boost_1_53_0/boost/test/utils/runtime/fwd.hpp | 8 +- .../boost/test/utils/runtime/validation.hpp | 10 +- .../PS3Extras/boost_1_53_0/boost/thread/future.hpp | 36 +- .../boost/thread/pthread/thread_data.hpp | 12 +- .../PS3Extras/boost_1_53_0/boost/thread/tss.hpp | 24 +- .../PS3Extras/boost_1_53_0/boost/tr1/memory.hpp | 20 +- .../boost_1_53_0/boost/uuid/random_generator.hpp | 14 +- .../boost_1_53_0/boost/wave/cpp_context.hpp | 198 +++---- .../boost_1_53_0/boost/wave/util/cpp_iterator.hpp | 6 +- .../boost_1_53_0/boost/wave/util/cpp_macromap.hpp | 4 +- .../boost_1_53_0/boost/wave/util/symbol_table.hpp | 28 +- .../boost/xpressive/detail/core/access.hpp | 4 +- .../boost/xpressive/detail/core/linker.hpp | 2 +- .../detail/core/matcher/regex_byref_matcher.hpp | 4 +- .../detail/core/matcher/regex_matcher.hpp | 2 +- .../boost/xpressive/detail/detail_fwd.hpp | 4 +- .../boost/xpressive/detail/static/compile.hpp | 8 +- .../boost/xpressive/detail/static/placeholders.hpp | 2 +- .../boost/xpressive/detail/static/visitor.hpp | 10 +- .../boost/xpressive/detail/utility/symbols.hpp | 14 +- .../xpressive/detail/utility/tracking_ptr.hpp | 26 +- .../boost/xpressive/regex_compiler.hpp | 4 +- .../PS3/SPU_Tasks/ChunkUpdate/ChunkRebuildData.cpp | 158 ++--- .../PS3/SPU_Tasks/ChunkUpdate/LeverTile_SPU.h | 2 +- .../PS3/SPU_Tasks/ChunkUpdate/PistonBaseTile_SPU.h | 2 +- .../ChunkUpdate/PistonExtensionTile_SPU.h | 2 +- .../PS3/SPU_Tasks/ChunkUpdate/TheEndPortal_SPU.h | 2 +- .../PS3/SPU_Tasks/ChunkUpdate/Tile_SPU.cpp | 228 +++---- .../LevelRenderer_FindNearestChunk.cpp | 22 +- .../LevelRenderer_FindNearestChunk.h | 6 +- Minecraft.Client/PaintingRenderer.cpp | 10 +- Minecraft.Client/PaintingRenderer.h | 6 +- Minecraft.Client/Particle.cpp | 10 +- Minecraft.Client/Particle.h | 4 +- Minecraft.Client/ParticleEngine.cpp | 18 +- Minecraft.Client/ParticleEngine.h | 8 +- Minecraft.Client/PendingConnection.cpp | 32 +- Minecraft.Client/PendingConnection.h | 16 +- Minecraft.Client/PigRenderer.cpp | 8 +- Minecraft.Client/PigRenderer.h | 4 +- Minecraft.Client/PistonPieceRenderer.cpp | 6 +- Minecraft.Client/PistonPieceRenderer.h | 4 +- Minecraft.Client/PlayerChunkMap.cpp | 56 +- Minecraft.Client/PlayerChunkMap.h | 32 +- Minecraft.Client/PlayerCloudParticle.cpp | 2 +- Minecraft.Client/PlayerConnection.cpp | 244 ++++---- Minecraft.Client/PlayerConnection.h | 80 +-- Minecraft.Client/PlayerList.cpp | 232 ++++---- Minecraft.Client/PlayerList.h | 56 +- Minecraft.Client/PlayerRenderer.cpp | 52 +- Minecraft.Client/PlayerRenderer.h | 20 +- Minecraft.Client/QuadrupedModel.cpp | 14 +- Minecraft.Client/QuadrupedModel.h | 2 +- Minecraft.Client/ReceivingLevelScreen.cpp | 2 +- Minecraft.Client/RemotePlayer.cpp | 4 +- Minecraft.Client/RemotePlayer.h | 2 +- Minecraft.Client/ServerCommandDispatcher.cpp | 4 +- Minecraft.Client/ServerCommandDispatcher.h | 2 +- Minecraft.Client/ServerConnection.cpp | 34 +- Minecraft.Client/ServerConnection.h | 10 +- Minecraft.Client/ServerLevel.cpp | 66 +-- Minecraft.Client/ServerLevel.h | 40 +- Minecraft.Client/ServerLevelListener.cpp | 30 +- Minecraft.Client/ServerLevelListener.h | 10 +- Minecraft.Client/ServerPlayer.cpp | 228 +++---- Minecraft.Client/ServerPlayer.h | 38 +- Minecraft.Client/ServerPlayerGameMode.cpp | 20 +- Minecraft.Client/ServerPlayerGameMode.h | 6 +- Minecraft.Client/SheepFurModel.cpp | 4 +- Minecraft.Client/SheepFurModel.h | 2 +- Minecraft.Client/SheepModel.cpp | 6 +- Minecraft.Client/SheepModel.h | 2 +- Minecraft.Client/SheepRenderer.cpp | 8 +- Minecraft.Client/SheepRenderer.h | 4 +- Minecraft.Client/SignRenderer.cpp | 14 +- Minecraft.Client/SignRenderer.h | 2 +- Minecraft.Client/SilverfishModel.cpp | 2 +- Minecraft.Client/SilverfishModel.h | 2 +- Minecraft.Client/SilverfishRenderer.cpp | 6 +- Minecraft.Client/SilverfishRenderer.h | 6 +- Minecraft.Client/SkeletonHeadModel.cpp | 2 +- Minecraft.Client/SkeletonHeadModel.h | 2 +- Minecraft.Client/SkullTileRenderer.cpp | 4 +- Minecraft.Client/SkullTileRenderer.h | 2 +- Minecraft.Client/SlimeModel.cpp | 2 +- Minecraft.Client/SlimeModel.h | 2 +- Minecraft.Client/SlimeRenderer.cpp | 10 +- Minecraft.Client/SlimeRenderer.h | 4 +- Minecraft.Client/SnowManModel.cpp | 6 +- Minecraft.Client/SnowManModel.h | 4 +- Minecraft.Client/SnowManRenderer.cpp | 8 +- Minecraft.Client/SnowManRenderer.h | 2 +- Minecraft.Client/SpiderModel.cpp | 10 +- Minecraft.Client/SpiderModel.h | 2 +- Minecraft.Client/SpiderRenderer.cpp | 12 +- Minecraft.Client/SpiderRenderer.h | 6 +- Minecraft.Client/SquidModel.cpp | 2 +- Minecraft.Client/SquidModel.h | 2 +- Minecraft.Client/SquidRenderer.cpp | 10 +- Minecraft.Client/SquidRenderer.h | 6 +- Minecraft.Client/SurvivalMode.cpp | 12 +- Minecraft.Client/SurvivalMode.h | 6 +- Minecraft.Client/TakeAnimationParticle.cpp | 10 +- Minecraft.Client/TakeAnimationParticle.h | 6 +- Minecraft.Client/TeleportCommand.cpp | 12 +- Minecraft.Client/TeleportCommand.h | 4 +- Minecraft.Client/TerrainParticle.cpp | 6 +- Minecraft.Client/TerrainParticle.h | 4 +- Minecraft.Client/TextEditScreen.cpp | 6 +- Minecraft.Client/TextEditScreen.h | 4 +- Minecraft.Client/TheEndPortalRenderer.cpp | 4 +- Minecraft.Client/TheEndPortalRenderer.h | 2 +- Minecraft.Client/TileEntityRenderDispatcher.cpp | 10 +- Minecraft.Client/TileEntityRenderDispatcher.h | 12 +- Minecraft.Client/TileEntityRenderer.h | 2 +- Minecraft.Client/TileRenderer.cpp | 4 +- Minecraft.Client/TileRenderer.h | 6 +- Minecraft.Client/TntRenderer.cpp | 4 +- Minecraft.Client/TntRenderer.h | 2 +- Minecraft.Client/TrackedEntity.cpp | 288 ++++----- Minecraft.Client/TrackedEntity.h | 32 +- Minecraft.Client/TrapScreen.cpp | 2 +- Minecraft.Client/TrapScreen.h | 2 +- Minecraft.Client/ViewportCuller.cpp | 34 +- Minecraft.Client/ViewportCuller.h | 6 +- Minecraft.Client/VillagerGolemModel.cpp | 6 +- Minecraft.Client/VillagerGolemModel.h | 4 +- Minecraft.Client/VillagerGolemRenderer.cpp | 14 +- Minecraft.Client/VillagerGolemRenderer.h | 6 +- Minecraft.Client/VillagerModel.cpp | 6 +- Minecraft.Client/VillagerModel.h | 4 +- Minecraft.Client/VillagerRenderer.cpp | 14 +- Minecraft.Client/VillagerRenderer.h | 10 +- Minecraft.Client/WolfModel.cpp | 12 +- Minecraft.Client/WolfModel.h | 4 +- Minecraft.Client/WolfRenderer.cpp | 8 +- Minecraft.Client/WolfRenderer.h | 4 +- Minecraft.Client/Xbox/Audio/SoundEngine.cpp | 8 +- Minecraft.Client/Xbox/Audio/SoundEngine.h | 4 +- Minecraft.Client/ZombieRenderer.cpp | 18 +- Minecraft.Client/ZombieRenderer.h | 10 +- 577 files changed, 6893 insertions(+), 6893 deletions(-) (limited to 'Minecraft.Client') diff --git a/Minecraft.Client/AbstractContainerScreen.cpp b/Minecraft.Client/AbstractContainerScreen.cpp index d199f726..2b3e0837 100644 --- a/Minecraft.Client/AbstractContainerScreen.cpp +++ b/Minecraft.Client/AbstractContainerScreen.cpp @@ -52,7 +52,7 @@ void AbstractContainerScreen::render(int xm, int ym, float a) glEnable(GL_RESCALE_NORMAL); Slot *hoveredSlot = NULL; - + AUTO_VAR(itEnd, menu->slots->end()); for (AUTO_VAR(it, menu->slots->begin()); it != itEnd; it++) { @@ -75,7 +75,7 @@ void AbstractContainerScreen::render(int xm, int ym, float a) } } - std::shared_ptr inventory = minecraft->player->inventory; + shared_ptr inventory = minecraft->player->inventory; if (inventory->getCarried() != NULL) { glTranslatef(0, 0, 32); @@ -128,7 +128,7 @@ void AbstractContainerScreen::renderSlot(Slot *slot) #if 0 int x = slot->x; int y = slot->y; - std::shared_ptr item = slot->getItem(); + shared_ptr item = slot->getItem(); if (item == NULL) { @@ -218,7 +218,7 @@ void AbstractContainerScreen::removed() if (minecraft->player == NULL) return; } -void AbstractContainerScreen::slotsChanged(std::shared_ptr container) +void AbstractContainerScreen::slotsChanged(shared_ptr container) { } diff --git a/Minecraft.Client/AbstractContainerScreen.h b/Minecraft.Client/AbstractContainerScreen.h index dc78db27..2ba9cdcd 100644 --- a/Minecraft.Client/AbstractContainerScreen.h +++ b/Minecraft.Client/AbstractContainerScreen.h @@ -32,7 +32,7 @@ protected: virtual void keyPressed(wchar_t eventCharacter, int eventKey); public: virtual void removed(); - virtual void slotsChanged(std::shared_ptr container); + virtual void slotsChanged(shared_ptr container); virtual bool isPauseScreen(); virtual void tick(); }; \ No newline at end of file diff --git a/Minecraft.Client/ArrowRenderer.cpp b/Minecraft.Client/ArrowRenderer.cpp index b717552b..65c4ee71 100644 --- a/Minecraft.Client/ArrowRenderer.cpp +++ b/Minecraft.Client/ArrowRenderer.cpp @@ -3,11 +3,11 @@ #include "..\Minecraft.World\net.minecraft.world.entity.projectile.h" #include "..\Minecraft.World\Mth.h" -void ArrowRenderer::render(std::shared_ptr _arrow, double x, double y, double z, float rot, float a) +void ArrowRenderer::render(shared_ptr _arrow, double x, double y, double z, float rot, float a) { - // 4J - original version used generics and thus had an input parameter of type Arrow rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type Arrow rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr arrow = dynamic_pointer_cast(_arrow); + shared_ptr arrow = dynamic_pointer_cast(_arrow); bindTexture(TN_ITEM_ARROWS); // 4J - was L"/item/arrows.png" glPushMatrix(); diff --git a/Minecraft.Client/ArrowRenderer.h b/Minecraft.Client/ArrowRenderer.h index 3348fc33..2731f7c2 100644 --- a/Minecraft.Client/ArrowRenderer.h +++ b/Minecraft.Client/ArrowRenderer.h @@ -4,5 +4,5 @@ class ArrowRenderer : public EntityRenderer { public: - virtual void render(std::shared_ptr _arrow, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr _arrow, double x, double y, double z, float rot, float a); }; diff --git a/Minecraft.Client/BlazeModel.cpp b/Minecraft.Client/BlazeModel.cpp index e1a7747b..5af894ac 100644 --- a/Minecraft.Client/BlazeModel.cpp +++ b/Minecraft.Client/BlazeModel.cpp @@ -7,7 +7,7 @@ BlazeModel::BlazeModel() : Model() { upperBodyParts = ModelPartArray(12); - for (unsigned int i = 0; i < upperBodyParts.length; i++) + for (unsigned int i = 0; i < upperBodyParts.length; i++) { upperBodyParts[i] = new ModelPart(this, 0, 16); upperBodyParts[i]->addBox(0, 0, 0, 2, 8, 2); @@ -18,34 +18,34 @@ BlazeModel::BlazeModel() : Model() // 4J added - compile now to avoid random performance hit first time cubes are rendered // 4J Stu - Not just performance, but alpha+depth tests don't work right unless we compile here - for (unsigned int i = 0; i < upperBodyParts.length; i++) + for (unsigned int i = 0; i < upperBodyParts.length; i++) { upperBodyParts[i]->compile(1.0f/16.0f); } head->compile(1.0f/16.0f); } -int BlazeModel::modelVersion() +int BlazeModel::modelVersion() { return 8; } -void BlazeModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void BlazeModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); head->render(scale,usecompiled); - for (unsigned int i = 0; i < upperBodyParts.length; i++) + for (unsigned int i = 0; i < upperBodyParts.length; i++) { upperBodyParts[i]->render(scale, usecompiled); } } -void BlazeModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim) +void BlazeModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim) { float angle = bob * PI * -.1f; - for (int i = 0; i < 4; i++) + for (int i = 0; i < 4; i++) { upperBodyParts[i]->y = -2 + Mth::cos((i * 2 + bob) * .25f); upperBodyParts[i]->x = Mth::cos(angle) * 9.0f; @@ -53,7 +53,7 @@ void BlazeModel::setupAnim(float time, float r, float bob, float yRot, float xRo angle += PI * 0.5f; } angle = .25f * PI + bob * PI * .03f; - for (int i = 4; i < 8; i++) + for (int i = 4; i < 8; i++) { upperBodyParts[i]->y = 2 + Mth::cos((i * 2 + bob) * .25f); upperBodyParts[i]->x = Mth::cos(angle) * 7.0f; @@ -62,7 +62,7 @@ void BlazeModel::setupAnim(float time, float r, float bob, float yRot, float xRo } angle = .15f * PI + bob * PI * -.05f; - for (int i = 8; i < 12; i++) + for (int i = 8; i < 12; i++) { upperBodyParts[i]->y = 11 + Mth::cos((i * 1.5f + bob) * .5f); upperBodyParts[i]->x = Mth::cos(angle) * 5.0f; diff --git a/Minecraft.Client/BlazeModel.h b/Minecraft.Client/BlazeModel.h index e710ebf6..27ee2060 100644 --- a/Minecraft.Client/BlazeModel.h +++ b/Minecraft.Client/BlazeModel.h @@ -1,7 +1,7 @@ #pragma once #include "Model.h" -class BlazeModel : public Model +class BlazeModel : public Model { private: @@ -11,6 +11,6 @@ private: public: BlazeModel(); int modelVersion(); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); }; diff --git a/Minecraft.Client/BlazeRenderer.cpp b/Minecraft.Client/BlazeRenderer.cpp index f3878c1d..7d5210dc 100644 --- a/Minecraft.Client/BlazeRenderer.cpp +++ b/Minecraft.Client/BlazeRenderer.cpp @@ -8,11 +8,11 @@ BlazeRenderer::BlazeRenderer() : MobRenderer(new BlazeModel(), 0.5f) this->modelVersion = ((BlazeModel *) model)->modelVersion(); } -void BlazeRenderer::render(std::shared_ptr _mob, double x, double y, double z, float rot, float a) +void BlazeRenderer::render(shared_ptr _mob, double x, double y, double z, float rot, float a) { - // 4J - original version used generics and thus had an input parameter of type Blaze rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type Blaze rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); int modelVersion = ((BlazeModel *) model)->modelVersion(); if (modelVersion != this->modelVersion) diff --git a/Minecraft.Client/BlazeRenderer.h b/Minecraft.Client/BlazeRenderer.h index 0ee973ca..fc575e9b 100644 --- a/Minecraft.Client/BlazeRenderer.h +++ b/Minecraft.Client/BlazeRenderer.h @@ -10,5 +10,5 @@ private: public: BlazeRenderer(); - virtual void render(std::shared_ptr mob, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr mob, double x, double y, double z, float rot, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/BoatModel.cpp b/Minecraft.Client/BoatModel.cpp index 096d243e..d0d465e5 100644 --- a/Minecraft.Client/BoatModel.cpp +++ b/Minecraft.Client/BoatModel.cpp @@ -16,19 +16,19 @@ BoatModel::BoatModel() : Model() cubes[0]->addBox((float)(-w / 2), (float)(-h / 2 + 2), -3, w, h - 4, 4, 0); cubes[0]->setPos(0, (float)(0 + yOff), 0); - + cubes[1]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[1]->setPos((float)(-w / 2 + 1), (float)(0 + yOff), 0); - + cubes[2]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[2]->setPos((float)(+w / 2 - 1), (float)(0 + yOff), 0); - + cubes[3]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[3]->setPos(0, (float)(0 + yOff), (float)(-h / 2 + 1)); - + cubes[4]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[4]->setPos(0, (float)(0 + yOff), (float)(+h / 2 - 1)); - + cubes[0]->xRot = PI / 2; cubes[1]->yRot = PI / 2 * 3; cubes[2]->yRot = PI / 2 * 1; @@ -42,7 +42,7 @@ BoatModel::BoatModel() : Model() cubes[4]->compile(1.0f/16.0f); } -void BoatModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void BoatModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { for (int i = 0; i < 5; i++) { diff --git a/Minecraft.Client/BoatModel.h b/Minecraft.Client/BoatModel.h index 192e140f..4298b643 100644 --- a/Minecraft.Client/BoatModel.h +++ b/Minecraft.Client/BoatModel.h @@ -7,5 +7,5 @@ class BoatModel : public Model public: ModelPart *cubes[5]; BoatModel(); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); }; \ No newline at end of file diff --git a/Minecraft.Client/BoatRenderer.cpp b/Minecraft.Client/BoatRenderer.cpp index 33ffc322..f1367ae4 100644 --- a/Minecraft.Client/BoatRenderer.cpp +++ b/Minecraft.Client/BoatRenderer.cpp @@ -10,11 +10,11 @@ BoatRenderer::BoatRenderer() : EntityRenderer() model = new BoatModel(); } -void BoatRenderer::render(std::shared_ptr _boat, double x, double y, double z, float rot, float a) +void BoatRenderer::render(shared_ptr _boat, double x, double y, double z, float rot, float a) { - // 4J - original version used generics and thus had an input parameter of type Boat rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type Boat rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr boat = dynamic_pointer_cast(_boat); + shared_ptr boat = dynamic_pointer_cast(_boat); glPushMatrix(); diff --git a/Minecraft.Client/BoatRenderer.h b/Minecraft.Client/BoatRenderer.h index c4bb0312..1cc9c1d9 100644 --- a/Minecraft.Client/BoatRenderer.h +++ b/Minecraft.Client/BoatRenderer.h @@ -9,5 +9,5 @@ protected: public: BoatRenderer(); - virtual void render(std::shared_ptr boat, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr boat, double x, double y, double z, float rot, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/BookModel.cpp b/Minecraft.Client/BookModel.cpp index dec3d6ac..bc4769bd 100644 --- a/Minecraft.Client/BookModel.cpp +++ b/Minecraft.Client/BookModel.cpp @@ -3,7 +3,7 @@ #include "BookModel.h" #include "ModelPart.h" -BookModel::BookModel() +BookModel::BookModel() { leftLid = (new ModelPart(this))->texOffs(0, 0)->addBox(-6, -5, 0, 6, 10, 0); rightLid = (new ModelPart(this))->texOffs(16, 0)->addBox(0, -5, 0, 6, 10, 0); @@ -33,7 +33,7 @@ BookModel::BookModel() } -void BookModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void BookModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/BookModel.h b/Minecraft.Client/BookModel.h index 3e6cee00..8b367a34 100644 --- a/Minecraft.Client/BookModel.h +++ b/Minecraft.Client/BookModel.h @@ -2,7 +2,7 @@ #pragma once #include "Model.h" -class BookModel : public Model +class BookModel : public Model { public: ModelPart *leftLid, *rightLid; @@ -11,6 +11,6 @@ public: ModelPart *seam; BookModel(); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); }; diff --git a/Minecraft.Client/Camera.cpp b/Minecraft.Client/Camera.cpp index 6c5a3649..db6072b2 100644 --- a/Minecraft.Client/Camera.cpp +++ b/Minecraft.Client/Camera.cpp @@ -21,7 +21,7 @@ float Camera::za = 0.0f; float Camera::xa2 = 0.0f; float Camera::za2 = 0.0f; -void Camera::prepare(std::shared_ptr player, bool mirror) +void Camera::prepare(shared_ptr player, bool mirror) { glGetFloat(GL_MODELVIEW_MATRIX, modelview); glGetFloat(GL_PROJECTION_MATRIX, projection); @@ -88,12 +88,12 @@ void Camera::prepare(std::shared_ptr player, bool mirror) ya = cosf(xRot * PI / 180.0f); } -TilePos *Camera::getCameraTilePos(std::shared_ptr player, double alpha) +TilePos *Camera::getCameraTilePos(shared_ptr player, double alpha) { return new TilePos(getCameraPos(player, alpha)); } -Vec3 *Camera::getCameraPos(std::shared_ptr player, double alpha) +Vec3 *Camera::getCameraPos(shared_ptr player, double alpha) { double xx = player->xo + (player->x - player->xo) * alpha; double yy = player->yo + (player->y - player->yo) * alpha + player->getHeadHeight(); @@ -106,7 +106,7 @@ Vec3 *Camera::getCameraPos(std::shared_ptr player, double alpha) return Vec3::newTemp(xt, yt, zt); } -int Camera::getBlockAt(Level *level, std::shared_ptr player, float alpha) +int Camera::getBlockAt(Level *level, shared_ptr player, float alpha) { Vec3 *p = Camera::getCameraPos(player, alpha); TilePos tp = TilePos(p); diff --git a/Minecraft.Client/Camera.h b/Minecraft.Client/Camera.h index 7e00540d..cccb0b2d 100644 --- a/Minecraft.Client/Camera.h +++ b/Minecraft.Client/Camera.h @@ -24,9 +24,9 @@ private: public: static float xa, ya, za, xa2, za2; - static void prepare(std::shared_ptr player, bool mirror); + static void prepare(shared_ptr player, bool mirror); - static TilePos *getCameraTilePos(std::shared_ptr player, double alpha); - static Vec3 *getCameraPos(std::shared_ptr player, double alpha); - static int getBlockAt(Level *level, std::shared_ptr player, float alpha); + static TilePos *getCameraTilePos(shared_ptr player, double alpha); + static Vec3 *getCameraPos(shared_ptr player, double alpha); + static int getBlockAt(Level *level, shared_ptr player, float alpha); }; \ No newline at end of file diff --git a/Minecraft.Client/ChestRenderer.cpp b/Minecraft.Client/ChestRenderer.cpp index d895d782..d1b5cf91 100644 --- a/Minecraft.Client/ChestRenderer.cpp +++ b/Minecraft.Client/ChestRenderer.cpp @@ -18,10 +18,10 @@ ChestRenderer::~ChestRenderer() delete largeChestModel; } -void ChestRenderer::render(std::shared_ptr _chest, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void ChestRenderer::render(shared_ptr _chest, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { // 4J Convert as we aren't using a templated class - std::shared_ptr chest = dynamic_pointer_cast(_chest); + shared_ptr chest = dynamic_pointer_cast(_chest); int data; diff --git a/Minecraft.Client/ChestRenderer.h b/Minecraft.Client/ChestRenderer.h index c52598e4..06c6bfff 100644 --- a/Minecraft.Client/ChestRenderer.h +++ b/Minecraft.Client/ChestRenderer.h @@ -11,8 +11,8 @@ private: ChestModel *largeChestModel; public: - ChestRenderer(); + ChestRenderer(); ~ChestRenderer(); - void render(std::shared_ptr _chest, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param + void render(shared_ptr _chest, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param }; diff --git a/Minecraft.Client/ChickenModel.cpp b/Minecraft.Client/ChickenModel.cpp index 2a88fac6..21dc2059 100644 --- a/Minecraft.Client/ChickenModel.cpp +++ b/Minecraft.Client/ChickenModel.cpp @@ -49,10 +49,10 @@ ChickenModel::ChickenModel() : Model() wing1->compile(1.0f/16.0f); } -void ChickenModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void ChickenModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); - if (young) + if (young) { float ss = 2; glPushMatrix(); @@ -70,8 +70,8 @@ void ChickenModel::render(std::shared_ptr entity, float time, float r, f wing0->render(scale,usecompiled); wing1->render(scale,usecompiled); glPopMatrix(); - } - else + } + else { head->render(scale,usecompiled); beak->render(scale,usecompiled); @@ -88,13 +88,13 @@ void ChickenModel::setupAnim(float time, float r, float bob, float yRot, float x { head->xRot = xRot / (float) (180 / PI); head->yRot = yRot / (float) (180 / PI); - + beak->xRot = head->xRot; beak->yRot = head->yRot; - + redThing->xRot = head->xRot; redThing->yRot = head->yRot; - + body->xRot = 90 / (float) (180 / PI); leg0->xRot = (Mth::cos(time * 0.6662f) * 1.4f) * r; diff --git a/Minecraft.Client/ChickenModel.h b/Minecraft.Client/ChickenModel.h index 81d83d99..9ee0858e 100644 --- a/Minecraft.Client/ChickenModel.h +++ b/Minecraft.Client/ChickenModel.h @@ -6,6 +6,6 @@ public: ModelPart *head, *hair, *body, *leg0, *leg1, *wing0,* wing1, *beak, *redThing; ChickenModel(); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); }; diff --git a/Minecraft.Client/ChickenRenderer.cpp b/Minecraft.Client/ChickenRenderer.cpp index 2e84a450..908ba506 100644 --- a/Minecraft.Client/ChickenRenderer.cpp +++ b/Minecraft.Client/ChickenRenderer.cpp @@ -7,18 +7,18 @@ ChickenRenderer::ChickenRenderer(Model *model, float shadow) : MobRenderer(model { } -void ChickenRenderer::render(std::shared_ptr _mob, double x, double y, double z, float rot, float a) +void ChickenRenderer::render(shared_ptr _mob, double x, double y, double z, float rot, float a) { MobRenderer::render(_mob, x, y, z, rot, a); } -float ChickenRenderer::getBob(std::shared_ptr _mob, float a) +float ChickenRenderer::getBob(shared_ptr _mob, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); float flap = mob->oFlap+(mob->flap-mob->oFlap)*a; float flapSpeed = mob->oFlapSpeed+(mob->flapSpeed-mob->oFlapSpeed)*a; - + return (Mth::sin(flap)+1)*flapSpeed; } \ No newline at end of file diff --git a/Minecraft.Client/ChickenRenderer.h b/Minecraft.Client/ChickenRenderer.h index 2c33176d..b81c9133 100644 --- a/Minecraft.Client/ChickenRenderer.h +++ b/Minecraft.Client/ChickenRenderer.h @@ -5,7 +5,7 @@ class ChickenRenderer : public MobRenderer { public: ChickenRenderer(Model *model, float shadow); - virtual void render(std::shared_ptr _mob, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr _mob, double x, double y, double z, float rot, float a); protected: - virtual float getBob(std::shared_ptr _mob, float a); + virtual float getBob(shared_ptr _mob, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/Chunk.cpp b/Minecraft.Client/Chunk.cpp index fcc540ad..99933db3 100644 --- a/Minecraft.Client/Chunk.cpp +++ b/Minecraft.Client/Chunk.cpp @@ -103,7 +103,7 @@ void Chunk::setPos(int x, int y, int z) { bb = AABB::newPermanent(-g, -g, -g, XZSIZE+g, SIZE+g, XZSIZE+g); } - else + else { // 4J MGH - bounds are relative to the position now, so the AABB will be setup already, either above, or from the tesselator bounds. // bb->set(-g, -g, -g, SIZE+g, SIZE+g, SIZE+g); @@ -141,7 +141,7 @@ void Chunk::setPos(int x, int y, int z) LeaveCriticalSection(&levelRenderer->m_csDirtyChunks); - + } void Chunk::translateToPos() @@ -173,7 +173,7 @@ void Chunk::makeCopyForRebuild(Chunk *source) this->clipChunk = NULL; this->id = source->id; this->globalRenderableTileEntities = source->globalRenderableTileEntities; - this->globalRenderableTileEntities_cs = source->globalRenderableTileEntities_cs; + this->globalRenderableTileEntities_cs = source->globalRenderableTileEntities_cs; } void Chunk::rebuild() @@ -186,7 +186,7 @@ void Chunk::rebuild() // if (!dirty) return; PIXBeginNamedEvent(0,"Rebuild section A"); - + #ifdef _LARGE_WORLDS Tesselator *t = Tesselator::getInstance(); #else @@ -204,10 +204,10 @@ void Chunk::rebuild() LevelChunk::touchedSky = false; -// unordered_set > oldTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); // 4J removed this & next line +// unordered_set > oldTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); // 4J removed this & next line // renderableTileEntities.clear(); - vector > renderableTileEntities; // 4J - added + vector > renderableTileEntities; // 4J - added int r = 1; @@ -223,7 +223,7 @@ void Chunk::rebuild() // Get the data for the level chunk that this render chunk is it (level chunk is 16 x 16 x 128, // render chunk is 16 x 16 x 16. We wouldn't have to actually get all of it if the data was ordered differently, but currently // it is ordered by x then z then y so just getting a small range of y out of it would involve getting the whole thing into - // the cache anyway. + // the cache anyway. #ifdef _LARGE_WORLDS unsigned char *tileIds = GetTileIdsStorage(); @@ -237,9 +237,9 @@ void Chunk::rebuild() TileRenderer *tileRenderer = new TileRenderer(region, this->x, this->y, this->z, tileIds); // AP - added a caching system for Chunk::rebuild to take advantage of - // Basically we're storing of copy of the tileIDs array inside the region so that calls to Region::getTile can grab data - // more quickly from this array rather than calling CompressedTileStorage. On the Vita the total thread time spent in - // Region::getTile went from 20% to 4%. + // Basically we're storing of copy of the tileIDs array inside the region so that calls to Region::getTile can grab data + // more quickly from this array rather than calling CompressedTileStorage. On the Vita the total thread time spent in + // Region::getTile went from 20% to 4%. #ifdef __PSVITA__ int xc = x >> 4; int zc = z >> 4; @@ -275,7 +275,7 @@ void Chunk::rebuild() if( yy == (Level::maxBuildHeight - 1) ) continue; if(( xx == 0 ) || ( xx == 15 )) continue; if(( zz == 0 ) || ( zz == 15 )) continue; - + // Establish whether this tile and its neighbours are all made of rock, dirt, unbreakable tiles, or have already // been determined to meet this criteria themselves and have a tile of 255 set. if( !( ( tileId == Tile::rock_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::unbreakable_Id ) || ( tileId == 255) ) ) continue; @@ -337,7 +337,7 @@ void Chunk::rebuild() PIXBeginNamedEvent(0,"Rebuild section C"); Tesselator::Bounds bounds; // 4J MGH - added { - // this was the old default clip bounds for the chunk, set in Chunk::setPos. + // this was the old default clip bounds for the chunk, set in Chunk::setPos. float g = 6.0f; bounds.boundingBox[0] = -g; bounds.boundingBox[1] = -g; @@ -398,11 +398,11 @@ void Chunk::rebuild() t->begin(); t->offset((float)(-this->x), (float)(-this->y), (float)(-this->z)); } - + Tile *tile = Tile::tiles[tileId]; if (currentLayer == 0 && tile->isEntityTile()) { - std::shared_ptr et = region->getTileEntity(x, y, z); + shared_ptr et = region->getTileEntity(x, y, z); if (TileEntityRenderDispatcher::instance->hasRenderer(et)) { renderableTileEntities.push_back(et); @@ -465,7 +465,7 @@ void Chunk::rebuild() { levelRenderer->setGlobalChunkFlag(this->x, this->y, this->z, level, LevelRenderer::CHUNK_FLAG_EMPTY1); RenderManager.CBuffClear(lists + 1); - break; + break; } } @@ -552,12 +552,12 @@ void Chunk::rebuild() oldTileEntities.removeAll(renderableTileEntities); globalRenderableTileEntities.removeAll(oldTileEntities); */ + - - unordered_set > newTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); - + unordered_set > newTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); + AUTO_VAR(endIt, oldTileEntities.end()); - for( unordered_set >::iterator it = oldTileEntities.begin(); it != endIt; it++ ) + for( unordered_set >::iterator it = oldTileEntities.begin(); it != endIt; it++ ) { newTileEntities.erase(*it); } @@ -566,7 +566,7 @@ void Chunk::rebuild() EnterCriticalSection(globalRenderableTileEntities_cs); endIt = newTileEntities.end(); - for( unordered_set >::iterator it = newTileEntities.begin(); it != endIt; it++ ) + for( unordered_set >::iterator it = newTileEntities.begin(); it != endIt; it++ ) { globalRenderableTileEntities->push_back(*it); } @@ -574,12 +574,12 @@ void Chunk::rebuild() // 4J - All these new things added to globalRenderableTileEntities AUTO_VAR(endItRTE, renderableTileEntities.end()); - for( vector >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ ) + for( vector >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ ) { oldTileEntities.erase(*it); } // 4J - oldTileEntities is now the removed items - vector >::iterator it = globalRenderableTileEntities->begin(); + vector >::iterator it = globalRenderableTileEntities->begin(); while( it != globalRenderableTileEntities->end() ) { if( oldTileEntities.find(*it) != oldTileEntities.end() ) @@ -656,10 +656,10 @@ void Chunk::rebuild_SPU() LevelChunk::touchedSky = false; -// unordered_set > oldTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); // 4J removed this & next line +// unordered_set > oldTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); // 4J removed this & next line // renderableTileEntities.clear(); - vector > renderableTileEntities; // 4J - added + vector > renderableTileEntities; // 4J - added // List newTileEntities = new ArrayList(); // newTileEntities.clear(); @@ -679,13 +679,13 @@ void Chunk::rebuild_SPU() // Get the data for the level chunk that this render chunk is it (level chunk is 16 x 16 x 128, // render chunk is 16 x 16 x 16. We wouldn't have to actually get all of it if the data was ordered differently, but currently // it is ordered by x then z then y so just getting a small range of y out of it would involve getting the whole thing into - // the cache anyway. + // the cache anyway. ChunkRebuildData* pOutData = NULL; g_rebuildDataIn.buildForChunk(®ion, level, x0, y0, z0); Tesselator::Bounds bounds; { - // this was the old default clip bounds for the chunk, set in Chunk::setPos. + // this was the old default clip bounds for the chunk, set in Chunk::setPos. float g = 6.0f; bounds.boundingBox[0] = -g; bounds.boundingBox[1] = -g; @@ -750,7 +750,7 @@ void Chunk::rebuild_SPU() { if (currentLayer == 0 && Tile::tiles[tileId]->isEntityTile()) { - std::shared_ptr et = region.getTileEntity(x, y, z); + shared_ptr et = region.getTileEntity(x, y, z); if (TileEntityRenderDispatcher::instance->hasRenderer(et)) { renderableTileEntities.push_back(et); @@ -881,12 +881,12 @@ void Chunk::rebuild_SPU() oldTileEntities.removeAll(renderableTileEntities); globalRenderableTileEntities.removeAll(oldTileEntities); */ + - - unordered_set > newTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); - + unordered_set > newTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); + AUTO_VAR(endIt, oldTileEntities.end()); - for( unordered_set >::iterator it = oldTileEntities.begin(); it != endIt; it++ ) + for( unordered_set >::iterator it = oldTileEntities.begin(); it != endIt; it++ ) { newTileEntities.erase(*it); } @@ -895,7 +895,7 @@ void Chunk::rebuild_SPU() EnterCriticalSection(globalRenderableTileEntities_cs); endIt = newTileEntities.end(); - for( unordered_set >::iterator it = newTileEntities.begin(); it != endIt; it++ ) + for( unordered_set >::iterator it = newTileEntities.begin(); it != endIt; it++ ) { globalRenderableTileEntities.push_back(*it); } @@ -903,12 +903,12 @@ void Chunk::rebuild_SPU() // 4J - All these new things added to globalRenderableTileEntities AUTO_VAR(endItRTE, renderableTileEntities.end()); - for( vector >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ ) + for( vector >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ ) { oldTileEntities.erase(*it); } // 4J - oldTileEntities is now the removed items - vector >::iterator it = globalRenderableTileEntities->begin(); + vector >::iterator it = globalRenderableTileEntities->begin(); while( it != globalRenderableTileEntities->end() ) { if( oldTileEntities.find(*it) != oldTileEntities.end() ) @@ -941,7 +941,7 @@ void Chunk::rebuild_SPU() #endif // _PS3_ -float Chunk::distanceToSqr(std::shared_ptr player) const +float Chunk::distanceToSqr(shared_ptr player) const { float xd = (float) (player->x - xm); float yd = (float) (player->y - ym); @@ -949,7 +949,7 @@ float Chunk::distanceToSqr(std::shared_ptr player) const return xd * xd + yd * yd + zd * zd; } -float Chunk::squishedDistanceToSqr(std::shared_ptr player) +float Chunk::squishedDistanceToSqr(shared_ptr player) { float xd = (float) (player->x - xm); float yd = (float) (player->y - ym) * 2; diff --git a/Minecraft.Client/Chunk.h b/Minecraft.Client/Chunk.h index 276372db..f7947156 100644 --- a/Minecraft.Client/Chunk.h +++ b/Minecraft.Client/Chunk.h @@ -38,22 +38,22 @@ public: static void ReleaseThreadStorage(); static unsigned char *GetTileIdsStorage(); #endif - + public: static int updates; int x, y, z; int xRender, yRender, zRender; int xRenderOffs, yRenderOffs, zRenderOffs; - + int xm, ym, zm; AABB *bb; ClipChunk *clipChunk; int id; //public: -// vector > renderableTileEntities; // 4J - removed - +// vector > renderableTileEntities; // 4J - removed + private: LevelRenderer::rteMap *globalRenderableTileEntities; CRITICAL_SECTION *globalRenderableTileEntities_cs; @@ -71,8 +71,8 @@ public: #ifdef __PS3__ void rebuild_SPU(); #endif // __PS3__ - float distanceToSqr(std::shared_ptr player) const; - float squishedDistanceToSqr(std::shared_ptr player); + float distanceToSqr(shared_ptr player) const; + float squishedDistanceToSqr(shared_ptr player); void reset(); void _delete(); diff --git a/Minecraft.Client/ClientConnection.cpp b/Minecraft.Client/ClientConnection.cpp index f2fbf3fc..5ba3cb85 100644 --- a/Minecraft.Client/ClientConnection.cpp +++ b/Minecraft.Client/ClientConnection.cpp @@ -150,16 +150,16 @@ INetworkPlayer *ClientConnection::getNetworkPlayer() else return NULL; } -void ClientConnection::handleLogin(std::shared_ptr packet) +void ClientConnection::handleLogin(shared_ptr packet) { if (done) return; PlayerUID OnlineXuid; ProfileManager.GetXUID(m_userIndex,&OnlineXuid,true); // online xuid MOJANG_DATA *pMojangData = NULL; - + if(!g_NetworkManager.IsLocalGame()) - { + { pMojangData=app.GetMojangDataForXuid(OnlineXuid); } @@ -211,7 +211,7 @@ void ClientConnection::handleLogin(std::shared_ptr packet) // check the file is not already in bRes=app.IsFileInMemoryTextures(wstr); if(!bRes) - { + { #ifdef _XBOX C4JStorage::ETMSStatus eTMSStatus; eTMSStatus=StorageManager.ReadTMSFile(iUserID,C4JStorage::eGlobalStorage_Title,C4JStorage::eTMS_FileType_Graphic,pMojangData->wchSkin,&pBuffer, &dwSize); @@ -223,17 +223,17 @@ void ClientConnection::handleLogin(std::shared_ptr packet) if(bRes) { app.AddMemoryTextureFile(wstr,pBuffer,dwSize); - } + } } // a cloak? if(pMojangData->wchCape[0]!=0L) - { + { wstring wstr=pMojangData->wchCape; // check the file is not already in bRes=app.IsFileInMemoryTextures(wstr); if(!bRes) - { + { #ifdef _XBOX C4JStorage::ETMSStatus eTMSStatus; eTMSStatus=StorageManager.ReadTMSFile(iUserID,C4JStorage::eGlobalStorage_Title,C4JStorage::eTMS_FileType_Graphic,pMojangData->wchCape,&pBuffer, &dwSize); @@ -291,7 +291,7 @@ void ClientConnection::handleLogin(std::shared_ptr packet) app.DebugPrintf("ClientConnection - DIFFICULTY --- %d\n",packet->difficulty); level->difficulty = packet->difficulty; // 4J Added level->isClientSide = true; - minecraft->setLevel(level); + minecraft->setLevel(level); } minecraft->player->setPlayerIndex( packet->m_playerIndex ); @@ -328,7 +328,7 @@ void ClientConnection::handleLogin(std::shared_ptr packet) // 4J-PB - this isn't the level we want //level = (MultiPlayerLevel *)minecraft->level; level = (MultiPlayerLevel *)minecraft->getLevel( packet->dimension ); - std::shared_ptr player; + shared_ptr player; if(level==NULL) { @@ -351,11 +351,11 @@ void ClientConnection::handleLogin(std::shared_ptr packet) // 4J Stu - At time of writing ProfileManager.GetGamertag() does not always return the correct name, // if sign-ins are turned off while the player signed in. Using the qnetPlayer instead. // need to have a level before create extra local player - MultiPlayerLevel *levelpassedin=(MultiPlayerLevel *)level; + MultiPlayerLevel *levelpassedin=(MultiPlayerLevel *)level; player = minecraft->createExtraLocalPlayer(m_userIndex, networkPlayer->GetOnlineName(), m_userIndex, packet->dimension, this,levelpassedin); // need to have a player before the setlevel - std::shared_ptr lastPlayer = minecraft->player; + shared_ptr lastPlayer = minecraft->player; minecraft->player = minecraft->localplayers[m_userIndex]; minecraft->setLevel(level); minecraft->player = lastPlayer; @@ -373,7 +373,7 @@ void ClientConnection::handleLogin(std::shared_ptr packet) player->setPlayerIndex( packet->m_playerIndex ); player->setCustomSkin( app.GetPlayerSkinId(m_userIndex) ); player->setCustomCape( app.GetPlayerCapeId(m_userIndex) ); - + BYTE networkSmallId = getSocket()->getSmallId(); app.UpdatePlayerInfo(networkSmallId, packet->m_playerIndex, packet->m_uiGamePrivileges); @@ -385,50 +385,50 @@ void ClientConnection::handleLogin(std::shared_ptr packet) displayPrivilegeChanges(minecraft->localplayers[m_userIndex],startingPrivileges); } - + maxPlayers = packet->maxPlayers; - + // need to have a player before the setLocalCreativeMode - std::shared_ptr lastPlayer = minecraft->player; + shared_ptr lastPlayer = minecraft->player; minecraft->player = minecraft->localplayers[m_userIndex]; ((MultiPlayerGameMode *)minecraft->localgameModes[m_userIndex])->setLocalMode(GameType::byId(packet->gameType)); minecraft->player = lastPlayer; - + // make sure the UI offsets for this player are set correctly if(iUserID!=-1) { ui.UpdateSelectedItemPos(iUserID); } - + TelemetryManager->RecordLevelStart(m_userIndex, eSen_FriendOrMatch_Playing_With_Invited_Friends, eSen_CompeteOrCoop_Coop_and_Competitive, Minecraft::GetInstance()->getLevel(packet->dimension)->difficulty, app.GetLocalPlayerCount(), g_NetworkManager.GetOnlinePlayerCount()); } -void ClientConnection::handleAddEntity(std::shared_ptr packet) +void ClientConnection::handleAddEntity(shared_ptr packet) { double x = packet->x / 32.0; double y = packet->y / 32.0; double z = packet->z / 32.0; - std::shared_ptr e; + shared_ptr e; boolean setRot = true; // 4J-PB - replacing this massive if nest with switch switch(packet->type) { case AddEntityPacket::MINECART_RIDEABLE: - e = std::shared_ptr( new Minecart(level, x, y, z, Minecart::RIDEABLE) ); + e = shared_ptr( new Minecart(level, x, y, z, Minecart::RIDEABLE) ); break; case AddEntityPacket::MINECART_CHEST: - e = std::shared_ptr( new Minecart(level, x, y, z, Minecart::CHEST) ); + e = shared_ptr( new Minecart(level, x, y, z, Minecart::CHEST) ); break; case AddEntityPacket::MINECART_FURNACE: - e = std::shared_ptr( new Minecart(level, x, y, z, Minecart::FURNACE) ); + e = shared_ptr( new Minecart(level, x, y, z, Minecart::FURNACE) ); break; case AddEntityPacket::FISH_HOOK: { // 4J Stu - Brought forward from 1.4 to be able to drop XP from fishing - std::shared_ptr owner = getEntity(packet->data); + shared_ptr owner = getEntity(packet->data); // 4J - check all local players to find match if( owner == NULL ) @@ -446,10 +446,10 @@ void ClientConnection::handleAddEntity(std::shared_ptr packet) } } } - std::shared_ptr player = dynamic_pointer_cast(owner); + shared_ptr player = dynamic_pointer_cast(owner); if (player != NULL) { - std::shared_ptr hook = std::shared_ptr( new FishingHook(level, x, y, z, player) ); + shared_ptr hook = shared_ptr( new FishingHook(level, x, y, z, player) ); e = hook; // 4J Stu - Move the player->fishing out of the ctor as we cannot reference 'this' player->fishing = hook; @@ -458,10 +458,10 @@ void ClientConnection::handleAddEntity(std::shared_ptr packet) } break; case AddEntityPacket::ARROW: - e = std::shared_ptr( new Arrow(level, x, y, z) ); + e = shared_ptr( new Arrow(level, x, y, z) ); break; case AddEntityPacket::SNOWBALL: - e = std::shared_ptr( new Snowball(level, x, y, z) ); + e = shared_ptr( new Snowball(level, x, y, z) ); break; case AddEntityPacket::ITEM_FRAME: { @@ -470,66 +470,66 @@ void ClientConnection::handleAddEntity(std::shared_ptr packet) int iz = (int) z; app.DebugPrintf("ClientConnection ITEM_FRAME xyz %d,%d,%d\n",ix,iy,iz); } - e = std::shared_ptr(new ItemFrame(level, (int) x, (int) y, (int) z, packet->data)); + e = shared_ptr(new ItemFrame(level, (int) x, (int) y, (int) z, packet->data)); packet->data = 0; setRot = false; break; case AddEntityPacket::THROWN_ENDERPEARL: - e = std::shared_ptr( new ThrownEnderpearl(level, x, y, z) ); + e = shared_ptr( new ThrownEnderpearl(level, x, y, z) ); break; case AddEntityPacket::EYEOFENDERSIGNAL: - e = std::shared_ptr( new EyeOfEnderSignal(level, x, y, z) ); + e = shared_ptr( new EyeOfEnderSignal(level, x, y, z) ); break; case AddEntityPacket::FIREBALL: - e = std::shared_ptr( new Fireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); + e = shared_ptr( new Fireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); packet->data = 0; break; case AddEntityPacket::SMALL_FIREBALL: - e = std::shared_ptr( new SmallFireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); + e = shared_ptr( new SmallFireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); packet->data = 0; break; case AddEntityPacket::DRAGON_FIRE_BALL: - e = std::shared_ptr( new DragonFireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); + e = shared_ptr( new DragonFireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); packet->data = 0; break; case AddEntityPacket::EGG: - e = std::shared_ptr( new ThrownEgg(level, x, y, z) ); + e = shared_ptr( new ThrownEgg(level, x, y, z) ); break; case AddEntityPacket::THROWN_POTION: - e = std::shared_ptr( new ThrownPotion(level, x, y, z, packet->data) ); + e = shared_ptr( new ThrownPotion(level, x, y, z, packet->data) ); packet->data = 0; break; case AddEntityPacket::THROWN_EXPBOTTLE: - e = std::shared_ptr( new ThrownExpBottle(level, x, y, z) ); + e = shared_ptr( new ThrownExpBottle(level, x, y, z) ); packet->data = 0; break; case AddEntityPacket::BOAT: - e = std::shared_ptr( new Boat(level, x, y, z) ); + e = shared_ptr( new Boat(level, x, y, z) ); break; case AddEntityPacket::PRIMED_TNT: - e = std::shared_ptr( new PrimedTnt(level, x, y, z) ); + e = shared_ptr( new PrimedTnt(level, x, y, z) ); break; case AddEntityPacket::ENDER_CRYSTAL: - e = std::shared_ptr( new EnderCrystal(level, x, y, z) ); + e = shared_ptr( new EnderCrystal(level, x, y, z) ); break; case AddEntityPacket::ITEM: - e = std::shared_ptr( new ItemEntity(level, x, y, z) ); + e = shared_ptr( new ItemEntity(level, x, y, z) ); break; case AddEntityPacket::FALLING: - e = std::shared_ptr( new FallingTile(level, x, y, z, packet->data & 0xFFFF, packet->data >> 16) ); + e = shared_ptr( new FallingTile(level, x, y, z, packet->data & 0xFFFF, packet->data >> 16) ); packet->data = 0; break; } - /* if (packet->type == AddEntityPacket::MINECART_RIDEABLE) e = std::shared_ptr( new Minecart(level, x, y, z, Minecart::RIDEABLE) ); - if (packet->type == AddEntityPacket::MINECART_CHEST) e = std::shared_ptr( new Minecart(level, x, y, z, Minecart::CHEST) ); - if (packet->type == AddEntityPacket::MINECART_FURNACE) e = std::shared_ptr( new Minecart(level, x, y, z, Minecart::FURNACE) ); + /* if (packet->type == AddEntityPacket::MINECART_RIDEABLE) e = shared_ptr( new Minecart(level, x, y, z, Minecart::RIDEABLE) ); + if (packet->type == AddEntityPacket::MINECART_CHEST) e = shared_ptr( new Minecart(level, x, y, z, Minecart::CHEST) ); + if (packet->type == AddEntityPacket::MINECART_FURNACE) e = shared_ptr( new Minecart(level, x, y, z, Minecart::FURNACE) ); if (packet->type == AddEntityPacket::FISH_HOOK) { // 4J Stu - Brought forward from 1.4 to be able to drop XP from fishing - std::shared_ptr owner = getEntity(packet->data); + shared_ptr owner = getEntity(packet->data); // 4J - check all local players to find match if( owner == NULL ) @@ -547,48 +547,48 @@ void ClientConnection::handleAddEntity(std::shared_ptr packet) } } } - std::shared_ptr player = dynamic_pointer_cast(owner); + shared_ptr player = dynamic_pointer_cast(owner); if (player != NULL) { - std::shared_ptr hook = std::shared_ptr( new FishingHook(level, x, y, z, player) ); + shared_ptr hook = shared_ptr( new FishingHook(level, x, y, z, player) ); e = hook; // 4J Stu - Move the player->fishing out of the ctor as we cannot reference 'this' player->fishing = hook; } packet->data = 0; } - - if (packet->type == AddEntityPacket::ARROW) e = std::shared_ptr( new Arrow(level, x, y, z) ); - if (packet->type == AddEntityPacket::SNOWBALL) e = std::shared_ptr( new Snowball(level, x, y, z) ); - if (packet->type == AddEntityPacket::THROWN_ENDERPEARL) e = std::shared_ptr( new ThrownEnderpearl(level, x, y, z) ); - if (packet->type == AddEntityPacket::EYEOFENDERSIGNAL) e = std::shared_ptr( new EyeOfEnderSignal(level, x, y, z) ); + + if (packet->type == AddEntityPacket::ARROW) e = shared_ptr( new Arrow(level, x, y, z) ); + if (packet->type == AddEntityPacket::SNOWBALL) e = shared_ptr( new Snowball(level, x, y, z) ); + if (packet->type == AddEntityPacket::THROWN_ENDERPEARL) e = shared_ptr( new ThrownEnderpearl(level, x, y, z) ); + if (packet->type == AddEntityPacket::EYEOFENDERSIGNAL) e = shared_ptr( new EyeOfEnderSignal(level, x, y, z) ); if (packet->type == AddEntityPacket::FIREBALL) { - e = std::shared_ptr( new Fireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); + e = shared_ptr( new Fireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); packet->data = 0; } if (packet->type == AddEntityPacket::SMALL_FIREBALL) { - e = std::shared_ptr( new SmallFireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); + e = shared_ptr( new SmallFireball(level, x, y, z, packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0) ); packet->data = 0; } - if (packet->type == AddEntityPacket::EGG) e = std::shared_ptr( new ThrownEgg(level, x, y, z) ); + if (packet->type == AddEntityPacket::EGG) e = shared_ptr( new ThrownEgg(level, x, y, z) ); if (packet->type == AddEntityPacket::THROWN_POTION) { - e = std::shared_ptr( new ThrownPotion(level, x, y, z, packet->data) ); + e = shared_ptr( new ThrownPotion(level, x, y, z, packet->data) ); packet->data = 0; } if (packet->type == AddEntityPacket::THROWN_EXPBOTTLE) { - e = std::shared_ptr( new ThrownExpBottle(level, x, y, z) ); + e = shared_ptr( new ThrownExpBottle(level, x, y, z) ); packet->data = 0; } - if (packet->type == AddEntityPacket::BOAT) e = std::shared_ptr( new Boat(level, x, y, z) ); - if (packet->type == AddEntityPacket::PRIMED_TNT) e = std::shared_ptr( new PrimedTnt(level, x, y, z) ); - if (packet->type == AddEntityPacket::ENDER_CRYSTAL) e = std::shared_ptr( new EnderCrystal(level, x, y, z) ); - if (packet->type == AddEntityPacket::FALLING_SAND) e = std::shared_ptr( new FallingTile(level, x, y, z, Tile::sand->id) ); - if (packet->type == AddEntityPacket::FALLING_GRAVEL) e = std::shared_ptr( new FallingTile(level, x, y, z, Tile::gravel->id) ); - if (packet->type == AddEntityPacket::FALLING_EGG) e = std::shared_ptr( new FallingTile(level, x, y, z, Tile::dragonEgg_Id) ); + if (packet->type == AddEntityPacket::BOAT) e = shared_ptr( new Boat(level, x, y, z) ); + if (packet->type == AddEntityPacket::PRIMED_TNT) e = shared_ptr( new PrimedTnt(level, x, y, z) ); + if (packet->type == AddEntityPacket::ENDER_CRYSTAL) e = shared_ptr( new EnderCrystal(level, x, y, z) ); + if (packet->type == AddEntityPacket::FALLING_SAND) e = shared_ptr( new FallingTile(level, x, y, z, Tile::sand->id) ); + if (packet->type == AddEntityPacket::FALLING_GRAVEL) e = shared_ptr( new FallingTile(level, x, y, z, Tile::gravel->id) ); + if (packet->type == AddEntityPacket::FALLING_EGG) e = shared_ptr( new FallingTile(level, x, y, z, Tile::dragonEgg_Id) ); */ @@ -603,13 +603,13 @@ void ClientConnection::handleAddEntity(std::shared_ptr packet) e->yRotp = packet->yRot; e->xRotp = packet->xRot; - if (setRot) + if (setRot) { e->yRot = 0.0f; e->xRot = 0.0f; } - vector > *subEntities = e->getSubEntities(); + vector > *subEntities = e->getSubEntities(); if (subEntities != NULL) { int offs = packet->id - e->entityId; @@ -635,7 +635,7 @@ void ClientConnection::handleAddEntity(std::shared_ptr packet) if (packet->type == AddEntityPacket::ARROW) { - std::shared_ptr owner = getEntity(packet->data); + shared_ptr owner = getEntity(packet->data); // 4J - check all local players to find match if( owner == NULL ) @@ -659,15 +659,15 @@ void ClientConnection::handleAddEntity(std::shared_ptr packet) } } - e->lerpMotion(packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0); + e->lerpMotion(packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0); } } } -void ClientConnection::handleAddExperienceOrb(std::shared_ptr packet) +void ClientConnection::handleAddExperienceOrb(shared_ptr packet) { - std::shared_ptr e = std::shared_ptr( new ExperienceOrb(level, packet->x / 32.0, packet->y / 32.0, packet->z / 32.0, packet->value) ); + shared_ptr e = shared_ptr( new ExperienceOrb(level, packet->x / 32.0, packet->y / 32.0, packet->z / 32.0, packet->value) ); e->xp = packet->x; e->yp = packet->y; e->zp = packet->z; @@ -677,13 +677,13 @@ void ClientConnection::handleAddExperienceOrb(std::shared_ptrputEntity(packet->id, e); } -void ClientConnection::handleAddGlobalEntity(std::shared_ptr packet) +void ClientConnection::handleAddGlobalEntity(shared_ptr packet) { double x = packet->x / 32.0; double y = packet->y / 32.0; double z = packet->z / 32.0; - std::shared_ptr e;// = nullptr; - if (packet->type == AddGlobalEntityPacket::LIGHTNING) e = std::shared_ptr( new LightningBolt(level, x, y, z) ); + shared_ptr e;// = nullptr; + if (packet->type == AddGlobalEntityPacket::LIGHTNING) e = shared_ptr( new LightningBolt(level, x, y, z) ); if (e != NULL) { e->xp = packet->x; @@ -696,29 +696,29 @@ void ClientConnection::handleAddGlobalEntity(std::shared_ptr packet) +void ClientConnection::handleAddPainting(shared_ptr packet) { - std::shared_ptr painting = std::shared_ptr( new Painting(level, packet->x, packet->y, packet->z, packet->dir, packet->motive) ); + shared_ptr painting = shared_ptr( new Painting(level, packet->x, packet->y, packet->z, packet->dir, packet->motive) ); level->putEntity(packet->id, painting); } -void ClientConnection::handleSetEntityMotion(std::shared_ptr packet) +void ClientConnection::handleSetEntityMotion(shared_ptr packet) { - std::shared_ptr e = getEntity(packet->id); + shared_ptr e = getEntity(packet->id); if (e == NULL) return; e->lerpMotion(packet->xa / 8000.0, packet->ya / 8000.0, packet->za / 8000.0); } -void ClientConnection::handleSetEntityData(std::shared_ptr packet) +void ClientConnection::handleSetEntityData(shared_ptr packet) { - std::shared_ptr e = getEntity(packet->id); + shared_ptr e = getEntity(packet->id); if (e != NULL && packet->getUnpackedData() != NULL) { e->getEntityData()->assignValues(packet->getUnpackedData()); } } -void ClientConnection::handleAddPlayer(std::shared_ptr packet) +void ClientConnection::handleAddPlayer(shared_ptr packet) { // Some remote players could actually be local players that are already added for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) @@ -755,7 +755,7 @@ void ClientConnection::handleAddPlayer(std::shared_ptr packet) double z = packet->z / 32.0; float yRot = packet->yRot * 360 / 256.0f; float xRot = packet->xRot * 360 / 256.0f; - std::shared_ptr player = std::shared_ptr( new RemotePlayer(minecraft->level, packet->name) ); + shared_ptr player = shared_ptr( new RemotePlayer(minecraft->level, packet->name) ); player->xo = player->xOld = player->xp = packet->x; player->yo = player->yOld = player->yp = packet->y; player->zo = player->zOld = player->zp = packet->z; @@ -778,11 +778,11 @@ void ClientConnection::handleAddPlayer(std::shared_ptr packet) int item = packet->carriedItem; if (item == 0) { - player->inventory->items[player->inventory->selected] = std::shared_ptr(); // NULL; + player->inventory->items[player->inventory->selected] = shared_ptr(); // NULL; } else { - player->inventory->items[player->inventory->selected] = std::shared_ptr( new ItemInstance(item, 1, 0) ); + player->inventory->items[player->inventory->selected] = shared_ptr( new ItemInstance(item, 1, 0) ); } player->absMoveTo(x, y, z, yRot, xRot); @@ -790,14 +790,14 @@ void ClientConnection::handleAddPlayer(std::shared_ptr packet) player->setCustomSkin( packet->m_skinId ); player->setCustomCape( packet->m_capeId ); player->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_All, packet->m_uiGamePrivileges); - + if(!player->customTextureUrl.empty() && player->customTextureUrl.substr(0,3).compare(L"def") != 0 && !app.IsFileInMemoryTextures(player->customTextureUrl)) { if( minecraft->addPendingClientTextureRequest(player->customTextureUrl) ) { app.DebugPrintf("Client sending TextureAndGeometryPacket to get custom skin %ls for player %ls\n",player->customTextureUrl.c_str(), player->name.c_str()); - send(std::shared_ptr( new TextureAndGeometryPacket(player->customTextureUrl,NULL,0) ) ); + send(shared_ptr( new TextureAndGeometryPacket(player->customTextureUrl,NULL,0) ) ); } } else if(!player->customTextureUrl.empty() && app.IsFileInMemoryTextures(player->customTextureUrl)) @@ -807,13 +807,13 @@ void ClientConnection::handleAddPlayer(std::shared_ptr packet) } app.DebugPrintf("Custom skin for player %ls is %ls\n",player->name.c_str(),player->customTextureUrl.c_str()); - + if(!player->customTextureUrl2.empty() && player->customTextureUrl2.substr(0,3).compare(L"def") != 0 && !app.IsFileInMemoryTextures(player->customTextureUrl2)) { if( minecraft->addPendingClientTextureRequest(player->customTextureUrl2) ) { app.DebugPrintf("Client sending texture packet to get custom cape %ls for player %ls\n",player->customTextureUrl2.c_str(), player->name.c_str()); - send(std::shared_ptr( new TexturePacket(player->customTextureUrl2,NULL,0) ) ); + send(shared_ptr( new TexturePacket(player->customTextureUrl2,NULL,0) ) ); } } else if(!player->customTextureUrl2.empty() && app.IsFileInMemoryTextures(player->customTextureUrl2)) @@ -826,7 +826,7 @@ void ClientConnection::handleAddPlayer(std::shared_ptr packet) level->putEntity(packet->id, player); - vector > *unpackedData = packet->getUnpackedData(); + vector > *unpackedData = packet->getUnpackedData(); if (unpackedData != NULL) { player->getEntityData()->assignValues(unpackedData); @@ -834,9 +834,9 @@ void ClientConnection::handleAddPlayer(std::shared_ptr packet) } -void ClientConnection::handleTeleportEntity(std::shared_ptr packet) +void ClientConnection::handleTeleportEntity(shared_ptr packet) { - std::shared_ptr e = getEntity(packet->id); + shared_ptr e = getEntity(packet->id); if (e == NULL) return; e->xp = packet->x; e->yp = packet->y; @@ -856,9 +856,9 @@ void ClientConnection::handleTeleportEntity(std::shared_ptrlerpTo(x, y, z, yRot, xRot, 3); } -void ClientConnection::handleMoveEntity(std::shared_ptr packet) +void ClientConnection::handleMoveEntity(shared_ptr packet) { - std::shared_ptr e = getEntity(packet->id); + shared_ptr e = getEntity(packet->id); if (e == NULL) return; e->xp += packet->xa; e->yp += packet->ya; @@ -877,17 +877,17 @@ void ClientConnection::handleMoveEntity(std::shared_ptr packet e->lerpTo(x, y, z, yRot, xRot, 3); } -void ClientConnection::handleRotateMob(std::shared_ptr packet) +void ClientConnection::handleRotateMob(shared_ptr packet) { - std::shared_ptr e = getEntity(packet->id); + shared_ptr e = getEntity(packet->id); if (e == NULL) return; float yHeadRot = packet->yHeadRot * 360 / 256.f; e->setYHeadRot(yHeadRot); } -void ClientConnection::handleMoveEntitySmall(std::shared_ptr packet) +void ClientConnection::handleMoveEntitySmall(shared_ptr packet) { - std::shared_ptr e = getEntity(packet->id); + shared_ptr e = getEntity(packet->id); if (e == NULL) return; e->xp += packet->xa; e->yp += packet->ya; @@ -906,7 +906,7 @@ void ClientConnection::handleMoveEntitySmall(std::shared_ptrlerpTo(x, y, z, yRot, xRot, 3); } -void ClientConnection::handleRemoveEntity(std::shared_ptr packet) +void ClientConnection::handleRemoveEntity(shared_ptr packet) { for (int i = 0; i < packet->ids.length; i++) { @@ -914,9 +914,9 @@ void ClientConnection::handleRemoveEntity(std::shared_ptr } } -void ClientConnection::handleMovePlayer(std::shared_ptr packet) +void ClientConnection::handleMovePlayer(shared_ptr packet) { - std::shared_ptr player = minecraft->localplayers[m_userIndex]; //minecraft->player; + shared_ptr player = minecraft->localplayers[m_userIndex]; //minecraft->player; double x = player->x; double y = player->y; @@ -945,7 +945,7 @@ void ClientConnection::handleMovePlayer(std::shared_ptr packet packet->yView = player->y; connection->send(packet); if (!started) - { + { if(!g_NetworkManager.IsHost() ) { @@ -961,7 +961,7 @@ void ClientConnection::handleMovePlayer(std::shared_ptr packet started = true; minecraft->setScreen(NULL); - + // Fix for #105852 - TU12: Content: Gameplay: Local splitscreen Players are spawned at incorrect places after re-joining previously saved and loaded "Mass Effect World". // Move this check from Minecraft::createExtraLocalPlayer // 4J-PB - can't call this when this function is called from the qnet thread (GetGameStarted will be false) @@ -974,19 +974,19 @@ void ClientConnection::handleMovePlayer(std::shared_ptr packet } // 4J Added -void ClientConnection::handleChunkVisibilityArea(std::shared_ptr packet) +void ClientConnection::handleChunkVisibilityArea(shared_ptr packet) { for(int z = packet->m_minZ; z <= packet->m_maxZ; ++z) for(int x = packet->m_minX; x <= packet->m_maxX; ++x) level->setChunkVisible(x, z, true); } -void ClientConnection::handleChunkVisibility(std::shared_ptr packet) +void ClientConnection::handleChunkVisibility(shared_ptr packet) { level->setChunkVisible(packet->x, packet->z, packet->visible); } -void ClientConnection::handleChunkTilesUpdate(std::shared_ptr packet) +void ClientConnection::handleChunkTilesUpdate(shared_ptr packet) { // 4J - changed to encode level in packet MultiPlayerLevel *dimensionLevel = (MultiPlayerLevel *)minecraft->levels[packet->levelIdx]; @@ -1035,7 +1035,7 @@ void ClientConnection::handleChunkTilesUpdate(std::shared_ptr packet) +void ClientConnection::handleBlockRegionUpdate(shared_ptr packet) { // 4J - changed to encode level in packet MultiPlayerLevel *dimensionLevel = (MultiPlayerLevel *)minecraft->levels[packet->levelIdx]; @@ -1090,7 +1090,7 @@ void ClientConnection::handleBlockRegionUpdate(std::shared_ptr packet) +void ClientConnection::handleTileUpdate(shared_ptr packet) { // 4J added - using a block of 255 to signify that this is a packet for destroying a tile, where we need to inform the level renderer that we are about to do so. // This is used in creative mode as the point where a tile is first destroyed at the client end of things. Packets formed like this are potentially sent from @@ -1147,11 +1147,11 @@ void ClientConnection::handleTileUpdate(std::shared_ptr packet } } -void ClientConnection::handleDisconnect(std::shared_ptr packet) +void ClientConnection::handleDisconnect(shared_ptr packet) { connection->close(DisconnectPacket::eDisconnect_Kicked); done = true; - + Minecraft *pMinecraft = Minecraft::GetInstance(); pMinecraft->connectionDisconnected( m_userIndex , packet->reason ); app.SetDisconnectReason( packet->reason ); @@ -1191,23 +1191,23 @@ void ClientConnection::onDisconnect(DisconnectPacket::eDisconnectReason reason, //minecraft->setScreen(new DisconnectedScreen(L"disconnect.lost", reason, reasonObjects)); } -void ClientConnection::sendAndDisconnect(std::shared_ptr packet) +void ClientConnection::sendAndDisconnect(shared_ptr packet) { if (done) return; connection->send(packet); connection->sendAndQuit(); } -void ClientConnection::send(std::shared_ptr packet) +void ClientConnection::send(shared_ptr packet) { if (done) return; connection->send(packet); } -void ClientConnection::handleTakeItemEntity(std::shared_ptr packet) +void ClientConnection::handleTakeItemEntity(shared_ptr packet) { - std::shared_ptr from = getEntity(packet->itemId); - std::shared_ptr to = dynamic_pointer_cast(getEntity(packet->playerId)); + shared_ptr from = getEntity(packet->itemId); + shared_ptr to = dynamic_pointer_cast(getEntity(packet->playerId)); // 4J - the original game could assume that if getEntity didn't find the player, it must be the local player. We // need to search all local players @@ -1235,12 +1235,12 @@ void ClientConnection::handleTakeItemEntity(std::shared_ptr player = dynamic_pointer_cast(to); + shared_ptr player = dynamic_pointer_cast(to); // 4J Stu - Fix for #10213 - UI: Local clients cannot progress through the tutorial normally. // We only send this packet once if many local players can see the event, so make sure we update @@ -1261,7 +1261,7 @@ void ClientConnection::handleTakeItemEntity(std::shared_ptrplaySound(from, eSoundType_RANDOM_POP, 0.2f, ((random->nextFloat() - random->nextFloat()) * 0.7f + 1.0f) * 2.0f); } - minecraft->particleEngine->add( std::shared_ptr( new TakeAnimationParticle(minecraft->level, from, to, -0.5f) ) ); + minecraft->particleEngine->add( shared_ptr( new TakeAnimationParticle(minecraft->level, from, to, -0.5f) ) ); level->removeEntity(packet->itemId); } else @@ -1274,14 +1274,14 @@ void ClientConnection::handleTakeItemEntity(std::shared_ptrplaySound(from, eSoundType_RANDOM_POP, 0.2f, ((random->nextFloat() - random->nextFloat()) * 0.7f + 1.0f) * 2.0f); - minecraft->particleEngine->add( std::shared_ptr( new TakeAnimationParticle(minecraft->level, from, to, -0.5f) ) ); + minecraft->particleEngine->add( shared_ptr( new TakeAnimationParticle(minecraft->level, from, to, -0.5f) ) ); level->removeEntity(packet->itemId); } } } -void ClientConnection::handleChat(std::shared_ptr packet) +void ClientConnection::handleChat(shared_ptr packet) { wstring message; int iPos; @@ -1316,7 +1316,7 @@ void ClientConnection::handleChat(std::shared_ptr packet) case ChatPacket::e_ChatBedMeSleep: message=app.GetString(IDS_TILE_BED_MESLEEP); break; - case ChatPacket::e_ChatPlayerJoinedGame: + case ChatPacket::e_ChatPlayerJoinedGame: message=app.GetString(IDS_PLAYER_JOINED); iPos=message.find(L"%s"); message.replace(iPos,2,playerDisplayName); @@ -1514,7 +1514,7 @@ void ClientConnection::handleChat(std::shared_ptr packet) message=app.GetString(IDS_MAX_WOLVES_BRED); break; - // can't shear the mooshroom + // can't shear the mooshroom case ChatPacket::e_ChatPlayerCantShearMooshroom: message=app.GetString(IDS_CANT_SHEAR_MOOSHROOM); break; @@ -1522,16 +1522,16 @@ void ClientConnection::handleChat(std::shared_ptr packet) // Paintings/Item Frames case ChatPacket::e_ChatPlayerMaxHangingEntities: message=app.GetString(IDS_MAX_HANGINGENTITIES); - break; + break; // Enemy spawn eggs in peaceful case ChatPacket::e_ChatPlayerCantSpawnInPeaceful: message=app.GetString(IDS_CANT_SPAWN_IN_PEACEFUL); - break; + break; // Enemy spawn eggs in peaceful case ChatPacket::e_ChatPlayerMaxBoats: message=app.GetString(IDS_MAX_BOATS); - break; + break; case ChatPacket::e_ChatCommandTeleportSuccess: message=app.GetString(IDS_COMMAND_TELEPORT_SUCCESS); @@ -1565,13 +1565,13 @@ void ClientConnection::handleChat(std::shared_ptr packet) if( displayOnGui ) minecraft->gui->addMessage(message,m_userIndex, bIsDeathMessage); } -void ClientConnection::handleAnimate(std::shared_ptr packet) +void ClientConnection::handleAnimate(shared_ptr packet) { - std::shared_ptr e = getEntity(packet->id); + shared_ptr e = getEntity(packet->id); if (e == NULL) return; if (packet->action == AnimatePacket::SWING) { - std::shared_ptr player = dynamic_pointer_cast(e); + shared_ptr player = dynamic_pointer_cast(e); if(player != NULL) player->swing(); } else if (packet->action == AnimatePacket::HURT) @@ -1580,7 +1580,7 @@ void ClientConnection::handleAnimate(std::shared_ptr packet) } else if (packet->action == AnimatePacket::WAKE_UP) { - std::shared_ptr player = dynamic_pointer_cast(e); + shared_ptr player = dynamic_pointer_cast(e); if(player != NULL) player->stopSleepInBed(false, false, false); } else if (packet->action == AnimatePacket::RESPAWN) @@ -1588,13 +1588,13 @@ void ClientConnection::handleAnimate(std::shared_ptr packet) } else if (packet->action == AnimatePacket::CRITICAL_HIT) { - std::shared_ptr critParticle = std::shared_ptr( new CritParticle(minecraft->level, e) ); + shared_ptr critParticle = shared_ptr( new CritParticle(minecraft->level, e) ); critParticle->CritParticlePostConstructor(); minecraft->particleEngine->add( critParticle ); } else if (packet->action == AnimatePacket::MAGIC_CRITICAL_HIT) { - std::shared_ptr critParticle = std::shared_ptr( new CritParticle(minecraft->level, e, eParticleType_magicCrit) ); + shared_ptr critParticle = shared_ptr( new CritParticle(minecraft->level, e, eParticleType_magicCrit) ); critParticle->CritParticlePostConstructor(); minecraft->particleEngine->add(critParticle); } @@ -1604,13 +1604,13 @@ void ClientConnection::handleAnimate(std::shared_ptr packet) } -void ClientConnection::handleEntityActionAtPosition(std::shared_ptr packet) +void ClientConnection::handleEntityActionAtPosition(shared_ptr packet) { - std::shared_ptr e = getEntity(packet->id); + shared_ptr e = getEntity(packet->id); if (e == NULL) return; if (packet->action == EntityActionAtPositionPacket::START_SLEEP) { - std::shared_ptr player = dynamic_pointer_cast(e); + shared_ptr player = dynamic_pointer_cast(e); player->startSleepInBed(packet->x, packet->y, packet->z); if( player == minecraft->localplayers[m_userIndex] ) @@ -1620,7 +1620,7 @@ void ClientConnection::handleEntityActionAtPosition(std::shared_ptr packet) +void ClientConnection::handlePreLogin(shared_ptr packet) { // printf("Client: handlePreLogin\n"); #if 1 @@ -1630,7 +1630,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) BOOL isAtLeastOneFriend = g_NetworkManager.IsHost(); BOOL isFriendsWithHost = TRUE; BOOL cantPlayContentRestricted = FALSE; - + if(!g_NetworkManager.IsHost()) { // set the game host settings @@ -1664,7 +1664,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) } if( playerXuid != INVALID_XUID ) { - // Is this user friends with the host player? + // Is this user friends with the host player? BOOL result; DWORD error; error = XUserAreUsersFriends(idx,&packet->m_playerXuids[packet->m_hostIndex],1,&result,NULL); @@ -1694,7 +1694,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) } if( playerXuid != INVALID_XUID ) { - // Is this user friends with the host player? + // Is this user friends with the host player? BOOL result; DWORD error; error = XUserAreUsersFriends(m_userIndex,&packet->m_playerXuids[packet->m_hostIndex],1,&result,NULL); @@ -1809,7 +1809,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) if(m_userIndex == ProfileManager.GetPrimaryPad() ) { - // Is this user friends with the host player? + // Is this user friends with the host player? bool isFriend = true; unsigned int friendCount = 0; #ifdef __PS3__ @@ -1839,7 +1839,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) requestParam.offset = 0; requestParam.userInfo.userId = ProfileManager.getUserID(ProfileManager.GetPrimaryPad()); - int ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, &requestParam, false); + int ret = sce::Toolkit::NP::Friends::Interface::getFriendslist(&friendList, &requestParam, false); if( ret == 0 ) { if( friendList.hasResult() ) @@ -1849,7 +1849,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) } #endif if( ret == 0 ) - { + { isFriend = false; SceNpId npid; for( unsigned int i = 0; i < friendCount; i++ ) @@ -1932,7 +1932,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) isAtLeastOneFriend = true; break; } - } + } } app.DebugPrintf("ClientConnection::handlePreLogin: User has at least one friend? %s\n", isAtLeastOneFriend ? "Yes" : "No"); @@ -1974,8 +1974,8 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) DisconnectPacket::eDisconnectReason reason = DisconnectPacket::eDisconnect_NoUGC_Remote; #else DisconnectPacket::eDisconnectReason reason = DisconnectPacket::eDisconnect_None; -#endif - if(m_userIndex == ProfileManager.GetPrimaryPad()) +#endif + if(m_userIndex == ProfileManager.GetPrimaryPad()) { if(!isFriendsWithHost) reason = DisconnectPacket::eDisconnect_NotFriendsWithHost; else if(!isAtLeastOneFriend) reason = DisconnectPacket::eDisconnect_NoFriendsInGame; @@ -1987,7 +1987,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) app.SetAction(ProfileManager.GetPrimaryPad(),eAppAction_ExitWorld,(void *)TRUE); } else - { + { if(!isFriendsWithHost) reason = DisconnectPacket::eDisconnect_NotFriendsWithHost; else if(!canPlayLocal) reason = DisconnectPacket::eDisconnect_NoUGC_Single_Local; else if(cantPlayContentRestricted) reason = DisconnectPacket::eDisconnect_ContentRestricted_Single_Local; @@ -2000,7 +2000,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) app.SetDisconnectReason( reason ); - // 4J-PB - this locks up on the read and write threads not closing down, because they are trying to lock the incoming critsec when it's already locked by this thread + // 4J-PB - this locks up on the read and write threads not closing down, because they are trying to lock the incoming critsec when it's already locked by this thread // Minecraft::GetInstance()->connectionDisconnected( m_userIndex , reason ); // done = true; // connection->flush(); @@ -2055,7 +2055,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) #endif // On PS3, all non-signed in players (even guests) can get a useful offlineXUID -#if !(defined __PS3__ || defined _DURANGO ) +#if !(defined __PS3__ || defined _DURANGO ) if( !ProfileManager.IsGuest( m_userIndex ) ) #endif { @@ -2064,7 +2064,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) } BOOL allAllowed, friendsAllowed; ProfileManager.AllowedPlayerCreatedContent(m_userIndex,true,&allAllowed,&friendsAllowed); - send( std::shared_ptr( new LoginPacket(minecraft->user->name, SharedConstants::NETWORK_PROTOCOL_VERSION, offlineXUID, onlineXUID, (allAllowed!=TRUE && friendsAllowed==TRUE), + send( shared_ptr( new LoginPacket(minecraft->user->name, SharedConstants::NETWORK_PROTOCOL_VERSION, offlineXUID, onlineXUID, (allAllowed!=TRUE && friendsAllowed==TRUE), packet->m_ugcPlayersVersion, app.GetPlayerSkinId(m_userIndex), app.GetPlayerCapeId(m_userIndex), ProfileManager.IsGuest( m_userIndex )))); if(!g_NetworkManager.IsHost() ) @@ -2105,7 +2105,7 @@ void ClientConnection::close() connection->close(DisconnectPacket::eDisconnect_Closed); } -void ClientConnection::handleAddMob(std::shared_ptr packet) +void ClientConnection::handleAddMob(shared_ptr packet) { double x = packet->x / 32.0; double y = packet->y / 32.0; @@ -2113,7 +2113,7 @@ void ClientConnection::handleAddMob(std::shared_ptr packet) float yRot = packet->yRot * 360 / 256.0f; float xRot = packet->xRot * 360 / 256.0f; - std::shared_ptr mob = dynamic_pointer_cast(EntityIO::newById(packet->type, level)); + shared_ptr mob = dynamic_pointer_cast(EntityIO::newById(packet->type, level)); mob->xp = packet->x; mob->yp = packet->y; mob->zp = packet->z; @@ -2121,7 +2121,7 @@ void ClientConnection::handleAddMob(std::shared_ptr packet) mob->yRotp = packet->yRot; mob->xRotp = packet->xRot; - vector > *subEntities = mob->getSubEntities(); + vector > *subEntities = mob->getSubEntities(); if (subEntities != NULL) { int offs = packet->id - mob->entityId; @@ -2143,7 +2143,7 @@ void ClientConnection::handleAddMob(std::shared_ptr packet) mob->zd = packet->zd / 8000.0f; level->putEntity(packet->id, mob); - vector > *unpackedData = packet->getUnpackedData(); + vector > *unpackedData = packet->getUnpackedData(); if (unpackedData != NULL) { mob->getEntityData()->assignValues(unpackedData); @@ -2153,17 +2153,17 @@ void ClientConnection::handleAddMob(std::shared_ptr packet) // 4J Stu - Slimes have a different BB depending on their size which is set in the entity data, so update the BB if(mob->GetType() == eTYPE_SLIME || mob->GetType() == eTYPE_LAVASLIME) { - std::shared_ptr slime = dynamic_pointer_cast(mob); + shared_ptr slime = dynamic_pointer_cast(mob); slime->setSize( slime->getSize() ); } } -void ClientConnection::handleSetTime(std::shared_ptr packet) +void ClientConnection::handleSetTime(shared_ptr packet) { minecraft->level->setTime(packet->time); } -void ClientConnection::handleSetSpawn(std::shared_ptr packet) +void ClientConnection::handleSetSpawn(shared_ptr packet) { //minecraft->player->setRespawnPosition(new Pos(packet->x, packet->y, packet->z)); minecraft->localplayers[m_userIndex]->setRespawnPosition(new Pos(packet->x, packet->y, packet->z)); @@ -2171,12 +2171,12 @@ void ClientConnection::handleSetSpawn(std::shared_ptr pa } -void ClientConnection::handleRidePacket(std::shared_ptr packet) +void ClientConnection::handleRidePacket(shared_ptr packet) { - std::shared_ptr rider = getEntity(packet->riderId); - std::shared_ptr ridden = getEntity(packet->riddenId); + shared_ptr rider = getEntity(packet->riderId); + shared_ptr ridden = getEntity(packet->riddenId); - std::shared_ptr boat = dynamic_pointer_cast(ridden); + shared_ptr boat = dynamic_pointer_cast(ridden); //if (packet->riderId == minecraft->player->entityId) rider = minecraft->player; if (packet->riderId == minecraft->localplayers[m_userIndex]->entityId) { @@ -2193,13 +2193,13 @@ void ClientConnection::handleRidePacket(std::shared_ptr packet) rider->ride(ridden); } -void ClientConnection::handleEntityEvent(std::shared_ptr packet) +void ClientConnection::handleEntityEvent(shared_ptr packet) { - std::shared_ptr e = getEntity(packet->entityId); + shared_ptr e = getEntity(packet->entityId); if (e != NULL) e->handleEntityEvent(packet->eventId); } -std::shared_ptr ClientConnection::getEntity(int entityId) +shared_ptr ClientConnection::getEntity(int entityId) { //if (entityId == minecraft->player->entityId) if(entityId == minecraft->localplayers[m_userIndex]->entityId) @@ -2210,7 +2210,7 @@ std::shared_ptr ClientConnection::getEntity(int entityId) return level->getEntity(entityId); } -void ClientConnection::handleSetHealth(std::shared_ptr packet) +void ClientConnection::handleSetHealth(shared_ptr packet) { //minecraft->player->hurtTo(packet->health); minecraft->localplayers[m_userIndex]->hurtTo(packet->health,packet->damageSource); @@ -2227,12 +2227,12 @@ void ClientConnection::handleSetHealth(std::shared_ptr packet) } } -void ClientConnection::handleSetExperience(std::shared_ptr packet) +void ClientConnection::handleSetExperience(shared_ptr packet) { minecraft->localplayers[m_userIndex]->setExperienceValues(packet->experienceProgress, packet->totalExperience, packet->experienceLevel); } -void ClientConnection::handleTexture(std::shared_ptr packet) +void ClientConnection::handleTexture(shared_ptr packet) { // Both PlayerConnection and ClientConnection should handle this mostly the same way // Server side also needs to store a list of those clients waiting to get a texture the server doesn't have yet @@ -2245,12 +2245,12 @@ void ClientConnection::handleTexture(std::shared_ptr packet) wprintf(L"Client received request for custom texture %ls\n",packet->textureName.c_str()); #endif PBYTE pbData=NULL; - DWORD dwBytes=0; + DWORD dwBytes=0; app.GetMemFileDetails(packet->textureName,&pbData,&dwBytes); if(dwBytes!=0) { - send( std::shared_ptr( new TexturePacket(packet->textureName,pbData,dwBytes) ) ); + send( shared_ptr( new TexturePacket(packet->textureName,pbData,dwBytes) ) ); } } else @@ -2264,7 +2264,7 @@ void ClientConnection::handleTexture(std::shared_ptr packet) } } -void ClientConnection::handleTextureAndGeometry(std::shared_ptr packet) +void ClientConnection::handleTextureAndGeometry(shared_ptr packet) { // Both PlayerConnection and ClientConnection should handle this mostly the same way // Server side also needs to store a list of those clients waiting to get a texture the server doesn't have yet @@ -2277,7 +2277,7 @@ void ClientConnection::handleTextureAndGeometry(std::shared_ptrtextureName.c_str()); #endif PBYTE pbData=NULL; - DWORD dwBytes=0; + DWORD dwBytes=0; app.GetMemFileDetails(packet->textureName,&pbData,&dwBytes); DLCSkinFile *pDLCSkinFile = app.m_dlcManager.getSkinFile(packet->textureName); @@ -2287,18 +2287,18 @@ void ClientConnection::handleTextureAndGeometry(std::shared_ptrgetAdditionalBoxesCount()!=0) { - send( std::shared_ptr( new TextureAndGeometryPacket(packet->textureName,pbData,dwBytes,pDLCSkinFile) ) ); + send( shared_ptr( new TextureAndGeometryPacket(packet->textureName,pbData,dwBytes,pDLCSkinFile) ) ); } else { - send( std::shared_ptr( new TextureAndGeometryPacket(packet->textureName,pbData,dwBytes) ) ); + send( shared_ptr( new TextureAndGeometryPacket(packet->textureName,pbData,dwBytes) ) ); } } else { unsigned int uiAnimOverrideBitmask= app.GetAnimOverrideBitmask(packet->dwSkinID); - send( std::shared_ptr( new TextureAndGeometryPacket(packet->textureName,pbData,dwBytes,app.GetAdditionalSkinBoxes(packet->dwSkinID),uiAnimOverrideBitmask) ) ); + send( shared_ptr( new TextureAndGeometryPacket(packet->textureName,pbData,dwBytes,app.GetAdditionalSkinBoxes(packet->dwSkinID),uiAnimOverrideBitmask) ) ); } } } @@ -2311,9 +2311,9 @@ void ClientConnection::handleTextureAndGeometry(std::shared_ptrtextureName,packet->pbData,packet->dwTextureBytes); // Add the geometry data - if(packet->dwBoxC!=0) + if(packet->dwBoxC!=0) { - app.SetAdditionalSkinBoxes(packet->dwSkinID,packet->BoxDataA,packet->dwBoxC); + app.SetAdditionalSkinBoxes(packet->dwSkinID,packet->BoxDataA,packet->dwBoxC); } // Add the anim override app.SetAnimOverrideBitmask(packet->dwSkinID,packet->uiAnimOverrideBitmask); @@ -2323,11 +2323,11 @@ void ClientConnection::handleTextureAndGeometry(std::shared_ptr packet) +void ClientConnection::handleTextureChange(shared_ptr packet) { - std::shared_ptr e = getEntity(packet->id); + shared_ptr e = getEntity(packet->id); if (e == NULL) return; - std::shared_ptr player = dynamic_pointer_cast(e); + shared_ptr player = dynamic_pointer_cast(e); if( e == NULL) return; bool isLocalPlayer = false; @@ -2360,7 +2360,7 @@ void ClientConnection::handleTextureChange(std::shared_ptr #endif break; } - + if(!packet->path.empty() && packet->path.substr(0,3).compare(L"def") != 0 && !app.IsFileInMemoryTextures(packet->path)) { if( minecraft->addPendingClientTextureRequest(packet->path) ) @@ -2368,7 +2368,7 @@ void ClientConnection::handleTextureChange(std::shared_ptr #ifndef _CONTENT_PACKAGE wprintf(L"handleTextureChange - Client sending texture packet to get custom skin %ls for player %ls\n",packet->path.c_str(), player->name.c_str()); #endif - send(std::shared_ptr( new TexturePacket(packet->path,NULL,0) ) ); + send(shared_ptr( new TexturePacket(packet->path,NULL,0) ) ); } } else if(!packet->path.empty() && app.IsFileInMemoryTextures(packet->path)) @@ -2378,11 +2378,11 @@ void ClientConnection::handleTextureChange(std::shared_ptr } } -void ClientConnection::handleTextureAndGeometryChange(std::shared_ptr packet) +void ClientConnection::handleTextureAndGeometryChange(shared_ptr packet) { - std::shared_ptr e = getEntity(packet->id); + shared_ptr e = getEntity(packet->id); if (e == NULL) return; - std::shared_ptr player = dynamic_pointer_cast(e); + shared_ptr player = dynamic_pointer_cast(e); if( e == NULL) return; bool isLocalPlayer = false; @@ -2413,7 +2413,7 @@ void ClientConnection::handleTextureAndGeometryChange(std::shared_ptrpath.c_str(), player->name.c_str()); #endif - send(std::shared_ptr( new TextureAndGeometryPacket(packet->path,NULL,0) ) ); + send(shared_ptr( new TextureAndGeometryPacket(packet->path,NULL,0) ) ); } } else if(!packet->path.empty() && app.IsFileInMemoryTextures(packet->path)) @@ -2424,7 +2424,7 @@ void ClientConnection::handleTextureAndGeometryChange(std::shared_ptr packet) +void ClientConnection::handleRespawn(shared_ptr packet) { //if (packet->dimension != minecraft->player->dimension) if( packet->dimension != minecraft->localplayers[m_userIndex]->dimension || packet->mapSeed != minecraft->localplayers[m_userIndex]->level->getSeed() ) @@ -2459,19 +2459,19 @@ void ClientConnection::handleRespawn(std::shared_ptr packet) } // Remove the player entity from the current level - level->removeEntity( std::shared_ptr(minecraft->localplayers[m_userIndex]) ); + level->removeEntity( shared_ptr(minecraft->localplayers[m_userIndex]) ); level = dimensionLevel; - + // Whilst calling setLevel, make sure that minecraft::player is set up to be correct for this // connection - std::shared_ptr lastPlayer = minecraft->player; + shared_ptr lastPlayer = minecraft->player; minecraft->player = minecraft->localplayers[m_userIndex]; minecraft->setLevel(dimensionLevel); minecraft->player = lastPlayer; TelemetryManager->RecordLevelExit(m_userIndex, eSen_LevelExitStatus_Succeeded); - + //minecraft->player->dimension = packet->dimension; minecraft->localplayers[m_userIndex]->dimension = packet->dimension; //minecraft->setScreen(new ReceivingLevelScreen(this)); @@ -2522,12 +2522,12 @@ void ClientConnection::handleRespawn(std::shared_ptr packet) { ui.NavigateToScene(m_userIndex, eUIScene_ConnectingProgress, param); } - + app.SetAction( m_userIndex, eAppAction_WaitForDimensionChangeComplete); } //minecraft->respawnPlayer(minecraft->player->GetXboxPad(),true, packet->dimension); - + // Wrap respawnPlayer call up in code to set & restore the player/gamemode etc. as some things // in there assume that we are set up for the player that the respawn is coming in for int oldIndex = minecraft->getLocalPlayerIdx(); @@ -2537,7 +2537,7 @@ void ClientConnection::handleRespawn(std::shared_ptr packet) minecraft->setLocalPlayerIdx(oldIndex); } -void ClientConnection::handleExplosion(std::shared_ptr packet) +void ClientConnection::handleExplosion(shared_ptr packet) { if(!packet->m_bKnockbackOnly) { @@ -2552,7 +2552,7 @@ void ClientConnection::handleExplosion(std::shared_ptr packet) MultiPlayerLevel *mpLevel = (MultiPlayerLevel *)minecraft->level; mpLevel->enableResetChanges(false); // 4J - now directly pass a pointer to the toBlow array in the packet rather than copying around - e->finalizeExplosion(true, &packet->toBlow); + e->finalizeExplosion(true, &packet->toBlow); mpLevel->enableResetChanges(true); PIXEndNamedEvent(); PIXEndNamedEvent(); @@ -2569,57 +2569,57 @@ void ClientConnection::handleExplosion(std::shared_ptr packet) minecraft->localplayers[m_userIndex]->zd += packet->getKnockbackZ(); } -void ClientConnection::handleContainerOpen(std::shared_ptr packet) +void ClientConnection::handleContainerOpen(shared_ptr packet) { bool failed = false; - std::shared_ptr player = minecraft->localplayers[m_userIndex]; + shared_ptr player = minecraft->localplayers[m_userIndex]; switch(packet->type) { case ContainerOpenPacket::CONTAINER: { - if( player->openContainer(std::shared_ptr( new SimpleContainer(packet->title, packet->size) ))) + if( player->openContainer(shared_ptr( new SimpleContainer(packet->title, packet->size) ))) { player->containerMenu->containerId = packet->containerId; } else { - failed = true; + failed = true; } } break; case ContainerOpenPacket::FURNACE: { - if( player->openFurnace(std::shared_ptr( new FurnaceTileEntity() )) ) + if( player->openFurnace(shared_ptr( new FurnaceTileEntity() )) ) { player->containerMenu->containerId = packet->containerId; } else { - failed = true; + failed = true; } } break; case ContainerOpenPacket::BREWING_STAND: { - if( player->openBrewingStand(std::shared_ptr( new BrewingStandTileEntity() )) ) + if( player->openBrewingStand(shared_ptr( new BrewingStandTileEntity() )) ) { player->containerMenu->containerId = packet->containerId; } else { - failed = true; + failed = true; } } break; case ContainerOpenPacket::TRAP: { - if( player->openTrap(std::shared_ptr( new DispenserTileEntity() )) ) + if( player->openTrap(shared_ptr( new DispenserTileEntity() )) ) { player->containerMenu->containerId = packet->containerId; } else { - failed = true; + failed = true; } } break; @@ -2631,7 +2631,7 @@ void ClientConnection::handleContainerOpen(std::shared_ptr } else { - failed = true; + failed = true; } } break; @@ -2643,13 +2643,13 @@ void ClientConnection::handleContainerOpen(std::shared_ptr } else { - failed = true; + failed = true; } } break; case ContainerOpenPacket::TRADER_NPC: { - std::shared_ptr csm = std::shared_ptr(new ClientSideMerchant(player,packet->title)); + shared_ptr csm = shared_ptr(new ClientSideMerchant(player,packet->title)); csm->createContainer(); if(player->openTrading(csm)) { @@ -2657,7 +2657,7 @@ void ClientConnection::handleContainerOpen(std::shared_ptr } else { - failed = true; + failed = true; } } break; @@ -2669,7 +2669,7 @@ void ClientConnection::handleContainerOpen(std::shared_ptr } else { - failed = true; + failed = true; } } break; @@ -2686,14 +2686,14 @@ void ClientConnection::handleContainerOpen(std::shared_ptr } else { - send(std::shared_ptr(new ContainerClosePacket(packet->containerId))); + send(shared_ptr(new ContainerClosePacket(packet->containerId))); } } } -void ClientConnection::handleContainerSetSlot(std::shared_ptr packet) +void ClientConnection::handleContainerSetSlot(shared_ptr packet) { - std::shared_ptr player = minecraft->localplayers[m_userIndex]; + shared_ptr player = minecraft->localplayers[m_userIndex]; if (packet->containerId == AbstractContainerMenu::CONTAINER_ID_CARRIED ) { player->inventory->setCarried(packet->item); @@ -2705,7 +2705,7 @@ void ClientConnection::handleContainerSetSlot(std::shared_ptrslot >= 36 && packet->slot < 36 + 9) { - std::shared_ptr lastItem = player->inventoryMenu->getSlot(packet->slot)->getItem(); + shared_ptr lastItem = player->inventoryMenu->getSlot(packet->slot)->getItem(); if (packet->item != NULL) { if (lastItem == NULL || lastItem->count < packet->item->count) @@ -2723,9 +2723,9 @@ void ClientConnection::handleContainerSetSlot(std::shared_ptr packet) +void ClientConnection::handleContainerAck(shared_ptr packet) { - std::shared_ptr player = minecraft->localplayers[m_userIndex]; + shared_ptr player = minecraft->localplayers[m_userIndex]; AbstractContainerMenu *menu = NULL; if (packet->containerId == AbstractContainerMenu::CONTAINER_ID_INVENTORY) { @@ -2739,15 +2739,15 @@ void ClientConnection::handleContainerAck(std::shared_ptr pa { if (!packet->accepted) { - send( std::shared_ptr( new ContainerAckPacket(packet->containerId, packet->uid, true) )); + send( shared_ptr( new ContainerAckPacket(packet->containerId, packet->uid, true) )); } } } -void ClientConnection::handleContainerContent(std::shared_ptr packet) +void ClientConnection::handleContainerContent(shared_ptr packet) { - std::shared_ptr player = minecraft->localplayers[m_userIndex]; - if (packet->containerId == AbstractContainerMenu::CONTAINER_ID_INVENTORY) + shared_ptr player = minecraft->localplayers[m_userIndex]; + if (packet->containerId == AbstractContainerMenu::CONTAINER_ID_INVENTORY) { player->inventoryMenu->setAll(&packet->items); } @@ -2757,17 +2757,17 @@ void ClientConnection::handleContainerContent(std::shared_ptr packet) +void ClientConnection::handleSignUpdate(shared_ptr packet) { app.DebugPrintf("ClientConnection::handleSignUpdate - "); if (minecraft->level->hasChunkAt(packet->x, packet->y, packet->z)) { - std::shared_ptr te = minecraft->level->getTileEntity(packet->x, packet->y, packet->z); + shared_ptr te = minecraft->level->getTileEntity(packet->x, packet->y, packet->z); // 4J-PB - on a client connecting, the line below fails if (dynamic_pointer_cast(te) != NULL) { - std::shared_ptr ste = dynamic_pointer_cast(te); + shared_ptr ste = dynamic_pointer_cast(te); for (int i = 0; i < MAX_SIGN_LINES; i++) { ste->SetMessage(i,packet->lines[i]); @@ -2790,11 +2790,11 @@ void ClientConnection::handleSignUpdate(std::shared_ptr packet } } -void ClientConnection::handleTileEntityData(std::shared_ptr packet) +void ClientConnection::handleTileEntityData(shared_ptr packet) { if (minecraft->level->hasChunkAt(packet->x, packet->y, packet->z)) { - std::shared_ptr te = minecraft->level->getTileEntity(packet->x, packet->y, packet->z); + shared_ptr te = minecraft->level->getTileEntity(packet->x, packet->y, packet->z); if (te != NULL) { @@ -2809,7 +2809,7 @@ void ClientConnection::handleTileEntityData(std::shared_ptrtype == TileEntityDataPacket::TYPE_SKULL && dynamic_pointer_cast(te) != NULL) { dynamic_pointer_cast(te)->load(packet->tag); @@ -2818,7 +2818,7 @@ void ClientConnection::handleTileEntityData(std::shared_ptr packet) +void ClientConnection::handleContainerSetData(shared_ptr packet) { onUnhandledPacket(packet); if (minecraft->localplayers[m_userIndex]->containerMenu != NULL && minecraft->localplayers[m_userIndex]->containerMenu->containerId == packet->containerId) @@ -2827,9 +2827,9 @@ void ClientConnection::handleContainerSetData(std::shared_ptr packet) +void ClientConnection::handleSetEquippedItem(shared_ptr packet) { - std::shared_ptr entity = getEntity(packet->entity); + shared_ptr entity = getEntity(packet->entity); if (entity != NULL) { // 4J Stu - Brought forward change from 1.3 to fix #64688 - Customer Encountered: TU7: Content: Art: Aura of enchanted item is not displayed for other players in online game @@ -2837,19 +2837,19 @@ void ClientConnection::handleSetEquippedItem(std::shared_ptr packet) +void ClientConnection::handleContainerClose(shared_ptr packet) { minecraft->localplayers[m_userIndex]->closeContainer(); } -void ClientConnection::handleTileEvent(std::shared_ptr packet) +void ClientConnection::handleTileEvent(shared_ptr packet) { PIXBeginNamedEvent(0,"Handle tile event\n"); minecraft->level->tileEvent(packet->x, packet->y, packet->z, packet->tile, packet->b0, packet->b1); PIXEndNamedEvent(); } -void ClientConnection::handleTileDestruction(std::shared_ptr packet) +void ClientConnection::handleTileDestruction(shared_ptr packet) { minecraft->level->destroyTileProgress(packet->getEntityId(), packet->getX(), packet->getY(), packet->getZ(), packet->getState()); } @@ -2859,7 +2859,7 @@ bool ClientConnection::canHandleAsyncPackets() return minecraft != NULL && minecraft->level != NULL && minecraft->localplayers[m_userIndex] != NULL && level != NULL; } -void ClientConnection::handleGameEvent(std::shared_ptr gameEventPacket) +void ClientConnection::handleGameEvent(shared_ptr gameEventPacket) { int event = gameEventPacket->_event; int param = gameEventPacket->param; @@ -2887,7 +2887,7 @@ void ClientConnection::handleGameEvent(std::shared_ptr gameEven else if (event == GameEventPacket::WIN_GAME) { ui.SetWinUserIndex( (BYTE)gameEventPacket->param ); - + #ifdef _XBOX // turn off the gamertags in splitscreen for the primary player, since they are about to be made fullscreen @@ -2925,7 +2925,7 @@ void ClientConnection::handleGameEvent(std::shared_ptr gameEven } } -void ClientConnection::handleComplexItemData(std::shared_ptr packet) +void ClientConnection::handleComplexItemData(shared_ptr packet) { if (packet->itemType == Item::map->id) { @@ -2939,7 +2939,7 @@ void ClientConnection::handleComplexItemData(std::shared_ptr packet) +void ClientConnection::handleLevelEvent(shared_ptr packet) { switch(packet->type) { @@ -2963,22 +2963,22 @@ void ClientConnection::handleLevelEvent(std::shared_ptr packet } } -void ClientConnection::handleAwardStat(std::shared_ptr packet) +void ClientConnection::handleAwardStat(shared_ptr packet) { minecraft->localplayers[m_userIndex]->awardStatFromServer(GenericStats::stat(packet->statId), packet->getParamData()); } -void ClientConnection::handleUpdateMobEffect(std::shared_ptr packet) +void ClientConnection::handleUpdateMobEffect(shared_ptr packet) { - std::shared_ptr e = getEntity(packet->entityId); + shared_ptr e = getEntity(packet->entityId); if (e == NULL || dynamic_pointer_cast(e) == NULL) return; ( dynamic_pointer_cast(e) )->addEffect(new MobEffectInstance(packet->effectId, packet->effectDurationTicks, packet->effectAmplifier)); } -void ClientConnection::handleRemoveMobEffect(std::shared_ptr packet) +void ClientConnection::handleRemoveMobEffect(shared_ptr packet) { - std::shared_ptr e = getEntity(packet->entityId); + shared_ptr e = getEntity(packet->entityId); if (e == NULL || dynamic_pointer_cast(e) == NULL) return; ( dynamic_pointer_cast(e) )->removeEffectNoUpdate(packet->effectId); @@ -2989,7 +2989,7 @@ bool ClientConnection::isServerPacketListener() return false; } -void ClientConnection::handlePlayerInfo(std::shared_ptr packet) +void ClientConnection::handlePlayerInfo(shared_ptr packet) { unsigned int startingPrivileges = app.GetPlayerPrivileges(packet->m_networkSmallId); @@ -3005,17 +3005,17 @@ void ClientConnection::handlePlayerInfo(std::shared_ptr packet // 4J Stu - Repurposed this packet for player info that we want app.UpdatePlayerInfo(packet->m_networkSmallId, packet->m_playerColourIndex, packet->m_playerPrivileges); - std::shared_ptr entity = getEntity(packet->m_entityId); + shared_ptr entity = getEntity(packet->m_entityId); if(entity != NULL && entity->GetType() == eTYPE_PLAYER) { - std::shared_ptr player = dynamic_pointer_cast(entity); + shared_ptr player = dynamic_pointer_cast(entity); player->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_All, packet->m_playerPrivileges); } if(networkPlayer != NULL && networkPlayer->IsLocal()) { for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { - std::shared_ptr localPlayer = minecraft->localplayers[i]; + shared_ptr localPlayer = minecraft->localplayers[i]; if(localPlayer != NULL && localPlayer->connection != NULL && localPlayer->connection->getNetworkPlayer() == networkPlayer ) { localPlayer->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_All,packet->m_playerPrivileges); @@ -3044,7 +3044,7 @@ void ClientConnection::handlePlayerInfo(std::shared_ptr packet } -void ClientConnection::displayPrivilegeChanges(std::shared_ptr player, unsigned int oldPrivileges) +void ClientConnection::displayPrivilegeChanges(shared_ptr player, unsigned int oldPrivileges) { int userIndex = player->GetXboxPad(); unsigned int newPrivileges = player->getAllPlayerGamePrivileges(); @@ -3117,7 +3117,7 @@ void ClientConnection::displayPrivilegeChanges(std::shared_ptr packet) +void ClientConnection::handleKeepAlive(shared_ptr packet) { - send(std::shared_ptr(new KeepAlivePacket(packet->id))); + send(shared_ptr(new KeepAlivePacket(packet->id))); } -void ClientConnection::handlePlayerAbilities(std::shared_ptr playerAbilitiesPacket) +void ClientConnection::handlePlayerAbilities(shared_ptr playerAbilitiesPacket) { - std::shared_ptr player = minecraft->localplayers[m_userIndex]; + shared_ptr player = minecraft->localplayers[m_userIndex]; player->abilities.flying = playerAbilitiesPacket->isFlying(); player->abilities.instabuild = playerAbilitiesPacket->canInstabuild(); player->abilities.invulnerable = playerAbilitiesPacket->isInvulnerable(); @@ -3156,12 +3156,12 @@ void ClientConnection::handlePlayerAbilities(std::shared_ptrabilities.setFlyingSpeed(playerAbilitiesPacket->getFlyingSpeed()); } -void ClientConnection::handleSoundEvent(std::shared_ptr packet) +void ClientConnection::handleSoundEvent(shared_ptr packet) { minecraft->level->playLocalSound(packet->getX(), packet->getY(), packet->getZ(), packet->getSound(), packet->getVolume(), packet->getPitch()); } -void ClientConnection::handleCustomPayload(std::shared_ptr customPayloadPacket) +void ClientConnection::handleCustomPayload(shared_ptr customPayloadPacket) { if (CustomPayloadPacket::TRADER_LIST_PACKET.compare(customPayloadPacket->identifier) == 0) { @@ -3170,7 +3170,7 @@ void ClientConnection::handleCustomPayload(std::shared_ptr int containerId = input.readInt(); if (ui.IsSceneInStack(m_userIndex, eUIScene_TradingMenu) && containerId == minecraft->localplayers[m_userIndex]->containerMenu->containerId) { - std::shared_ptr trader = nullptr; + shared_ptr trader = nullptr; #ifdef _XBOX HXUIOBJ scene = app.GetCurrentScene(m_userIndex); @@ -3190,7 +3190,7 @@ void ClientConnection::handleCustomPayload(std::shared_ptr UIScene_TradingMenu *screen = (UIScene_TradingMenu *)scene; trader = screen->getMerchant(); #endif - + MerchantRecipeList *recipeList = MerchantRecipeList::createFromStream(&input); trader->overrideOffers(recipeList); } @@ -3203,7 +3203,7 @@ Connection *ClientConnection::getConnection() } // 4J Added -void ClientConnection::handleServerSettingsChanged(std::shared_ptr packet) +void ClientConnection::handleServerSettingsChanged(shared_ptr packet) { if(packet->action==ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS) { @@ -3229,7 +3229,7 @@ void ClientConnection::handleServerSettingsChanged(std::shared_ptr packet) +void ClientConnection::handleXZ(shared_ptr packet) { if(packet->action==XZPacket::STRONGHOLD) { @@ -3239,12 +3239,12 @@ void ClientConnection::handleXZ(std::shared_ptr packet) } } -void ClientConnection::handleUpdateProgress(std::shared_ptr packet) +void ClientConnection::handleUpdateProgress(shared_ptr packet) { if(!g_NetworkManager.IsHost() ) Minecraft::GetInstance()->progressRenderer->progressStagePercentage( packet->m_percentage ); } -void ClientConnection::handleUpdateGameRuleProgressPacket(std::shared_ptr packet) +void ClientConnection::handleUpdateGameRuleProgressPacket(shared_ptr packet) { LPCWSTR string = app.GetGameRulesString(packet->m_messageId); if(string != NULL) @@ -3277,7 +3277,7 @@ int ClientConnection::HostDisconnectReturned(void *pParam,int iPad,C4JStorage::E DLCPack *pDLCPack=pDLCTexPack->getDLCInfoParentPack();//tPack->getDLCPack(); if(!pDLCPack->hasPurchasedFile( DLCManager::e_DLCType_Texture, L"" )) - { + { // no upsell, we're about to quit MinecraftServer::getInstance()->setSaveOnExit( false ); // flag a app action of exit game @@ -3331,7 +3331,7 @@ int ClientConnection::HostDisconnectReturned(void *pParam,int iPad,C4JStorage::E int ClientConnection::ExitGameAndSaveReturned(void *pParam,int iPad,C4JStorage::EMessageResult result) { // results switched for this dialog - if(result==C4JStorage::EMessage_ResultDecline) + if(result==C4JStorage::EMessage_ResultDecline) { //INT saveOrCheckpointId = 0; //bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId); @@ -3350,7 +3350,7 @@ int ClientConnection::ExitGameAndSaveReturned(void *pParam,int iPad,C4JStorage:: return 0; } -// +// wstring ClientConnection::GetDisplayNameByGamertag(wstring gamertag) { #ifdef _DURANGO diff --git a/Minecraft.Client/ClientConnection.h b/Minecraft.Client/ClientConnection.h index 53c3ff22..2ce46ce0 100644 --- a/Minecraft.Client/ClientConnection.h +++ b/Minecraft.Client/ClientConnection.h @@ -49,92 +49,92 @@ public: ~ClientConnection(); void tick(); INetworkPlayer *getNetworkPlayer(); - virtual void handleLogin(std::shared_ptr packet); - virtual void handleAddEntity(std::shared_ptr packet); - virtual void handleAddExperienceOrb(std::shared_ptr packet); - virtual void handleAddGlobalEntity(std::shared_ptr packet); - virtual void handleAddPainting(std::shared_ptr packet); - virtual void handleSetEntityMotion(std::shared_ptr packet); - virtual void handleSetEntityData(std::shared_ptr packet); - virtual void handleAddPlayer(std::shared_ptr packet); - virtual void handleTeleportEntity(std::shared_ptr packet); - virtual void handleMoveEntity(std::shared_ptr packet); - virtual void handleRotateMob(std::shared_ptr packet); - virtual void handleMoveEntitySmall(std::shared_ptr packet); - virtual void handleRemoveEntity(std::shared_ptr packet); - virtual void handleMovePlayer(std::shared_ptr packet); + virtual void handleLogin(shared_ptr packet); + virtual void handleAddEntity(shared_ptr packet); + virtual void handleAddExperienceOrb(shared_ptr packet); + virtual void handleAddGlobalEntity(shared_ptr packet); + virtual void handleAddPainting(shared_ptr packet); + virtual void handleSetEntityMotion(shared_ptr packet); + virtual void handleSetEntityData(shared_ptr packet); + virtual void handleAddPlayer(shared_ptr packet); + virtual void handleTeleportEntity(shared_ptr packet); + virtual void handleMoveEntity(shared_ptr packet); + virtual void handleRotateMob(shared_ptr packet); + virtual void handleMoveEntitySmall(shared_ptr packet); + virtual void handleRemoveEntity(shared_ptr packet); + virtual void handleMovePlayer(shared_ptr packet); Random *random; - + // 4J Added - virtual void handleChunkVisibilityArea(std::shared_ptr packet); + virtual void handleChunkVisibilityArea(shared_ptr packet); - virtual void handleChunkVisibility(std::shared_ptr packet); - virtual void handleChunkTilesUpdate(std::shared_ptr packet); - virtual void handleBlockRegionUpdate(std::shared_ptr packet); - virtual void handleTileUpdate(std::shared_ptr packet); - virtual void handleDisconnect(std::shared_ptr packet); + virtual void handleChunkVisibility(shared_ptr packet); + virtual void handleChunkTilesUpdate(shared_ptr packet); + virtual void handleBlockRegionUpdate(shared_ptr packet); + virtual void handleTileUpdate(shared_ptr packet); + virtual void handleDisconnect(shared_ptr packet); virtual void onDisconnect(DisconnectPacket::eDisconnectReason reason, void *reasonObjects); - void sendAndDisconnect(std::shared_ptr packet); - void send(std::shared_ptr packet); - virtual void handleTakeItemEntity(std::shared_ptr packet); - virtual void handleChat(std::shared_ptr packet); - virtual void handleAnimate(std::shared_ptr packet); - virtual void handleEntityActionAtPosition(std::shared_ptr packet); - virtual void handlePreLogin(std::shared_ptr packet); + void sendAndDisconnect(shared_ptr packet); + void send(shared_ptr packet); + virtual void handleTakeItemEntity(shared_ptr packet); + virtual void handleChat(shared_ptr packet); + virtual void handleAnimate(shared_ptr packet); + virtual void handleEntityActionAtPosition(shared_ptr packet); + virtual void handlePreLogin(shared_ptr packet); void close(); - virtual void handleAddMob(std::shared_ptr packet); - virtual void handleSetTime(std::shared_ptr packet); - virtual void handleSetSpawn(std::shared_ptr packet); - virtual void handleRidePacket(std::shared_ptr packet); - virtual void handleEntityEvent(std::shared_ptr packet); + virtual void handleAddMob(shared_ptr packet); + virtual void handleSetTime(shared_ptr packet); + virtual void handleSetSpawn(shared_ptr packet); + virtual void handleRidePacket(shared_ptr packet); + virtual void handleEntityEvent(shared_ptr packet); private: - std::shared_ptr getEntity(int entityId); + shared_ptr getEntity(int entityId); wstring GetDisplayNameByGamertag(wstring gamertag); public: - virtual void handleSetHealth(std::shared_ptr packet); - virtual void handleSetExperience(std::shared_ptr packet); - virtual void handleRespawn(std::shared_ptr packet); - virtual void handleExplosion(std::shared_ptr packet); - virtual void handleContainerOpen(std::shared_ptr packet); - virtual void handleContainerSetSlot(std::shared_ptr packet); - virtual void handleContainerAck(std::shared_ptr packet); - virtual void handleContainerContent(std::shared_ptr packet); - virtual void handleSignUpdate(std::shared_ptr packet); - virtual void handleTileEntityData(std::shared_ptr packet); - virtual void handleContainerSetData(std::shared_ptr packet); - virtual void handleSetEquippedItem(std::shared_ptr packet); - virtual void handleContainerClose(std::shared_ptr packet); - virtual void handleTileEvent(std::shared_ptr packet); - virtual void handleTileDestruction(std::shared_ptr packet); + virtual void handleSetHealth(shared_ptr packet); + virtual void handleSetExperience(shared_ptr packet); + virtual void handleRespawn(shared_ptr packet); + virtual void handleExplosion(shared_ptr packet); + virtual void handleContainerOpen(shared_ptr packet); + virtual void handleContainerSetSlot(shared_ptr packet); + virtual void handleContainerAck(shared_ptr packet); + virtual void handleContainerContent(shared_ptr packet); + virtual void handleSignUpdate(shared_ptr packet); + virtual void handleTileEntityData(shared_ptr packet); + virtual void handleContainerSetData(shared_ptr packet); + virtual void handleSetEquippedItem(shared_ptr packet); + virtual void handleContainerClose(shared_ptr packet); + virtual void handleTileEvent(shared_ptr packet); + virtual void handleTileDestruction(shared_ptr packet); virtual bool canHandleAsyncPackets(); - virtual void handleGameEvent(std::shared_ptr gameEventPacket); - virtual void handleComplexItemData(std::shared_ptr packet); - virtual void handleLevelEvent(std::shared_ptr packet); - virtual void handleAwardStat(std::shared_ptr packet); - virtual void handleUpdateMobEffect(std::shared_ptr packet); - virtual void handleRemoveMobEffect(std::shared_ptr packet); + virtual void handleGameEvent(shared_ptr gameEventPacket); + virtual void handleComplexItemData(shared_ptr packet); + virtual void handleLevelEvent(shared_ptr packet); + virtual void handleAwardStat(shared_ptr packet); + virtual void handleUpdateMobEffect(shared_ptr packet); + virtual void handleRemoveMobEffect(shared_ptr packet); virtual bool isServerPacketListener(); - virtual void handlePlayerInfo(std::shared_ptr packet); - virtual void handleKeepAlive(std::shared_ptr packet); - virtual void handlePlayerAbilities(std::shared_ptr playerAbilitiesPacket); - virtual void handleSoundEvent(std::shared_ptr packet); - virtual void handleCustomPayload(std::shared_ptr customPayloadPacket); + virtual void handlePlayerInfo(shared_ptr packet); + virtual void handleKeepAlive(shared_ptr packet); + virtual void handlePlayerAbilities(shared_ptr playerAbilitiesPacket); + virtual void handleSoundEvent(shared_ptr packet); + virtual void handleCustomPayload(shared_ptr customPayloadPacket); virtual Connection *getConnection(); // 4J Added - virtual void handleServerSettingsChanged(std::shared_ptr packet); - virtual void handleTexture(std::shared_ptr packet); - virtual void handleTextureAndGeometry(std::shared_ptr packet); - virtual void handleUpdateProgress(std::shared_ptr packet); + virtual void handleServerSettingsChanged(shared_ptr packet); + virtual void handleTexture(shared_ptr packet); + virtual void handleTextureAndGeometry(shared_ptr packet); + virtual void handleUpdateProgress(shared_ptr packet); // 4J Added static int HostDisconnectReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); static int ExitGameAndSaveReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); - virtual void handleTextureChange(std::shared_ptr packet); - virtual void handleTextureAndGeometryChange(std::shared_ptr packet); - virtual void handleUpdateGameRuleProgressPacket(std::shared_ptr packet); - virtual void handleXZ(std::shared_ptr packet); + virtual void handleTextureChange(shared_ptr packet); + virtual void handleTextureAndGeometryChange(shared_ptr packet); + virtual void handleUpdateGameRuleProgressPacket(shared_ptr packet); + virtual void handleXZ(shared_ptr packet); - void displayPrivilegeChanges(std::shared_ptr player, unsigned int oldPrivileges); + void displayPrivilegeChanges(shared_ptr player, unsigned int oldPrivileges); }; \ No newline at end of file diff --git a/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h b/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h index 607a24c6..4ec76036 100644 --- a/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h +++ b/Minecraft.Client/Common/Audio/Consoles_SoundEngine.h @@ -43,7 +43,7 @@ class ConsoleSoundEngine public: ConsoleSoundEngine() : m_bIsPlayingStreamingCDMusic(false),m_bIsPlayingStreamingGameMusic(false), m_bIsPlayingEndMusic(false),m_bIsPlayingNetherMusic(false){}; - virtual void tick(std::shared_ptr *players, float a) =0; + virtual void tick(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; diff --git a/Minecraft.Client/Common/Audio/SoundEngine.cpp b/Minecraft.Client/Common/Audio/SoundEngine.cpp index 7bf10b40..43d2059d 100644 --- a/Minecraft.Client/Common/Audio/SoundEngine.cpp +++ b/Minecraft.Client/Common/Audio/SoundEngine.cpp @@ -22,17 +22,17 @@ #ifdef __ORBIS__ #include //#define __DISABLE_MILES__ // MGH disabled for now as it crashes if we call sceNpMatching2Initialize -#endif +#endif // take out Orbis until they are done -#if defined _XBOX +#if defined _XBOX SoundEngine::SoundEngine() {} void SoundEngine::init(Options *pOptions) { } -void SoundEngine::tick(std::shared_ptr *players, float a) +void SoundEngine::tick(shared_ptr *players, float a) { } void SoundEngine::destroy() {} @@ -95,7 +95,7 @@ char SoundEngine::m_szRedistName[]={"redist"}; #endif -F32 AILCALLBACK custom_falloff_function (HSAMPLE S, +F32 AILCALLBACK custom_falloff_function (HSAMPLE S, F32 distance, F32 rolloff_factor, F32 min_dist, @@ -124,7 +124,7 @@ char *SoundEngine::m_szStreamFileA[eStream_Max]= "menu2", "menu3", "menu4", -#endif +#endif "piano1", "piano2", "piano3", @@ -209,7 +209,7 @@ void SoundEngine::init(Options *pOptions) #endif #ifdef __ORBIS__ C4JThread::PushAffinityAllCores(); -#endif +#endif #if defined _DURANGO || defined __ORBIS__ || defined __PS3__ || defined __PSVITA__ Register_RIB(BinkADec); #endif @@ -226,8 +226,8 @@ void SoundEngine::init(Options *pOptions) int iNumberOfChannels=initAudioHardware(8); // Create a driver to render our audio - 44khz, 16 bit, -#ifdef __PS3__ - // On the Sony PS3, the driver is always opened in 48 kHz, 32-bit floating point. The only meaningful configurations are MSS_MC_STEREO, MSS_MC_51_DISCRETE, and MSS_MC_71_DISCRETE. +#ifdef __PS3__ + // On the Sony PS3, the driver is always opened in 48 kHz, 32-bit floating point. The only meaningful configurations are MSS_MC_STEREO, MSS_MC_51_DISCRETE, and MSS_MC_71_DISCRETE. m_hDriver = AIL_open_digital_driver( 48000, 16, iNumberOfChannels, AIL_OPEN_DIGITAL_USE_SPU0 ); #elif defined __PSVITA__ @@ -236,7 +236,7 @@ void SoundEngine::init(Options *pOptions) m_hDriver = AIL_open_digital_driver( 48000, 16, MSS_MC_STEREO, 0 ); - // AP - For some reason the submit thread defaults to a priority of zero (invalid). Make sure it has the highest priority to avoid audio breakup. + // AP - For some reason the submit thread defaults to a priority of zero (invalid). Make sure it has the highest priority to avoid audio breakup. SceUID threadID; AIL_platform_property( m_hDriver, PSP2_SUBMIT_THREAD, &threadID, 0, 0); S32 g_DefaultCPU = sceKernelGetThreadCpuAffinityMask(threadID); @@ -260,7 +260,7 @@ void SoundEngine::init(Options *pOptions) AIL_shutdown(); #ifdef __ORBIS__ C4JThread::PopAffinity(); -#endif +#endif return; } app.DebugPrintf("---SoundEngine::init - driver opened\n"); @@ -289,12 +289,12 @@ void SoundEngine::init(Options *pOptions) AIL_shutdown(); #ifdef __ORBIS__ C4JThread::PopAffinity(); -#endif +#endif app.DebugPrintf("---SoundEngine::init - AIL_startup_event_system failed\n"); return; } char szBankName[255]; -#if defined __PS3__ +#if defined __PS3__ if(app.GetBootedFromDiscPatch()) { char szTempSoundFilename[255]; @@ -308,7 +308,7 @@ void SoundEngine::init(Options *pOptions) { sprintf(szBankName,"%s/%s",getUsrDirPath(), m_szSoundPath ); } - + #elif defined __PSVITA__ sprintf(szBankName,"%s/%s",getUsrDirPath(), m_szSoundPath ); #elif defined __ORBIS__ @@ -329,7 +329,7 @@ void SoundEngine::init(Options *pOptions) AIL_shutdown(); #ifdef __ORBIS__ C4JThread::PopAffinity(); -#endif +#endif return; } @@ -362,7 +362,7 @@ void SoundEngine::init(Options *pOptions) #endif #ifdef __PSVITA__ - // AP - By default the mixer won't start up and nothing will process. Kick off a blank sample to force the mixer to start up. + // AP - By default the mixer won't start up and nothing will process. Kick off a blank sample to force the mixer to start up. HSAMPLE Sample = AIL_allocate_sample_handle(m_hDriver); AIL_init_sample(Sample, DIG_F_STEREO_16); static U64 silence = 0; @@ -403,7 +403,7 @@ void SoundEngine::SetStreamingSounds(int iOverworldMin, int iOverWorldMax, int i // AP - moved to a separate function so it can be called from the mixer callback on Vita void SoundEngine::updateMiles() { -#ifdef __PSVITA__ +#ifdef __PSVITA__ //CD - We must check for Background Music [BGM] at any point //If it's playing disable our audio, otherwise enable int NoBGMPlaying = sceAudioOutGetAdopt(SCE_AUDIO_OUT_PORT_TYPE_BGM); @@ -463,7 +463,7 @@ void SoundEngine::updateMiles() { isThunder = true; } - if(game_data->volume>1) + if(game_data->volume>1) { game_data->volume=1; } @@ -477,7 +477,7 @@ void SoundEngine::updateMiles() AIL_register_falloff_function_callback(SoundInfo.Sample,&custom_falloff_function); if(game_data->bIs3D) - { + { AIL_set_sample_is_3D( SoundInfo.Sample, 1 ); int iSound = game_data->iSound - eSFX_MAX; @@ -518,7 +518,7 @@ void SoundEngine::updateMiles() } if(game_data->bIs3D) - { + { if(m_validListenerCount>1) { float fClosest=10000.0f; @@ -562,7 +562,7 @@ void SoundEngine::updateMiles() default: if(game_data->bIs3D) - { + { if(m_validListenerCount>1) { float fClosest=10000.0f; @@ -600,9 +600,9 @@ void SoundEngine::updateMiles() { AIL_set_sample_3D_position( SoundInfo.Sample, game_data->x, game_data->y, -game_data->z ); // Flipped sign of z as Miles is expecting left handed coord system } - } + } break; - } + } } } AIL_complete_event_queue_processing(); @@ -622,7 +622,7 @@ static float fVal=0.0f; static S32 running = AIL_ms_count(); #endif -void SoundEngine::tick(std::shared_ptr *players, float a) +void SoundEngine::tick(shared_ptr *players, float a) { #ifdef __DISABLE_MILES__ return; @@ -657,7 +657,7 @@ void SoundEngine::tick(std::shared_ptr *players, float a) // store the listener positions for splitscreen m_ListenerA[i].vPosition.x = x; m_ListenerA[i].vPosition.y = y; - m_ListenerA[i].vPosition.z = z; + m_ListenerA[i].vPosition.z = z; m_ListenerA[i].vOrientFront.x = ySin; m_ListenerA[i].vOrientFront.y = 0; @@ -707,7 +707,7 @@ SoundEngine::SoundEngine() m_hStream=0; m_StreamState=eMusicStreamState_Idle; m_iMusicDelay=0; - m_validListenerCount=0; + m_validListenerCount=0; m_bHeardTrackA=NULL; @@ -763,7 +763,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa // AP removed old counting system. Now relying on Miles' Play Count Limit /* // if we are already playing loads of this sounds ignore this one - if(CurrentSoundsPlaying[iSound+eSFX_MAX]>MAX_SAME_SOUNDS_PLAYING) + if(CurrentSoundsPlaying[iSound+eSFX_MAX]>MAX_SAME_SOUNDS_PLAYING) { // wstring name = wchSoundNames[iSound]; // char *SoundName = (char *)ConvertSoundPathToName(name); @@ -810,7 +810,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, floa // playUI // ///////////////////////////////////////////// -void SoundEngine::playUI(int iSound, float volume, float pitch) +void SoundEngine::playUI(int iSound, float volume, float pitch) { U8 szSoundName[256]; wstring name; @@ -956,7 +956,7 @@ int SoundEngine::GetRandomishTrack(int iStart,int iEnd) int iVal=iStart; for(int i=iStart;i<=iEnd;i++) { - if(m_bHeardTrackA[i]==false) + if(m_bHeardTrackA[i]==false) { bAllTracksHeard=false; app.DebugPrintf("Not heard all tracks yet\n"); @@ -974,7 +974,7 @@ int SoundEngine::GetRandomishTrack(int iStart,int iEnd) } } - // trying to get a track we haven't heard, but not too hard + // trying to get a track we haven't heard, but not too hard for(int i=0;i<=((iEnd-iStart)/2);i++) { // random->nextInt(1) will always return 0 @@ -1111,7 +1111,7 @@ void SoundEngine::updateSystemMusicPlaying(bool isPlaying) // updateSoundEffectVolume // ///////////////////////////////////////////// -void SoundEngine::updateSoundEffectVolume(float fVal) +void SoundEngine::updateSoundEffectVolume(float fVal) { m_MasterEffectsVolume=fVal; //AIL_set_variable_float(0,"UserEffectVol",fVal); @@ -1137,7 +1137,7 @@ int SoundEngine::OpenStreamThreadProc( void* lpParameter ) // playMusicTick // ///////////////////////////////////////////// -void SoundEngine::playMusicTick() +void SoundEngine::playMusicTick() { // AP - vita will update the music during the mixer callback #ifndef __PSVITA__ @@ -1146,7 +1146,7 @@ void SoundEngine::playMusicTick() } // AP - moved to a separate function so it can be called from the mixer callback on Vita -void SoundEngine::playMusicUpdate() +void SoundEngine::playMusicUpdate() { //return; static bool firstCall = true; @@ -1179,7 +1179,7 @@ void SoundEngine::playMusicUpdate() // 4J-PB - Need to check if we are a patched BD build if(app.GetBootedFromDiscPatch()) { - sprintf(m_szStreamName,"%s/%s",app.GetBDUsrDirPath(m_szMusicPath), m_szMusicPath ); + sprintf(m_szStreamName,"%s/%s",app.GetBDUsrDirPath(m_szMusicPath), m_szMusicPath ); app.DebugPrintf("SoundEngine::playMusicUpdate - (booted from disc patch) music path - %s",m_szStreamName); } else @@ -1214,7 +1214,7 @@ void SoundEngine::playMusicUpdate() SetIsPlayingStreamingCDMusic(false); m_MusicType=eMusicType_Game; m_StreamingAudioInfo.bIs3D=false; - + #ifdef _XBOX_ONE wstring &wstrSoundName=dlcAudioFile->GetSoundName(m_musicID); wstring wstrFile=L"TPACK:\\Data\\" + wstrSoundName +L".binka"; @@ -1244,7 +1244,7 @@ void SoundEngine::playMusicUpdate() } } else - { + { // 4J-PB - if this is a PS3 disc patch, we have to check if the music file is in the patch data #ifdef __PS3__ if(app.GetBootedFromDiscPatch() && (m_musicIDRun(); m_StreamState = eMusicStreamState_Opening; @@ -1335,7 +1335,7 @@ void SoundEngine::playMusicUpdate() delete m_openStreamThread; m_openStreamThread = NULL; - HSAMPLE hSample = AIL_stream_sample_handle( m_hStream); + HSAMPLE hSample = AIL_stream_sample_handle( m_hStream); // 4J-PB - causes the falloff to be calculated on the PPU instead of the SPU, and seems to resolve our distorted sound issue AIL_register_falloff_function_callback(hSample,&custom_falloff_function); @@ -1383,12 +1383,12 @@ void SoundEngine::playMusicUpdate() else { // clear the 3d flag on the stream after a jukebox finishes and streaming music starts - AIL_set_sample_is_3D( hSample, 0 ); + AIL_set_sample_is_3D( hSample, 0 ); } // set the pitch app.DebugPrintf("Sample rate:%d\n", AIL_sample_playback_rate(hSample)); AIL_set_sample_playback_rate_factor(hSample,m_StreamingAudioInfo.pitch); - // set the volume + // set the volume AIL_set_sample_volume_levels( hSample, m_StreamingAudioInfo.volume*getMasterMusicVolume(), m_StreamingAudioInfo.volume*getMasterMusicVolume()); AIL_start_stream( m_hStream ); @@ -1447,7 +1447,7 @@ void SoundEngine::playMusicUpdate() // Set the end track m_musicID = getMusicID(LevelData::DIMENSION_END); SetIsPlayingEndMusic(true); - SetIsPlayingNetherMusic(false); + SetIsPlayingNetherMusic(false); } else if(!playerInEnd && GetIsPlayingEndMusic()) { @@ -1458,7 +1458,7 @@ void SoundEngine::playMusicUpdate() // Set the end track m_musicID = getMusicID(LevelData::DIMENSION_NETHER); SetIsPlayingEndMusic(false); - SetIsPlayingNetherMusic(true); + SetIsPlayingNetherMusic(true); } else { @@ -1467,7 +1467,7 @@ void SoundEngine::playMusicUpdate() // Set the end track m_musicID = getMusicID(LevelData::DIMENSION_OVERWORLD); SetIsPlayingEndMusic(false); - SetIsPlayingNetherMusic(false); + SetIsPlayingNetherMusic(false); } } else if (playerInNether && !GetIsPlayingNetherMusic()) @@ -1502,7 +1502,7 @@ void SoundEngine::playMusicUpdate() if(fMusicVol!=getMasterMusicVolume()) { fMusicVol=getMasterMusicVolume(); - HSAMPLE hSample = AIL_stream_sample_handle( m_hStream); + HSAMPLE hSample = AIL_stream_sample_handle( m_hStream); //AIL_set_sample_3D_position( hSample, m_StreamingAudioInfo.x, m_StreamingAudioInfo.y, m_StreamingAudioInfo.z ); AIL_set_sample_volume_levels( hSample, fMusicVol, fMusicVol); } @@ -1545,7 +1545,7 @@ void SoundEngine::playMusicUpdate() } // our distances in the world aren't very big, so floats rather than casts to doubles should be fine - HSAMPLE hSample = AIL_stream_sample_handle( m_hStream); + HSAMPLE hSample = AIL_stream_sample_handle( m_hStream); fDist=sqrtf((fClosestX*fClosestX)+(fClosestY*fClosestY)+(fClosestZ*fClosestZ)); AIL_set_sample_3D_position( hSample, 0, 0, fDist ); } @@ -1555,7 +1555,7 @@ void SoundEngine::playMusicUpdate() break; case eMusicStreamState_Completed: - { + { // random delay of up to 3 minutes for music m_iMusicDelay = random->nextInt(20 * 60 * 3);//random->nextInt(20 * 60 * 10) + 20 * 60 * 10; // Check if we have a local player in The Nether or in The End, and play that music if they are @@ -1644,7 +1644,7 @@ char *SoundEngine::ConvertSoundPathToName(const wstring& name, bool bConvertSpac #endif -F32 AILCALLBACK custom_falloff_function (HSAMPLE S, +F32 AILCALLBACK custom_falloff_function (HSAMPLE S, F32 distance, F32 rolloff_factor, F32 min_dist, diff --git a/Minecraft.Client/Common/Audio/SoundEngine.h b/Minecraft.Client/Common/Audio/SoundEngine.h index 8dc50e7c..92c99d23 100644 --- a/Minecraft.Client/Common/Audio/SoundEngine.h +++ b/Minecraft.Client/Common/Audio/SoundEngine.h @@ -78,8 +78,8 @@ typedef struct { F32 x,y,z,volume,pitch; int iSound; - bool bIs3D; - bool bUseSoundsPitchVal; + bool bIs3D; + bool bUseSoundsPitchVal; #ifdef _DEBUG char chName[64]; #endif @@ -103,7 +103,7 @@ public: virtual void updateSystemMusicPlaying(bool isPlaying); virtual void updateSoundEffectVolume(float fVal); virtual void init(Options *); - virtual void tick(std::shared_ptr *players, float a); // 4J - updated to take array of local players rather than single one + 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); @@ -123,7 +123,7 @@ private: #else int initAudioHardware(int iMinSpeakers) { return iMinSpeakers;} #endif - + int GetRandomishTrack(int iStart,int iEnd); HMSOUNDBANK m_hBank; @@ -165,4 +165,4 @@ private: #ifdef __ORBIS__ int32_t m_hBGMAudio; #endif -}; +}; diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp index a1cb78d8..0e55ec9f 100644 --- a/Minecraft.Client/Common/Consoles_App.cpp +++ b/Minecraft.Client/Common/Consoles_App.cpp @@ -365,7 +365,7 @@ void CMinecraftApp::HandleButtonPresses(int iPad) // ProfileManager.WriteToProfile(iPad,true); } -bool CMinecraftApp::LoadInventoryMenu(int iPad,std::shared_ptr player,bool bNavigateBack) +bool CMinecraftApp::LoadInventoryMenu(int iPad,shared_ptr player,bool bNavigateBack) { bool success = true; @@ -388,7 +388,7 @@ bool CMinecraftApp::LoadInventoryMenu(int iPad,std::shared_ptr play return success; } -bool CMinecraftApp::LoadCreativeMenu(int iPad,std::shared_ptr player,bool bNavigateBack) +bool CMinecraftApp::LoadCreativeMenu(int iPad,shared_ptr player,bool bNavigateBack) { bool success = true; @@ -411,7 +411,7 @@ bool CMinecraftApp::LoadCreativeMenu(int iPad,std::shared_ptr playe return success; } -bool CMinecraftApp::LoadCrafting2x2Menu(int iPad,std::shared_ptr player) +bool CMinecraftApp::LoadCrafting2x2Menu(int iPad,shared_ptr player) { bool success = true; @@ -437,7 +437,7 @@ bool CMinecraftApp::LoadCrafting2x2Menu(int iPad,std::shared_ptr pl return success; } -bool CMinecraftApp::LoadCrafting3x3Menu(int iPad,std::shared_ptr player, int x, int y, int z) +bool CMinecraftApp::LoadCrafting3x3Menu(int iPad,shared_ptr player, int x, int y, int z) { bool success = true; @@ -463,7 +463,7 @@ bool CMinecraftApp::LoadCrafting3x3Menu(int iPad,std::shared_ptr pl return success; } -bool CMinecraftApp::LoadEnchantingMenu(int iPad,std::shared_ptr inventory, int x, int y, int z, Level *level) +bool CMinecraftApp::LoadEnchantingMenu(int iPad,shared_ptr inventory, int x, int y, int z, Level *level) { bool success = true; @@ -489,7 +489,7 @@ bool CMinecraftApp::LoadEnchantingMenu(int iPad,std::shared_ptr inven return success; } -bool CMinecraftApp::LoadFurnaceMenu(int iPad,std::shared_ptr inventory, std::shared_ptr furnace) +bool CMinecraftApp::LoadFurnaceMenu(int iPad,shared_ptr inventory, shared_ptr furnace) { bool success = true; @@ -514,7 +514,7 @@ bool CMinecraftApp::LoadFurnaceMenu(int iPad,std::shared_ptr inventor return success; } -bool CMinecraftApp::LoadBrewingStandMenu(int iPad,std::shared_ptr inventory, std::shared_ptr brewingStand) +bool CMinecraftApp::LoadBrewingStandMenu(int iPad,shared_ptr inventory, shared_ptr brewingStand) { bool success = true; @@ -540,7 +540,7 @@ bool CMinecraftApp::LoadBrewingStandMenu(int iPad,std::shared_ptr inv } -bool CMinecraftApp::LoadContainerMenu(int iPad,std::shared_ptr inventory, std::shared_ptr container) +bool CMinecraftApp::LoadContainerMenu(int iPad,shared_ptr inventory, shared_ptr container) { bool success = true; @@ -574,7 +574,7 @@ bool CMinecraftApp::LoadContainerMenu(int iPad,std::shared_ptr invent return success; } -bool CMinecraftApp::LoadTrapMenu(int iPad,std::shared_ptr inventory, std::shared_ptr trap) +bool CMinecraftApp::LoadTrapMenu(int iPad,shared_ptr inventory, shared_ptr trap) { bool success = true; @@ -599,7 +599,7 @@ bool CMinecraftApp::LoadTrapMenu(int iPad,std::shared_ptr inventory, return success; } -bool CMinecraftApp::LoadSignEntryMenu(int iPad,std::shared_ptr sign) +bool CMinecraftApp::LoadSignEntryMenu(int iPad,shared_ptr sign) { bool success = true; @@ -615,7 +615,7 @@ bool CMinecraftApp::LoadSignEntryMenu(int iPad,std::shared_ptr s return success; } -bool CMinecraftApp::LoadRepairingMenu(int iPad,std::shared_ptr inventory, Level *level, int x, int y, int z) +bool CMinecraftApp::LoadRepairingMenu(int iPad,shared_ptr inventory, Level *level, int x, int y, int z) { bool success = true; @@ -634,7 +634,7 @@ bool CMinecraftApp::LoadRepairingMenu(int iPad,std::shared_ptr invent return success; } -bool CMinecraftApp::LoadTradingMenu(int iPad, std::shared_ptr inventory, std::shared_ptr trader, Level *level) +bool CMinecraftApp::LoadTradingMenu(int iPad, shared_ptr inventory, shared_ptr trader, Level *level) { bool success = true; @@ -1272,7 +1272,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) { - std::shared_ptr decorationPlayer = *it3; + shared_ptr decorationPlayer = *it3; decorationPlayer->setShowOnMaps((app.GetGameHostOption(eGameHostOption_Gamertags)!=0)?true:false); } } @@ -2240,7 +2240,7 @@ unsigned int CMinecraftApp::GetGameSettingsDebugMask(int iPad,bool bOverridePlay } if(iPad < 0) iPad = 0; - std::shared_ptr player = Minecraft::GetInstance()->localplayers[iPad]; + shared_ptr player = Minecraft::GetInstance()->localplayers[iPad]; if(bOverridePlayer || player==NULL) { @@ -2260,7 +2260,7 @@ void CMinecraftApp::SetGameSettingsDebugMask(int iPad, unsigned int uiVal) GameSettingsA[iPad]->uiDebugBitmask=uiVal; // update the value so the network server can use it - std::shared_ptr player = Minecraft::GetInstance()->localplayers[iPad]; + shared_ptr player = Minecraft::GetInstance()->localplayers[iPad]; if(player) { @@ -2427,7 +2427,7 @@ void CMinecraftApp::HandleXuiActions(void) eTMSAction eTMS; LPVOID param; Minecraft *pMinecraft=Minecraft::GetInstance(); - std::shared_ptr player; + shared_ptr player; // are there any global actions to deal with? eAction = app.GetGlobalXuiAction(); diff --git a/Minecraft.Client/Common/Consoles_App.h b/Minecraft.Client/Common/Consoles_App.h index fd517d73..68f4ccd4 100644 --- a/Minecraft.Client/Common/Consoles_App.h +++ b/Minecraft.Client/Common/Consoles_App.h @@ -125,18 +125,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,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 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 GetTutorialMode() { return m_bTutorialMode;} void SetTutorialMode(bool bSet) {m_bTutorialMode=bSet;} diff --git a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp index b2687619..eabc1401 100644 --- a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp +++ b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp @@ -43,14 +43,14 @@ void AddEnchantmentRuleDefinition::addAttribute(const wstring &attributeName, co } } -bool AddEnchantmentRuleDefinition::enchantItem(std::shared_ptr item) +bool AddEnchantmentRuleDefinition::enchantItem(shared_ptr item) { bool enchanted = false; if (item != NULL) { // 4J-JEV: Ripped code from enchantmenthelpers // Maybe we want to add an addEnchantment method to EnchantmentHelpers - if (item->id == Item::enchantedBook_Id) + if (item->id == Item::enchantedBook_Id) { Item::enchantedBook->addEnchantment( item, new EnchantmentInstance(m_enchantmentId, m_enchantmentLevel) ); } diff --git a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.h b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.h index 0ec2ff44..3beece10 100644 --- a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.h +++ b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.h @@ -19,5 +19,5 @@ public: virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); - bool enchantItem(std::shared_ptr item); + bool enchantItem(shared_ptr item); }; \ No newline at end of file diff --git a/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.cpp index 6b99c59e..0d14884a 100644 --- a/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.cpp +++ b/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.cpp @@ -94,13 +94,13 @@ void AddItemRuleDefinition::addAttribute(const wstring &attributeName, const wst } } -bool AddItemRuleDefinition::addItemToContainer(std::shared_ptr container, int slotId) +bool AddItemRuleDefinition::addItemToContainer(shared_ptr container, int slotId) { bool added = false; if(Item::items[m_itemId] != NULL) { int quantity = min(m_quantity, Item::items[m_itemId]->getMaxStackSize()); - std::shared_ptr newItem = std::shared_ptr(new ItemInstance(m_itemId,quantity,m_auxValue) ); + shared_ptr newItem = 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/Common/GameRules/AddItemRuleDefinition.h b/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.h index bd8c466a..602f2d82 100644 --- a/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.h +++ b/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.h @@ -26,5 +26,5 @@ public: virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType); virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); - bool addItemToContainer(std::shared_ptr container, int slotId); + bool addItemToContainer(shared_ptr container, int slotId); }; \ No newline at end of file diff --git a/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp index d94ce63b..66abefbb 100644 --- a/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp +++ b/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp @@ -74,7 +74,7 @@ void CollectItemRuleDefinition::populateGameRule(GameRulesInstance::EGameRulesIn GameRuleDefinition::populateGameRule(type, rule); } -bool CollectItemRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr item) +bool CollectItemRuleDefinition::onCollectItem(GameRule *rule, 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, std::shared_ptrgetConnection() != NULL) { - rule->getConnection()->send( std::shared_ptr( new UpdateGameRuleProgressPacket(getActionType(), this->m_descriptionId, m_itemId, m_auxValue, this->m_4JDataValue,NULL,0))); + rule->getConnection()->send( shared_ptr( new UpdateGameRuleProgressPacket(getActionType(), this->m_descriptionId, m_itemId, m_auxValue, this->m_4JDataValue,NULL,0))); } } } @@ -102,7 +102,7 @@ bool CollectItemRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr item) +wstring CollectItemRuleDefinition::generateXml(shared_ptr item) { // 4J Stu - This should be kept in sync with the GameRulesDefinition.xsd wstring xml = L""; diff --git a/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.h b/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.h index 1c6821e4..5ee6f4c5 100644 --- a/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.h +++ b/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.h @@ -25,16 +25,16 @@ public: virtual int getGoal(); virtual int getProgress(GameRule *rule); - + virtual int getIcon() { return m_itemId; } virtual int getAuxValue() { return m_auxValue; } void populateGameRule(GameRulesInstance::EGameRulesInstanceType type, GameRule *rule); - bool onCollectItem(GameRule *rule, std::shared_ptr item); + bool onCollectItem(GameRule *rule, shared_ptr item); - static wstring generateXml(std::shared_ptr item); + static wstring generateXml(shared_ptr item); -private: +private: //static wstring generateXml(CollectItemRuleDefinition *ruleDef); }; \ No newline at end of file diff --git a/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp index f0362f48..adaf70c8 100644 --- a/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp +++ b/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp @@ -17,7 +17,7 @@ bool CompleteAllRuleDefinition::onUseTile(GameRule *rule, int tileId, int x, int return statusChanged; } -bool CompleteAllRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr item) +bool CompleteAllRuleDefinition::onCollectItem(GameRule *rule, shared_ptr item) { bool statusChanged = CompoundGameRuleDefinition::onCollectItem(rule,item); if(statusChanged) updateStatus(rule); @@ -44,14 +44,14 @@ void CompleteAllRuleDefinition::updateStatus(GameRule *rule) int icon = -1; int auxValue = 0; - + if(m_lastRuleStatusChanged != NULL) - { + { icon = m_lastRuleStatusChanged->getIcon(); auxValue = m_lastRuleStatusChanged->getAuxValue(); m_lastRuleStatusChanged = NULL; } - rule->getConnection()->send( std::shared_ptr( new UpdateGameRuleProgressPacket(getActionType(), this->m_descriptionId,icon, auxValue, 0,&data,sizeof(PacketData)))); + rule->getConnection()->send( 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); } diff --git a/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.h b/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.h index 2ecbc303..b2cb8847 100644 --- a/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.h +++ b/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.h @@ -17,7 +17,7 @@ public: virtual void getChildren(vector *children); virtual bool onUseTile(GameRule *rule, int tileId, int x, int y, int z); - virtual bool onCollectItem(GameRule *rule, std::shared_ptr item); + virtual bool onCollectItem(GameRule *rule, shared_ptr item); static wstring generateDescriptionString(const wstring &description, void *data, int dataLength); diff --git a/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.cpp index 106302ee..0481a54b 100644 --- a/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.cpp +++ b/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.cpp @@ -40,7 +40,7 @@ GameRuleDefinition *CompoundGameRuleDefinition::addChild(ConsoleGameRules::EGame rule = new UseTileRuleDefinition(); } else if(ruleType == ConsoleGameRules::eGameRuleType_UpdatePlayerRule) - { + { rule = new UpdatePlayerRuleDefinition(); } else @@ -91,7 +91,7 @@ bool CompoundGameRuleDefinition::onUseTile(GameRule *rule, int tileId, int x, in return statusChanged; } -bool CompoundGameRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr item) +bool CompoundGameRuleDefinition::onCollectItem(GameRule *rule, shared_ptr item) { bool statusChanged = false; for(AUTO_VAR(it, rule->m_parameters.begin()); it != rule->m_parameters.end(); ++it) @@ -100,7 +100,7 @@ bool CompoundGameRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptrsecond.gr->getGameRuleDefinition()->onCollectItem(it->second.gr,item); if(!statusChanged && changed) - { + { m_lastRuleStatusChanged = it->second.gr->getGameRuleDefinition(); statusChanged = true; } @@ -109,7 +109,7 @@ bool CompoundGameRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr player) +void CompoundGameRuleDefinition::postProcessPlayer(shared_ptr player) { for(AUTO_VAR(it, m_children.begin()); it != m_children.end(); ++it) { diff --git a/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.h b/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.h index 4b91cda8..bfedfd09 100644 --- a/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.h +++ b/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.h @@ -18,6 +18,6 @@ public: 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, std::shared_ptr item); - virtual void postProcessPlayer(std::shared_ptr player); + virtual bool onCollectItem(GameRule *rule, shared_ptr item); + virtual void postProcessPlayer(shared_ptr player); }; \ No newline at end of file diff --git a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp index 5f4bc737..0eef096b 100644 --- a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp +++ b/Minecraft.Client/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); - std::shared_ptr te = TileEntity::loadStatic(teTag); + 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) { - std::shared_ptr te = *it; + 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) ) { - std::shared_ptr teCopy = chunk->getTileEntity( (int)targetX & 15, (int)targetY & 15, (int)targetZ & 15 ); + 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; - std::shared_ptr e = EntityIO::loadStatic(eTag, NULL); + shared_ptr e = EntityIO::loadStatic(eTag, NULL); if( e->GetType() == eTYPE_PAINTING ) { - std::shared_ptr painting = dynamic_pointer_cast(e); + 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 ) { - std::shared_ptr frame = dynamic_pointer_cast(e); + 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); + 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) { - std::shared_ptr te = *it; + shared_ptr te = *it; CompoundTag *teTag = new CompoundTag(); - std::shared_ptr teCopy = te->clone(); + 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); + vector > *entities = level->getEntities(nullptr, bb); ListTag *entitiesTag = new ListTag(L"entities"); for(AUTO_VAR(it, entities->begin()); it != entities->end(); ++it) { - std::shared_ptr e = *it; + 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) +vector > *ConsoleSchematicFile::getTileEntitiesInRegion(LevelChunk *chunk, int x0, int y0, int z0, int x1, int y1, int z1) { - vector > *result = new vector >; + vector > *result = new vector >; for (AUTO_VAR(it, chunk->tileEntities.begin()); it != chunk->tileEntities.end(); ++it) { - std::shared_ptr te = it->second; + 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/Common/GameRules/ConsoleSchematicFile.h b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h index 299f81d4..b0eebf9e 100644 --- a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h +++ b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h @@ -55,7 +55,7 @@ public: } XboxSchematicInitParam; private: int m_xSize, m_ySize, m_zSize; - vector > m_tileEntities; + vector > m_tileEntities; vector< pair > m_entities; public: @@ -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 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/Common/GameRules/GameRule.cpp b/Minecraft.Client/Common/GameRules/GameRule.cpp index 310d6d65..34d6196c 100644 --- a/Minecraft.Client/Common/GameRules/GameRule.cpp +++ b/Minecraft.Client/Common/GameRules/GameRule.cpp @@ -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(std::shared_ptr item) { m_definition->onCollectItem(this,item); } +void GameRule::onCollectItem(shared_ptr item) { m_definition->onCollectItem(this,item); } void GameRule::write(DataOutputStream *dos) { @@ -63,7 +63,7 @@ void GameRule::write(DataOutputStream *dos) { wstring pName = (*it).first; ValueType vType = (*it).second; - + dos->writeUTF( (*it).first ); dos->writeBoolean( vType.isPointer ); @@ -80,7 +80,7 @@ void GameRule::read(DataInputStream *dis) for (int i = 0; i < savedParams; i++) { wstring pNames = dis->readUTF(); - + ValueType vType = getParameter(pNames); if (dis->readBoolean()) diff --git a/Minecraft.Client/Common/GameRules/GameRule.h b/Minecraft.Client/Common/GameRules/GameRule.h index c2b6c826..3b9dba7e 100644 --- a/Minecraft.Client/Common/GameRules/GameRule.h +++ b/Minecraft.Client/Common/GameRules/GameRule.h @@ -51,7 +51,7 @@ public: // All the hooks go here void onUseTile(int tileId, int x, int y, int z); - void onCollectItem(std::shared_ptr item); + void onCollectItem(shared_ptr item); // 4J-JEV: For saving. //CompoundTag *toTags(unordered_map *map); diff --git a/Minecraft.Client/Common/GameRules/GameRuleDefinition.h b/Minecraft.Client/Common/GameRules/GameRuleDefinition.h index ea7647bf..afec8fbc 100644 --- a/Minecraft.Client/Common/GameRules/GameRuleDefinition.h +++ b/Minecraft.Client/Common/GameRules/GameRuleDefinition.h @@ -39,7 +39,7 @@ public: virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType); virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue); - + virtual void populateGameRule(GameRulesInstance::EGameRulesInstanceType type, GameRule *rule); bool getComplete(GameRule *rule); @@ -53,8 +53,8 @@ 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, std::shared_ptr item) { return false; } - virtual void postProcessPlayer(std::shared_ptr player) { } + virtual bool onCollectItem(GameRule *rule, shared_ptr item) { return false; } + virtual void postProcessPlayer(shared_ptr player) { } vector *enumerate(); unordered_map *enumerateMap(); diff --git a/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.cpp index 7ef8e577..6e55cd45 100644 --- a/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.cpp +++ b/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.cpp @@ -11,7 +11,7 @@ UpdatePlayerRuleDefinition::UpdatePlayerRuleDefinition() { m_bUpdateHealth = m_bUpdateFood = m_bUpdateYRot = false;; m_health = 0; - m_food = 0; + m_food = 0; m_spawnPos = NULL; m_yRot = 0.0f; } @@ -130,7 +130,7 @@ void UpdatePlayerRuleDefinition::addAttribute(const wstring &attributeName, cons } } -void UpdatePlayerRuleDefinition::postProcessPlayer(std::shared_ptr player) +void UpdatePlayerRuleDefinition::postProcessPlayer(shared_ptr player) { if(m_bUpdateHealth) { diff --git a/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.h b/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.h index f02ba848..538aefa1 100644 --- a/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.h +++ b/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.h @@ -13,7 +13,7 @@ private: bool m_bUpdateHealth, m_bUpdateFood, m_bUpdateYRot, m_bUpdateInventory; int m_health; - int m_food; + int m_food; Pos *m_spawnPos; float m_yRot; @@ -22,12 +22,12 @@ public: ~UpdatePlayerRuleDefinition(); virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_UpdatePlayerRule; } - + virtual void getChildren(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 postProcessPlayer(std::shared_ptr player); + virtual void postProcessPlayer(shared_ptr player); }; \ No newline at end of file diff --git a/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceContainer.cpp b/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceContainer.cpp index 25b7f6ab..8184f45b 100644 --- a/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceContainer.cpp +++ b/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceContainer.cpp @@ -22,7 +22,7 @@ XboxStructureActionPlaceContainer::~XboxStructureActionPlaceContainer() // 4J-JEV: Super class handles attr-facing fine. //void XboxStructureActionPlaceContainer::writeAttributes(DataOutputStream *dos, UINT numAttrs) - + void XboxStructureActionPlaceContainer::getChildren(vector *children) { @@ -78,8 +78,8 @@ bool XboxStructureActionPlaceContainer::placeContainerInLevel(StructurePiece *st } level->setTile( worldX, worldY, worldZ, m_tile ); - std::shared_ptr container = dynamic_pointer_cast(level->getTileEntity( worldX, worldY, worldZ )); - + 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/Common/GameRules/XboxStructureActionPlaceSpawner.cpp b/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceSpawner.cpp index fcb8a018..1eca3342 100644 --- a/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceSpawner.cpp +++ b/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceSpawner.cpp @@ -54,7 +54,7 @@ bool XboxStructureActionPlaceSpawner::placeSpawnerInLevel(StructurePiece *struct } level->setTile( worldX, worldY, worldZ, m_tile ); - std::shared_ptr entity = dynamic_pointer_cast(level->getTileEntity( worldX, worldY, worldZ )); + 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/Common/Network/GameNetworkManager.cpp b/Minecraft.Client/Common/Network/GameNetworkManager.cpp index f52bd4e7..5fd72e40 100644 --- a/Minecraft.Client/Common/Network/GameNetworkManager.cpp +++ b/Minecraft.Client/Common/Network/GameNetworkManager.cpp @@ -316,7 +316,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame return false; } - connection->send( std::shared_ptr( new PreLoginPacket(minecraft->user->name) ) ); + connection->send( shared_ptr( new PreLoginPacket(minecraft->user->name) ) ); // Tick connection until we're ready to go. The stages involved in this are: // (1) Creating the ClientConnection sends a prelogin packet to the server @@ -403,7 +403,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame // Open the socket on the server end to accept incoming data Socket::addIncomingSocket(socket); - connection->send( std::shared_ptr( new PreLoginPacket(convStringToWstring( ProfileManager.GetGamertag(idx) )) ) ); + connection->send( shared_ptr( new PreLoginPacket(convStringToWstring( ProfileManager.GetGamertag(idx) )) ) ); createdConnections.push_back( connection ); @@ -1134,7 +1134,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam ) PlayerList *players = pServer->getPlayers(); for(AUTO_VAR(it, players->players.begin()); it < players->players.end(); ++it) { - std::shared_ptr servPlayer = *it; + shared_ptr servPlayer = *it; if( servPlayer->connection->isLocal() && !servPlayer->connection->isGuest() ) { servPlayer->connection->connection->getSocket()->setPlayer(NULL); @@ -1202,7 +1202,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam ) PlayerList *players = pServer->getPlayers(); for(AUTO_VAR(it, players->players.begin()); it < players->players.end(); ++it) { - std::shared_ptr servPlayer = *it; + shared_ptr servPlayer = *it; if( servPlayer->getXuid() == localPlayerXuid ) { servPlayer->connection->connection->getSocket()->setPlayer( g_NetworkManager.GetLocalPlayerByUserIndex(index) ); @@ -1391,7 +1391,7 @@ void CGameNetworkManager::CreateSocket( INetworkPlayer *pNetworkPlayer, bool loc Minecraft *pMinecraft = Minecraft::GetInstance(); Socket *socket = NULL; - std::shared_ptr mpPlayer = pMinecraft->localplayers[pNetworkPlayer->GetUserIndex()]; + 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 @@ -1428,7 +1428,7 @@ void CGameNetworkManager::CreateSocket( INetworkPlayer *pNetworkPlayer, bool loc if( connection->createdOk ) { - connection->send( std::shared_ptr( new PreLoginPacket( pNetworkPlayer->GetOnlineName() ) ) ); + connection->send( shared_ptr( new PreLoginPacket( pNetworkPlayer->GetOnlineName() ) ) ); pMinecraft->addPendingLocalConnection(idx, connection); } else diff --git a/Minecraft.Client/Common/Tutorial/ChangeStateConstraint.cpp b/Minecraft.Client/Common/Tutorial/ChangeStateConstraint.cpp index f495cca0..f01db84e 100644 --- a/Minecraft.Client/Common/Tutorial/ChangeStateConstraint.cpp +++ b/Minecraft.Client/Common/Tutorial/ChangeStateConstraint.cpp @@ -24,7 +24,7 @@ ChangeStateConstraint::ChangeStateConstraint( Tutorial *tutorial, eTutorial_Stat m_tutorial = tutorial; m_targetState = targetState; m_sourceStatesCount = sourceStatesCount; - + m_bHasChanged = false; m_changedFromState = e_Tutorial_State_None; @@ -59,11 +59,11 @@ void ChangeStateConstraint::tick(int iPad) if(originalPrivileges != playerPrivs) { // Send update settings packet to server - Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr player = minecraft->localplayers[iPad]; + Minecraft *pMinecraft = Minecraft::GetInstance(); + shared_ptr player = minecraft->localplayers[iPad]; if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL) { - player->connection->send( std::shared_ptr( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); + player->connection->send( shared_ptr( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); } } } @@ -100,11 +100,11 @@ void ChangeStateConstraint::tick(int iPad) if(originalPrivileges != playerPrivs) { // Send update settings packet to server - Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr player = minecraft->localplayers[iPad]; + Minecraft *pMinecraft = Minecraft::GetInstance(); + shared_ptr player = minecraft->localplayers[iPad]; if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL) { - player->connection->send( std::shared_ptr( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); + player->connection->send( shared_ptr( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); } } } @@ -124,11 +124,11 @@ void ChangeStateConstraint::tick(int iPad) if(originalPrivileges != playerPrivs) { // Send update settings packet to server - Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr player = minecraft->localplayers[iPad]; + Minecraft *pMinecraft = Minecraft::GetInstance(); + shared_ptr player = minecraft->localplayers[iPad]; if(player != NULL && player->connection && player->connection->getNetworkPlayer() != NULL) { - player->connection->send( std::shared_ptr( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); + player->connection->send( shared_ptr( new PlayerInfoPacket( player->connection->getNetworkPlayer()->GetSmallId(), -1, playerPrivs) ) ); } } } diff --git a/Minecraft.Client/Common/Tutorial/CompleteUsingItemTask.cpp b/Minecraft.Client/Common/Tutorial/CompleteUsingItemTask.cpp index fbd6ddf3..43b2f7f3 100644 --- a/Minecraft.Client/Common/Tutorial/CompleteUsingItemTask.cpp +++ b/Minecraft.Client/Common/Tutorial/CompleteUsingItemTask.cpp @@ -4,7 +4,7 @@ CompleteUsingItemTask::CompleteUsingItemTask(Tutorial *tutorial, int descriptionId, int itemIds[], unsigned int itemIdsLength, bool enablePreCompletion) : TutorialTask( tutorial, descriptionId, enablePreCompletion, NULL) -{ +{ m_iValidItemsA= new int [itemIdsLength]; for(int i=0;i item) +void CompleteUsingItemTask::completeUsingItem(shared_ptr item) { if(!hasBeenActivated() && !isPreCompletionEnabled()) return; for(int i=0;i item); + virtual void completeUsingItem(shared_ptr item); }; \ No newline at end of file diff --git a/Minecraft.Client/Common/Tutorial/CraftTask.cpp b/Minecraft.Client/Common/Tutorial/CraftTask.cpp index ca462aa5..6749d030 100644 --- a/Minecraft.Client/Common/Tutorial/CraftTask.cpp +++ b/Minecraft.Client/Common/Tutorial/CraftTask.cpp @@ -40,7 +40,7 @@ CraftTask::~CraftTask() delete[] m_auxValues; } -void CraftTask::onCrafted(std::shared_ptr item) +void CraftTask::onCrafted(shared_ptr item) { #ifndef _CONTENT_PACKAGE wprintf(L"CraftTask::onCrafted - %ls\n", item->toString().c_str() ); diff --git a/Minecraft.Client/Common/Tutorial/CraftTask.h b/Minecraft.Client/Common/Tutorial/CraftTask.h index c841c96b..1496f07a 100644 --- a/Minecraft.Client/Common/Tutorial/CraftTask.h +++ b/Minecraft.Client/Common/Tutorial/CraftTask.h @@ -14,7 +14,7 @@ public: ~CraftTask(); virtual bool isCompleted() { return bIsCompleted; } - virtual void onCrafted(std::shared_ptr item); + virtual void onCrafted(shared_ptr item); private: int *m_items; diff --git a/Minecraft.Client/Common/Tutorial/DiggerItemHint.cpp b/Minecraft.Client/Common/Tutorial/DiggerItemHint.cpp index fcfec29d..1367f411 100644 --- a/Minecraft.Client/Common/Tutorial/DiggerItemHint.cpp +++ b/Minecraft.Client/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(std::shared_ptr item, Tile *tile) +int DiggerItemHint::startDestroyBlock(shared_ptr item, Tile *tile) { if(item != NULL) { @@ -46,7 +46,7 @@ int DiggerItemHint::startDestroyBlock(std::shared_ptr item, Tile * return -1; } -int DiggerItemHint::attack(std::shared_ptr item, std::shared_ptr entity) +int DiggerItemHint::attack(shared_ptr item, shared_ptr entity) { if(item != NULL) { diff --git a/Minecraft.Client/Common/Tutorial/DiggerItemHint.h b/Minecraft.Client/Common/Tutorial/DiggerItemHint.h index b23a8be3..cb71742e 100644 --- a/Minecraft.Client/Common/Tutorial/DiggerItemHint.h +++ b/Minecraft.Client/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(std::shared_ptr item, Tile *tile); - virtual int attack(std::shared_ptr item, std::shared_ptr entity); + virtual int startDestroyBlock(shared_ptr item, Tile *tile); + virtual int attack(shared_ptr item, shared_ptr entity); }; \ No newline at end of file diff --git a/Minecraft.Client/Common/Tutorial/PickupTask.cpp b/Minecraft.Client/Common/Tutorial/PickupTask.cpp index 742ed08c..00bc9d1f 100644 --- a/Minecraft.Client/Common/Tutorial/PickupTask.cpp +++ b/Minecraft.Client/Common/Tutorial/PickupTask.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" #include "PickupTask.h" -void PickupTask::onTake(std::shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) +void PickupTask::onTake(shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) { if(item->id == m_itemId) { diff --git a/Minecraft.Client/Common/Tutorial/PickupTask.h b/Minecraft.Client/Common/Tutorial/PickupTask.h index 26ef3a21..68e1d479 100644 --- a/Minecraft.Client/Common/Tutorial/PickupTask.h +++ b/Minecraft.Client/Common/Tutorial/PickupTask.h @@ -17,7 +17,7 @@ public: {} virtual bool isCompleted() { return bIsCompleted; } - virtual void onTake(std::shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux); + virtual void onTake(shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux); private: int m_itemId; diff --git a/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.cpp b/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.cpp index 39daa72a..8603f765 100644 --- a/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.cpp +++ b/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.cpp @@ -111,7 +111,7 @@ bool ProcedureCompoundTask::isCompleted() return allCompleted; } -void ProcedureCompoundTask::onCrafted(std::shared_ptr item) +void ProcedureCompoundTask::onCrafted(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, std::shared_ptr item, int x, int y, int z,bool bTestUseOnly) +void ProcedureCompoundTask::useItemOn(Level *level, 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, std::shared_ptr item, bool bTestUseOnly) +void ProcedureCompoundTask::useItem(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(std::shared_ptr item, bool bTe } } -void ProcedureCompoundTask::onTake(std::shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) +void ProcedureCompoundTask::onTake(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/Common/Tutorial/ProcedureCompoundTask.h b/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.h index e60bcfb0..36b32798 100644 --- a/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.h +++ b/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.h @@ -18,7 +18,7 @@ public: virtual int getDescriptionId(); virtual int getPromptId(); virtual bool isCompleted(); - virtual void onCrafted(std::shared_ptr item); + virtual void onCrafted(shared_ptr item); virtual void handleUIInput(int iAction); virtual void setAsCurrentTask(bool active = true); virtual bool ShowMinimumTime(); @@ -26,9 +26,9 @@ public: virtual void setShownForMinimumTime(); virtual bool AllowFade(); - 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 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 onStateChange(eTutorial_State newState); private: diff --git a/Minecraft.Client/Common/Tutorial/TakeItemHint.cpp b/Minecraft.Client/Common/Tutorial/TakeItemHint.cpp index 5a5c0ea5..a1a5c37a 100644 --- a/Minecraft.Client/Common/Tutorial/TakeItemHint.cpp +++ b/Minecraft.Client/Common/Tutorial/TakeItemHint.cpp @@ -17,7 +17,7 @@ TakeItemHint::TakeItemHint(eTutorial_Hint id, Tutorial *tutorial, int items[], u } } -bool TakeItemHint::onTake(std::shared_ptr item) +bool TakeItemHint::onTake(shared_ptr item) { if(item != NULL) { diff --git a/Minecraft.Client/Common/Tutorial/TakeItemHint.h b/Minecraft.Client/Common/Tutorial/TakeItemHint.h index 25d43eac..f001d4c7 100644 --- a/Minecraft.Client/Common/Tutorial/TakeItemHint.h +++ b/Minecraft.Client/Common/Tutorial/TakeItemHint.h @@ -15,5 +15,5 @@ public: TakeItemHint(eTutorial_Hint id, Tutorial *tutorial, int items[], unsigned int itemsLength); ~TakeItemHint(); - virtual bool onTake( std::shared_ptr item ); + virtual bool onTake( shared_ptr item ); }; \ No newline at end of file diff --git a/Minecraft.Client/Common/Tutorial/Tutorial.cpp b/Minecraft.Client/Common/Tutorial/Tutorial.cpp index fa865b90..f7e44b17 100644 --- a/Minecraft.Client/Common/Tutorial/Tutorial.cpp +++ b/Minecraft.Client/Common/Tutorial/Tutorial.cpp @@ -1681,7 +1681,7 @@ void Tutorial::showTutorialPopup(bool show) } } -void Tutorial::useItemOn(Level *level, std::shared_ptr item, int x, int y, int z, bool bTestUseOnly) +void Tutorial::useItemOn(Level *level, 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, std::shared_ptr item, int x } } -void Tutorial::useItemOn(std::shared_ptr item, bool bTestUseOnly) +void Tutorial::useItemOn(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(std::shared_ptr item, bool bTestUseOnly) } } -void Tutorial::completeUsingItem(std::shared_ptr item) +void Tutorial::completeUsingItem(shared_ptr item) { for(AUTO_VAR(it, activeTasks[m_CurrentState].begin()); it < activeTasks[m_CurrentState].end(); ++it) { @@ -1718,7 +1718,7 @@ void Tutorial::completeUsingItem(std::shared_ptr item) } } -void Tutorial::startDestroyBlock(std::shared_ptr item, Tile *tile) +void Tutorial::startDestroyBlock(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(std::shared_ptr player, std::shared_ptr entity) +void Tutorial::attack(shared_ptr player, 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(std::shared_ptr player, std::shared_ptr en } } -void Tutorial::itemDamaged(std::shared_ptr item) +void Tutorial::itemDamaged(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(std::shared_ptr item, bool canMake) +void Tutorial::createItemSelected(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(std::shared_ptr item, bool canMa } } -void Tutorial::onCrafted(std::shared_ptr item) +void Tutorial::onCrafted(shared_ptr item) { for(unsigned int state = 0; state < e_Tutorial_State_Max; ++state) { @@ -1833,7 +1833,7 @@ void Tutorial::onCrafted(std::shared_ptr item) } } -void Tutorial::onTake(std::shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) +void Tutorial::onTake(shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) { if( !m_hintDisplayed ) { @@ -1860,7 +1860,7 @@ void Tutorial::onTake(std::shared_ptr item, unsigned int invItemCo } } -void Tutorial::onSelectedItemChanged(std::shared_ptr item) +void Tutorial::onSelectedItemChanged(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 diff --git a/Minecraft.Client/Common/Tutorial/Tutorial.h b/Minecraft.Client/Common/Tutorial/Tutorial.h index e942ff32..aaaaba0a 100644 --- a/Minecraft.Client/Common/Tutorial/Tutorial.h +++ b/Minecraft.Client/Common/Tutorial/Tutorial.h @@ -11,7 +11,7 @@ using namespace std; // #define TUTORIAL_MINIMUM_DISPLAY_MESSAGE_TIME 2000 // #define TUTORIAL_REMINDER_TIME (TUTORIAL_DISPLAY_MESSAGE_TIME + 20000) // #define TUTORIAL_CONSTRAINT_DELAY_REMOVE_TICKS 15 -// +// // // 0-24000 // #define TUTORIAL_FREEZE_TIME_VALUE 8000 @@ -151,19 +151,19 @@ public: void showTutorialPopup(bool show); - 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 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 destroyBlock(Tile *tile); - void attack(std::shared_ptr player, std::shared_ptr entity); - void itemDamaged(std::shared_ptr item); + void attack(shared_ptr player, shared_ptr entity); + void itemDamaged(shared_ptr item); void handleUIInput(int iAction); - 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 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 onLookAt(int id, int iData=0); void onLookAtEntity(eINSTANCEOF type); void onEffectChanged(MobEffect *effect, bool bRemoved=false); diff --git a/Minecraft.Client/Common/Tutorial/TutorialHint.cpp b/Minecraft.Client/Common/Tutorial/TutorialHint.cpp index ecd6fe29..5f0808bf 100644 --- a/Minecraft.Client/Common/Tutorial/TutorialHint.cpp +++ b/Minecraft.Client/Common/Tutorial/TutorialHint.cpp @@ -7,14 +7,14 @@ #include "..\..\Minecraft.h" #include "..\..\MultiplayerLocalPlayer.h" -TutorialHint::TutorialHint(eTutorial_Hint id, Tutorial *tutorial, int descriptionId, eHintType type, bool allowFade /*= true*/) +TutorialHint::TutorialHint(eTutorial_Hint id, Tutorial *tutorial, int descriptionId, eHintType type, bool allowFade /*= true*/) : m_id( id ), m_tutorial(tutorial), m_descriptionId( descriptionId ), m_type( type ), m_counter( 0 ), m_lastTile( NULL ), m_hintNeeded( true ), m_allowFade(allowFade) { tutorial->addMessage(descriptionId, type != e_Hint_NoIngredients); } -int TutorialHint::startDestroyBlock(std::shared_ptr item, Tile *tile) +int TutorialHint::startDestroyBlock(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(std::shared_ptr item, std::shared_ptr entity) +int TutorialHint::attack(shared_ptr item, shared_ptr entity) { /* switch(m_type) @@ -71,7 +71,7 @@ int TutorialHint::attack(std::shared_ptr item, std::shared_ptr item, bool canMake) +int TutorialHint::createItemSelected(shared_ptr item, bool canMake) { int returnVal = -1; switch(m_type) @@ -86,7 +86,7 @@ int TutorialHint::createItemSelected(std::shared_ptr item, bool ca return returnVal; } -int TutorialHint::itemDamaged(std::shared_ptr item) +int TutorialHint::itemDamaged(shared_ptr item) { int returnVal = -1; switch(m_type) @@ -100,7 +100,7 @@ int TutorialHint::itemDamaged(std::shared_ptr item) return returnVal; } -bool TutorialHint::onTake( std::shared_ptr item ) +bool TutorialHint::onTake( shared_ptr item ) { return false; } @@ -121,7 +121,7 @@ int TutorialHint::tick() switch(m_type) { case e_Hint_SwimUp: - if( Minecraft::GetInstance()->localplayers[m_tutorial->getPad()]->isUnderLiquid(Material::water) ) returnVal = m_descriptionId; + if( Minecraft::GetInstance()->localplayers[m_tutorial->getPad()]->isUnderLiquid(Material::water) ) returnVal = m_descriptionId; break; } return returnVal; diff --git a/Minecraft.Client/Common/Tutorial/TutorialHint.h b/Minecraft.Client/Common/Tutorial/TutorialHint.h index 8c33156f..8ca543cc 100644 --- a/Minecraft.Client/Common/Tutorial/TutorialHint.h +++ b/Minecraft.Client/Common/Tutorial/TutorialHint.h @@ -10,7 +10,7 @@ class Tutorial; class TutorialHint { -public: +public: enum eHintType { e_Hint_DiggerItem, @@ -40,12 +40,12 @@ public: eTutorial_Hint getId() { return m_id; } - virtual int startDestroyBlock(std::shared_ptr item, Tile *tile); + virtual int startDestroyBlock(shared_ptr item, Tile *tile); virtual int destroyBlock(Tile *tile); - 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 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 bool onLookAt(int id, int iData=0); virtual bool onLookAtEntity(eINSTANCEOF type); virtual int tick(); diff --git a/Minecraft.Client/Common/Tutorial/TutorialMode.cpp b/Minecraft.Client/Common/Tutorial/TutorialMode.cpp index 774e9c73..82c81598 100644 --- a/Minecraft.Client/Common/Tutorial/TutorialMode.cpp +++ b/Minecraft.Client/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]); } - std::shared_ptr item = minecraft->player->getSelectedItem(); + shared_ptr item = minecraft->player->getSelectedItem(); int damageBefore; if(item != NULL) { @@ -47,7 +47,7 @@ bool TutorialMode::destroyBlock(int x, int y, int z, int face) if(!tutorial->m_allTutorialsComplete) { if ( item != NULL && item->isDamageableItem() ) - { + { int max = item->getMaxDamage(); int damageNow = item->getDamageValue(); @@ -78,7 +78,7 @@ void TutorialMode::tick() */ } -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 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 haveItem = false; int itemCount = 0; @@ -87,7 +87,7 @@ bool TutorialMode::useItemOn(std::shared_ptr player, Level *level, std:: tutorial->useItemOn(level, item, x, y, z, bTestUseOnly); if(!bTestUseOnly) - { + { if(item != NULL) { haveItem = true; @@ -110,7 +110,7 @@ bool TutorialMode::useItemOn(std::shared_ptr player, Level *level, std:: return result; } -void TutorialMode::attack(std::shared_ptr player, std::shared_ptr entity) +void TutorialMode::attack(shared_ptr player, shared_ptr entity) { if(!tutorial->m_allTutorialsComplete) tutorial->attack(player, entity); diff --git a/Minecraft.Client/Common/Tutorial/TutorialMode.h b/Minecraft.Client/Common/Tutorial/TutorialMode.h index 330b0d51..75e24edf 100644 --- a/Minecraft.Client/Common/Tutorial/TutorialMode.h +++ b/Minecraft.Client/Common/Tutorial/TutorialMode.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(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 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 isInputAllowed(int mapping); diff --git a/Minecraft.Client/Common/Tutorial/TutorialTask.h b/Minecraft.Client/Common/Tutorial/TutorialTask.h index adeaab6d..92cb5999 100644 --- a/Minecraft.Client/Common/Tutorial/TutorialTask.h +++ b/Minecraft.Client/Common/Tutorial/TutorialTask.h @@ -26,7 +26,7 @@ protected: bool m_bAllowFade; bool m_bTaskReminders; bool m_bShowMinimumTime; - + protected: bool bIsCompleted; bool m_bShownForMinimumTime; @@ -43,7 +43,7 @@ public: virtual eTutorial_CompletionAction getCompletionAction() { return e_Tutorial_Completion_None; } virtual bool isPreCompletionEnabled() { return enablePreCompletion; } virtual void taskCompleted(); - virtual void enableConstraints(bool enable, bool delayRemove = false); + virtual void enableConstraints(bool enable, bool delayRemove = false); virtual void setAsCurrentTask(bool active = true); virtual void setShownForMinimumTime() { m_bShownForMinimumTime = true; } @@ -52,12 +52,12 @@ public: bool TaskReminders() { return m_bTaskReminders;} virtual bool ShowMinimumTime() { return m_bShowMinimumTime;} - 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 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 handleUIInput(int iAction) { } - virtual void onCrafted(std::shared_ptr item) { } - virtual void onTake(std::shared_ptr item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux) { } + virtual void onCrafted(shared_ptr item) { } + virtual void onTake(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/Common/Tutorial/UseItemTask.cpp b/Minecraft.Client/Common/Tutorial/UseItemTask.cpp index 8f53f14d..09bac4d1 100644 --- a/Minecraft.Client/Common/Tutorial/UseItemTask.cpp +++ b/Minecraft.Client/Common/Tutorial/UseItemTask.cpp @@ -16,7 +16,7 @@ bool UseItemTask::isCompleted() return bIsCompleted; } -void UseItemTask::useItem(std::shared_ptr item,bool bTestUseOnly) +void UseItemTask::useItem(shared_ptr item,bool bTestUseOnly) { if(bTestUseOnly) return; diff --git a/Minecraft.Client/Common/Tutorial/UseItemTask.h b/Minecraft.Client/Common/Tutorial/UseItemTask.h index 2982412e..46d71be4 100644 --- a/Minecraft.Client/Common/Tutorial/UseItemTask.h +++ b/Minecraft.Client/Common/Tutorial/UseItemTask.h @@ -16,5 +16,5 @@ public: UseItemTask(const int itemId, Tutorial *tutorial, int descriptionId, bool enablePreCompletion = false, vector *inConstraints = NULL, bool bShowMinimumTime = false, bool bAllowFade = true, bool bTaskReminders = true ); virtual bool isCompleted(); - virtual void useItem(std::shared_ptr item, bool bTestUseOnly=false); + virtual void useItem(shared_ptr item, bool bTestUseOnly=false); }; \ No newline at end of file diff --git a/Minecraft.Client/Common/Tutorial/UseTileTask.cpp b/Minecraft.Client/Common/Tutorial/UseTileTask.cpp index 57e67cad..1f4ed4cb 100644 --- a/Minecraft.Client/Common/Tutorial/UseTileTask.cpp +++ b/Minecraft.Client/Common/Tutorial/UseTileTask.cpp @@ -25,7 +25,7 @@ bool UseTileTask::isCompleted() return bIsCompleted; } -void UseTileTask::useItemOn(Level *level, std::shared_ptr item, int x, int y, int z,bool bTestUseOnly) +void UseTileTask::useItemOn(Level *level, shared_ptr item, int x, int y, int z,bool bTestUseOnly) { if(bTestUseOnly) return; diff --git a/Minecraft.Client/Common/Tutorial/UseTileTask.h b/Minecraft.Client/Common/Tutorial/UseTileTask.h index b20c4b84..74b3a40c 100644 --- a/Minecraft.Client/Common/Tutorial/UseTileTask.h +++ b/Minecraft.Client/Common/Tutorial/UseTileTask.h @@ -20,5 +20,5 @@ public: UseTileTask(const int tileId, Tutorial *tutorial, int descriptionId, bool enablePreCompletion = false, vector *inConstraints = NULL, bool bShowMinimumTime = false, bool bAllowFade = true, bool bTaskReminders = true); virtual bool isCompleted(); - virtual void useItemOn(Level *level, std::shared_ptr item, int x, int y, int z, bool bTestUseOnly=false); + virtual void useItemOn(Level *level, shared_ptr item, int x, int y, int z, bool bTestUseOnly=false); }; \ No newline at end of file diff --git a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp index 2bdf8ae9..29ddcf71 100644 --- a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp @@ -73,7 +73,7 @@ void IUIScene_AbstractContainerMenu::Initialize(int iPad, AbstractContainerMenu* m_iCurrSlotX = 0; m_iCurrSlotY = 0; #endif // TAP_DETECTION - // + // // for(int i=0;itouch[0].x)-m_oldvTouchPos.x) * m_fTouchPadMulX; float fNewY=(((float)pTouchPadData->touch[0].y)-m_oldvTouchPos.y) * m_fTouchPadMulY; - // relative positions - needs a deadzone + // relative positions - needs a deadzone if(fNewX>m_fTouchPadDeadZoneX) { @@ -320,11 +320,11 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if(fNewY>m_fTouchPadDeadZoneY) { - vPointerPos.y=m_oldvPointerPos.y+((fNewY-m_fTouchPadDeadZoneY)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f)); + vPointerPos.y=m_oldvPointerPos.y+((fNewY-m_fTouchPadDeadZoneY)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f)); } else if(fNewY<-m_fTouchPadDeadZoneY) { - vPointerPos.y=m_oldvPointerPos.y+((fNewY+m_fTouchPadDeadZoneY)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f)); + vPointerPos.y=m_oldvPointerPos.y+((fNewY+m_fTouchPadDeadZoneY)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f)); } // Clamp to pointer extents. @@ -334,7 +334,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() else if ( vPointerPos.y > m_fPointerMaxY ) vPointerPos.y = m_fPointerMaxY; bStickInput = true; - m_eCurrTapState=eTapStateNoInput; + m_eCurrTapState=eTapStateNoInput; } else { @@ -408,7 +408,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() fInputX *= fInputScale; fInputY *= fInputScale; -#ifdef USE_POINTER_ACCEL +#ifdef USE_POINTER_ACCEL m_fPointerAccelX += fInputX / 50.0f; m_fPointerAccelY += fInputY / 50.0f; @@ -451,12 +451,12 @@ void IUIScene_AbstractContainerMenu::onMouseTick() else { m_iConsectiveInputTicks = 0; -#ifdef USE_POINTER_ACCEL +#ifdef USE_POINTER_ACCEL m_fPointerVelX = 0.0f; m_fPointerVelY = 0.0f; m_fPointerAccelX = 0.0f; m_fPointerAccelY = 0.0f; -#endif +#endif } #ifdef __ORBIS__ @@ -501,7 +501,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() ( vPointerPos.y >= sectionPos.y ) && ( vPointerPos.y <= itemMax.y ) ) { // Pointer is over this control! - eSectionUnderPointer = eSection; + eSectionUnderPointer = eSection; vSnapPos.x = itemPos.x + ( itemSize.x / 2.0f ); vSnapPos.y = itemPos.y + ( itemSize.y / 2.0f ); @@ -590,7 +590,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() } // If we are not over any slot, set focus elsewhere. - if ( eSectionUnderPointer == eSectionNone ) + if ( eSectionUnderPointer == eSectionNone ) { setFocusToPointer( getPad() ); #ifdef TAP_DETECTION @@ -704,11 +704,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. - std::shared_ptr player = Minecraft::GetInstance()->localplayers[getPad()]; - std::shared_ptr carriedItem = nullptr; + shared_ptr player = Minecraft::GetInstance()->localplayers[getPad()]; + shared_ptr carriedItem = nullptr; if(player != NULL) carriedItem = player->inventory->getCarried(); - std::shared_ptr slotItem = nullptr; + shared_ptr slotItem = nullptr; Slot *slot = NULL; int slotIndex = 0; if(bPointerIsOverSlot) @@ -790,7 +790,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if ( bSlotHasItem ) { // Item in hand and item in slot ... is item in slot the same as in out hand? If so, can we stack on to it? - if ( bCarriedIsSameAsSlot ) + if ( bCarriedIsSameAsSlot ) { // Can we stack more into this slot? if ( iSlotStackSizeRemaining == 0 ) @@ -889,7 +889,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if((eSectionUnderPointer==eSectionInventoryUsing)||(eSectionUnderPointer==eSectionInventoryInventory)) { - std::shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); + shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); ArmorRecipes::_eArmorType eArmourType=ArmorRecipes::GetArmorType(item->id); if(eArmourType==ArmorRecipes::eArmorType_None) @@ -919,7 +919,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() else { buttonY = eToolTipQuickMove; - } + } break; case ArmorRecipes::eArmorType_Leggings: if(isSlotEmpty(eSectionInventoryArmor,2)) @@ -952,7 +952,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() else if((eSectionUnderPointer==eSectionFurnaceUsing)||(eSectionUnderPointer==eSectionFurnaceInventory)) { // Get the info on this item. - std::shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); + shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); bool bValidFuel = FurnaceTileEntity::isFuel(item); bool bValidIngredient = FurnaceRecipes::getInstance()->getResult(item->getItem()->id) != NULL; @@ -962,7 +962,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if(!isSlotEmpty(eSectionFurnaceIngredient,0)) { // is it the same as this item - std::shared_ptr IngredientItem = getSlotItem(eSectionFurnaceIngredient,0); + shared_ptr IngredientItem = getSlotItem(eSectionFurnaceIngredient,0); if(IngredientItem->id == item->id) { buttonY = eToolTipQuickMoveIngredient; @@ -991,7 +991,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if(!isSlotEmpty(eSectionFurnaceFuel,0)) { // is it the same as this item - std::shared_ptr fuelItem = getSlotItem(eSectionFurnaceFuel,0); + shared_ptr fuelItem = getSlotItem(eSectionFurnaceFuel,0); if(fuelItem->id == item->id) { buttonY = eToolTipQuickMoveFuel; @@ -1002,7 +1002,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if(!isSlotEmpty(eSectionFurnaceIngredient,0)) { // is it the same as this item - std::shared_ptr IngredientItem = getSlotItem(eSectionFurnaceIngredient,0); + shared_ptr IngredientItem = getSlotItem(eSectionFurnaceIngredient,0); if(IngredientItem->id == item->id) { buttonY = eToolTipQuickMoveIngredient; @@ -1044,7 +1044,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() else if((eSectionUnderPointer==eSectionBrewingUsing)||(eSectionUnderPointer==eSectionBrewingInventory)) { // Get the info on this item. - std::shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); + shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); int iId=item->id; // valid ingredient? @@ -1062,7 +1062,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() if(!isSlotEmpty(eSectionBrewingIngredient,0)) { // is it the same as this item - std::shared_ptr IngredientItem = getSlotItem(eSectionBrewingIngredient,0); + shared_ptr IngredientItem = getSlotItem(eSectionBrewingIngredient,0); if(IngredientItem->id == item->id) { buttonY = eToolTipQuickMoveIngredient; @@ -1077,15 +1077,15 @@ void IUIScene_AbstractContainerMenu::onMouseTick() // ingredient slot empty buttonY = eToolTipQuickMoveIngredient; } - } + } else { // valid potion? Glass bottle with water in it is a 'potion' too. if(iId==Item::potion_Id) { // space available? - if(isSlotEmpty(eSectionBrewingBottle1,0) || - isSlotEmpty(eSectionBrewingBottle2,0) || + if(isSlotEmpty(eSectionBrewingBottle1,0) || + isSlotEmpty(eSectionBrewingBottle2,0) || isSlotEmpty(eSectionBrewingBottle3,0)) { buttonY = eToolTipQuickMoveIngredient; @@ -1104,7 +1104,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() else if((eSectionUnderPointer==eSectionEnchantUsing)||(eSectionUnderPointer==eSectionEnchantInventory)) { // Get the info on this item. - std::shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); + shared_ptr item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); int iId=item->id; // valid enchantable tool? @@ -1112,8 +1112,8 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { // is there already something in the ingredient slot? if(isSlotEmpty(eSectionEnchantSlot,0)) - { - // tool slot empty + { + // tool slot empty switch(iId) { case Item::bow_Id: @@ -1155,7 +1155,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() buttonY = eToolTipQuickMove; break; default: - buttonY=eToolTipQuickMoveTool; + buttonY=eToolTipQuickMoveTool; break; } } @@ -1163,10 +1163,10 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { buttonY = eToolTipQuickMove; } - } + } else { - buttonY=eToolTipQuickMove; + buttonY=eToolTipQuickMove; } } else @@ -1199,7 +1199,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() SetPointerOutsideMenu( false ); } - std::shared_ptr item = nullptr; + shared_ptr item = nullptr; if(bPointerIsOverSlot && bSlotHasItem) item = getSlotItem(eSectionUnderPointer, iNewSlotIndex); overrideTooltips(eSectionUnderPointer, item, bIsItemCarried, bSlotHasItem, bCarriedIsSameAsSlot, iSlotStackSizeRemaining, buttonA, buttonX, buttonY, buttonRT); @@ -1358,7 +1358,7 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b } else { - ui.CloseUIScenes(iPad); + ui.CloseUIScenes(iPad); } bHandled = true; @@ -1410,7 +1410,7 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b bool bSlotHasItem = !isSlotEmpty(m_eCurrSection, currentIndex); if ( bSlotHasItem ) { - std::shared_ptr item = getSlotItem(m_eCurrSection, currentIndex); + shared_ptr item = getSlotItem(m_eCurrSection, currentIndex); if( Minecraft::GetInstance()->localgameModes[iPad] != NULL ) { Tutorial::PopupMessageDetails *message = new Tutorial::PopupMessageDetails; @@ -1456,7 +1456,7 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, bool b { handleOutsideClicked(iPad, buttonNum, quickKeyHeld); } - else // + else // { // over empty space or something else??? handleOtherClicked(iPad,m_eCurrSection,buttonNum,quickKeyHeld?true:false); @@ -1569,7 +1569,7 @@ int IUIScene_AbstractContainerMenu::getCurrentIndex(ESceneSection eSection) return currentIndex + getSectionStartOffset(eSection); } -bool IUIScene_AbstractContainerMenu::IsSameItemAs(std::shared_ptr itemA, std::shared_ptr itemB) +bool IUIScene_AbstractContainerMenu::IsSameItemAs(shared_ptr itemA, shared_ptr itemB) { if(itemA == NULL || itemB == NULL) return false; @@ -1583,7 +1583,7 @@ int IUIScene_AbstractContainerMenu::GetEmptyStackSpace(Slot *slot) if(slot != NULL && slot->hasItem()) { - std::shared_ptr item = slot->getItem(); + shared_ptr item = slot->getItem(); if ( item->isStackable() ) { int iCount = item->GetCount(); @@ -1614,7 +1614,7 @@ wstring IUIScene_AbstractContainerMenu::GetItemDescription(Slot *slot, vectorgetItem()->getRarity()->color; int colour = app.GetHTMLColour(rarityColour); @@ -1624,7 +1624,7 @@ wstring IUIScene_AbstractContainerMenu::GetItemDescription(Slot *slot, vector%ls",colour,thisString.c_str()); + swprintf(formatted, 256, L"%ls",colour,thisString.c_str()); thisString = formatted; } desc.append( thisString ); diff --git a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.h b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.h index 57bc8253..bdb8bb4c 100644 --- a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.h +++ b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.h @@ -10,7 +10,7 @@ // Uncomment to enable acceleration on pointer input. //#define USE_POINTER_ACCEL -#define POINTER_INPUT_TIMER_ID (0) // Arbitrary timer ID. +#define POINTER_INPUT_TIMER_ID (0) // Arbitrary timer ID. #define POINTER_SPEED_FACTOR (13.0f) // Speed of pointer. //#define POINTER_PANEL_OVER_REACH (42.0f) // Amount beyond edge of panel which pointer can go over to drop items. - comes from the pointer size in the scene @@ -32,19 +32,19 @@ protected: eSectionContainerInventory, eSectionContainerChest, eSectionContainerMax, - + eSectionFurnaceUsing, eSectionFurnaceInventory, eSectionFurnaceIngredient, eSectionFurnaceFuel, eSectionFurnaceResult, eSectionFurnaceMax, - + eSectionInventoryUsing, eSectionInventoryInventory, eSectionInventoryArmor, eSectionInventoryMax, - + eSectionTrapUsing, eSectionTrapInventory, eSectionTrapTrap, @@ -64,7 +64,7 @@ protected: eSectionInventoryCreativeSlider, #endif eSectionInventoryCreativeMax, - + eSectionEnchantUsing, eSectionEnchantInventory, eSectionEnchantSlot, @@ -151,7 +151,7 @@ protected: // 4J - WESTY - Added for pointer prototype. // Current tooltip settings. EToolTipItem m_aeToolTipSettings[ eToolTipNumButtons ]; - + // 4J - WESTY - Added for pointer prototype. // Indicates if pointer is outside UI window (used to drop items). bool m_bPointerOutsideMenu; @@ -159,7 +159,7 @@ protected: bool m_bSplitscreen; bool m_bNavigateBack; // should we exit the xuiscenes or just navigate back on exit? - + virtual bool IsSectionSlotList( ESceneSection eSection ) { return eSection != eSectionNone; } virtual bool CanHaveFocus( ESceneSection eSection ) { return true; } int GetSectionDimensions( ESceneSection eSection, int* piNumColumns, int* piNumRows ); @@ -180,7 +180,7 @@ protected: // 4J - WESTY - Added for pointer prototype. void SetPointerOutsideMenu( bool bOutside ) { m_bPointerOutsideMenu = bOutside; } - + void Initialize(int m_iPad, AbstractContainerMenu* menu, bool autoDeleteMenu, int startIndex,ESceneSection firstSection,ESceneSection maxSection, bool bNavigateBack=FALSE); virtual void PlatformInitialize(int iPad, int startIndex) = 0; virtual void InitDataAssociations(int iPad, AbstractContainerMenu *menu, int startIndex = 0) = 0; @@ -201,15 +201,15 @@ protected: 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 std::shared_ptr getSlotItem(ESceneSection eSection, int iSlot) = 0; + virtual 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, std::shared_ptr itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, + virtual bool overrideTooltips(ESceneSection sectionUnderPointer, shared_ptr itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, EToolTipItem &buttonA, EToolTipItem &buttonX, EToolTipItem &buttonY, EToolTipItem &buttonRT) { return false; } private: - bool IsSameItemAs(std::shared_ptr itemA, std::shared_ptr itemB); + bool IsSameItemAs(shared_ptr itemA, shared_ptr itemB); int GetEmptyStackSpace(Slot *slot); wstring GetItemDescription(Slot *slot, vector &unformattedStrings); diff --git a/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp index 990e4d6a..81451c7a 100644 --- a/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.cpp @@ -245,15 +245,15 @@ void IUIScene_AnvilMenu::updateItemName() ByteArrayOutputStream baos; DataOutputStream dos(&baos); dos.writeUTF(m_itemName); - Minecraft::GetInstance()->localplayers[getPad()]->connection->send(std::shared_ptr(new CustomPayloadPacket(CustomPayloadPacket::SET_ITEM_NAME_PACKET, baos.toByteArray()))); + Minecraft::GetInstance()->localplayers[getPad()]->connection->send(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, vector > *items) { slotChanged(container, RepairMenu::INPUT_SLOT, container->getSlot(0)->getItem()); } -void IUIScene_AnvilMenu::slotChanged(AbstractContainerMenu *container, int slotIndex, std::shared_ptr item) +void IUIScene_AnvilMenu::slotChanged(AbstractContainerMenu *container, int slotIndex, shared_ptr item) { if (slotIndex == RepairMenu::INPUT_SLOT) { diff --git a/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.h b/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.h index aad54abc..6c4348f2 100644 --- a/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.h +++ b/Minecraft.Client/Common/UI/IUIScene_AnvilMenu.h @@ -16,7 +16,7 @@ class RepairMenu; class IUIScene_AnvilMenu : public virtual IUIScene_AbstractContainerMenu, public net_minecraft_world_inventory::ContainerListener { protected: - std::shared_ptr m_inventory; + shared_ptr m_inventory; RepairMenu *m_repairMenu; wstring m_itemName; @@ -24,7 +24,7 @@ protected: IUIScene_AnvilMenu(); virtual ESceneSection GetSectionAndSlotInDirection( ESceneSection eSection, ETapState eTapDirection, int *piTargetX, int *piTargetY ); - int getSectionStartOffset(ESceneSection eSection); + int getSectionStartOffset(ESceneSection eSection); virtual void handleOtherClicked(int iPad, ESceneSection eSection, int buttonNum, bool quickKey); bool IsSectionSlotList( ESceneSection eSection ); @@ -39,7 +39,7 @@ protected: void updateItemName(); // ContainerListenr - void refreshContainer(AbstractContainerMenu *container, vector > *items); - void slotChanged(AbstractContainerMenu *container, int slotIndex, std::shared_ptr item); + void refreshContainer(AbstractContainerMenu *container, vector > *items); + void slotChanged(AbstractContainerMenu *container, int slotIndex, shared_ptr item); void setContainerData(AbstractContainerMenu *container, int id, int value); }; \ No newline at end of file diff --git a/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp index 2c6c69fc..f158b174 100644 --- a/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.cpp @@ -91,7 +91,7 @@ IUIScene_CraftingMenu::_eGroupTab IUIScene_CraftingMenu::m_GroupTabBkgMapping3x3 // eBaseItemType_bow, // eBaseItemType_pockettool, // eBaseItemType_utensil, -// +// // } // eBaseItemType; @@ -180,11 +180,11 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) UpdateTooltips(); break; case ACTION_MENU_PAUSEMENU: - case ACTION_MENU_B: + case ACTION_MENU_B: ui.ShowTooltip( iPad, eToolTipButtonX, false ); ui.ShowTooltip( iPad, eToolTipButtonB, false ); - ui.ShowTooltip( iPad, eToolTipButtonA, false ); - ui.ShowTooltip( iPad, eToolTipButtonRB, false ); + ui.ShowTooltip( iPad, eToolTipButtonA, false ); + ui.ShowTooltip( iPad, eToolTipButtonRB, false ); // kill the crafting xui //ui.PlayUISFX(eSFX_Back); ui.CloseUIScenes(iPad); @@ -197,18 +197,18 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) #endif // Do some crafting! if(m_pPlayer && m_pPlayer->inventory) - { + { //RecipyList *recipes = ((Recipes *)Recipes::getInstance())->getRecipies(); Recipy::INGREDIENTS_REQUIRED *pRecipeIngredientsRequired=Recipes::getInstance()->getRecipeIngredientsArray(); // Force a make if the debug is on if(app.DebugSettingsOn() && app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad())&(1L< pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); + 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]; - std::shared_ptr pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); + shared_ptr pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); //int iIcon=pTempItemInst->getItem()->getIcon(pTempItemInst->getAuxValue()); if( pMinecraft->localgameModes[iPad] != NULL ) @@ -256,7 +256,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) } } - if(pRecipeIngredientsRequired[iRecipe].bCanMake[iPad]) + if(pRecipeIngredientsRequired[iRecipe].bCanMake[iPad]) { pTempItemInst->onCraftedBy(m_pPlayer->level, dynamic_pointer_cast( m_pPlayer->shared_from_this() ), pTempItemInst->count ); // TODO 4J Stu - handleCraftItem should do a lot more than what it does, loads of the "can we craft" code should also probably be @@ -272,7 +272,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) { for(int j=0;j ingItemInst = nullptr; + 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( std::shared_ptr( new ItemInstance(ingItemInst->getItem()->getCraftingRemainingItem()) ) ); + m_pPlayer->inventory->add( shared_ptr( new ItemInstance(ingItemInst->getItem()->getCraftingRemainingItem()) ) ); } } @@ -337,7 +337,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) break; case ACTION_MENU_LEFT_SCROLL: - // turn off the old group tab + // turn off the old group tab showTabHighlight(m_iGroupIndex,false); if(m_iGroupIndex==0) @@ -431,7 +431,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) // clear the indices iVSlotIndexA[0]=CanBeMadeA[m_iCurrentSlotHIndex].iCount-1; iVSlotIndexA[1]=0; - iVSlotIndexA[2]=1; + iVSlotIndexA[2]=1; UpdateVerticalSlots(); UpdateHighlight(); @@ -482,13 +482,13 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) else { iVSlotIndexA[1]--; - } + } ui.PlayUISFX(eSFX_Focus); } else if(CanBeMadeA[m_iCurrentSlotHIndex].iCount>2) { - { + { if(m_iCurrentSlotVIndex!=0) { // just move the highlight @@ -496,11 +496,11 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) ui.PlayUISFX(eSFX_Focus); } else - { + { //move the slots iVSlotIndexA[2]=iVSlotIndexA[1]; iVSlotIndexA[1]=iVSlotIndexA[0]; - // on 0 and went up, so cycle the values + // on 0 and went up, so cycle the values if(iVSlotIndexA[0]==0) { iVSlotIndexA[0]=CanBeMadeA[m_iCurrentSlotHIndex].iCount-1; @@ -533,7 +533,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) if(CanBeMadeA[m_iCurrentSlotHIndex].iCount>1) { if(bNoScrollSlots) - { + { if(iVSlotIndexA[1]==(CanBeMadeA[m_iCurrentSlotHIndex].iCount-1)) { iVSlotIndexA[1]=0; @@ -574,7 +574,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) { m_iCurrentSlotVIndex++; ui.PlayUISFX(eSFX_Focus); - } + } } UpdateVerticalSlots(); UpdateHighlight(); @@ -624,11 +624,11 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() // for (int i = 0; i < iRecipeC; i++) // { - // std::shared_ptr pTempItemInst=pRecipeIngredientsRequired[i].pRecipy->assemble(NULL); + // shared_ptr pTempItemInst=pRecipeIngredientsRequired[i].pRecipy->assemble(NULL); // if (pTempItemInst != NULL) // { // wstring itemstring=pTempItemInst->toString(); - // + // // printf("Recipe [%d] = ",i); // OutputDebugStringW(itemstring.c_str()); // if(pTempItemInst->id!=0) @@ -642,7 +642,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() // { // printf("ID\t%d\tAux val\t%d\tBase type\t%d\tMaterial\t%d Count=%d\n",pTempItemInst->id, pTempItemInst->getAuxValue(),pTempItemInst->getItem()->getBaseItemType(),pTempItemInst->getItem()->getMaterial(),pTempItemInst->GetCount()); // } - // + // // } // } // } @@ -683,9 +683,9 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() if (m_pPlayer->inventory->items[k] != NULL) { // do they have the ingredient, and the aux value matches, and enough off it? - if((m_pPlayer->inventory->items[k]->id == pRecipeIngredientsRequired[i].iIngIDA[j]) && + if((m_pPlayer->inventory->items[k]->id == pRecipeIngredientsRequired[i].iIngIDA[j]) && // check if the ingredient required doesn't care about the aux value, or if it does, does the inventory item aux match it - ((pRecipeIngredientsRequired[i].iIngAuxValA[j]==Recipes::ANY_AUX_VALUE) || (pRecipeIngredientsRequired[i].iIngAuxValA[j]==m_pPlayer->inventory->items[k]->getAuxValue())) + ((pRecipeIngredientsRequired[i].iIngAuxValA[j]==Recipes::ANY_AUX_VALUE) || (pRecipeIngredientsRequired[i].iIngAuxValA[j]==m_pPlayer->inventory->items[k]->getAuxValue())) ) { // do they have enough? We need to check the whole inventory, since they may have enough in different slots (milk isn't milkx3, but milk,milk,milk) @@ -721,18 +721,18 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() // 4J Stu - TU-1 hotfix // Fix for #13143 - Players are able to craft items they do not have enough ingredients for if they store the ingredients in multiple, smaller stacks break; - } + } } } // if bFoundA[j] is false, then we didn't have enough of the ingredient required by the recipe, so mark the grid items we're short of if(bFoundA[j]==false) - { + { int iMissing = pRecipeIngredientsRequired[i].iIngValA[j]-iTotalCount; int iGridIndex=0; while(iMissing!=0) { // need to check if there is an aux val and match that - if(((pRecipeIngredientsRequired[i].uiGridA[iGridIndex]&0x00FFFFFF)==pRecipeIngredientsRequired[i].iIngIDA[j]) && + if(((pRecipeIngredientsRequired[i].uiGridA[iGridIndex]&0x00FFFFFF)==pRecipeIngredientsRequired[i].iIngIDA[j]) && ((pRecipeIngredientsRequired[i].iIngAuxValA[j]==Recipes::ANY_AUX_VALUE) ||(pRecipeIngredientsRequired[i].iIngAuxValA[j]== ((pRecipeIngredientsRequired[i].uiGridA[iGridIndex]&0xFF000000)>>24))) ) { // this grid entry is the ingredient we don't have enough of @@ -761,7 +761,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() if(iHSlotBrushControl<=m_iCraftablesMaxHSlotC) { bool bFound=false; - std::shared_ptr pTempItemInst=pRecipeIngredientsRequired[i].pRecipy->assemble(nullptr); + shared_ptr pTempItemInst=pRecipeIngredientsRequired[i].pRecipy->assemble(nullptr); //int iIcon=pTempItemInst->getItem()->getIcon(pTempItemInst->getAuxValue()); int iID=pTempItemInst->getItem()->id; int iBaseType; @@ -777,7 +777,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() // ignore for the misc base type - these have not been placed in a base type group if(iBaseType!=Item::eBaseItemType_undefined) - { + { for(int k=0;k pTempItemInst=pRecipeIngredientsRequired[CanBeMadeA[iIndex].iRecipeA[0]].pRecipy->assemble(nullptr); + shared_ptr pTempItemInst=pRecipeIngredientsRequired[CanBeMadeA[iIndex].iRecipeA[0]].pRecipy->assemble(nullptr); assert(pTempItemInst->id!=0); unsigned int uiAlpha; @@ -844,7 +844,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() uiAlpha = 31; } else - { + { if(pRecipeIngredientsRequired[CanBeMadeA[iIndex].iRecipeA[0]].bCanMake[getPad()]) { uiAlpha = 31; @@ -903,7 +903,7 @@ void IUIScene_CraftingMenu::UpdateHighlight() { iSlot=0; } - std::shared_ptr pTempItemInstAdditional=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]].pRecipy->assemble(nullptr); + shared_ptr pTempItemInstAdditional=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]].pRecipy->assemble(nullptr); // special case for the torch coal/charcoal int id=pTempItemInstAdditional->getDescriptionId(); @@ -933,10 +933,10 @@ void IUIScene_CraftingMenu::UpdateHighlight() { itemstring=app.GetString( IDS_ITEM_FIREBALLCOAL ); } - } + } break; default: - itemstring=app.GetString(id ); + itemstring=app.GetString(id ); break; } @@ -991,7 +991,7 @@ void IUIScene_CraftingMenu::UpdateVerticalSlots() { if(i!=1) continue; } - std::shared_ptr pTempItemInstAdditional=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iVSlotIndexA[i]]].pRecipy->assemble(nullptr); + shared_ptr pTempItemInstAdditional=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iVSlotIndexA[i]]].pRecipy->assemble(nullptr); assert(pTempItemInstAdditional->id!=0); unsigned int uiAlpha; @@ -1001,7 +1001,7 @@ void IUIScene_CraftingMenu::UpdateVerticalSlots() uiAlpha = 31; } else - { + { if(pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iVSlotIndexA[i]]].bCanMake[getPad()]) { uiAlpha = 31; @@ -1040,7 +1040,7 @@ void IUIScene_CraftingMenu::DisplayIngredients() hideAllIngredientsSlots(); if(CanBeMadeA[m_iCurrentSlotHIndex].iCount!=0) - { + { int iSlot,iRecipy; if(CanBeMadeA[m_iCurrentSlotHIndex].iCount>1) { @@ -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()]; - std::shared_ptr pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); + shared_ptr pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); m_iIngredientsC=pRecipeIngredientsRequired[iRecipe].iIngC; @@ -1077,7 +1077,7 @@ void IUIScene_CraftingMenu::DisplayIngredients() iAuxVal = 0xFF; } - std::shared_ptr itemInst= std::shared_ptr(new ItemInstance(item,pRecipeIngredientsRequired[iRecipe].iIngValA[i],iAuxVal)); + shared_ptr itemInst= shared_ptr(new ItemInstance(item,pRecipeIngredientsRequired[iRecipe].iIngValA[i],iAuxVal)); setIngredientDescriptionItem(getPad(),i,itemInst); setIngredientDescriptionRedBox(i,false); @@ -1124,13 +1124,13 @@ void IUIScene_CraftingMenu::DisplayIngredients() } } - for (int x = 0; x < iBoxWidth; x++) + for (int x = 0; x < iBoxWidth; x++) { - for (int y = 0; y < iBoxWidth; y++) + for (int y = 0; y < iBoxWidth; y++) { int index = x+y*iBoxWidth; if(pRecipeIngredientsRequired[iRecipy].uiGridA[x+y*3]!=0) - { + { int id=pRecipeIngredientsRequired[iRecipy].uiGridA[x+y*3]&0x00FFFFFF; assert(id!=0); int iAuxVal=(pRecipeIngredientsRequired[iRecipy].uiGridA[x+y*3]&0xFF000000)>>24; @@ -1141,7 +1141,7 @@ void IUIScene_CraftingMenu::DisplayIngredients() { iAuxVal = 0xFF; } - std::shared_ptr itemInst= std::shared_ptr(new ItemInstance(id,1,iAuxVal)); + shared_ptr itemInst= 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<getRecipeIngredientsArray(); if(bCanBeMade) - { + { int iSlot;//,iRecipy; if(CanBeMadeA[m_iCurrentSlotHIndex].iCount>1) { @@ -1218,7 +1218,7 @@ void IUIScene_CraftingMenu::UpdateDescriptionText(bool bCanBeMade) //iRecipy=CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[0]; } - std::shared_ptr pTempItemInst=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]].pRecipy->assemble(nullptr); + shared_ptr pTempItemInst=pRecipeIngredientsRequired[CanBeMadeA[m_iCurrentSlotHIndex].iRecipeA[iSlot]].pRecipy->assemble(nullptr); int iID=pTempItemInst->getItem()->id; int iAuxVal=pTempItemInst->getAuxValue(); int iBaseType; @@ -1278,13 +1278,13 @@ void IUIScene_CraftingMenu::UpdateDescriptionText(bool bCanBeMade) #ifdef _DEBUG setDescriptionText(L"This is some placeholder description text about the craftable item."); #else - setDescriptionText(L""); + setDescriptionText(L""); #endif - } + } } else { - setDescriptionText(L""); + setDescriptionText(L""); } } @@ -1308,7 +1308,7 @@ void IUIScene_CraftingMenu::UpdateTooltips() { iSlot=iVSlotIndexA[m_iCurrentSlotVIndex]; } - else + else { iSlot=0; } @@ -1348,7 +1348,7 @@ void IUIScene_CraftingMenu::UpdateTooltips() { iSlot=iVSlotIndexA[m_iCurrentSlotVIndex]; } - else + else { iSlot=0; } @@ -1372,7 +1372,7 @@ bool IUIScene_CraftingMenu::isItemSelected(int itemId) { bool isSelected = false; if(m_pPlayer && m_pPlayer->inventory) - { + { //RecipyList *recipes = ((Recipes *)Recipes::getInstance())->getRecipies(); Recipy::INGREDIENTS_REQUIRED *pRecipeIngredientsRequired=Recipes::getInstance()->getRecipeIngredientsArray(); diff --git a/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.h b/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.h index c3ee07ba..05227fff 100644 --- a/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.h +++ b/Minecraft.Client/Common/UI/IUIScene_CraftingMenu.h @@ -22,7 +22,7 @@ protected: static const int m_iMaxHSlotC = 12; static const int m_iMaxHCraftingSlotC = 10; - static const int m_iMaxVSlotC = 17; + static const int m_iMaxVSlotC = 17; static const int m_iMaxDisplayedVSlotC = 3; static const int m_iIngredients3x3SlotC = 9; static const int m_iIngredients2x2SlotC = 4; @@ -35,7 +35,7 @@ protected: static int m_iBaseTypeMapA[Item::eBaseItemType_MAXTYPES]; - typedef struct + typedef struct { int iCount; int iItemBaseType; @@ -49,7 +49,7 @@ protected: int m_iCurrentSlotVIndex; int m_iRecipeC; int m_iContainerType; // 2x2 or 3x3 - std::shared_ptr m_pPlayer; + shared_ptr m_pPlayer; int m_iGroupIndex; int iVSlotIndexA[3]; // index of the v slots currently displayed @@ -59,7 +59,7 @@ protected: static Recipy::_eGroupType m_GroupTypeMapping9GridA[m_iMaxGroup3x3]; Recipy::_eGroupType *m_pGroupA; - static LPCWSTR m_GroupTabNameA[3]; + static LPCWSTR m_GroupTabNameA[3]; static _eGroupTab m_GroupTabBkgMapping2x2A[m_iMaxGroup2x2]; static _eGroupTab m_GroupTabBkgMapping3x3A[m_iMaxGroup3x3]; _eGroupTab *m_pGroupTabA; @@ -96,13 +96,13 @@ protected: virtual void hideAllHSlots() = 0; virtual void hideAllVSlots() = 0; virtual void hideAllIngredientsSlots() = 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 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 setCraftingOutputSlotRedBox(bool show) = 0; - virtual void setIngredientSlotItem(int iPad, int index, std::shared_ptr item) = 0; + virtual void setIngredientSlotItem(int iPad, int index, shared_ptr item) = 0; virtual void setIngredientSlotRedBox(int index, bool show) = 0; - virtual void setIngredientDescriptionItem(int iPad, int index, std::shared_ptr item) = 0; + virtual void setIngredientDescriptionItem(int iPad, int index, 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/Common/UI/IUIScene_CreativeMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp index 0ab9a672..7ce33234 100644 --- a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp @@ -12,16 +12,16 @@ // 4J JEV - Images for each tab. IUIScene_CreativeMenu::TabSpec **IUIScene_CreativeMenu::specs = NULL; -vector< std::shared_ptr > IUIScene_CreativeMenu::categoryGroups[eCreativeInventoryGroupsCount]; +vector< shared_ptr > IUIScene_CreativeMenu::categoryGroups[eCreativeInventoryGroupsCount]; -#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 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 DEF(index) list = &categoryGroups[index]; void IUIScene_CreativeMenu::staticCtor() { - vector< std::shared_ptr > *list; + vector< shared_ptr > *list; // Building Blocks @@ -56,7 +56,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM_AUX(Tile::treeTrunk_Id, 0) ITEM_AUX(Tile::treeTrunk_Id, TreeTile::DARK_TRUNK) ITEM_AUX(Tile::treeTrunk_Id, TreeTile::BIRCH_TRUNK) - ITEM_AUX(Tile::treeTrunk_Id, TreeTile::JUNGLE_TRUNK) + ITEM_AUX(Tile::treeTrunk_Id, TreeTile::JUNGLE_TRUNK) ITEM(Tile::gravel_Id) ITEM(Tile::redBrick_Id) ITEM(Tile::mossStone_Id) @@ -118,7 +118,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Tile::sponge_Id) ITEM(Tile::melon_Id) ITEM(Tile::pumpkin_Id) - ITEM(Tile::litPumpkin_Id) + ITEM(Tile::litPumpkin_Id) ITEM_AUX(Tile::sapling_Id, Sapling::TYPE_DEFAULT) ITEM_AUX(Tile::sapling_Id, Sapling::TYPE_EVERGREEN) ITEM_AUX(Tile::sapling_Id, Sapling::TYPE_BIRCH) @@ -232,7 +232,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM_AUX(Tile::cobbleWall_Id, WallTile::TYPE_MOSSY) ITEM(Item::bed_Id) ITEM(Item::bucket_empty_Id) - ITEM(Item::bucket_lava_Id) + ITEM(Item::bucket_lava_Id) ITEM(Item::bucket_water_Id) ITEM(Item::milk_Id) ITEM(Item::cauldron_Id) @@ -292,7 +292,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::beef_cooked_Id) ITEM(Item::beef_raw_Id) ITEM(Item::chicken_raw_Id) - ITEM(Item::chicken_cooked_Id) + ITEM(Item::chicken_cooked_Id) ITEM(Item::rotten_flesh_Id) ITEM(Item::spiderEye_Id) ITEM(Item::potato_Id) @@ -314,7 +314,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::pickAxe_wood_Id) ITEM(Item::hatchet_wood_Id) ITEM(Item::hoe_wood_Id) - + ITEM(Item::map_Id) ITEM(Item::helmet_chain_Id) ITEM(Item::chestplate_chain_Id) @@ -325,7 +325,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::pickAxe_stone_Id) ITEM(Item::hatchet_stone_Id) ITEM(Item::hoe_stone_Id) - + ITEM(Item::bow_Id) ITEM(Item::helmet_iron_Id) ITEM(Item::chestplate_iron_Id) @@ -336,7 +336,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::pickAxe_iron_Id) ITEM(Item::hatchet_iron_Id) ITEM(Item::hoe_iron_Id) - + ITEM(Item::arrow_Id) ITEM(Item::helmet_gold_Id) ITEM(Item::chestplate_gold_Id) @@ -384,7 +384,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::brick_Id) ITEM(Item::netherbrick_Id) ITEM(Item::stick_Id) - ITEM(Item::bowl_Id) + ITEM(Item::bowl_Id) ITEM(Item::bone_Id) ITEM(Item::string_Id) ITEM(Item::feather_Id) @@ -393,13 +393,13 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::sulphur_Id) ITEM(Item::clay_Id) ITEM(Item::yellowDust_Id) - ITEM(Item::seeds_wheat_Id) + ITEM(Item::seeds_wheat_Id) ITEM(Item::seeds_melon_Id) ITEM(Item::seeds_pumpkin_Id) ITEM(Item::wheat_Id) ITEM(Item::reeds_Id) ITEM(Item::egg_Id) - ITEM(Item::sugar_Id) + ITEM(Item::sugar_Id) ITEM(Item::slimeBall_Id) ITEM(Item::blazeRod_Id) ITEM(Item::goldNugget_Id) @@ -432,7 +432,7 @@ void IUIScene_CreativeMenu::staticCtor() ITEM(Item::magmaCream_Id) ITEM(Item::speckledMelon_Id) ITEM(Item::glassBottle_Id) - ITEM_AUX(Item::potion_Id,0) // Water bottle + ITEM_AUX(Item::potion_Id,0) // Water bottle //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, 0, MASK_TYPE_AWKWARD)) // Awkward Potion @@ -464,7 +464,7 @@ void IUIScene_CreativeMenu::staticCtor() //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2, MASK_INSTANTHEALTH)) //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2, MASK_NIGHTVISION)) //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2, MASK_INVISIBILITY)) - + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, 0, MASK_WEAKNESS)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2, MASK_STRENGTH)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, 0, MASK_SLOWNESS)) @@ -579,7 +579,7 @@ IUIScene_CreativeMenu::IUIScene_CreativeMenu() m_creativeSlotX = m_creativeSlotY = m_inventorySlotX = m_inventorySlotY = 0; // 4J JEV - Settup Tabs - for (int i = 0; i < eCreativeInventoryTab_COUNT; i++) + for (int i = 0; i < eCreativeInventoryTab_COUNT; i++) { m_tabDynamicPos[i] = 0; m_tabPage[i] = 0; @@ -594,7 +594,7 @@ void IUIScene_CreativeMenu::switchTab(ECreativeInventoryTabs tab) if(tab != m_curTab) updateTabHighlightAndText(tab); m_curTab = tab; - + updateScrollCurrentPage(m_tabPage[m_curTab] + 1, specs[m_curTab]->getPageCount()); specs[tab]->populateMenu(itemPickerMenu,m_tabDynamicPos[m_curTab], m_tabPage[m_curTab]); @@ -605,7 +605,7 @@ void IUIScene_CreativeMenu::switchTab(ECreativeInventoryTabs tab) IUIScene_CreativeMenu::TabSpec::TabSpec(LPCWSTR icon, int descriptionId, int staticGroupsCount, ECreative_Inventory_Groups *staticGroups, int dynamicGroupsCount, ECreative_Inventory_Groups *dynamicGroups) : m_icon(icon), m_descriptionId(descriptionId), m_staticGroupsCount(staticGroupsCount), m_dynamicGroupsCount(dynamicGroupsCount) { - + m_pages = 0; m_staticGroupsA = NULL; @@ -708,10 +708,10 @@ unsigned int IUIScene_CreativeMenu::TabSpec::getPageCount() // 4J JEV - Item Picker Menu -IUIScene_CreativeMenu::ItemPickerMenu::ItemPickerMenu( std::shared_ptr smp, std::shared_ptr inv ) : AbstractContainerMenu() +IUIScene_CreativeMenu::ItemPickerMenu::ItemPickerMenu( shared_ptr smp, shared_ptr inv ) : AbstractContainerMenu() { inventory = inv; - creativeContainer = smp; + creativeContainer = smp; //int startLength = slots->size(); @@ -734,7 +734,7 @@ IUIScene_CreativeMenu::ItemPickerMenu::ItemPickerMenu( std::shared_ptr player) +bool IUIScene_CreativeMenu::ItemPickerMenu::stillValid(shared_ptr player) { return true; } @@ -752,7 +752,7 @@ IUIScene_AbstractContainerMenu::ESceneSection IUIScene_CreativeMenu::GetSectionA switch( eSection ) { case eSectionInventoryCreativeSelector: - if (eTapDirection == eTapStateDown || eTapDirection == eTapStateUp) + if (eTapDirection == eTapStateDown || eTapDirection == eTapStateUp) { newSection = eSectionInventoryCreativeUsing; } @@ -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) { - std::shared_ptr newItem = m_menu->getSlot(i)->getItem(); + 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(); - std::shared_ptr playerInventory = pMinecraft->localplayers[iPad]->inventory; + 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) { - std::shared_ptr removedItem = playerInventory->getCarried()->remove(1); + shared_ptr removedItem = playerInventory->getCarried()->remove(1); pMinecraft->localgameModes[iPad]->handleCreativeModeItemDrop(removedItem); if (playerInventory->getCarried()->count == 0) playerInventory->setCarried(nullptr); } @@ -841,7 +841,7 @@ void IUIScene_CreativeMenu::handleAdditionalKeyPress(int iAction) dir = -1; // Fall through intentional case ACTION_MENU_RIGHT_SCROLL: - { + { ECreativeInventoryTabs tab = (ECreativeInventoryTabs)(m_curTab + dir); if (tab < 0) tab = (ECreativeInventoryTabs)(eCreativeInventoryTab_COUNT - 1); if (tab >= eCreativeInventoryTab_COUNT) tab = eCreativeInventoryTab_BuildingBlocks; @@ -894,9 +894,9 @@ void IUIScene_CreativeMenu::handleSlotListClicked(ESceneSection eSection, int bu if (buttonNum == 0) { - std::shared_ptr playerInventory = pMinecraft->localplayers[getPad()]->inventory; - std::shared_ptr carried = playerInventory->getCarried(); - std::shared_ptr clicked = m_menu->getSlot(currentIndex)->getItem(); + shared_ptr playerInventory = pMinecraft->localplayers[getPad()]->inventory; + shared_ptr carried = playerInventory->getCarried(); + 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()]); - std::shared_ptr newItem = m_menu->getSlot(currentIndex)->getItem(); + 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; - std::shared_ptr playerInventory = pMinecraft->localplayers[getPad()]->inventory; + 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(std::shared_ptr item, int &slotX) +bool IUIScene_CreativeMenu::getEmptyInventorySlot(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) { - std::shared_ptr slotItem = m_menu->getSlot(i)->getItem(); + 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, std::shared_ptr itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, +bool IUIScene_CreativeMenu::overrideTooltips(ESceneSection sectionUnderPointer, 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/Common/UI/IUIScene_CreativeMenu.h b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.h index 46370773..7ab3ff7e 100644 --- a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.h +++ b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.h @@ -74,21 +74,21 @@ public: class ItemPickerMenu : public AbstractContainerMenu { protected: - std::shared_ptr creativeContainer; - std::shared_ptr inventory; + shared_ptr creativeContainer; + shared_ptr inventory; public: - ItemPickerMenu( std::shared_ptr creativeContainer, std::shared_ptr inventory ); + ItemPickerMenu( shared_ptr creativeContainer, shared_ptr inventory ); - virtual bool stillValid(std::shared_ptr player); + virtual bool stillValid(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, std::shared_ptr player) { } // do nothing + virtual void loopClick(int slotIndex, int buttonNum, bool quickKeyHeld, shared_ptr player) { } // do nothing } *itemPickerMenu; protected: - static vector< std::shared_ptr > categoryGroups[eCreativeInventoryGroupsCount]; + static vector< 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(std::shared_ptr item, int &slotX); + bool getEmptyInventorySlot(shared_ptr item, int &slotX); int getSectionStartOffset(ESceneSection eSection); virtual bool IsSectionSlotList( ESceneSection eSection ); virtual bool CanHaveFocus( ESceneSection eSection ); - virtual bool overrideTooltips(ESceneSection sectionUnderPointer, std::shared_ptr itemUnderPointer, bool bIsItemCarried, bool bSlotHasItem, bool bCarriedIsSameAsSlot, int iSlotStackSizeRemaining, + virtual bool overrideTooltips(ESceneSection sectionUnderPointer, 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/Common/UI/IUIScene_TradingMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp index cd99cb79..658bcdfb 100644 --- a/Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_TradingMenu.cpp @@ -16,7 +16,7 @@ IUIScene_TradingMenu::IUIScene_TradingMenu() m_bHasUpdatedOnce = false; } -std::shared_ptr IUIScene_TradingMenu::getMerchant() +shared_ptr IUIScene_TradingMenu::getMerchant() { return m_merchant; } @@ -46,11 +46,11 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) switch(iAction) { - case ACTION_MENU_B: + case ACTION_MENU_B: ui.ShowTooltip( iPad, eToolTipButtonX, false ); ui.ShowTooltip( iPad, eToolTipButtonB, false ); - ui.ShowTooltip( iPad, eToolTipButtonA, false ); - ui.ShowTooltip( iPad, eToolTipButtonRB, false ); + ui.ShowTooltip( iPad, eToolTipButtonA, false ); + ui.ShowTooltip( iPad, eToolTipButtonRB, false ); // kill the crafting xui //ui.PlayUISFX(eSFX_Back); ui.CloseUIScenes(iPad); @@ -70,9 +70,9 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) if(!activeRecipe->isDeprecated()) { // Do we have the ingredients? - std::shared_ptr buyAItem = activeRecipe->getBuyAItem(); - std::shared_ptr buyBItem = activeRecipe->getBuyBItem(); - std::shared_ptr player = Minecraft::GetInstance()->localplayers[getPad()]; + shared_ptr buyAItem = activeRecipe->getBuyAItem(); + shared_ptr buyBItem = activeRecipe->getBuyBItem(); + 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 - std::shared_ptr result = activeRecipe->getSellItem()->copy(); + 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( std::shared_ptr( new TradeItemPacket(m_menu->containerId, actualShopItem) ) ); + player->connection->send( 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(std::shared_ptr( new CustomPayloadPacket(CustomPayloadPacket::TRADER_SELECTION_PACKET, rawOutput.toByteArray()))); + Minecraft::GetInstance()->getConnection(getPad())->send(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(std::shared_ptr( new CustomPayloadPacket(CustomPayloadPacket::TRADER_SELECTION_PACKET, rawOutput.toByteArray()))); + Minecraft::GetInstance()->getConnection(getPad())->send(shared_ptr( new CustomPayloadPacket(CustomPayloadPacket::TRADER_SELECTION_PACKET, rawOutput.toByteArray()))); } } @@ -247,9 +247,9 @@ void IUIScene_TradingMenu::updateDisplay() vector unformattedStrings; wstring offerDescription = GetItemDescription(activeRecipe->getSellItem(), unformattedStrings); setOfferDescription(offerDescription, unformattedStrings); - - std::shared_ptr buyAItem = activeRecipe->getBuyAItem(); - std::shared_ptr buyBItem = activeRecipe->getBuyBItem(); + + shared_ptr buyAItem = activeRecipe->getBuyAItem(); + shared_ptr buyBItem = activeRecipe->getBuyBItem(); setRequest1Item(buyAItem); setRequest2Item(buyBItem); @@ -262,7 +262,7 @@ void IUIScene_TradingMenu::updateDisplay() bool canMake = true; - std::shared_ptr player = Minecraft::GetInstance()->localplayers[getPad()]; + 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; - std::shared_ptr buyAItem = recipe->getBuyAItem(); - std::shared_ptr buyBItem = recipe->getBuyBItem(); + shared_ptr buyAItem = recipe->getBuyAItem(); + shared_ptr buyBItem = recipe->getBuyBItem(); - std::shared_ptr player = Minecraft::GetInstance()->localplayers[getPad()]; + shared_ptr player = Minecraft::GetInstance()->localplayers[getPad()]; int buyAMatches = player->inventory->countMatches(buyAItem); if(buyAMatches > 0) { @@ -349,19 +349,19 @@ bool IUIScene_TradingMenu::canMake(MerchantRecipe *recipe) } -void IUIScene_TradingMenu::setRequest1Item(std::shared_ptr item) +void IUIScene_TradingMenu::setRequest1Item(shared_ptr item) { } -void IUIScene_TradingMenu::setRequest2Item(std::shared_ptr item) +void IUIScene_TradingMenu::setRequest2Item(shared_ptr item) { } -void IUIScene_TradingMenu::setTradeItem(int index, std::shared_ptr item) +void IUIScene_TradingMenu::setTradeItem(int index, shared_ptr item) { } -wstring IUIScene_TradingMenu::GetItemDescription(std::shared_ptr item, vector &unformattedStrings) +wstring IUIScene_TradingMenu::GetItemDescription(shared_ptr item, vector &unformattedStrings) { if(item == NULL) return L""; diff --git a/Minecraft.Client/Common/UI/IUIScene_TradingMenu.h b/Minecraft.Client/Common/UI/IUIScene_TradingMenu.h index b02f1a8b..c8edda67 100644 --- a/Minecraft.Client/Common/UI/IUIScene_TradingMenu.h +++ b/Minecraft.Client/Common/UI/IUIScene_TradingMenu.h @@ -7,7 +7,7 @@ class IUIScene_TradingMenu { protected: MerchantMenu *m_menu; - std::shared_ptr m_merchant; + shared_ptr m_merchant; vector< pair > m_activeOffers; int m_validOffersCount; @@ -39,20 +39,20 @@ protected: 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 setRequest1Item(std::shared_ptr item); - virtual void setRequest2Item(std::shared_ptr item); - virtual void setTradeItem(int index, std::shared_ptr item); + virtual void setRequest1Item(shared_ptr item); + virtual void setRequest2Item(shared_ptr item); + virtual void setTradeItem(int index, shared_ptr item); private: void updateDisplay(); bool canMake(MerchantRecipe *recipe); - wstring GetItemDescription(std::shared_ptr item, vector &unformattedStrings); + wstring GetItemDescription(shared_ptr item, vector &unformattedStrings); public: - std::shared_ptr getMerchant(); + shared_ptr getMerchant(); virtual int getPad() = 0; }; \ No newline at end of file diff --git a/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp b/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp index e27c36da..858a8b43 100644 --- a/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp +++ b/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.cpp @@ -126,7 +126,7 @@ void UIComponent_TutorialPopup::handleTimerComplete(int id) } void UIComponent_TutorialPopup::_SetDescription(UIScene *interactScene, const wstring &desc, const wstring &title, bool allowFade, bool isReminder) -{ +{ m_interactScene = interactScene; app.DebugPrintf("Setting m_interactScene to %08x\n", m_interactScene); if( interactScene != m_lastInteractSceneMoved ) m_lastInteractSceneMoved = NULL; @@ -204,12 +204,12 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, wstring temp(desc); bool isFixedIcon = false; - + m_iconIsFoil = isFoil; if( icon != TUTORIAL_NO_ICON ) { m_iconIsFoil = false; - m_iconItem = std::shared_ptr(new ItemInstance(icon,1,iAuxVal)); + m_iconItem = shared_ptr(new ItemInstance(icon,1,iAuxVal)); } else { @@ -238,72 +238,72 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, { iAuxVal = 0; } - m_iconItem = std::shared_ptr(new ItemInstance(iconId,1,iAuxVal)); + m_iconItem = 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) { - m_iconItem = std::shared_ptr(new ItemInstance(Tile::workBench_Id,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Tile::workBench_Id,1,0)); } else if(temp.find(L"{*SticksIcon*}")!=wstring::npos) { - m_iconItem = std::shared_ptr(new ItemInstance(Item::stick_Id,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Item::stick_Id,1,0)); } else if(temp.find(L"{*PlanksIcon*}")!=wstring::npos) { - m_iconItem = std::shared_ptr(new ItemInstance(Tile::wood_Id,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Tile::wood_Id,1,0)); } else if(temp.find(L"{*WoodenShovelIcon*}")!=wstring::npos) { - m_iconItem = std::shared_ptr(new ItemInstance(Item::shovel_wood_Id,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Item::shovel_wood_Id,1,0)); } else if(temp.find(L"{*WoodenHatchetIcon*}")!=wstring::npos) { - m_iconItem = std::shared_ptr(new ItemInstance(Item::hatchet_wood_Id,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Item::hatchet_wood_Id,1,0)); } else if(temp.find(L"{*WoodenPickaxeIcon*}")!=wstring::npos) { - m_iconItem = std::shared_ptr(new ItemInstance(Item::pickAxe_wood_Id,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Item::pickAxe_wood_Id,1,0)); } else if(temp.find(L"{*FurnaceIcon*}")!=wstring::npos) { - m_iconItem = std::shared_ptr(new ItemInstance(Tile::furnace_Id,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Tile::furnace_Id,1,0)); } else if(temp.find(L"{*WoodenDoorIcon*}")!=wstring::npos) { - m_iconItem = std::shared_ptr(new ItemInstance(Item::door_wood,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Item::door_wood,1,0)); } else if(temp.find(L"{*TorchIcon*}")!=wstring::npos) { - m_iconItem = std::shared_ptr(new ItemInstance(Tile::torch_Id,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Tile::torch_Id,1,0)); } else if(temp.find(L"{*BoatIcon*}")!=wstring::npos) { - m_iconItem = std::shared_ptr(new ItemInstance(Item::boat_Id,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Item::boat_Id,1,0)); } else if(temp.find(L"{*FishingRodIcon*}")!=wstring::npos) { - m_iconItem = std::shared_ptr(new ItemInstance(Item::fishingRod_Id,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Item::fishingRod_Id,1,0)); } else if(temp.find(L"{*FishIcon*}")!=wstring::npos) { - m_iconItem = std::shared_ptr(new ItemInstance(Item::fish_raw_Id,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Item::fish_raw_Id,1,0)); } else if(temp.find(L"{*MinecartIcon*}")!=wstring::npos) { - m_iconItem = std::shared_ptr(new ItemInstance(Item::minecart_Id,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Item::minecart_Id,1,0)); } else if(temp.find(L"{*RailIcon*}")!=wstring::npos) { - m_iconItem = std::shared_ptr(new ItemInstance(Tile::rail_Id,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Tile::rail_Id,1,0)); } else if(temp.find(L"{*PoweredRailIcon*}")!=wstring::npos) { - m_iconItem = std::shared_ptr(new ItemInstance(Tile::goldenRail_Id,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Tile::goldenRail_Id,1,0)); } else if(temp.find(L"{*StructuresIcon*}")!=wstring::npos) { @@ -317,7 +317,7 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, } else if(temp.find(L"{*StoneIcon*}")!=wstring::npos) { - m_iconItem = std::shared_ptr(new ItemInstance(Tile::rock_Id,1,0)); + m_iconItem = shared_ptr(new ItemInstance(Tile::rock_Id,1,0)); } else { @@ -358,7 +358,7 @@ wstring UIComponent_TutorialPopup::_SetImage(wstring &desc) // hide the icon slot m_image.SetShow( FALSE ); } - + BOOL imageShowAtEnd = m_image.IsShown(); if(imageShowAtStart != imageShowAtEnd) { diff --git a/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.h b/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.h index 036fc148..36f78300 100644 --- a/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.h +++ b/Minecraft.Client/Common/UI/UIComponent_TutorialPopup.h @@ -15,7 +15,7 @@ private: bool m_lastSceneMovedLeft; bool m_bAllowFade; Tutorial *m_tutorial; - std::shared_ptr m_iconItem; + shared_ptr m_iconItem; bool m_iconIsFoil; //int m_iLocalPlayerC; diff --git a/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.cpp b/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.cpp index 32086f39..ef7c0e94 100644 --- a/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.cpp +++ b/Minecraft.Client/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(); - std::shared_ptr current = menu->getSlot(0)->getItem(); + shared_ptr current = menu->getSlot(0)->getItem(); if (!ItemInstance::matches(current, last)) { last = current; @@ -122,7 +122,7 @@ void UIControl_EnchantmentBook::tickBook() { shouldBeOpen = true; } - } + } if (shouldBeOpen) open += 0.2f; else open -= 0.2f; diff --git a/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.h b/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.h index 5cd78a89..cbe2cf2b 100644 --- a/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.h +++ b/Minecraft.Client/Common/UI/UIControl_EnchantmentBook.h @@ -19,7 +19,7 @@ private: //BOOL m_bDirty; //float m_fScale,m_fAlpha; //int m_iPad; - std::shared_ptr last; + shared_ptr last; //float m_fScreenWidth,m_fScreenHeight; //float m_fRawWidth,m_fRawHeight; diff --git a/Minecraft.Client/Common/UI/UIScene.cpp b/Minecraft.Client/Common/UI/UIScene.cpp index 86a9c3e6..75eb3dcf 100644 --- a/Minecraft.Client/Common/UI/UIScene.cpp +++ b/Minecraft.Client/Common/UI/UIScene.cpp @@ -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, std::shared_ptr item, float fAlpha, bool isFoil, bool bDecorations) +void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, 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(); - std::shared_ptr oldPlayer = pMinecraft->player; + 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 - std::shared_ptr oldPlayer = pMinecraft->player; + 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, std::shared_ptr item, float fAlpha, bool isFoil, bool bDecorations, bool usingCommandBuffer) +void UIScene::_customDrawSlotControl(CustomDrawData *region, int iPad, shared_ptr item, float fAlpha, bool isFoil, bool bDecorations, bool usingCommandBuffer) { Minecraft *pMinecraft=Minecraft::GetInstance(); diff --git a/Minecraft.Client/Common/UI/UIScene.h b/Minecraft.Client/Common/UI/UIScene.h index d9490a82..1b646ce0 100644 --- a/Minecraft.Client/Common/UI/UIScene.h +++ b/Minecraft.Client/Common/UI/UIScene.h @@ -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, std::shared_ptr item, float fAlpha, bool isFoil, bool bDecorations); + void customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, 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; - std::shared_ptr item; + shared_ptr item; float fAlpha; bool isFoil; bool bDecorations; } CachedSlotDrawData; vector m_cachedSlotDraw; - void _customDrawSlotControl(CustomDrawData *region, int iPad, std::shared_ptr item, float fAlpha, bool isFoil, bool bDecorations, bool usingCommandBuffer); + void _customDrawSlotControl(CustomDrawData *region, int iPad, shared_ptr item, float fAlpha, bool isFoil, bool bDecorations, bool usingCommandBuffer); public: // INPUT diff --git a/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp index 126f2403..7823fb4e 100644 --- a/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.cpp @@ -49,7 +49,7 @@ void UIScene_AbstractContainerMenu::handleDestroy() } // 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst packet loss. - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(pMinecraft->localplayers[m_iPad] != NULL) pMinecraft->localplayers[m_iPad]->closeContainer(); ui.OverrideSFX(m_iPad,ACTION_MENU_A,false); @@ -90,7 +90,7 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex) // We may have varying depths of controls here, so base off the pointers parent #if TO_BE_IMPLEMENTED HXUIOBJ parent; - XuiElementGetBounds( m_pointerControl->m_hObj, &fPointerWidth, &fPointerHeight ); + XuiElementGetBounds( m_pointerControl->m_hObj, &fPointerWidth, &fPointerHeight ); #else fPointerWidth = 50; fPointerHeight = 50; @@ -103,7 +103,7 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex) // Get size of pointer m_fPointerImageOffsetX = 0; //floor(fPointerWidth/2.0f); m_fPointerImageOffsetY = 0; //floor(fPointerHeight/2.0f); - + m_fPanelMinX = fPanelX; m_fPanelMaxX = fPanelX + fPanelWidth; m_fPanelMinY = fPanelY; @@ -111,9 +111,9 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex) #ifdef __ORBIS__ // we need to map the touchpad rectangle to the UI rectangle. While it works great for the creative menu, it is much too sensitive for the smaller menus. - //X coordinate of the touch point (0 to 1919) - //Y coordinate of the touch point (0 to 941: DUALSHOCK�4 wireless controllers and the CUH-ZCT1J/CAP-ZCT1J/CAP-ZCT1U controllers for the PlayStation�4 development tool, - //0 to 753: JDX-1000x series controllers for the PlayStation�4 development tool,) + //X coordinate of the touch point (0 to 1919) + //Y coordinate of the touch point (0 to 941: DUALSHOCK�4 wireless controllers and the CUH-ZCT1J/CAP-ZCT1J/CAP-ZCT1U controllers for the PlayStation�4 development tool, + //0 to 753: JDX-1000x series controllers for the PlayStation�4 development tool,) m_fTouchPadMulX=fPanelWidth/1919.0f; m_fTouchPadMulY=fPanelHeight/941.0f; m_fTouchPadDeadZoneX=15.0f*m_fTouchPadMulX; @@ -161,13 +161,13 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, int startIndex) S32 width, height; m_parentLayer->getRenderDimensions(width, height); S32 x = m_pointerPos.x*((float)width/m_movieWidth); - S32 y = m_pointerPos.y*((float)height/m_movieHeight); + S32 y = m_pointerPos.y*((float)height/m_movieHeight); IggyMakeEventMouseMove( &mouseEvent, x, y); IggyEventResult result; IggyPlayerDispatchEventRS ( getMovie() , &mouseEvent , &result ); -#ifdef USE_POINTER_ACCEL +#ifdef USE_POINTER_ACCEL m_fPointerVelX = 0.0f; m_fPointerVelY = 0.0f; m_fPointerAccelX = 0.0f; @@ -332,9 +332,9 @@ void UIScene_AbstractContainerMenu::customDraw(IggyCustomDrawCallbackRegion *reg Minecraft *pMinecraft = Minecraft::GetInstance(); if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL) return; - std::shared_ptr item = nullptr; + shared_ptr item = nullptr; if(wcscmp((wchar_t *)region->name,L"pointerIcon")==0) - { + { m_cacheSlotRenders = false; item = pMinecraft->localplayers[m_iPad]->inventory->getCarried(); } @@ -347,7 +347,7 @@ void UIScene_AbstractContainerMenu::customDraw(IggyCustomDrawCallbackRegion *reg app.DebugPrintf("This is not the control we are looking for\n"); } else - { + { m_cacheSlotRenders = true; Slot *slot = m_menu->getSlot(slotId); item = slot->getItem(); @@ -398,7 +398,7 @@ void UIScene_AbstractContainerMenu::setFocusToPointer(int iPad) m_focusSection = eSectionNone; } -std::shared_ptr UIScene_AbstractContainerMenu::getSlotItem(ESceneSection eSection, int iSlot) +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/Common/UI/UIScene_AbstractContainerMenu.h b/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.h index f4411b00..26688dc5 100644 --- a/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.h +++ b/Minecraft.Client/Common/UI/UIScene_AbstractContainerMenu.h @@ -31,7 +31,7 @@ protected: UI_MAP_ELEMENT( m_labelInventory, "inventoryLabel") UI_END_MAP_CHILD_ELEMENTS() UI_END_MAP_ELEMENTS_AND_NAMES() - + public: UIScene_AbstractContainerMenu(int iPad, UILayer *parentLayer); ~UIScene_AbstractContainerMenu(); @@ -49,7 +49,7 @@ protected: virtual void setSectionFocus(ESceneSection eSection, int iPad); void setFocusToPointer(int iPad); void SetPointerText(const wstring &description, vector &unformattedStrings, bool newSlot); - virtual std::shared_ptr getSlotItem(ESceneSection eSection, int iSlot); + virtual shared_ptr getSlotItem(ESceneSection eSection, int iSlot); virtual bool isSlotEmpty(ESceneSection eSection, int iSlot); virtual void adjustPointerForSafeZone(); @@ -57,7 +57,7 @@ protected: public: virtual void tick(); - + virtual void render(S32 width, S32 height, C4JRender::eViewportType viewpBort); virtual void customDraw(IggyCustomDrawCallbackRegion *region); diff --git a/Minecraft.Client/Common/UI/UIScene_BrewingStandMenu.h b/Minecraft.Client/Common/UI/UIScene_BrewingStandMenu.h index 13c8b1de..5441a1ac 100644 --- a/Minecraft.Client/Common/UI/UIScene_BrewingStandMenu.h +++ b/Minecraft.Client/Common/UI/UIScene_BrewingStandMenu.h @@ -8,7 +8,7 @@ class InventoryMenu; class UIScene_BrewingStandMenu : public UIScene_AbstractContainerMenu, public IUIScene_BrewingMenu { private: - std::shared_ptr m_brewingStand; + shared_ptr m_brewingStand; public: UIScene_BrewingStandMenu(int iPad, void *initData, UILayer *parentLayer); diff --git a/Minecraft.Client/Common/UI/UIScene_CraftingMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CraftingMenu.cpp index 1be78ad6..5b729069 100644 --- a/Minecraft.Client/Common/UI/UIScene_CraftingMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_CraftingMenu.cpp @@ -51,7 +51,7 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void *_initData, UILayer *p // if we are in splitscreen, then we need to figure out if we want to move this scene if(m_bSplitscreen) { - app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); + app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); } XuiElementSetShow(m_hGrid,TRUE); @@ -76,7 +76,7 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void *_initData, UILayer *p #if TO_BE_IMPLEMENTED - // display the first group tab + // display the first group tab m_hTabGroupA[m_iGroupIndex].SetShow(TRUE); // store the slot 0 position @@ -196,7 +196,7 @@ void UIScene_CraftingMenu::handleDestroy() if(gameMode != NULL) gameMode->getTutorial()->changeTutorialState(m_previousTutorialState); } - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(Minecraft::GetInstance()->localplayers[m_iPad] != NULL) Minecraft::GetInstance()->localplayers[m_iPad]->closeContainer(); ui.OverrideSFX(m_iPad,ACTION_MENU_A,false); @@ -297,7 +297,7 @@ void UIScene_CraftingMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y, int else { iVSlotIndexA[1]--; - } + } ui.PlayUISFX(eSFX_Focus); UpdateVerticalSlots(); @@ -349,7 +349,7 @@ void UIScene_CraftingMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y, int // clear the indices iVSlotIndexA[0]=CanBeMadeA[m_iCurrentSlotHIndex].iCount-1; iVSlotIndexA[1]=0; - iVSlotIndexA[2]=1; + iVSlotIndexA[2]=1; UpdateVerticalSlots(); UpdateHighlight(); @@ -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; - std::shared_ptr item = nullptr; + 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, std::shared_ptr item, unsigned int uiAlpha) +void UIScene_CraftingMenu::setCraftHSlotItem(int iPad, int iIndex, 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, std::shared_ptr item, unsigned int uiAlpha) +void UIScene_CraftingMenu::setCraftVSlotItem(int iPad, int iIndex, 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, std::shared_ptr item) +void UIScene_CraftingMenu::setCraftingOutputSlotItem(int iPad, 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, std::shared_ptr item) +void UIScene_CraftingMenu::setIngredientSlotItem(int iPad, int index, 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, std::shared_ptr item) +void UIScene_CraftingMenu::setIngredientDescriptionItem(int iPad, int index, shared_ptr item) { m_ingredientsInfo[index].item = item; m_ingredientsInfo[index].alpha = 31; @@ -680,7 +680,7 @@ void UIScene_CraftingMenu::setShowCraftHSlot(int iIndex, bool show) void UIScene_CraftingMenu::showTabHighlight(int iIndex, bool show) { if(show) - { + { IggyDataValue result; IggyDataValue value[1]; @@ -729,7 +729,7 @@ void UIScene_CraftingMenu::scrollDescriptionDown() void UIScene_CraftingMenu::updateHighlightAndScrollPositions() { - { + { IggyDataValue result; IggyDataValue value[2]; diff --git a/Minecraft.Client/Common/UI/UIScene_CraftingMenu.h b/Minecraft.Client/Common/UI/UIScene_CraftingMenu.h index dffd4273..44a39d61 100644 --- a/Minecraft.Client/Common/UI/UIScene_CraftingMenu.h +++ b/Minecraft.Client/Common/UI/UIScene_CraftingMenu.h @@ -32,7 +32,7 @@ class UIScene_CraftingMenu : public UIScene, public IUIScene_CraftingMenu private: typedef struct _SlotInfo { - std::shared_ptr item; + shared_ptr item; unsigned int alpha; bool show; @@ -97,7 +97,7 @@ protected: ETouchInput_TouchPanel_5, ETouchInput_TouchPanel_6, ETouchInput_CraftingHSlots, - + ETouchInput_Count, }; UIControl_Touch m_TouchInput[ETouchInput_Count]; @@ -182,13 +182,13 @@ protected: virtual void hideAllHSlots(); virtual void hideAllVSlots(); virtual void hideAllIngredientsSlots(); - 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 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 setCraftingOutputSlotRedBox(bool show); - virtual void setIngredientSlotItem(int iPad, int index, std::shared_ptr item); + virtual void setIngredientSlotItem(int iPad, int index, shared_ptr item); virtual void setIngredientSlotRedBox(int index, bool show); - virtual void setIngredientDescriptionItem(int iPad, int index, std::shared_ptr item); + virtual void setIngredientDescriptionItem(int iPad, int index, 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/Common/UI/UIScene_CreativeMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp index 85441877..569cc8ba 100644 --- a/Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_CreativeMenu.cpp @@ -21,7 +21,7 @@ UIScene_CreativeMenu::UIScene_CreativeMenu(int iPad, void *_initData, UILayer *p InventoryScreenInput *initData = (InventoryScreenInput *)_initData; - std::shared_ptr creativeContainer = std::shared_ptr(new SimpleContainer( 0, TabSpec::MAX_SIZE )); + shared_ptr creativeContainer = 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); @@ -96,7 +96,7 @@ void UIScene_CreativeMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y, int { // calculate relative touch position on slider float fPosition = ((float)y - (float)m_TouchInput[ETouchInput_TouchSlider].getYPos() - m_controlMainPanel.getYPos()) / (float)m_TouchInput[ETouchInput_TouchSlider].getHeight(); - + // clamp if(fPosition > 1) fPosition = 1.0f; @@ -105,7 +105,7 @@ void UIScene_CreativeMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y, int // calculate page position according to page count int iCurrentPage = Math::round(fPosition * (specs[m_curTab]->getPageCount() - 1)); - + // set tab page m_tabPage[m_curTab] = iCurrentPage; @@ -208,7 +208,7 @@ void UIScene_CreativeMenu::handleInput(int iPad, int key, bool repeat, bool pres dir = -1; // Fall through intentional case VK_PAD_RSHOULDER: - { + { ECreativeInventoryTabs tab = (ECreativeInventoryTabs)(m_curTab + dir); if (tab < 0) tab = (ECreativeInventoryTabs)(eCreativeInventoryTab_COUNT - 1); if (tab >= eCreativeInventoryTab_COUNT) tab = eCreativeInventoryTab_BuildingBlocks; diff --git a/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp b/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp index 2dcdf8fe..44a7e6c5 100644 --- a/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp +++ b/Minecraft.Client/Common/UI/UIScene_DebugOverlay.cpp @@ -127,7 +127,7 @@ void UIScene_DebugOverlay::customDraw(IggyCustomDrawCallbackRegion *region) } else { - std::shared_ptr item = std::shared_ptr( new ItemInstance(itemId,1,0) ); + shared_ptr item = shared_ptr( new ItemInstance(itemId,1,0) ); if(item != NULL) customDrawSlotControl(region,m_iPad,item,1.0f,false,false); } } @@ -176,7 +176,7 @@ void UIScene_DebugOverlay::handlePress(F64 controlId, F64 childId) { int id = childId; if(id m_furnace; + shared_ptr m_furnace; public: UIScene_FurnaceMenu(int iPad, void *initData, UILayer *parentLayer); diff --git a/Minecraft.Client/Common/UI/UIScene_HUD.cpp b/Minecraft.Client/Common/UI/UIScene_HUD.cpp index 37b433cf..27eeb76b 100644 --- a/Minecraft.Client/Common/UI/UIScene_HUD.cpp +++ b/Minecraft.Client/Common/UI/UIScene_HUD.cpp @@ -161,7 +161,7 @@ void UIScene_HUD::tick() } else { - std::shared_ptr boss = EnderDragonRenderer::bossInstance; + 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); - std::shared_ptr item = invSlot->getItem(); + shared_ptr item = invSlot->getItem(); if(item != NULL) { unsigned char ucAlpha=app.GetGameSettings(ProfileManager.GetPrimaryPad(),eGameSetting_InterfaceOpacity); @@ -265,7 +265,7 @@ void UIScene_HUD::handleReload() } m_labelJukebox.init(L""); - int iGuiScale; + int iGuiScale; Minecraft *pMinecraft = Minecraft::GetInstance(); if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localplayers[m_iPad]->m_iScreenSection == C4JRender::VIEWPORT_TYPE_FULLSCREEN) { @@ -629,7 +629,7 @@ void UIScene_HUD::render(S32 width, S32 height, C4JRender::eViewportType viewpor } IggyPlayerSetDisplaySize( getMovie(), m_movieWidth, m_movieHeight ); - + m_renderWidth = tileWidth; m_renderHeight = tileHeight; @@ -639,7 +639,7 @@ void UIScene_HUD::render(S32 width, S32 height, C4JRender::eViewportType viewpor tileYStart , tileXStart + tileWidth , tileYStart + tileHeight , - 0 ); + 0 ); IggyPlayerDrawTilesEnd ( getMovie() ); } else @@ -651,7 +651,7 @@ void UIScene_HUD::render(S32 width, S32 height, C4JRender::eViewportType viewpor void UIScene_HUD::handleTimerComplete(int id) { Minecraft *pMinecraft = Minecraft::GetInstance(); - + bool anyVisible = false; if(pMinecraft->localplayers[m_iPad]!= NULL) { @@ -735,7 +735,7 @@ void UIScene_HUD::SetDisplayName(const wstring &displayName) if(displayName.compare(m_displayName) != 0) { m_displayName = displayName; - + IggyDataValue result; IggyDataValue value[1]; IggyStringUTF16 stringVal; @@ -775,7 +775,7 @@ void UIScene_HUD::handleGameTick() } m_parentLayer->showComponent(m_iPad, eUIScene_HUD,true); - int iGuiScale; + int iGuiScale; if(pMinecraft->localplayers[m_iPad]->m_iScreenSection == C4JRender::VIEWPORT_TYPE_FULLSCREEN) { @@ -788,7 +788,7 @@ void UIScene_HUD::handleGameTick() SetHudSize(iGuiScale); SetDisplayName(ProfileManager.GetDisplayName(m_iPad)); - + SetTooltipsEnabled(((ui.GetMenuDisplayed(ProfileManager.GetPrimaryPad())) || (app.GetGameSettings(ProfileManager.GetPrimaryPad(),eGameSetting_Tooltips) != 0))); #if TO_BE_IMPLEMENTED @@ -797,8 +797,8 @@ void UIScene_HUD::handleGameTick() { int iTooltipsYOffset = 0; // if tooltips are off, set the y offset to zero - if(app.GetGameSettings(m_iPad,eGameSetting_Tooltips)==0) - { + if(app.GetGameSettings(m_iPad,eGameSetting_Tooltips)==0) + { switch(iGuiScale) { case 0: @@ -987,11 +987,11 @@ void UIScene_HUD::handleGameTick() bool bDisplayGui=app.GetGameStarted() && !ui.GetMenuDisplayed(m_iPad) && !(app.GetXuiAction(m_iPad)==eAppAction_AutosaveSaveGameCapturedThumbnail) && app.GetGameSettings(m_iPad,eGameSetting_DisplayHUD)!=0; if(bDisplayGui && pMinecraft->localplayers[m_iPad] != NULL) { - setVisible(true); + setVisible(true); } else { - setVisible(false); + setVisible(false); } } } diff --git a/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp index 72c41049..de8af0ac 100644 --- a/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_InGameHostOptionsMenu.cpp @@ -65,11 +65,11 @@ void UIScene_InGameHostOptionsMenu::handleInput(int iPad, int key, bool repeat, // Send update settings packet to server if(hostOptions != app.GetGameHostOption(eGameHostOption_All) ) { - Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr player = pMinecraft->localplayers[m_iPad]; + Minecraft *pMinecraft = Minecraft::GetInstance(); + shared_ptr player = pMinecraft->localplayers[m_iPad]; if(player->connection) { - player->connection->send( std::shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, hostOptions) ) ); + player->connection->send( shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, hostOptions) ) ); } } diff --git a/Minecraft.Client/Common/UI/UIScene_InGameInfoMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InGameInfoMenu.cpp index 542834db..5c3f73f6 100644 --- a/Minecraft.Client/Common/UI/UIScene_InGameInfoMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_InGameInfoMenu.cpp @@ -67,7 +67,7 @@ UIScene_InGameInfoMenu::UIScene_InGameInfoMenu(int iPad, void *initData, UILayer m_playersVoiceState[i] = voiceStatus; m_playersColourState[i] = app.GetPlayerColour( m_players[i] ); m_playerNames[i] = playerName; - m_playerList.addItem( playerName, app.GetPlayerColour( m_players[i] ), voiceStatus); + m_playerList.addItem( playerName, app.GetPlayerColour( m_players[i] ), voiceStatus); } } @@ -78,7 +78,7 @@ UIScene_InGameInfoMenu::UIScene_InGameInfoMenu(int iPad, void *initData, UILayer if(thisPlayer != NULL) m_isHostPlayer = thisPlayer->IsHost() == TRUE; Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; + shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; if(!m_isHostPlayer && !localPlayer->isModerator() ) { removeControl( &m_buttonGameOptions, false ); @@ -131,7 +131,7 @@ void UIScene_InGameInfoMenu::updateTooltips() int keyA = -1; Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; + shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; bool isOp = m_isHostPlayer || localPlayer->isModerator(); bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0; @@ -161,7 +161,7 @@ void UIScene_InGameInfoMenu::updateTooltips() } } } - + #if defined(__PS3__) || defined(__ORBIS__) if(m_iPad == ProfileManager.GetPrimaryPad() ) ikeyY = IDS_TOOLTIPS_GAME_INVITES; #else @@ -243,7 +243,7 @@ void UIScene_InGameInfoMenu::handleReload() m_playersVoiceState[i] = voiceStatus; m_playersColourState[i] = app.GetPlayerColour( m_players[i] ); m_playerNames[i] = playerName; - m_playerList.addItem( playerName, app.GetPlayerColour( m_players[i] ), voiceStatus); + m_playerList.addItem( playerName, app.GetPlayerColour( m_players[i] ), voiceStatus); } } @@ -252,7 +252,7 @@ void UIScene_InGameInfoMenu::handleReload() if(thisPlayer != NULL) m_isHostPlayer = thisPlayer->IsHost() == TRUE; Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; + shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; if(!m_isHostPlayer && !localPlayer->isModerator() ) { removeControl( &m_buttonGameOptions, false ); @@ -367,7 +367,7 @@ void UIScene_InGameInfoMenu::handleInput(int iPad, int key, bool repeat, bool pr #else // __PS3__ int ret = sceNpBasicRecvMessageCustom(SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE, SCE_NP_BASIC_RECV_MESSAGE_OPTIONS_INCLUDE_BOOTABLE, SYS_MEMORY_CONTAINER_ID_INVALID); app.DebugPrintf("sceNpBasicRecvMessageCustom return %d ( %08x )\n", ret, ret); -#endif +#endif } } #else @@ -397,7 +397,7 @@ void UIScene_InGameInfoMenu::handleInput(int iPad, int key, bool repeat, bool pr if(pressed && !repeat && !g_NetworkManager.IsLocalGame() ) { #ifdef __PSVITA__ - if(CGameNetworkManager::usingAdhocMode() == false) + if(CGameNetworkManager::usingAdhocMode() == false) g_NetworkManager.SendInviteGUI(iPad); #else g_NetworkManager.SendInviteGUI(iPad); @@ -431,7 +431,7 @@ void UIScene_InGameInfoMenu::handlePress(F64 controlId, F64 childId) INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId( m_players[ currentSelection ] ); Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; + shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; bool isOp = m_isHostPlayer || localPlayer->isModerator(); bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0; @@ -544,7 +544,7 @@ void UIScene_InGameInfoMenu::OnPlayerChanged(void *callbackParam, INetworkPlayer } } - scene->m_playerList.addItem( playerName, app.GetPlayerColour( scene->m_players[scene->m_playersCount - 1] ), voiceStatus); + scene->m_playerList.addItem( playerName, app.GetPlayerColour( scene->m_players[scene->m_playersCount - 1] ), voiceStatus); } } @@ -554,12 +554,12 @@ int UIScene_InGameInfoMenu::KickPlayerReturned(void *pParam,int iPad,C4JStorage: delete pParam; if(result==C4JStorage::EMessage_ResultAccept) - { + { Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr localPlayer = pMinecraft->localplayers[iPad]; + shared_ptr localPlayer = pMinecraft->localplayers[iPad]; if(localPlayer->connection) { - localPlayer->connection->send( std::shared_ptr( new KickPlayerPacket(smallId) ) ); + localPlayer->connection->send( shared_ptr( new KickPlayerPacket(smallId) ) ); } } @@ -571,7 +571,7 @@ int UIScene_InGameInfoMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStora { UIScene_InGameInfoMenu* pClass = (UIScene_InGameInfoMenu*)pParam; - if(result==C4JStorage::EMessage_ResultAccept) + if(result==C4JStorage::EMessage_ResultAccept) { #ifdef __PS3__ SQRNetworkManager_PS3::AttemptPSNSignIn(&UIScene_InGameInfoMenu::ViewInvites_SignInReturned, pClass); diff --git a/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp index aa0e1994..6eb22b09 100644 --- a/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp @@ -66,7 +66,7 @@ UIScene_InGamePlayerOptionsMenu::UIScene_InGamePlayerOptionsMenu(int iPad, void #else m_checkboxes[eControl_Op].init(L"DEBUG: Creative",eControl_Op,Player::getPlayerGamePrivilege(m_playerPrivileges,Player::ePlayerGamePrivilege_CreativeMode)); #endif - + removeControl( &m_buttonKick, true ); removeControl( &m_checkboxes[eControl_CheatTeleport], true ); @@ -129,7 +129,7 @@ UIScene_InGamePlayerOptionsMenu::UIScene_InGamePlayerOptionsMenu(int iPad, void m_checkboxes[eControl_HostHunger].SetEnable(true); checked = Player::getPlayerGamePrivilege(m_playerPrivileges, Player::ePlayerGamePrivilege_CanToggleClassicHunger)!=0; m_checkboxes[eControl_HostHunger].init( app.GetString(IDS_CAN_DISABLE_EXHAUSTION), eControl_HostHunger, checked); - + checked = Player::getPlayerGamePrivilege(m_playerPrivileges, Player::ePlayerGamePrivilege_CanTeleport)!=0; m_checkboxes[eControl_CheatTeleport].init(app.GetString(IDS_ENABLE_TELEPORT),eControl_CheatTeleport,checked); } @@ -315,11 +315,11 @@ void UIScene_InGamePlayerOptionsMenu::handleInput(int iPad, int key, bool repeat if(originalPrivileges != m_playerPrivileges) { // Send update settings packet to server - Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr player = pMinecraft->localplayers[m_iPad]; + Minecraft *pMinecraft = Minecraft::GetInstance(); + shared_ptr player = pMinecraft->localplayers[m_iPad]; if(player->connection) { - player->connection->send( std::shared_ptr( new PlayerInfoPacket( m_networkSmallId, -1, m_playerPrivileges) ) ); + player->connection->send( shared_ptr( new PlayerInfoPacket( m_networkSmallId, -1, m_playerPrivileges) ) ); } } navigateBack(); @@ -364,12 +364,12 @@ int UIScene_InGamePlayerOptionsMenu::KickPlayerReturned(void *pParam,int iPad,C4 delete pParam; if(result==C4JStorage::EMessage_ResultAccept) - { + { Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr localPlayer = pMinecraft->localplayers[iPad]; + shared_ptr localPlayer = pMinecraft->localplayers[iPad]; if(localPlayer->connection) { - localPlayer->connection->send( std::shared_ptr( new KickPlayerPacket(smallId) ) ); + localPlayer->connection->send( shared_ptr( new KickPlayerPacket(smallId) ) ); } // Fix for #61494 - [CRASH]: TU7: Code: Multiplayer: Title may crash while kicking a player from an online game. @@ -405,7 +405,7 @@ void UIScene_InGamePlayerOptionsMenu::resetCheatCheckboxes() m_checkboxes[eControl_HostInvisible].SetEnable(isModerator); m_checkboxes[eControl_HostFly].SetEnable(isModerator); m_checkboxes[eControl_HostHunger].SetEnable(isModerator); - m_checkboxes[eControl_CheatTeleport].SetEnable(isModerator); + m_checkboxes[eControl_CheatTeleport].SetEnable(isModerator); } } diff --git a/Minecraft.Client/Common/UI/UIScene_InventoryMenu.cpp b/Minecraft.Client/Common/UI/UIScene_InventoryMenu.cpp index e13a9239..723937d0 100644 --- a/Minecraft.Client/Common/UI/UIScene_InventoryMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_InventoryMenu.cpp @@ -32,7 +32,7 @@ UIScene_InventoryMenu::UIScene_InventoryMenu(int iPad, void *_initData, UILayer m_previousTutorialState = gameMode->getTutorial()->getCurrentState(); gameMode->getTutorial()->changeTutorialState(e_Tutorial_State_Inventory_Menu, this); } - + InventoryMenu *menu = (InventoryMenu *)initData->player->inventoryMenu; initData->player->awardStat(GenericStats::openInventory(),GenericStats::param_openInventory()); @@ -251,7 +251,7 @@ void UIScene_InventoryMenu::updateEffectsDisplay() { // Update with the current effects Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr player = pMinecraft->localplayers[m_iPad]; + shared_ptr player = pMinecraft->localplayers[m_iPad]; if(player == NULL) return; @@ -262,7 +262,7 @@ void UIScene_InventoryMenu::updateEffectsDisplay() IggyDataValue *UpdateValue = new IggyDataValue[activeEffects->size()*2]; for(AUTO_VAR(it, activeEffects->begin()); it != activeEffects->end(); ++it) - { + { MobEffectInstance *effect = *it; if(effect->getDuration() >= m_bEffectTime[effect->getId()]) diff --git a/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp index d21c2906..80db57f8 100644 --- a/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp @@ -9,7 +9,7 @@ #define PLAYER_ONLINE_TIMER_TIME 100 // if the value is greater than 32000, it's an xzp icon that needs displayed, rather than the game icon -const int UIScene_LeaderboardsMenu::TitleIcons[UIScene_LeaderboardsMenu::NUM_LEADERBOARDS][7] = +const int UIScene_LeaderboardsMenu::TitleIcons[UIScene_LeaderboardsMenu::NUM_LEADERBOARDS][7] = { { UIControl_LeaderboardList::e_ICON_TYPE_WALKED, UIControl_LeaderboardList::e_ICON_TYPE_FALLEN, Item::minecart_Id, Item::boat_Id, NULL }, { Tile::dirt_Id, Tile::stoneBrick_Id, Tile::sand_Id, Tile::rock_Id, Tile::gravel_Id, Tile::clay_Id, Tile::obsidian_Id }, @@ -36,7 +36,7 @@ const UIScene_LeaderboardsMenu::LeaderboardDescriptor UIScene_LeaderboardsMenu:: UIScene_LeaderboardsMenu::LeaderboardDescriptor( 6, false, IDS_LEADERBOARD_FARMING_HARD), // Farming Hard }, { - UIScene_LeaderboardsMenu::LeaderboardDescriptor( 0, false, -1), // + UIScene_LeaderboardsMenu::LeaderboardDescriptor( 0, false, -1), // UIScene_LeaderboardsMenu::LeaderboardDescriptor( 7, false, IDS_LEADERBOARD_KILLS_EASY), // Kills Easy UIScene_LeaderboardsMenu::LeaderboardDescriptor( 7, false, IDS_LEADERBOARD_KILLS_NORMAL), // Kills Normal UIScene_LeaderboardsMenu::LeaderboardDescriptor( 7, false, IDS_LEADERBOARD_KILLS_HARD), // Kills Hard @@ -132,7 +132,7 @@ void UIScene_LeaderboardsMenu::updateTooltips() selection < (GetEntryStartIndex() + m_leaderboard.m_entries.size()) ) { #ifdef _XBOX - if( (m_leaderboard.m_entries[selection - (m_leaderboard.m_entryStartIndex-1)].m_bFriend==false) + if( (m_leaderboard.m_entries[selection - (m_leaderboard.m_entryStartIndex-1)].m_bFriend==false) && (m_leaderboard.m_entries[selection - (m_leaderboard.m_entryStartIndex-1)].m_bRequestedFriend==false)) #endif { @@ -267,7 +267,7 @@ void UIScene_LeaderboardsMenu::handleInput(int iPad, int key, bool repeat, bool SetLeaderboardHeader(); - ReadStats(-1); + ReadStats(-1); ui.PlayUISFX(eSFX_Press); } handled = true; @@ -284,7 +284,7 @@ void UIScene_LeaderboardsMenu::handleInput(int iPad, int key, bool repeat, bool if( m_leaderboard.m_totalEntryCount <= 10 ) break; - + sendInputToMovie(key, repeat, pressed, released); #if 0 @@ -441,7 +441,7 @@ void UIScene_LeaderboardsMenu::ReadStats(int startIndex) } //app.DebugPrintf("Requesting stats read %d - %d - %d\n", m_currentLeaderboard, startIndex == -1 ? m_currentFilter : LeaderboardManager::eFM_TopRank, m_currentDifficulty); - + LeaderboardManager::EFilterMode filtermode; if ( m_currentFilter == LeaderboardManager::eFM_MyScore || m_currentFilter == LeaderboardManager::eFM_TopRank ) @@ -457,8 +457,8 @@ void UIScene_LeaderboardsMenu::ReadStats(int startIndex) switch (filtermode) { case LeaderboardManager::eFM_TopRank: - LeaderboardManager::Instance()->ReadStats_TopRank( this, - m_currentDifficulty, (LeaderboardManager::EStatsType) m_currentLeaderboard, + LeaderboardManager::Instance()->ReadStats_TopRank( this, + m_currentDifficulty, (LeaderboardManager::EStatsType) m_currentLeaderboard, m_newEntryIndex, m_newReadSize ); break; @@ -529,7 +529,7 @@ bool UIScene_LeaderboardsMenu::RetrieveStats() { m_leaderboard.m_totalEntryCount = NUM_ENTRIES; m_leaderboard.m_numColumns = LEADERBOARD_DESCRIPTORS[m_currentLeaderboard][m_currentDifficulty].m_columnCount; - + //For each entry in the leaderboard for(unsigned int entryIndex=0; entryIndex < NUM_ENTRIES; entryIndex++) { @@ -539,7 +539,7 @@ bool UIScene_LeaderboardsMenu::RetrieveStats() m_leaderboard.m_entries[entryIndex].m_row = entryIndex; m_leaderboard.m_entries[entryIndex].m_rank = entryIndex+1; swprintf(m_leaderboard.m_entries[entryIndex].m_wcRank, 12, L"12345678");//(int)m_leaderboard.m_entries[entryIndex].m_rank); - + swprintf(m_leaderboard.m_entries[entryIndex].m_gamerTag, 17, L"WWWWWWWWWWWWWWWW"); //m_leaderboard.m_entries[entryIndex].m_locale = (entryIndex % 37) + 1; @@ -598,7 +598,7 @@ bool UIScene_LeaderboardsMenu::RetrieveStats() //LeaderboardManager::Instance()->SetStatsRetrieved(false); return false; } - + m_leaderboard.m_numColumns = m_stats.m_queries[0].m_statsSize; for( unsigned int entryIndex=0 ; entryIndex < m_newEntriesCount; ++entryIndex ) @@ -676,7 +676,7 @@ bool UIScene_LeaderboardsMenu::RetrieveStats() insertPosition++; } - + if (deleteFront) { // Delete front x entries @@ -865,7 +865,7 @@ void UIScene_LeaderboardsMenu::PopulateLeaderboard(LeaderboardManager::eStatsRet m_labelInfo.setVisible( false ); m_listEntries.initLeaderboard(m_newSel, m_leaderboard.m_totalEntryCount, LEADERBOARD_DESCRIPTORS[m_currentLeaderboard][m_currentDifficulty].m_columnCount); - + int startIndex = m_newEntryIndex; int entryCount = m_newEntriesCount; @@ -874,7 +874,7 @@ void UIScene_LeaderboardsMenu::PopulateLeaderboard(LeaderboardManager::eStatsRet bool isLast = i == ((startIndex + entryCount) - 1); int idsErrorMessage = m_leaderboard.m_entries[i].m_idsErrorMessage; - + if (idsErrorMessage > 0) { m_listEntries.addDataSet( @@ -882,7 +882,7 @@ void UIScene_LeaderboardsMenu::PopulateLeaderboard(LeaderboardManager::eStatsRet m_leaderboard.m_entries[i].m_row, m_leaderboard.m_entries[i].m_rank, m_leaderboard.m_entries[i].m_gamerTag, - + true, // 4J-JEV: Has error message to display. app.GetString(idsErrorMessage), @@ -896,9 +896,9 @@ void UIScene_LeaderboardsMenu::PopulateLeaderboard(LeaderboardManager::eStatsRet m_leaderboard.m_entries[i].m_row, m_leaderboard.m_entries[i].m_rank, m_leaderboard.m_entries[i].m_gamerTag, - - // 4J-TomK | The bDisplayMessage Flag defines if Leaderboard Data should be - // displayed (false) or if a specific message (true - when data is private for example) + + // 4J-TomK | The bDisplayMessage Flag defines if Leaderboard Data should be + // displayed (false) or if a specific message (true - when data is private for example) // should be displayed. The message itself should be passed on in col0! false, @@ -955,7 +955,7 @@ int UIScene_LeaderboardsMenu::SetLeaderboardTitleIcons() m_listEntries.setColumnIcon(i,TitleIcons[m_currentLeaderboard][i]); } } - + return iValidIcons; } @@ -969,7 +969,7 @@ void UIScene_LeaderboardsMenu::customDraw(IggyCustomDrawCallbackRegion *region) } else { - std::shared_ptr item = std::shared_ptr( new ItemInstance(TitleIcons[m_currentLeaderboard][slotId], 1, 0) ); + shared_ptr item = shared_ptr( new ItemInstance(TitleIcons[m_currentLeaderboard][slotId], 1, 0) ); customDrawSlotControl(region,m_iPad,item,1.0f,false,false); } } diff --git a/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.cpp index fec64a98..c29bac2d 100644 --- a/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.cpp @@ -85,7 +85,7 @@ void UIScene_SignEntryMenu::tick() for(int i=0;i<4;i++) { wstring temp=m_textInputLines[i].getLabel(); - m_sign->SetMessage(i,temp); + m_sign->SetMessage(i,temp); } m_sign->setChanged(); @@ -94,10 +94,10 @@ void UIScene_SignEntryMenu::tick() // need to send the new data if (pMinecraft->level->isClientSide) { - std::shared_ptr player = pMinecraft->localplayers[m_iPad]; + shared_ptr player = pMinecraft->localplayers[m_iPad]; if(player != NULL && player->connection && player->connection->isStarted()) { - 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()) ) ); + 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()) ) ); } } ui.CloseUIScenes(m_iPad); diff --git a/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.h b/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.h index b83a8b2d..28b37d53 100644 --- a/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.h +++ b/Minecraft.Client/Common/UI/UIScene_SignEntryMenu.h @@ -17,7 +17,7 @@ private: eControl_Confirm }; - std::shared_ptr m_sign; + shared_ptr m_sign; int m_iEditingLine; bool m_bConfirmed; bool m_bIgnoreInput; diff --git a/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp b/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp index 596f5b67..f6916d13 100644 --- a/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_TeleportMenu.cpp @@ -11,13 +11,13 @@ UIScene_TeleportMenu::UIScene_TeleportMenu(int iPad, void *initData, UILayer *pa { // Setup all the Iggy references we need for this scene initialiseMovie(); - + TeleportMenuInitData *initParam = (TeleportMenuInitData *)initData; m_teleportToPlayer = initParam->teleportToPlayer; delete initParam; - + if(m_teleportToPlayer) { m_labelTitle.init(app.GetString(IDS_TELEPORT_TO_PLAYER)); @@ -81,7 +81,7 @@ UIScene_TeleportMenu::UIScene_TeleportMenu(int iPad, void *initData, UILayer *pa m_playersVoiceState[m_playersCount] = voiceStatus; m_playersColourState[m_playersCount] = app.GetPlayerColour( m_players[m_playersCount] ); m_playerNames[m_playersCount] = playerName; - m_playerList.addItem( playerName, app.GetPlayerColour( m_players[m_playersCount] ), voiceStatus); + m_playerList.addItem( playerName, app.GetPlayerColour( m_players[m_playersCount] ), voiceStatus); } } @@ -171,7 +171,7 @@ void UIScene_TeleportMenu::handleReload() m_playersVoiceState[m_playersCount] = voiceStatus; m_playersColourState[m_playersCount] = app.GetPlayerColour( m_players[m_playersCount] ); m_playerNames[m_playersCount] = playerName; - m_playerList.addItem( playerName, app.GetPlayerColour( m_players[m_playersCount] ), voiceStatus); + m_playerList.addItem( playerName, app.GetPlayerColour( m_players[m_playersCount] ), voiceStatus); } } @@ -257,8 +257,8 @@ void UIScene_TeleportMenu::handlePress(F64 controlId, F64 childId) int currentSelection = (int)childId; INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId( m_players[ currentSelection ] ); INetworkPlayer *thisPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(m_iPad); - - std::shared_ptr packet; + + shared_ptr packet; if(m_teleportToPlayer) { packet = TeleportCommand::preparePacket(thisPlayer->GetUID(),selectedPlayer->GetUID()); @@ -339,6 +339,6 @@ void UIScene_TeleportMenu::OnPlayerChanged(void *callbackParam, INetworkPlayer * } } - scene->m_playerList.addItem( playerName, app.GetPlayerColour( scene->m_players[scene->m_playersCount - 1] ), voiceStatus); + scene->m_playerList.addItem( playerName, app.GetPlayerColour( scene->m_players[scene->m_playersCount - 1] ), voiceStatus); } } diff --git a/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp b/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp index cd630651..dc2bac48 100644 --- a/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp @@ -11,7 +11,7 @@ UIScene_TradingMenu::UIScene_TradingMenu(int iPad, void *_initData, UILayer *par { // Setup all the Iggy references we need for this scene initialiseMovie(); - + m_showingLeftArrow = true; m_showingRightArrow = true; @@ -36,7 +36,7 @@ UIScene_TradingMenu::UIScene_TradingMenu(int iPad, void *_initData, UILayer *par } m_menu = new MerchantMenu( initData->inventory, initData->trader, initData->level ); - + Minecraft::GetInstance()->localplayers[iPad]->containerMenu = m_menu; m_slotListRequest1.addSlots(BUY_A,1); @@ -93,7 +93,7 @@ void UIScene_TradingMenu::handleDestroy() } // 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst packet loss. - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(pMinecraft->localplayers[m_iPad] != NULL) pMinecraft->localplayers[m_iPad]->closeContainer(); ui.OverrideSFX(m_iPad,ACTION_MENU_A,false); @@ -147,12 +147,12 @@ void UIScene_TradingMenu::customDraw(IggyCustomDrawCallbackRegion *region) Minecraft *pMinecraft = Minecraft::GetInstance(); if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL) return; - std::shared_ptr item = nullptr; + shared_ptr item = nullptr; int slotId = -1; swscanf((wchar_t*)region->name,L"slot_%d",&slotId); if(slotId < MerchantMenu::USE_ROW_SLOT_END) - { + { Slot *slot = m_menu->getSlot(slotId); item = slot->getItem(); } diff --git a/Minecraft.Client/Common/UI/UIStructs.h b/Minecraft.Client/Common/UI/UIStructs.h index 0865cbf3..2dd03c8c 100644 --- a/Minecraft.Client/Common/UI/UIStructs.h +++ b/Minecraft.Client/Common/UI/UIStructs.h @@ -31,8 +31,8 @@ typedef struct _UIVec2D // Brewing typedef struct _BrewingScreenInput { - std::shared_ptr inventory; - std::shared_ptr brewingStand; + shared_ptr inventory; + shared_ptr brewingStand; int iPad; bool bSplitscreen; } BrewingScreenInput; @@ -40,8 +40,8 @@ typedef struct _BrewingScreenInput // Chest typedef struct _ContainerScreenInput { - std::shared_ptr inventory; - std::shared_ptr container; + shared_ptr inventory; + shared_ptr container; int iPad; bool bSplitscreen; } ContainerScreenInput; @@ -49,8 +49,8 @@ typedef struct _ContainerScreenInput // Dispenser typedef struct _TrapScreenInput { - std::shared_ptr inventory; - std::shared_ptr trap; + shared_ptr inventory; + shared_ptr trap; int iPad; bool bSplitscreen; } TrapScreenInput; @@ -58,16 +58,16 @@ typedef struct _TrapScreenInput // Inventory and creative inventory typedef struct _InventoryScreenInput { - std::shared_ptr player; + 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; } InventoryScreenInput; -// Enchanting +// Enchanting typedef struct _EnchantingScreenInput { - std::shared_ptr inventory; + shared_ptr inventory; Level *level; int x; int y; @@ -79,8 +79,8 @@ typedef struct _EnchantingScreenInput // Furnace typedef struct _FurnaceScreenInput { - std::shared_ptr inventory; - std::shared_ptr furnace; + shared_ptr inventory; + shared_ptr furnace; int iPad; bool bSplitscreen; } FurnaceScreenInput; @@ -88,21 +88,21 @@ typedef struct _FurnaceScreenInput // Crafting typedef struct _CraftingPanelScreenInput { - std::shared_ptr player; + shared_ptr player; int iContainerType; // RECIPE_TYPE_2x2 or RECIPE_TYPE_3x3 bool bSplitscreen; int iPad; int x; int y; int z; -} +} CraftingPanelScreenInput; // Trading typedef struct _TradingScreenInput { - std::shared_ptr inventory; - std::shared_ptr trader; + shared_ptr inventory; + shared_ptr trader; Level *level; int iPad; bool bSplitscreen; @@ -112,7 +112,7 @@ TradingScreenInput; // Anvil typedef struct _AnvilScreenInput { - std::shared_ptr inventory; + shared_ptr inventory; Level *level; int x; int y; @@ -125,7 +125,7 @@ AnvilScreenInput; // Sign typedef struct _SignEntryScreenInput { - std::shared_ptr sign; + shared_ptr sign; int iPad; } SignEntryScreenInput; @@ -179,7 +179,7 @@ typedef struct _CreateWorldMenuInitData BOOL bOnline; BOOL bIsPrivate; int iPad; -} +} CreateWorldMenuInitData; // Join/Load saves list @@ -223,7 +223,7 @@ typedef struct _LoadMenuInitData int iSaveGameInfoIndex; LevelGenerationOptions *levelGen; SaveListDetails *saveDetails; -} +} LoadMenuInitData; // Join Games @@ -276,7 +276,7 @@ typedef struct _LaunchMoreOptionsMenuInitData seed = L""; bDisableSaving = false; } -} +} LaunchMoreOptionsMenuInitData; typedef struct _LoadingInputParams @@ -352,7 +352,7 @@ typedef struct _SignInInfo } SignInInfo; // Credits -typedef struct +typedef struct { LPCWSTR m_Text; // Should contain string, optionally with %s to add in translated string ... e.g. "Andy West - %s" int m_iStringID[2]; // May be NO_TRANSLATED_STRING if we do not require to add any translated string. @@ -379,8 +379,8 @@ typedef struct _DLCOffersParam { int iPad; int iOfferC; - int iType; -} + int iType; +} DLCOffersParam; typedef struct _InGamePlayerOptionsInitData diff --git a/Minecraft.Client/Common/XUI/SlotProgressControl.cpp b/Minecraft.Client/Common/XUI/SlotProgressControl.cpp index 180ade67..91f362a3 100644 --- a/Minecraft.Client/Common/XUI/SlotProgressControl.cpp +++ b/Minecraft.Client/Common/XUI/SlotProgressControl.cpp @@ -20,8 +20,8 @@ int SlotProgressControl::GetValue() if( pvUserData != NULL ) { SlotControlUserDataContainer* pUserDataContainer = (SlotControlUserDataContainer*)pvUserData; - - std::shared_ptr item = std::shared_ptr(); + + shared_ptr item = shared_ptr(); if( pUserDataContainer->slot != NULL ) { @@ -68,8 +68,8 @@ void SlotProgressControl::GetRange(int *pnRangeMin, int *pnRangeMax) if( pvUserData != NULL ) { SlotControlUserDataContainer* pUserDataContainer = (SlotControlUserDataContainer*)pvUserData; - - std::shared_ptr item = std::shared_ptr(); + + shared_ptr item = shared_ptr(); if( pUserDataContainer->slot != NULL ) { diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp b/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp index 6989aeef..82b6c3ed 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.cpp @@ -8,7 +8,7 @@ //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -CXuiCtrlCraftIngredientSlot::CXuiCtrlCraftIngredientSlot() +CXuiCtrlCraftIngredientSlot::CXuiCtrlCraftIngredientSlot() { m_iID=0; m_Desc=NULL; @@ -23,7 +23,7 @@ CXuiCtrlCraftIngredientSlot::CXuiCtrlCraftIngredientSlot() HRESULT CXuiCtrlCraftIngredientSlot::OnInit(XUIMessageInit* pInitData, BOOL& rfHandled) { HRESULT hr=S_OK; - + return hr; } //----------------------------------------------------------------------------- @@ -48,10 +48,10 @@ HRESULT CXuiCtrlCraftIngredientSlot::OnCustomMessage_GetSlotItem(CustomMessage_G } HRESULT CXuiCtrlCraftIngredientSlot::OnGetSourceText(XUIMessageGetSourceText *pGetSourceTextData,BOOL& bHandled) -{ +{ pGetSourceTextData->szText=m_Desc; bHandled = TRUE; - + return S_OK; } @@ -72,7 +72,7 @@ void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCo m_item = nullptr; m_iID=iId; m_iAuxVal=iAuxVal; - + // 4J Stu - For clocks and compasses we set the aux value to a special one that signals we should use a default texture // rather than the dynamic one for the player // not right... auxvals for diggables are damage values, can be a lot higher @@ -92,7 +92,7 @@ void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCo XuiElementSetShow(m_hObj,bShow); } -void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow) +void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, 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/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h b/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h index 0a46227b..5cf7a7f4 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h +++ b/Minecraft.Client/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, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow=TRUE); + void SetIcon(int iPad, 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: - std::shared_ptr m_item; + shared_ptr m_item; int m_iID; int m_iAuxVal; int m_iCount; diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp b/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp index b05a8fdd..8a56a0ea 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.cpp @@ -100,7 +100,7 @@ HRESULT CXuiCtrlEnchantmentBook::OnRender(XUIMessageRender *pRenderData, BOOL &b // Annoyingly, XUI renders everything to a z of 0 so if we want to render anything that needs the z-buffer on top of it, then we need to clear it. // Clear just the region required for this control. - D3DRECT clearRect; + D3DRECT clearRect; clearRect.x1 = (int)(matrix._41) - 2; clearRect.y1 = (int)(matrix._42) - 2; clearRect.x2 = (int)(matrix._41 + ( bwidth * matrix._11 )) + 2; @@ -201,7 +201,7 @@ HRESULT CXuiCtrlEnchantmentBook::OnRender(XUIMessageRender *pRenderData, BOOL &b //HRESULT CXuiCtrlEnchantmentBook::OnRender(XUIMessageRender *pRenderData, BOOL &bHandled ) //{ // HXUIDC hDC = pRenderData->hDC; -// +// // RenderManager.Set_matrixDirty(); // // Minecraft *minecraft = Minecraft::GetInstance(); @@ -306,7 +306,7 @@ HRESULT CXuiCtrlEnchantmentBook::OnRender(XUIMessageRender *pRenderData, BOOL &b void CXuiCtrlEnchantmentBook::tickBook() { EnchantmentMenu *menu = m_containerScene->getMenu(); - std::shared_ptr current = menu->getSlot(0)->getItem(); + shared_ptr current = menu->getSlot(0)->getItem(); if (!ItemInstance::matches(current, last)) { last = current; @@ -328,7 +328,7 @@ void CXuiCtrlEnchantmentBook::tickBook() { shouldBeOpen = true; } - } + } if (shouldBeOpen) open += 0.2f; else open -= 0.2f; diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.h b/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.h index 8d22eed9..93da0768 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.h +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_EnchantmentBook.h @@ -42,7 +42,7 @@ private: float m_fScale,m_fAlpha; int m_iPad; CXuiSceneEnchant *m_containerScene; - std::shared_ptr last; + shared_ptr last; float m_fScreenWidth,m_fScreenHeight; float m_fRawWidth,m_fRawHeight; diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp b/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp index 08e9fdd7..84273eb5 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.cpp @@ -124,7 +124,7 @@ HRESULT CXuiCtrlMinecraftSlot::OnGetSourceImage(XUIMessageGetSourceImage* pData, // if the id is greater than or equal to 32000, then it's an xzp icon, not a game icon if(m_iID<32000) - { + { // 4J Stu - Some parent controls may overide this, others will leave it as what we passed in m_iPad = GET_SLOTDISPLAY_USERINDEX_FROM_DATA_BITMASK(MsgGetSlotItem.iDataBitField); @@ -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 = std::shared_ptr( new ItemInstance(m_iID, m_iCount, m_iAuxVal) ); + if(m_item == NULL) m_item = shared_ptr( new ItemInstance(m_iID, m_iCount, m_iAuxVal) ); // build and render with the game call @@ -208,15 +208,15 @@ HRESULT CXuiCtrlMinecraftSlot::OnRender(XUIMessageRender *pRenderData, BOOL &bHa // we might want separate x & y scales here float scaleX = bwidth / 16.0f; - float scaleY = bheight / 16.0f; + float scaleY = bheight / 16.0f; // apply any scale in the matrix too scaleX *= matrix._11; - scaleY *= matrix._22; + scaleY *= matrix._22; // Annoyingly, XUI renders everything to a z of 0 so if we want to render anything that needs the z-buffer on top of it, then we need to clear it. // Clear just the region required for this control. - D3DRECT clearRect; + D3DRECT clearRect; clearRect.x1 = (int)(matrix._41) - 2; clearRect.y1 = (int)(matrix._42) - 2; clearRect.x2 = (int)(matrix._41 + ( bwidth * matrix._11 )) + 2; @@ -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 - std::shared_ptr oldPlayer = pMinecraft->player; + shared_ptr oldPlayer = pMinecraft->player; if( m_iPad >= 0 && m_iPad < XUSER_MAX_COUNT ) pMinecraft->player = pMinecraft->localplayers[m_iPad]; @@ -281,8 +281,8 @@ HRESULT CXuiCtrlMinecraftSlot::OnRender(XUIMessageRender *pRenderData, BOOL &bHa if(m_bDecorations) { if((scaleX!=1.0f) ||(scaleY!=1.0f)) - { - glPushMatrix(); + { + glPushMatrix(); glScalef(scaleX, scaleY, 1.0f); int iX= (int)(0.5f+((float)x)/scaleX); int iY= (int)(0.5f+((float)y)/scaleY); @@ -317,7 +317,7 @@ void CXuiCtrlMinecraftSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCount, i // aux value for diggers can go as high as 1561 //const _Tier *_Tier::DIAMOND = new _Tier(3, 1561, 8, 3); // - // setMaxDamage(tier->getUses()); + // setMaxDamage(tier->getUses()); // int ItemInstance::getDamageValue() // { @@ -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, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow) +void CXuiCtrlMinecraftSlot::SetIcon(int iPad, shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow) { m_item = item; m_isFoil = item->isFoil(); diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.h b/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.h index 02d06ae6..5dafec53 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.h +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_MinecraftSlot.h @@ -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, std::shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow=TRUE); + void SetIcon(int iPad, 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: - std::shared_ptr m_item; + shared_ptr m_item; BOOL m_bDirty; INT m_iPassThroughDataAssociation; INT m_iPassThroughIdAssociation; diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.cpp b/Minecraft.Client/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.cpp index eb5bf366..87abbcd3 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.cpp +++ b/Minecraft.Client/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) { - std::shared_ptr item = std::shared_ptr(); + shared_ptr item = 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) { - std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); + shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); if(player != NULL) item = player->inventory->getCarried(); } @@ -64,7 +64,7 @@ HRESULT CXuiCtrlSlotItemCtrlBase::OnCustomMessage_GetSlotItem(HXUIOBJ hObj, Cust // 11 bits - auxval // 6 bits - count // 6 bits - scale - pData->iDataBitField = MAKE_SLOTDISPLAY_DATA_BITMASK(pUserDataContainer->m_iPad, (int)(31*pUserDataContainer->m_fAlpha),true,item->GetCount(),7,item->popTime); + pData->iDataBitField = MAKE_SLOTDISPLAY_DATA_BITMASK(pUserDataContainer->m_iPad, (int)(31*pUserDataContainer->m_fAlpha),true,item->GetCount(),7,item->popTime); } else { @@ -93,7 +93,7 @@ void CXuiCtrlSlotItemCtrlBase::SetUserIndex( HXUIOBJ hObj, int iPad ) XuiElementGetUserData( hObj, &pvUserData ); SlotControlUserDataContainer* pUserDataContainer = (SlotControlUserDataContainer*)pvUserData; - + pUserDataContainer->m_iPad = iPad; } @@ -103,7 +103,7 @@ void CXuiCtrlSlotItemCtrlBase::SetAlpha( HXUIOBJ hObj, float fAlpha ) XuiElementGetUserData( hObj, &pvUserData ); SlotControlUserDataContainer* pUserDataContainer = (SlotControlUserDataContainer*)pvUserData; - + pUserDataContainer->m_fAlpha = fAlpha; } @@ -119,7 +119,7 @@ bool CXuiCtrlSlotItemCtrlBase::isEmpty( HXUIOBJ hObj ) } else if(pUserDataContainer->m_iPad >= 0 && pUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); + shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); if(player != NULL) return player->inventory->getCarried() == NULL; } @@ -146,7 +146,7 @@ wstring CXuiCtrlSlotItemCtrlBase::GetItemDescription( HXUIOBJ hObj, vectorslot->getItem()->getRarity()->color; int colour = app.GetHTMLColour(rarityColour); @@ -156,7 +156,7 @@ wstring CXuiCtrlSlotItemCtrlBase::GetItemDescription( HXUIOBJ hObj, vector%s",colour,thisString.c_str()); + swprintf(formatted, 256, L"%s",colour,thisString.c_str()); thisString = formatted; } desc.append( thisString ); @@ -167,10 +167,10 @@ wstring CXuiCtrlSlotItemCtrlBase::GetItemDescription( HXUIOBJ hObj, vectorm_iPad >= 0 && pUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); + shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); if(player != NULL) { - std::shared_ptr item = player->inventory->getCarried(); + 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 ) +shared_ptr CXuiCtrlSlotItemCtrlBase::getItemInstance( HXUIOBJ hObj ) { void* pvUserData; XuiElementGetUserData( hObj, &pvUserData ); @@ -190,7 +190,7 @@ std::shared_ptr CXuiCtrlSlotItemCtrlBase::getItemInstance( HXUIOBJ } else if(pUserDataContainer->m_iPad >= 0 && pUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); + shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); if(player != NULL) return player->inventory->getCarried(); } @@ -221,7 +221,7 @@ HRESULT CXuiCtrlSlotItemCtrlBase::OnKeyDown(HXUIOBJ hObj, XUIMessageInput *pInpu XUIMessage message; XUIMessageInput messageInput; - + XuiMessageInput( &message, &messageInput, XUI_KEYDOWN, pInputData->dwKeyCode, pInputData->wch, pInputData->dwFlags, pInputData->UserIndex ); if (HRESULT_SUCCEEDED(hr)) @@ -268,7 +268,7 @@ int CXuiCtrlSlotItemCtrlBase::GetObjectCount( HXUIOBJ hObj ) } else if(pUserDataContainer->m_iPad >= 0 && pUserDataContainer->m_iPad < XUSER_MAX_COUNT) { - std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pUserDataContainer->m_iPad] ); + 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) { - std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pThisUserDataContainer->m_iPad] ); + 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) { - std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pOtherUserDataContainer->m_iPad] ); + shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->localplayers[pOtherUserDataContainer->m_iPad] ); if(player != NULL && player->inventory->getCarried() != NULL) { iOtherID = player->inventory->getCarried()->id; @@ -358,7 +358,7 @@ bool CXuiCtrlSlotItemCtrlBase::IsSameItemAs( HXUIOBJ hThisObj, HXUIOBJ hOtherObj // 4J WESTY : Pointer Prototype : Added to support prototype only. // Returns number of items that can still be stacked into this slot. -int CXuiCtrlSlotItemCtrlBase::GetEmptyStackSpace( HXUIOBJ hObj ) +int CXuiCtrlSlotItemCtrlBase::GetEmptyStackSpace( HXUIOBJ hObj ) { int iResult = 0; diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h b/Minecraft.Client/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h index 3fe436ad..2fd21749 100644 --- a/Minecraft.Client/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_SlotItemCtrlBase.h @@ -29,9 +29,9 @@ private: public: // We define a lot of functions as virtual. These should be implemented to call the protected version by // passing in the HXUIOBJ of the control as the first parameter. We do not have access to that normally - // due to the inheritance structure + // due to the inheritance structure virtual HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) = 0; - + virtual HRESULT OnDestroy() = 0; virtual HRESULT OnCustomMessage_GetSlotItem(CustomMessage_GetSlotItem_Struct *pData, BOOL& bHandled) = 0; @@ -49,7 +49,7 @@ public: wstring GetItemDescription( HXUIOBJ hObj, vector &unformattedStrings ); - std::shared_ptr getItemInstance( HXUIOBJ hObj ); + shared_ptr getItemInstance( HXUIOBJ hObj ); Slot *getSlot( HXUIOBJ hObj ); // 4J WESTY : Pointer Prototype : Added to support prototype only. @@ -64,9 +64,9 @@ public: // 4J WESTY : Pointer Prototype : Added to support prototype only. bool IsSameItemAs( HXUIOBJ hThisObj, HXUIOBJ hOtherObj ); -protected: +protected: HRESULT OnInit( HXUIOBJ hObj, XUIMessageInit* pInitData, BOOL& bHandled ); - + HRESULT OnDestroy( HXUIOBJ hObj ); HRESULT OnCustomMessage_GetSlotItem(HXUIOBJ hObj, CustomMessage_GetSlotItem_Struct *pData, BOOL& bHandled); diff --git a/Minecraft.Client/Common/XUI/XUI_CustomMessages.h b/Minecraft.Client/Common/XUI/XUI_CustomMessages.h index 0744f826..888f8ad0 100644 --- a/Minecraft.Client/Common/XUI/XUI_CustomMessages.h +++ b/Minecraft.Client/Common/XUI/XUI_CustomMessages.h @@ -8,13 +8,13 @@ #define XM_INVENTORYUPDATED_MESSAGE XM_USER + 5 #define XM_TMS_DLCFILE_RETRIEVED_MESSAGE XM_USER + 6 #define XM_TMS_BANFILE_RETRIEVED_MESSAGE XM_USER + 7 -#define XM_TMS_ALLFILES_RETRIEVED_MESSAGE XM_USER + 8 +#define XM_TMS_ALLFILES_RETRIEVED_MESSAGE XM_USER + 8 #define XM_CUSTOMTICKSCENE_MESSAGE XM_USER + 9 #define XM_GETSLOTITEM_MESSAGE XM_USER + 10 typedef struct { - std::shared_ptr item; + shared_ptr item; // Legacy values for compatibility int iDataBitField; diff --git a/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.cpp b/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.cpp index 0931f50d..56b41267 100644 --- a/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.cpp +++ b/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.cpp @@ -9,7 +9,7 @@ #include "..\..\Common\GameRules\ConsoleGameRules.h" #include "XUI_DebugItemEditor.h" -#ifdef _DEBUG_MENUS_ENABLED +#ifdef _DEBUG_MENUS_ENABLED HRESULT CScene_DebugItemEditor::OnInit( XUIMessageInit *pInitData, BOOL &bHandled ) { MapChildControls(); @@ -22,7 +22,7 @@ HRESULT CScene_DebugItemEditor::OnInit( XUIMessageInit *pInitData, BOOL &bHandle if(m_item!=NULL) { - m_icon->SetIcon(m_iPad, m_item->id,m_item->getAuxValue(),m_item->count,10,31,false,m_item->isFoil()); + m_icon->SetIcon(m_iPad, m_item->id,m_item->getAuxValue(),m_item->count,10,31,false,m_item->isFoil()); m_itemName.SetText( app.GetString( Item::items[m_item->id]->getDescriptionId(m_item) ) ); m_itemId .SetText( _toString(m_item->id).c_str() ); @@ -59,8 +59,8 @@ HRESULT CScene_DebugItemEditor::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfH m_slot->set(m_item); Minecraft *pMinecraft = Minecraft::GetInstance(); - 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) ) ); + 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) ) ); } // kill the crafting xui app.NavigateBack(m_iPad); @@ -76,7 +76,7 @@ HRESULT CScene_DebugItemEditor::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfH HRESULT CScene_DebugItemEditor::OnNotifyValueChanged( HXUIOBJ hObjSource, XUINotifyValueChanged *pNotifyValueChangedData, BOOL &bHandled) { - if(m_item == NULL) m_item = std::shared_ptr( new ItemInstance(0,1,0) ); + if(m_item == NULL) m_item = shared_ptr( new ItemInstance(0,1,0) ); if(hObjSource == m_itemId) { int id = 0; @@ -107,7 +107,7 @@ HRESULT CScene_DebugItemEditor::OnNotifyValueChanged( HXUIOBJ hObjSource, XUINot if(!value.empty()) data = _fromString( value ); m_item->set4JData(data); } - + m_icon->SetIcon(m_iPad, m_item->id,m_item->getAuxValue(),m_item->count,10,31,false,m_item->isFoil()); m_itemName.SetText( app.GetString( Item::items[m_item->id]->getDescriptionId(m_item) ) ); diff --git a/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.h b/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.h index 0445a679..2e2f5b5a 100644 --- a/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.h +++ b/Minecraft.Client/Common/XUI/XUI_DebugItemEditor.h @@ -8,7 +8,7 @@ using namespace std; class CScene_DebugItemEditor : public CXuiSceneImpl { -#ifdef _DEBUG_MENUS_ENABLED +#ifdef _DEBUG_MENUS_ENABLED public: typedef struct _ItemEditorInput { @@ -18,7 +18,7 @@ public: } ItemEditorInput; private: int m_iPad; - std::shared_ptr m_item; + shared_ptr m_item; Slot *m_slot; AbstractContainerMenu *m_menu; diff --git a/Minecraft.Client/Common/XUI/XUI_InGameHostOptions.cpp b/Minecraft.Client/Common/XUI/XUI_InGameHostOptions.cpp index 53e400a8..f0561745 100644 --- a/Minecraft.Client/Common/XUI/XUI_InGameHostOptions.cpp +++ b/Minecraft.Client/Common/XUI/XUI_InGameHostOptions.cpp @@ -50,7 +50,7 @@ HRESULT CScene_InGameHostOptions::OnInit( XUIMessageInit* pInitData, BOOL& bHand CXuiSceneBase::ShowLogo( m_iPad, FALSE ); - + //SentientManager.RecordMenuShown(m_iPad, eUIScene_CreateWorldMenu, 0); return S_OK; @@ -74,11 +74,11 @@ HRESULT CScene_InGameHostOptions::OnKeyDown(XUIMessageInput* pInputData, BOOL& r // Send update settings packet to server if(hostOptions != app.GetGameHostOption(eGameHostOption_All) ) { - Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr player = pMinecraft->localplayers[m_iPad]; + Minecraft *pMinecraft = Minecraft::GetInstance(); + shared_ptr player = pMinecraft->localplayers[m_iPad]; if(player != NULL && player->connection) { - player->connection->send( std::shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, hostOptions) ) ); + player->connection->send( shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, hostOptions) ) ); } } diff --git a/Minecraft.Client/Common/XUI/XUI_InGameInfo.cpp b/Minecraft.Client/Common/XUI/XUI_InGameInfo.cpp index c9b9f76f..4839013c 100644 --- a/Minecraft.Client/Common/XUI/XUI_InGameInfo.cpp +++ b/Minecraft.Client/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(); - std::shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; + shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; if(!m_isHostPlayer && !localPlayer->isModerator() ) { m_gameOptionsButton.SetEnable(FALSE); @@ -77,7 +77,7 @@ HRESULT CScene_InGameInfo::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) int keyA = -1; ui.SetTooltips( m_iPad, keyA,IDS_TOOLTIPS_BACK,keyX,-1); - + CXuiSceneBase::ShowDarkOverlay( m_iPad, TRUE ); SetTimer( TOOLTIP_TIMERID , INGAME_INFO_TOOLTIP_TIMER ); @@ -179,11 +179,11 @@ HRESULT CScene_InGameInfo::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* ui.AnimateKeyPress(pNotifyPressData->UserIndex, VK_PAD_A); if( hObjPressed == playersList ) - { + { INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId( m_players[ playersList.GetCurSel() ] ); - + Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; + shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; bool isOp = m_isHostPlayer || localPlayer->isModerator(); bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0; @@ -220,7 +220,7 @@ HRESULT CScene_InGameInfo::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* } } else if( hObjPressed == m_gameOptionsButton ) - { + { app.NavigateToScene(pNotifyPressData->UserIndex,eUIScene_InGameHostOptionsMenu); } return S_OK; @@ -330,7 +330,7 @@ HRESULT CScene_InGameInfo::OnGetSourceDataText(XUIMessageGetSourceText *pGetSour } HRESULT hr; - HXUIOBJ hButton, hVisual, hPlayerIcon, hVoiceIcon; + HXUIOBJ hButton, hVisual, hPlayerIcon, hVoiceIcon; hButton = playersList.GetItemControl(pGetSourceTextData->iItem); hr=XuiControlGetVisual(hButton,&hVisual); @@ -415,7 +415,7 @@ HRESULT CScene_InGameInfo::OnGetSourceDataText(XUIMessageGetSourceText *pGetSour XuiElementFindNamedFrame(hVoiceIcon, L"NotSpeaking", &playFrame); } } - + if(playFrame < 0) { XuiElementFindNamedFrame(hVoiceIcon, L"Normal", &playFrame); @@ -465,8 +465,8 @@ void CScene_InGameInfo::updateTooltips() int keyA = -1; Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; - + shared_ptr localPlayer = pMinecraft->localplayers[m_iPad]; + bool isOp = m_isHostPlayer || localPlayer->isModerator(); bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0; bool trust = app.GetGameHostOption(eGameHostOption_TrustPlayers) != 0; @@ -524,12 +524,12 @@ int CScene_InGameInfo::KickPlayerReturned(void *pParam,int iPad,C4JStorage::EMes delete pParam; if(result==C4JStorage::EMessage_ResultAccept) - { + { Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr localPlayer = pMinecraft->localplayers[iPad]; + shared_ptr localPlayer = pMinecraft->localplayers[iPad]; if(localPlayer != NULL && localPlayer->connection) { - localPlayer->connection->send( std::shared_ptr( new KickPlayerPacket(smallId) ) ); + localPlayer->connection->send( shared_ptr( new KickPlayerPacket(smallId) ) ); } } diff --git a/Minecraft.Client/Common/XUI/XUI_InGamePlayerOptions.cpp b/Minecraft.Client/Common/XUI/XUI_InGamePlayerOptions.cpp index 6334574f..156cd092 100644 --- a/Minecraft.Client/Common/XUI/XUI_InGamePlayerOptions.cpp +++ b/Minecraft.Client/Common/XUI/XUI_InGamePlayerOptions.cpp @@ -141,7 +141,7 @@ HRESULT CScene_InGamePlayerOptions::OnInit( XUIMessageInit* pInitData, BOOL& bHa m_checkboxes[eControl_HostInvisible].SetText( app.GetString(IDS_CAN_INVISIBLE) ); m_checkboxes[eControl_HostInvisible].SetCheck(checked); - + bool inCreativeMode = Player::getPlayerGamePrivilege(m_playerPrivileges,Player::ePlayerGamePrivilege_CreativeMode) != 0; if(inCreativeMode) { @@ -191,7 +191,7 @@ HRESULT CScene_InGamePlayerOptions::OnInit( XUIMessageInit* pInitData, BOOL& bHa ui.SetTooltips( m_iPad, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK); - CXuiSceneBase::ShowLogo( m_iPad, FALSE ); + CXuiSceneBase::ShowLogo( m_iPad, FALSE ); g_NetworkManager.RegisterPlayerChangedCallback(m_iPad, &CScene_InGamePlayerOptions::OnPlayerChanged, this); @@ -276,11 +276,11 @@ HRESULT CScene_InGamePlayerOptions::OnKeyDown(XUIMessageInput* pInputData, BOOL& if(originalPrivileges != m_playerPrivileges) { // Send update settings packet to server - Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr player = pMinecraft->localplayers[m_iPad]; + Minecraft *pMinecraft = Minecraft::GetInstance(); + shared_ptr player = pMinecraft->localplayers[m_iPad]; if(player != NULL && player->connection) { - player->connection->send( std::shared_ptr( new PlayerInfoPacket( m_networkSmallId, -1, m_playerPrivileges) ) ); + player->connection->send( shared_ptr( new PlayerInfoPacket( m_networkSmallId, -1, m_playerPrivileges) ) ); } } @@ -334,12 +334,12 @@ int CScene_InGamePlayerOptions::KickPlayerReturned(void *pParam,int iPad,C4JStor delete pParam; if(result==C4JStorage::EMessage_ResultAccept) - { + { Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr localPlayer = pMinecraft->localplayers[iPad]; + shared_ptr localPlayer = pMinecraft->localplayers[iPad]; if(localPlayer != NULL && localPlayer->connection) { - localPlayer->connection->send( std::shared_ptr( new KickPlayerPacket(smallId) ) ); + localPlayer->connection->send( shared_ptr( new KickPlayerPacket(smallId) ) ); } // Fix for #61494 - [CRASH]: TU7: Code: Multiplayer: Title may crash while kicking a player from an online game. @@ -478,22 +478,22 @@ void CScene_InGamePlayerOptions::resetCheatCheckboxes() if (!m_editingSelf) { m_checkboxes[eControl_HostInvisible].SetEnable(isModerator); - m_checkboxes[eControl_HostInvisible].SetCheck( isModerator + m_checkboxes[eControl_HostInvisible].SetCheck( isModerator && (Player::getPlayerGamePrivilege(m_playerPrivileges, Player::ePlayerGamePrivilege_CanToggleInvisible) != 0) ); // NOT CREATIVE MODE. { m_checkboxes[eControl_HostFly].SetEnable(isModerator); - m_checkboxes[eControl_HostFly].SetCheck( isModerator + m_checkboxes[eControl_HostFly].SetCheck( isModerator && (Player::getPlayerGamePrivilege(m_playerPrivileges, Player::ePlayerGamePrivilege_CanToggleFly) != 0) ); m_checkboxes[eControl_HostHunger].SetEnable(isModerator); - m_checkboxes[eControl_HostHunger].SetCheck( isModerator + m_checkboxes[eControl_HostHunger].SetCheck( isModerator && (Player::getPlayerGamePrivilege(m_playerPrivileges, Player::ePlayerGamePrivilege_CanToggleClassicHunger) != 0) ); } m_checkboxes[eControl_CheatTeleport].SetEnable(isModerator); - m_checkboxes[eControl_CheatTeleport].SetCheck( isModerator + m_checkboxes[eControl_CheatTeleport].SetCheck( isModerator && (Player::getPlayerGamePrivilege(m_playerPrivileges, Player::ePlayerGamePrivilege_CanTeleport) != 0) ); } } \ No newline at end of file diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.cpp index ecdc358a..10369d5e 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.cpp @@ -24,7 +24,7 @@ #include "XUI_Ctrl_SlotItem.h" #include "XUI_Ctrl_SlotItemListItem.h" #include "XUI_Scene_AbstractContainer.h" -#ifdef _DEBUG_MENUS_ENABLED +#ifdef _DEBUG_MENUS_ENABLED #include "XUI_DebugItemEditor.h" #endif @@ -44,14 +44,14 @@ void CXuiSceneAbstractContainer::PlatformInitialize(int iPad, int startIndex) // We may have varying depths of controls here, so base off the pointers parent HXUIOBJ parent; - XuiElementGetBounds( m_pointerControl->m_hObj, &fPointerWidth, &fPointerHeight ); + XuiElementGetBounds( m_pointerControl->m_hObj, &fPointerWidth, &fPointerHeight ); XuiElementGetParent( m_pointerControl->m_hObj, &parent ); m_pointerControl->SetShow(TRUE); - XuiElementGetBounds( parent, &fPanelWidth, &fPanelHeight ); + XuiElementGetBounds( parent, &fPanelWidth, &fPanelHeight ); // Get size of pointer m_fPointerImageOffsetX = floor(fPointerWidth/2.0f); m_fPointerImageOffsetY = floor(fPointerHeight/2.0f); - + m_fPanelMinX = 0.0f; m_fPanelMaxX = fPanelWidth; m_fPanelMinY = 0.0f; @@ -97,13 +97,13 @@ void CXuiSceneAbstractContainer::PlatformInitialize(int iPad, int startIndex) m_pointerPos.x = newPointerPos.x; m_pointerPos.y = newPointerPos.y; -#ifdef USE_POINTER_ACCEL +#ifdef USE_POINTER_ACCEL m_fPointerVelX = 0.0f; m_fPointerVelY = 0.0f; m_fPointerAccelX = 0.0f; m_fPointerAccelY = 0.0f; #endif - + // Add timer to poll controller stick input at 60Hz HRESULT timerResult = SetTimer( POINTER_INPUT_TIMER_ID, ( 1000 / 60 ) ); assert( timerResult == S_OK ); @@ -114,7 +114,7 @@ void CXuiSceneAbstractContainer::PlatformInitialize(int iPad, int startIndex) for ( int iSection = m_eFirstSection; iSection < m_eMaxSection; ++iSection ) { ESceneSection eSection = ( ESceneSection )( iSection ); - + if(!IsSectionSlotList(eSection)) continue; // Get dimensions of this section. @@ -153,7 +153,7 @@ int CXuiSceneAbstractContainer::getSectionRows(ESceneSection eSection) return GetSectionSlotList( eSection )->GetRows(); } -// Adding this so we can turn off the pointer text background, since it flickers on then off at the start of a scene where a tutorial popup is +// Adding this so we can turn off the pointer text background, since it flickers on then off at the start of a scene where a tutorial popup is HRESULT CXuiSceneAbstractContainer::OnTransitionStart( XUIMessageTransition *pTransition, BOOL& bHandled ) { if(pTransition->dwTransAction==XUI_TRANSITION_ACTION_DESTROY ) return S_OK; @@ -306,7 +306,7 @@ void CXuiSceneAbstractContainer::GetItemScreenData( ESceneSection eSection, int } } -std::shared_ptr CXuiSceneAbstractContainer::getSlotItem(ESceneSection eSection, int iSlot) +shared_ptr CXuiSceneAbstractContainer::getSlotItem(ESceneSection eSection, int iSlot) { CXuiCtrlSlotItemListItem* pCXuiCtrlSlotItem; GetSectionSlotList( eSection )->GetCXuiCtrlSlotItem( iSlot, &( pCXuiCtrlSlotItem ) ); @@ -327,7 +327,7 @@ HRESULT CXuiSceneAbstractContainer::OnTimer( XUIMessageTimer *pTimer, BOOL& bHan // Update pointer from stick input on timer. if ( pTimer->nId == POINTER_INPUT_TIMER_ID ) { - + onMouseTick(); D3DXVECTOR3 pointerPos; pointerPos.x = m_pointerPos.x; @@ -348,7 +348,7 @@ HRESULT CXuiSceneAbstractContainer::OnTimer( XUIMessageTimer *pTimer, BOOL& bHan hr = handleCustomTimer( pTimer, bHandled ); } return hr; -} +} HRESULT CXuiSceneAbstractContainer::OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL& bHandled) { @@ -443,7 +443,7 @@ void CXuiSceneAbstractContainer::adjustPointerForSafeZone() D3DXVECTOR2 baseSceneOrigin; float baseWidth, baseHeight; if(CXuiSceneBase::GetBaseSceneSafeZone( m_iPad, baseSceneOrigin, baseWidth, baseHeight)) - { + { D3DXMATRIX pointerBackgroundMatrix; XuiElementGetFullXForm( m_hPointerTextBkg, &pointerBackgroundMatrix); diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.h b/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.h index 939dda0b..ca191db5 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.h +++ b/Minecraft.Client/Common/XUI/XUI_Scene_AbstractContainer.h @@ -25,7 +25,7 @@ protected: CXuiCtrlSlotList* m_useRowControl; CXuiCtrlSlotItem* m_pointerControl; CXuiControl m_InventoryText; - + HRESULT OnKeyDown(XUIMessageInput *pInputData, BOOL& bHandled); // Timer function to poll stick input and update pointer position. HRESULT OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled ); @@ -64,7 +64,7 @@ public: HXUIOBJ m_hPointerText; HXUIOBJ m_hPointerTextBkg; HXUIOBJ m_hPointerImg; - + virtual int getSectionColumns(ESceneSection eSection); virtual int getSectionRows(ESceneSection eSection); virtual CXuiControl* GetSectionControl( ESceneSection eSection ) = 0; @@ -77,7 +77,7 @@ public: void setSectionSelectedSlot(ESceneSection eSection, int x, int y); void setFocusToPointer(int iPad); void SetPointerText(const wstring &description, vector &unformattedStrings, bool newSlot); - virtual std::shared_ptr getSlotItem(ESceneSection eSection, int iSlot); + virtual 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/Common/XUI/XUI_Scene_Base.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_Base.cpp index 3f53bfe0..1a679f58 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_Base.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_Base.cpp @@ -215,7 +215,7 @@ void CXuiSceneBase::_TickAllBaseScenes() } else { - std::shared_ptr boss = EnderDragonRenderer::bossInstance; + shared_ptr boss = EnderDragonRenderer::bossInstance; EnderDragonRenderer::bossInstance = nullptr; m_ticksWithNoBoss = 0; diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_Container.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_Container.cpp index 9c556e72..39b836d2 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_Container.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_Container.cpp @@ -30,12 +30,12 @@ HRESULT CXuiSceneContainer::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) Minecraft *pMinecraft = Minecraft::GetInstance(); ContainerScreenInput* initData = (ContainerScreenInput*)pInitData->pvInitData; - + XuiControlSetText(m_ChestText,app.GetString(initData->container->getName())); ContainerMenu* menu = new ContainerMenu( initData->inventory, initData->container ); - std::shared_ptr container = initData->container; + shared_ptr container = initData->container; m_iPad=initData->iPad; m_bSplitscreen=initData->bSplitscreen; @@ -61,7 +61,7 @@ HRESULT CXuiSceneContainer::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) // Adjust the height to show the correct number of container rows float height, width; - this->GetBounds( &width, &height ); + this->GetBounds( &width, &height ); int rowDiff = CONTAINER_DEFAULT_ROWS - rows; //height = height - (rowDiff * ROW_HEIGHT); height = height - (rowDiff * fPointerHeight); @@ -103,7 +103,7 @@ HRESULT CXuiSceneContainer::OnDestroy() #endif // 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst packet loss. - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(Minecraft::GetInstance()->localplayers[m_iPad] != NULL) Minecraft::GetInstance()->localplayers[m_iPad]->closeContainer(); return S_OK; } @@ -156,7 +156,7 @@ void CXuiSceneContainer::InitDataAssociations(int iPad, AbstractContainerMenu *m // TODO Inventory dimensions need defined as constants m_containerControl->SetData( iPad, menu, rows, 9, 0 ); - + CXuiSceneAbstractContainer::InitDataAssociations(iPad, menu, containerSize); } diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.cpp index 90b4b87d..a5dc6584 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.cpp @@ -22,7 +22,7 @@ ////////////////////////////////////////////////////////////////////////// // -// +// // ////////////////////////////////////////////////////////////////////////// CXuiSceneCraftingPanel::CXuiSceneCraftingPanel() @@ -46,10 +46,10 @@ HRESULT CXuiSceneCraftingPanel::OnInit( XUIMessageInit* pInitData, BOOL& bHandle m_iPad=pCraftingPanelData->iPad; m_bSplitscreen=pCraftingPanelData->bSplitscreen; - HRESULT hr = S_OK; + HRESULT hr = S_OK; MapChildControls(); - + if(m_iContainerType==RECIPE_TYPE_2x2) { // TODO Inventory dimensions need defined as constants @@ -74,7 +74,7 @@ HRESULT CXuiSceneCraftingPanel::OnInit( XUIMessageInit* pInitData, BOOL& bHandle // if we are in splitscreen, then we need to figure out if we want to move this scene if(m_bSplitscreen) { - app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); + app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); } XuiElementSetShow(m_hGrid,TRUE); @@ -84,7 +84,7 @@ HRESULT CXuiSceneCraftingPanel::OnInit( XUIMessageInit* pInitData, BOOL& bHandle if(m_iContainerType==RECIPE_TYPE_3x3) { m_pCursors=m_pHSlotsCraftingTableCursors; - + m_iIngredientsMaxSlotC = m_iIngredients3x3SlotC; for(int i=0;idwTransAction==XUI_TRANSITION_ACTION_DESTROY ) + // are we being destroyed? If so, don't do anything + if(pTransData->dwTransAction==XUI_TRANSITION_ACTION_DESTROY ) { return S_OK; } @@ -222,7 +222,7 @@ HRESULT CXuiSceneCraftingPanel::OnTransitionEnd( XUIMessageTransition *pTransDat // Display the tooltips ui.SetTooltips(m_iPad, IDS_TOOLTIPS_CREATE,IDS_TOOLTIPS_EXIT, IDS_TOOLTIPS_SHOW_INVENTORY,-1,-1,-1,-2, IDS_TOOLTIPS_CHANGE_GROUP); - CXuiSceneBase::EnableTooltip(m_iPad, BUTTON_TOOLTIP_A, FALSE ); + CXuiSceneBase::EnableTooltip(m_iPad, BUTTON_TOOLTIP_A, FALSE ); // Check which recipes are available with the resources we have CheckRecipesAvailable(); @@ -241,7 +241,7 @@ HRESULT CXuiSceneCraftingPanel::OnCustomMessage_InventoryUpdated() { // Display the tooltips ui.SetTooltips(m_iPad, IDS_TOOLTIPS_CREATE,IDS_TOOLTIPS_EXIT, IDS_TOOLTIPS_SHOW_INVENTORY,-1,-1,-1,-2, IDS_TOOLTIPS_CHANGE_GROUP); - CXuiSceneBase::EnableTooltip(m_iPad, BUTTON_TOOLTIP_A, FALSE ); + CXuiSceneBase::EnableTooltip(m_iPad, BUTTON_TOOLTIP_A, FALSE ); // Check which recipes are available with the resources we have CheckRecipesAvailable(); @@ -359,7 +359,7 @@ HRESULT CXuiSceneCraftingPanel::OnDestroy() } #endif - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(Minecraft::GetInstance()->localplayers[m_iPad] != NULL) Minecraft::GetInstance()->localplayers[m_iPad]->closeContainer(); return S_OK; @@ -417,21 +417,21 @@ void CXuiSceneCraftingPanel::hideAllIngredientsSlots() } } -void CXuiSceneCraftingPanel::setCraftHSlotItem(int iPad, int iIndex, std::shared_ptr item, unsigned int uiAlpha) +void CXuiSceneCraftingPanel::setCraftHSlotItem(int iPad, int iIndex, 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, std::shared_ptr item, unsigned int uiAlpha) +void CXuiSceneCraftingPanel::setCraftVSlotItem(int iPad, int iIndex, 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, std::shared_ptr item) +void CXuiSceneCraftingPanel::setCraftingOutputSlotItem(int iPad, 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, std::shared_ptr item) +void CXuiSceneCraftingPanel::setIngredientSlotItem(int iPad, int index, 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, std::shared_ptr item) +void CXuiSceneCraftingPanel::setIngredientDescriptionItem(int iPad, int index, shared_ptr item) { m_pCraftIngredientDescA[index]->SetIcon(iPad, item->id,item->getAuxValue(),item->GetCount(),8,31,TRUE,item->isFoil(),FALSE); } @@ -524,7 +524,7 @@ void CXuiSceneCraftingPanel::UpdateMultiPanel() // turn off the inventory XuiElementSetShow(m_hGridInventory,FALSE); XuiElementSetShow(m_DescriptionText,TRUE); - XuiElementSetShow(m_InventoryText,FALSE); + XuiElementSetShow(m_InventoryText,FALSE); break; case DISPLAY_INGREDIENTS: // turn off all the descriptions @@ -544,7 +544,7 @@ void CXuiSceneCraftingPanel::UpdateMultiPanel() { XuiControlSetText(m_InventoryText,app.GetString(IDS_INGREDIENTS)); XuiElementSetShow(m_InventoryText,TRUE); - } + } break; } } diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.h b/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.h index df2090ec..0c6e22ff 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.h +++ b/Minecraft.Client/Common/XUI/XUI_Scene_CraftingPanel.h @@ -3,7 +3,7 @@ using namespace std; #include "../media/xuiscene_craftingpanel_2x2.h" #include "XUI_Ctrl_MinecraftSlot.h" -#include "..\..\..\Minecraft.World\Recipy.h" +#include "..\..\..\Minecraft.World\Recipy.h" #include "XUI_Ctrl_CraftIngredientSlot.h" #include "..\..\..\Minecraft.World\Item.h" #include "XUI_CustomMessages.h" @@ -137,7 +137,7 @@ public: MAP_CONTROL(IDC_CraftingOutputRed,m_hCraftOutput) END_MAP_CHILD_CONTROLS() - + MAP_CONTROL(IDC_InventoryGrid, m_hGridInventory) BEGIN_MAP_CHILD_CONTROLS(m_hGridInventory) MAP_OVERRIDE(IDC_Inventory, m_inventoryControl) @@ -182,13 +182,13 @@ protected: virtual void hideAllHSlots(); virtual void hideAllVSlots(); virtual void hideAllIngredientsSlots(); - 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 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 setCraftingOutputSlotRedBox(bool show); - virtual void setIngredientSlotItem(int iPad, int index, std::shared_ptr item); + virtual void setIngredientSlotItem(int iPad, int index, shared_ptr item); virtual void setIngredientSlotRedBox(int index, bool show); - virtual void setIngredientDescriptionItem(int iPad, int index, std::shared_ptr item); + virtual void setIngredientDescriptionItem(int iPad, int index, shared_ptr item); virtual void setIngredientDescriptionRedBox(int index, bool show); virtual void setIngredientDescriptionText(int index, LPCWSTR text); virtual void setShowCraftHSlot(int iIndex, bool show); @@ -200,6 +200,6 @@ protected: virtual void scrollDescriptionDown(); virtual void updateHighlightAndScrollPositions(); virtual void updateVSlotPositions(int iSlots, int i); - + virtual void UpdateMultiPanel(); }; diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_Inventory.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_Inventory.cpp index c715bba5..04e77e5e 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_Inventory.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_Inventory.cpp @@ -33,7 +33,7 @@ HRESULT CXuiSceneInventory::OnInit( XUIMessageInit *pInitData, BOOL &bHandled ) { if(m_bSplitscreen) { - app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); + app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); } } @@ -57,7 +57,7 @@ HRESULT CXuiSceneInventory::OnInit( XUIMessageInit *pInitData, BOOL &bHandled ) initData->player->awardStat(GenericStats::openInventory(), GenericStats::param_noArgs()); CXuiSceneAbstractContainer::Initialize( initData->iPad, menu, false, InventoryMenu::INV_SLOT_START, eSectionInventoryUsing, eSectionInventoryMax, initData->bNavigateBack ); - + delete initData; float fWidth; @@ -86,7 +86,7 @@ HRESULT CXuiSceneInventory::OnDestroy() } // 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst packet loss. - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(Minecraft::GetInstance()->localplayers[m_iPad] != NULL) Minecraft::GetInstance()->localplayers[m_iPad]->closeContainer(); return S_OK; } @@ -154,7 +154,7 @@ void CXuiSceneInventory::updateEffectsDisplay() { // Update with the current effects Minecraft *pMinecraft = Minecraft::GetInstance(); - std::shared_ptr player = pMinecraft->localplayers[m_iPad]; + shared_ptr player = pMinecraft->localplayers[m_iPad]; if(player == NULL) return; @@ -185,7 +185,7 @@ void CXuiSceneInventory::updateEffectsDisplay() if(i > 0) position.y -= fNextEffectYOffset; // Stack from the bottom m_hEffectDisplayA[i]->SetPosition(&position); - + MobEffectInstance *effect = *it; MobEffect *mobEffect = MobEffect::effects[effect->getId()]; diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_Inventory_Creative.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_Inventory_Creative.cpp index bb5319a3..0793fc9e 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_Inventory_Creative.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_Inventory_Creative.cpp @@ -43,7 +43,7 @@ HRESULT CXuiSceneInventoryCreative::OnInit( XUIMessageInit *pInitData, BOOL &bHa { if(m_bSplitscreen) { - app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); + app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); } } @@ -60,12 +60,12 @@ HRESULT CXuiSceneInventoryCreative::OnInit( XUIMessageInit *pInitData, BOOL &bHa initData->player->awardStat(GenericStats::openInventory(), GenericStats::param_noArgs()); // 4J JEV - Item Picker Menu - std::shared_ptr creativeContainer = std::shared_ptr(new SimpleContainer( 0, TabSpec::MAX_SIZE + 9 )); + shared_ptr creativeContainer = shared_ptr(new SimpleContainer( 0, TabSpec::MAX_SIZE + 9 )); itemPickerMenu = new ItemPickerMenu(creativeContainer, initData->player->inventory); - + // 4J JEV - InitDataAssociations. m_containerControl->SetData( initData->iPad, itemPickerMenu, TabSpec::rows, TabSpec::columns, 0, TabSpec::MAX_SIZE ); - m_useRowControl->SetData( initData->iPad, itemPickerMenu, 1, 9, TabSpec::MAX_SIZE, TabSpec::MAX_SIZE + 9 ); + m_useRowControl->SetData( initData->iPad, itemPickerMenu, 1, 9, TabSpec::MAX_SIZE, TabSpec::MAX_SIZE + 9 ); m_pointerControl->SetUserIndex(m_pointerControl->m_hObj, initData->iPad); // Initialize superclass. @@ -79,7 +79,7 @@ HRESULT CXuiSceneInventoryCreative::OnInit( XUIMessageInit *pInitData, BOOL &bHa m_fPointerMinY += containerPos.y; // 4J JEV - Settup Tabs - for (int i = 0; i < eCreativeInventoryTab_COUNT; i++) + for (int i = 0; i < eCreativeInventoryTab_COUNT; i++) { m_hTabGroupA[i].SetShow(FALSE); } @@ -103,7 +103,7 @@ HRESULT CXuiSceneInventoryCreative::OnDestroy() #endif // 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst packet loss. - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(Minecraft::GetInstance()->localplayers[m_iPad] != NULL) Minecraft::GetInstance()->localplayers[m_iPad]->closeContainer(); return S_OK; } @@ -115,8 +115,8 @@ HRESULT CXuiSceneInventoryCreative::OnDestroy() ////////////////////////////////////////////////////////////////////////// HRESULT CXuiSceneInventoryCreative::OnTransitionEnd( XUIMessageTransition *pTransData, BOOL& bHandled ) { - // are we being destroyed? If so, don't do anything - if(pTransData->dwTransAction==XUI_TRANSITION_ACTION_DESTROY ) + // are we being destroyed? If so, don't do anything + if(pTransData->dwTransAction==XUI_TRANSITION_ACTION_DESTROY ) { return S_OK; } @@ -199,7 +199,7 @@ void CXuiSceneInventoryCreative::updateScrollCurrentPage(int currentPage, int pa m_scrollUp.SetShow(currentPage > 1); m_scrollUp.PlayOptionalVisual(L"ScrollMore",L"EndScrollMore"); - + m_scrollDown.SetShow(currentPage < pageCount); m_scrollDown.PlayOptionalVisual(L"ScrollMore",L"EndScrollMore"); diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_Trading.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_Trading.cpp index b4b936c2..fec13460 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_Trading.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_Trading.cpp @@ -19,11 +19,11 @@ HRESULT CXuiSceneTrading::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) { MapChildControls(); - + //XuiControlSetText(m_villagerText,app.GetString(IDS_VILLAGER)); XuiControlSetText(m_inventoryLabel,app.GetString(IDS_INVENTORY)); XuiControlSetText(m_requiredLabel,app.GetString(IDS_REQUIRED_ITEMS_FOR_TRADE)); - + Minecraft *pMinecraft = Minecraft::GetInstance(); @@ -36,7 +36,7 @@ HRESULT CXuiSceneTrading::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) if(m_bSplitscreen) { - app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); + app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); } if( pMinecraft->localgameModes[m_iPad] != NULL ) @@ -65,7 +65,7 @@ HRESULT CXuiSceneTrading::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) // store the slot 0 highlight position m_tradingSelector.GetPosition(&m_vSelectorInitialPos); - + //app.SetRichPresenceContextValue(m_iPad,CONTEXT_GAME_STATE_FORGING); XuiSetTimer(m_hObj,TRADING_UPDATE_TIMER_ID,TRADING_UPDATE_TIMER_TIME); @@ -86,7 +86,7 @@ HRESULT CXuiSceneTrading::OnDestroy() } // 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst packet loss. - // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) + // We need to make sure that we call closeContainer() anytime this menu is closed, even if it is forced to close by some other reason (like the player dying) if(Minecraft::GetInstance()->localplayers[m_iPad] != NULL) Minecraft::GetInstance()->localplayers[m_iPad]->closeContainer(); return S_OK; } @@ -245,17 +245,17 @@ void CXuiSceneTrading::setTradeRedBox(int index, bool show) m_tradeHSlots[index]->SetRedBox(show?TRUE:FALSE); } -void CXuiSceneTrading::setRequest1Item(std::shared_ptr item) +void CXuiSceneTrading::setRequest1Item(shared_ptr item) { m_request1Control->SetIcon(getPad(), item, 12, 31, true); } -void CXuiSceneTrading::setRequest2Item(std::shared_ptr item) +void CXuiSceneTrading::setRequest2Item(shared_ptr item) { m_request2Control->SetIcon(getPad(), item, 12, 31, true); } -void CXuiSceneTrading::setTradeItem(int index, std::shared_ptr item) +void CXuiSceneTrading::setTradeItem(int index, shared_ptr item) { m_tradeHSlots[index]->SetIcon(getPad(), item, 12, 31, true); } @@ -299,7 +299,7 @@ void CXuiSceneTrading::setOfferDescription(const wstring &name, vector XuiElementSetBounds(m_hOfferInfoText,xuiRect.right+4.0f+4.0f,xuiRect.bottom+4.0f+4.0f); // edge graphics are 8 pixels, text is centred m_offerInfoControl.SetShow(TRUE); - + D3DXVECTOR3 highlightPos, offerInfoPos; float highlightWidth, highlightHeight; m_tradingSelector.GetPosition(&highlightPos); diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_Trading.h b/Minecraft.Client/Common/XUI/XUI_Scene_Trading.h index 5ca08b83..72194cbc 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_Trading.h +++ b/Minecraft.Client/Common/XUI/XUI_Scene_Trading.h @@ -83,7 +83,7 @@ protected: MAP_OVERRIDE(IDC_Inventory, m_inventoryControl) MAP_OVERRIDE(IDC_UseRow, m_useRowControl) END_MAP_CHILD_CONTROLS() - END_MAP_CHILD_CONTROLS() + END_MAP_CHILD_CONTROLS() END_CONTROL_MAP() HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled ); @@ -120,9 +120,9 @@ protected: virtual void setRequest2RedBox(bool show); virtual void setTradeRedBox(int index, bool show); - 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 setRequest1Item(shared_ptr item); + virtual void setRequest2Item(shared_ptr item); + virtual void setTradeItem(int index, shared_ptr item); + virtual void setOfferDescription(const wstring &name, vector &unformattedStrings); }; \ No newline at end of file diff --git a/Minecraft.Client/Common/XUI/XUI_SignEntry.cpp b/Minecraft.Client/Common/XUI/XUI_SignEntry.cpp index 8fb6678c..378ac147 100644 --- a/Minecraft.Client/Common/XUI/XUI_SignEntry.cpp +++ b/Minecraft.Client/Common/XUI/XUI_SignEntry.cpp @@ -11,13 +11,13 @@ HRESULT CScene_SignEntry::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) { MapChildControls(); - + XuiControlSetText(m_ButtonDone,app.GetString(IDS_DONE)); XuiControlSetText(m_labelEditSign,app.GetString(IDS_EDIT_SIGN_MESSAGE)); SignEntryScreenInput* initData = (SignEntryScreenInput*)pInitData->pvInitData; m_sign = initData->sign; - + CXuiSceneBase::ShowDarkOverlay( initData->iPad, TRUE ); CXuiSceneBase::ShowLogo( initData->iPad, FALSE); ui.SetTooltips( initData->iPad, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK); @@ -65,7 +65,7 @@ HRESULT CScene_SignEntry::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* p for(int i=0;i<4;i++) { wstring temp=m_signRows[i].GetText(); - m_sign->SetMessage(i,temp); + m_sign->SetMessage(i,temp); } m_sign->setChanged(); @@ -74,10 +74,10 @@ HRESULT CScene_SignEntry::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* p // need to send the new data if (pMinecraft->level->isClientSide) { - std::shared_ptr player = pMinecraft->localplayers[pNotifyPressData->UserIndex]; + shared_ptr player = pMinecraft->localplayers[pNotifyPressData->UserIndex]; if(player != NULL && player->connection && player->connection->isStarted()) { - 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()) ) ); + 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()) ) ); } } app.CloseXuiScenes(pNotifyPressData->UserIndex); @@ -103,7 +103,7 @@ HRESULT CScene_SignEntry::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled app.CloseXuiScenes(pInputData->UserIndex); rfHandled = TRUE; - + CXuiSceneBase::PlayUISFX(eSFX_Back); break; } diff --git a/Minecraft.Client/Common/XUI/XUI_SignEntry.h b/Minecraft.Client/Common/XUI/XUI_SignEntry.h index c8d5aae2..4f8c44d2 100644 --- a/Minecraft.Client/Common/XUI/XUI_SignEntry.h +++ b/Minecraft.Client/Common/XUI/XUI_SignEntry.h @@ -43,7 +43,7 @@ public: XUI_IMPLEMENT_CLASS( CScene_SignEntry, L"CScene_SignEntry", XUI_CLASS_SCENE ) private: - std::shared_ptr m_sign; + shared_ptr m_sign; D3DXVECTOR3 m_OriginalPosition; }; \ No newline at end of file diff --git a/Minecraft.Client/Common/XUI/XUI_Teleport.cpp b/Minecraft.Client/Common/XUI/XUI_Teleport.cpp index 90b4b5fa..1d6ac3bf 100644 --- a/Minecraft.Client/Common/XUI/XUI_Teleport.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Teleport.cpp @@ -61,7 +61,7 @@ HRESULT CScene_Teleport::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) g_NetworkManager.RegisterPlayerChangedCallback(m_iPad, &CScene_Teleport::OnPlayerChanged, this); ui.SetTooltips( m_iPad, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK); - + CXuiSceneBase::ShowDarkOverlay( m_iPad, TRUE ); return S_OK; @@ -104,11 +104,11 @@ HRESULT CScene_Teleport::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pN ui.AnimateKeyPress(pNotifyPressData->UserIndex, VK_PAD_A); if( hObjPressed == playersList ) - { + { INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId( m_players[ playersList.GetCurSel() ] ); INetworkPlayer *thisPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(m_iPad); - - std::shared_ptr packet; + + shared_ptr packet; if(m_teleportToPlayer) { packet = TeleportCommand::preparePacket(thisPlayer->GetUID(),selectedPlayer->GetUID()); @@ -186,7 +186,7 @@ HRESULT CScene_Teleport::OnGetSourceDataText(XUIMessageGetSourceText *pGetSource } HRESULT hr; - HXUIOBJ hButton, hVisual, hPlayerIcon, hVoiceIcon; + HXUIOBJ hButton, hVisual, hPlayerIcon, hVoiceIcon; hButton = playersList.GetItemControl(pGetSourceTextData->iItem); hr=XuiControlGetVisual(hButton,&hVisual); @@ -271,7 +271,7 @@ HRESULT CScene_Teleport::OnGetSourceDataText(XUIMessageGetSourceText *pGetSource XuiElementFindNamedFrame(hVoiceIcon, L"NotSpeaking", &playFrame); } } - + if(playFrame < 0) { XuiElementFindNamedFrame(hVoiceIcon, L"Normal", &playFrame); diff --git a/Minecraft.Client/Common/XUI/XUI_TextEntry.cpp b/Minecraft.Client/Common/XUI/XUI_TextEntry.cpp index 19c2b34e..8934350d 100644 --- a/Minecraft.Client/Common/XUI/XUI_TextEntry.cpp +++ b/Minecraft.Client/Common/XUI/XUI_TextEntry.cpp @@ -53,7 +53,7 @@ HRESULT CScene_TextEntry::OnNotifyValueChanged (HXUIOBJ hObjSource, XUINotifyVal if(pValueChangedData->nValue==10) { LPCWSTR pText = m_EditText.GetText(); - + if(pText) { wstring wText = pText; @@ -61,7 +61,7 @@ HRESULT CScene_TextEntry::OnNotifyValueChanged (HXUIOBJ hObjSource, XUINotifyVal } app.NavigateBack(m_iPad); - rfHandled = TRUE; + rfHandled = TRUE; } return S_OK; @@ -86,7 +86,7 @@ HRESULT CScene_TextEntry::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled app.NavigateBack(m_iPad); rfHandled = TRUE; - } + } break; case VK_PAD_B: @@ -125,7 +125,7 @@ HRESULT CScene_TextEntry::InterpretString(wstring &wsText) case eCommand_Teleport: { int x,z; - + #ifdef __PS3__ // 4J Stu - The Xbox version uses swscanf_s which isn't available in GCC. swscanf(wsText.c_str(), L"%40s%c%d%c%d", wchCommand,wchSep,&x,wchSep,&z); @@ -146,9 +146,9 @@ HRESULT CScene_TextEntry::InterpretString(wstring &wsText) } break; case eCommand_Give: - { + { int iItem,iCount; - + #ifdef __PS3__ // 4J Stu - The Xbox version uses swscanf_s which isn't available in GCC. swscanf(wsText.c_str(), L"%40s%c%d%c%d", wchCommand,wchSep,&iItem,wchSep,&iCount); @@ -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(); // std::shared_ptr(new ItemInstance( iItem, 1, 0 )) ); + pMinecraft->localplayers[m_iPad]->drop(); // shared_ptr(new ItemInstance( iItem, 1, 0 )) ); } break; diff --git a/Minecraft.Client/Common/XUI/XUI_TutorialPopup.cpp b/Minecraft.Client/Common/XUI/XUI_TutorialPopup.cpp index bea3e055..98951d81 100644 --- a/Minecraft.Client/Common/XUI/XUI_TutorialPopup.cpp +++ b/Minecraft.Client/Common/XUI/XUI_TutorialPopup.cpp @@ -23,7 +23,7 @@ HRESULT CScene_TutorialPopup::OnInit( XUIMessageInit* pInitData, BOOL& bHandled // if we are in splitscreen, then we need to figure out if we want to move this scene if(app.GetLocalPlayerCount()>1) { - app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); + app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad); } m_textFontSize = _fromString( m_fontSizeControl.GetText() ); @@ -143,7 +143,7 @@ void CScene_TutorialPopup::UpdateInteractScenePosition(bool visible) } HRESULT CScene_TutorialPopup::_SetDescription(CXuiScene *interactScene, LPCWSTR desc, LPCWSTR title, bool allowFade, bool isReminder) -{ +{ HRESULT hr = S_OK; m_interactScene = interactScene; if( interactScene != m_lastInteractSceneMoved ) m_lastInteractSceneMoved = NULL; @@ -289,7 +289,7 @@ wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWS if( icon != TUTORIAL_NO_ICON ) { bool itemIsFoil = false; - itemIsFoil = (std::shared_ptr(new ItemInstance(icon,1,iAuxVal)))->isFoil(); + itemIsFoil = (shared_ptr(new ItemInstance(icon,1,iAuxVal)))->isFoil(); if(!itemIsFoil) itemIsFoil = isFoil; m_pCraftingPic->SetIcon(m_iPad, icon,iAuxVal,1,10,31,false,itemIsFoil); @@ -322,7 +322,7 @@ wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWS } bool itemIsFoil = false; - itemIsFoil = (std::shared_ptr(new ItemInstance(iconId,1,iAuxVal)))->isFoil(); + itemIsFoil = (shared_ptr(new ItemInstance(iconId,1,iAuxVal)))->isFoil(); if(!itemIsFoil) itemIsFoil = isFoil; m_pCraftingPic->SetIcon(m_iPad, iconId,iAuxVal,1,10,31,false,itemIsFoil); @@ -330,7 +330,7 @@ wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWS temp.replace(iconTagStartPos, iconEndPos - iconTagStartPos + closeTag.length(), L""); } } - + // remove any icon text else if(temp.find(L"{*CraftingTableIcon*}")!=wstring::npos) { @@ -410,7 +410,7 @@ wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWS m_pCraftingPic->SetIcon(m_iPad, 0,0,0,0,0,false,false,FALSE); } } - + BOOL iconShowAtEnd = m_pCraftingPic->IsShown(); if(iconShowAtStart != iconShowAtEnd) { @@ -432,7 +432,7 @@ wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWS } m_description.SetBounds(fDescWidth, fDescHeight); } - + return temp; } @@ -463,7 +463,7 @@ wstring CScene_TutorialPopup::_SetImage(wstring &desc) // hide the icon slot m_image.SetShow( FALSE ); } - + BOOL imageShowAtEnd = m_image.IsShown(); if(imageShowAtStart != imageShowAtEnd) { @@ -485,7 +485,7 @@ wstring CScene_TutorialPopup::_SetImage(wstring &desc) } m_description.SetBounds(fDescWidth, fDescHeight); } - + return desc; } diff --git a/Minecraft.Client/ConnectScreen.cpp b/Minecraft.Client/ConnectScreen.cpp index 3f93a5b0..2cf005b6 100644 --- a/Minecraft.Client/ConnectScreen.cpp +++ b/Minecraft.Client/ConnectScreen.cpp @@ -17,7 +17,7 @@ ConnectScreen::ConnectScreen(Minecraft *minecraft, const wstring& ip, int port) // 4J - removed from separate thread, but need to investigate what we actually need here connection = new ClientConnection(minecraft, ip, port); if (aborted) return; - connection->send( std::shared_ptr( new PreLoginPacket(minecraft->user->name) ) ); + connection->send( shared_ptr( new PreLoginPacket(minecraft->user->name) ) ); #else new Thread() { diff --git a/Minecraft.Client/ContainerScreen.cpp b/Minecraft.Client/ContainerScreen.cpp index 0cee4bf5..17b45406 100644 --- a/Minecraft.Client/ContainerScreen.cpp +++ b/Minecraft.Client/ContainerScreen.cpp @@ -3,7 +3,7 @@ #include "Textures.h" #include "..\Minecraft.World\net.minecraft.world.inventory.h" -ContainerScreen::ContainerScreen(std::shared_ptr inventory, std::shared_ptr container) : AbstractContainerScreen(new ContainerMenu(inventory, container)) +ContainerScreen::ContainerScreen(shared_ptr inventory, shared_ptr container) : AbstractContainerScreen(new ContainerMenu(inventory, container)) { this->inventory = inventory; this->container = container; diff --git a/Minecraft.Client/ContainerScreen.h b/Minecraft.Client/ContainerScreen.h index 314026ae..38806c1e 100644 --- a/Minecraft.Client/ContainerScreen.h +++ b/Minecraft.Client/ContainerScreen.h @@ -5,13 +5,13 @@ class Container; class ContainerScreen : public AbstractContainerScreen { private: - std::shared_ptr inventory; - std::shared_ptr container; + shared_ptr inventory; + shared_ptr container; int containerRows; public: - ContainerScreen(std::shared_ptrinventory, std::shared_ptrcontainer); + ContainerScreen(shared_ptrinventory, shared_ptrcontainer); protected: virtual void renderLabels(); diff --git a/Minecraft.Client/CowModel.h b/Minecraft.Client/CowModel.h index b3ffba6a..617bb94f 100644 --- a/Minecraft.Client/CowModel.h +++ b/Minecraft.Client/CowModel.h @@ -1,10 +1,10 @@ #pragma once #include "QuadrupedModel.h" -class CowModel : public QuadrupedModel +class CowModel : public QuadrupedModel { public: CowModel(); -// virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); +// virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); // virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale); }; diff --git a/Minecraft.Client/CowRenderer.cpp b/Minecraft.Client/CowRenderer.cpp index 57b0bbb4..c4eaf261 100644 --- a/Minecraft.Client/CowRenderer.cpp +++ b/Minecraft.Client/CowRenderer.cpp @@ -5,7 +5,7 @@ CowRenderer::CowRenderer(Model *model, float shadow) : MobRenderer(model, shadow { } -void CowRenderer::render(std::shared_ptr _mob, double x, double y, double z, float rot, float a) +void CowRenderer::render(shared_ptr _mob, double x, double y, double z, float rot, float a) { MobRenderer::render(_mob, x, y, z, rot, a); } \ No newline at end of file diff --git a/Minecraft.Client/CowRenderer.h b/Minecraft.Client/CowRenderer.h index 0dabaf29..e99e1c12 100644 --- a/Minecraft.Client/CowRenderer.h +++ b/Minecraft.Client/CowRenderer.h @@ -5,5 +5,5 @@ class CowRenderer : public MobRenderer { public: CowRenderer(Model *model, float shadow); - virtual void render(std::shared_ptr _mob, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr _mob, double x, double y, double z, float rot, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/CraftingScreen.cpp b/Minecraft.Client/CraftingScreen.cpp index edbc7ec5..c28df18d 100644 --- a/Minecraft.Client/CraftingScreen.cpp +++ b/Minecraft.Client/CraftingScreen.cpp @@ -4,7 +4,7 @@ #include "MultiplayerLocalPlayer.h" #include "..\Minecraft.World\net.minecraft.world.inventory.h" -CraftingScreen::CraftingScreen(std::shared_ptr inventory, Level *level, int x, int y, int z) : AbstractContainerScreen(new CraftingMenu(inventory, level, x, y, z)) +CraftingScreen::CraftingScreen(shared_ptr inventory, Level *level, int x, int y, int z) : AbstractContainerScreen(new CraftingMenu(inventory, level, x, y, z)) { } diff --git a/Minecraft.Client/CraftingScreen.h b/Minecraft.Client/CraftingScreen.h index 42b2623a..2de1681f 100644 --- a/Minecraft.Client/CraftingScreen.h +++ b/Minecraft.Client/CraftingScreen.h @@ -6,7 +6,7 @@ class Level; class CraftingScreen : public AbstractContainerScreen { public: - CraftingScreen(std::shared_ptr inventory, Level *level, int x, int y, int z); + CraftingScreen(shared_ptr inventory, Level *level, int x, int y, int z); virtual void removed(); protected: virtual void renderLabels(); diff --git a/Minecraft.Client/CreativeMode.cpp b/Minecraft.Client/CreativeMode.cpp index 78183c81..48342ebc 100644 --- a/Minecraft.Client/CreativeMode.cpp +++ b/Minecraft.Client/CreativeMode.cpp @@ -19,7 +19,7 @@ void CreativeMode::init() // initPlayer(); } -void CreativeMode::enableCreativeForPlayer(std::shared_ptr player) +void CreativeMode::enableCreativeForPlayer(shared_ptr player) { // please check ServerPlayerGameMode.java if you change these player->abilities.mayfly = true; @@ -27,7 +27,7 @@ void CreativeMode::enableCreativeForPlayer(std::shared_ptr player) player->abilities.invulnerable = true; } -void CreativeMode::disableCreativeForPlayer(std::shared_ptr player) +void CreativeMode::disableCreativeForPlayer(shared_ptr player) { player->abilities.mayfly = false; player->abilities.flying = false; @@ -35,7 +35,7 @@ void CreativeMode::disableCreativeForPlayer(std::shared_ptr player) player->abilities.invulnerable = false; } -void CreativeMode::adjustPlayer(std::shared_ptr player) +void CreativeMode::adjustPlayer(shared_ptr player) { enableCreativeForPlayer(player); @@ -43,7 +43,7 @@ void CreativeMode::adjustPlayer(std::shared_ptr player) { if (player->inventory->items[i] == NULL) { - player->inventory->items[i] = std::shared_ptr( new ItemInstance(User::allowedTiles[i]) ); + player->inventory->items[i] = shared_ptr( new ItemInstance(User::allowedTiles[i]) ); } else { @@ -61,7 +61,7 @@ void CreativeMode::creativeDestroyBlock(Minecraft *minecraft, GameMode *gameMode } } -bool CreativeMode::useItemOn(std::shared_ptr player, Level *level, std::shared_ptr item, int x, int y, int z, int face, bool bTestUseOnOnly, bool *pbUsedItem) +bool CreativeMode::useItemOn(shared_ptr player, Level *level, shared_ptr item, int x, int y, int z, int face, bool bTestUseOnOnly, bool *pbUsedItem) { int t = level->getTile(x, y, z); if (t > 0) diff --git a/Minecraft.Client/CreativeMode.h b/Minecraft.Client/CreativeMode.h index 9732cfd0..10b27a53 100644 --- a/Minecraft.Client/CreativeMode.h +++ b/Minecraft.Client/CreativeMode.h @@ -9,11 +9,11 @@ private: public: CreativeMode(Minecraft *minecraft); virtual void init(); - static void enableCreativeForPlayer(std::shared_ptr player); - static void disableCreativeForPlayer(std::shared_ptr player); - virtual void adjustPlayer(std::shared_ptr player); + static void enableCreativeForPlayer(shared_ptr player); + static void disableCreativeForPlayer(shared_ptr player); + virtual void adjustPlayer(shared_ptr player); static void creativeDestroyBlock(Minecraft *minecraft, GameMode *gameMode, int x, int y, int z, int face); - virtual bool useItemOn(std::shared_ptr player, Level *level, std::shared_ptr item, int x, int y, int z, int face, bool bTestUseOnOnly=false, bool *pbUsedItem = NULL); + virtual bool useItemOn(shared_ptr player, Level *level, shared_ptr item, int x, int y, int z, int face, bool bTestUseOnOnly=false, bool *pbUsedItem = NULL); virtual void startDestroyBlock(int x, int y, int z, int face); virtual void continueDestroyBlock(int x, int y, int z, int face); virtual void stopDestroyBlock(); diff --git a/Minecraft.Client/CreeperModel.cpp b/Minecraft.Client/CreeperModel.cpp index 6c2737d3..51237ce6 100644 --- a/Minecraft.Client/CreeperModel.cpp +++ b/Minecraft.Client/CreeperModel.cpp @@ -56,7 +56,7 @@ CreeperModel::CreeperModel(float g) : Model() _init(g); } -void CreeperModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void CreeperModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/CreeperModel.h b/Minecraft.Client/CreeperModel.h index 0c4e9448..06231d0e 100644 --- a/Minecraft.Client/CreeperModel.h +++ b/Minecraft.Client/CreeperModel.h @@ -9,6 +9,6 @@ public: void _init(float g); // 4J added CreeperModel(); CreeperModel(float g); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); }; \ No newline at end of file diff --git a/Minecraft.Client/CreeperRenderer.cpp b/Minecraft.Client/CreeperRenderer.cpp index 4afa22a8..483d14e3 100644 --- a/Minecraft.Client/CreeperRenderer.cpp +++ b/Minecraft.Client/CreeperRenderer.cpp @@ -9,9 +9,9 @@ CreeperRenderer::CreeperRenderer() : MobRenderer( new CreeperModel(), 0.5f ) armorModel = new CreeperModel(2); } -void CreeperRenderer::scale(std::shared_ptr mob, float a) +void CreeperRenderer::scale(shared_ptr mob, float a) { - std::shared_ptr creeper = dynamic_pointer_cast(mob); + shared_ptr creeper = dynamic_pointer_cast(mob); float g = creeper->getSwelling(a); @@ -25,9 +25,9 @@ void CreeperRenderer::scale(std::shared_ptr mob, float a) glScalef(s, hs, s); } -int CreeperRenderer::getOverlayColor(std::shared_ptr mob, float br, float a) +int CreeperRenderer::getOverlayColor(shared_ptr mob, float br, float a) { - std::shared_ptr creeper = dynamic_pointer_cast(mob); + shared_ptr creeper = dynamic_pointer_cast(mob); float step = creeper->getSwelling(a); @@ -44,10 +44,10 @@ int CreeperRenderer::getOverlayColor(std::shared_ptr mob, float br, float a return (_a << 24) | (r << 16) | (g << 8) | b; } -int CreeperRenderer::prepareArmor(std::shared_ptr _mob, int layer, float a) +int CreeperRenderer::prepareArmor(shared_ptr _mob, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); if (mob->isPowered()) { if (mob->isInvisible()) glDepthMask(false); @@ -84,7 +84,7 @@ int CreeperRenderer::prepareArmor(std::shared_ptr _mob, int layer, float a) } -int CreeperRenderer::prepareArmorOverlay(std::shared_ptr mob, int layer, float a) +int CreeperRenderer::prepareArmorOverlay(shared_ptr mob, int layer, float a) { return -1; } \ No newline at end of file diff --git a/Minecraft.Client/CreeperRenderer.h b/Minecraft.Client/CreeperRenderer.h index 3afd511b..4d0fac10 100644 --- a/Minecraft.Client/CreeperRenderer.h +++ b/Minecraft.Client/CreeperRenderer.h @@ -9,8 +9,8 @@ private: public: CreeperRenderer(); protected: - virtual void scale(std::shared_ptr _mob, float a); - virtual int getOverlayColor(std::shared_ptr mob, float br, float a); - virtual int prepareArmor(std::shared_ptr mob, int layer, float a); - virtual int prepareArmorOverlay(std::shared_ptr _mob, int layer, float a); + virtual void scale(shared_ptr _mob, float a); + virtual int getOverlayColor(shared_ptr mob, float br, float a); + virtual int prepareArmor(shared_ptr mob, int layer, float a); + virtual int prepareArmorOverlay(shared_ptr _mob, int layer, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/CritParticle.cpp b/Minecraft.Client/CritParticle.cpp index ec99d248..6c71b027 100644 --- a/Minecraft.Client/CritParticle.cpp +++ b/Minecraft.Client/CritParticle.cpp @@ -5,7 +5,7 @@ #include "..\Minecraft.World\net.minecraft.world.phys.h" #include "..\Minecraft.World\net.minecraft.world.level.h" -void CritParticle::_init(Level *level, std::shared_ptr entity, ePARTICLE_TYPE type) +void CritParticle::_init(Level *level, shared_ptr entity, ePARTICLE_TYPE type) { life = 0; this->entity = entity; @@ -15,17 +15,17 @@ void CritParticle::_init(Level *level, std::shared_ptr entity, ePARTICLE //tick(); } -CritParticle::CritParticle(Level *level, std::shared_ptr entity) : Particle(level, entity->x, entity->bb->y0 + entity->bbHeight / 2, entity->z, entity->xd, entity->yd, entity->zd) +CritParticle::CritParticle(Level *level, shared_ptr entity) : Particle(level, entity->x, entity->bb->y0 + entity->bbHeight / 2, entity->z, entity->xd, entity->yd, entity->zd) { _init(level,entity,eParticleType_crit); } -CritParticle::CritParticle(Level *level, std::shared_ptr entity, ePARTICLE_TYPE type) : Particle(level, entity->x, entity->bb->y0 + entity->bbHeight / 2, entity->z, entity->xd, entity->yd, entity->zd) +CritParticle::CritParticle(Level *level, shared_ptr entity, ePARTICLE_TYPE type) : Particle(level, entity->x, entity->bb->y0 + entity->bbHeight / 2, entity->z, entity->xd, entity->yd, entity->zd) { _init(level, entity, type); } -// 4J - Added this so that we can use some std::shared_ptr functions that were needed in the ctor +// 4J - Added this so that we can use some shared_ptr functions that were needed in the ctor void CritParticle::CritParticlePostConstructor(void) { tick(); @@ -49,7 +49,7 @@ void CritParticle::tick() level->addParticle(particleName, x, y, z, xa, ya+0.2, za); } life++; - if (life >= lifeTime) + if (life >= lifeTime) { remove(); } diff --git a/Minecraft.Client/CritParticle.h b/Minecraft.Client/CritParticle.h index 5bad1c25..23f30339 100644 --- a/Minecraft.Client/CritParticle.h +++ b/Minecraft.Client/CritParticle.h @@ -7,17 +7,17 @@ class Entity; class CritParticle : public Particle { private: - std::shared_ptr entity; + shared_ptr entity; int life; int lifeTime; ePARTICLE_TYPE particleName; - void _init(Level *level, std::shared_ptr entity, ePARTICLE_TYPE type); + void _init(Level *level, shared_ptr entity, ePARTICLE_TYPE type); public: virtual eINSTANCEOF GetType() { return eType_CRITPARTICLE; } - CritParticle(Level *level, std::shared_ptr entity); - CritParticle(Level *level, std::shared_ptr entity, ePARTICLE_TYPE type); + CritParticle(Level *level, shared_ptr entity); + CritParticle(Level *level, shared_ptr entity, ePARTICLE_TYPE type); void CritParticlePostConstructor(void); void render(Tesselator *t, float a, float xa, float ya, float za, float xa2, float za2); void tick(); diff --git a/Minecraft.Client/DefaultRenderer.cpp b/Minecraft.Client/DefaultRenderer.cpp index f6cb38ee..d4c15737 100644 --- a/Minecraft.Client/DefaultRenderer.cpp +++ b/Minecraft.Client/DefaultRenderer.cpp @@ -2,7 +2,7 @@ #include "DefaultRenderer.h" #include "..\Minecraft.World\net.minecraft.world.entity.h" -void DefaultRenderer::render(std::shared_ptr entity, double x, double y, double z, float rot, float a) +void DefaultRenderer::render(shared_ptr entity, double x, double y, double z, float rot, float a) { glPushMatrix(); // 4J - removed following line as doesn't really make any sense diff --git a/Minecraft.Client/DefaultRenderer.h b/Minecraft.Client/DefaultRenderer.h index 651a99c1..dcb5a9c3 100644 --- a/Minecraft.Client/DefaultRenderer.h +++ b/Minecraft.Client/DefaultRenderer.h @@ -4,5 +4,5 @@ class DefaultRenderer : public EntityRenderer { public: - virtual void render(std::shared_ptr entity, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr entity, double x, double y, double z, float rot, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/DemoLevel.cpp b/Minecraft.Client/DemoLevel.cpp index f112aed4..52edc0ba 100644 --- a/Minecraft.Client/DemoLevel.cpp +++ b/Minecraft.Client/DemoLevel.cpp @@ -2,7 +2,7 @@ #include "DemoLevel.h" #include "..\Minecraft.World\net.minecraft.world.level.storage.h" -DemoLevel::DemoLevel(std::shared_ptr levelStorage, const wstring& levelName) : Level(levelStorage, levelName, DEMO_LEVEL_SEED) +DemoLevel::DemoLevel(shared_ptr levelStorage, const wstring& levelName) : Level(levelStorage, levelName, DEMO_LEVEL_SEED) { } diff --git a/Minecraft.Client/DemoLevel.h b/Minecraft.Client/DemoLevel.h index 4c1ef110..6464c32b 100644 --- a/Minecraft.Client/DemoLevel.h +++ b/Minecraft.Client/DemoLevel.h @@ -9,7 +9,7 @@ private: static const int DEMO_SPAWN_Y = 72; static const int DEMO_SPAWN_Z = -731; public: - DemoLevel(std::shared_ptr levelStorage, const wstring& levelName); + DemoLevel(shared_ptr levelStorage, const wstring& levelName); DemoLevel(Level *level, Dimension *dimension); protected: virtual void setInitialSpawn(); diff --git a/Minecraft.Client/DemoMode.cpp b/Minecraft.Client/DemoMode.cpp index 798f7bd4..0816023b 100644 --- a/Minecraft.Client/DemoMode.cpp +++ b/Minecraft.Client/DemoMode.cpp @@ -95,7 +95,7 @@ bool DemoMode::destroyBlock(int x, int y, int z, int face) return SurvivalMode::destroyBlock(x, y, z, face); } -bool DemoMode::useItem(std::shared_ptr player, Level *level, std::shared_ptr item) +bool DemoMode::useItem(shared_ptr player, Level *level, shared_ptr item) { if (demoHasEnded) { @@ -105,7 +105,7 @@ bool DemoMode::useItem(std::shared_ptr player, Level *level, std::shared return SurvivalMode::useItem(player, level, item); } -bool DemoMode::useItemOn(std::shared_ptr player, Level *level, std::shared_ptr item, int x, int y, int z, int face) +bool DemoMode::useItemOn(shared_ptr player, Level *level, shared_ptr item, int x, int y, int z, int face) { if (demoHasEnded) { outputDemoReminder(); @@ -114,7 +114,7 @@ bool DemoMode::useItemOn(std::shared_ptr player, Level *level, std::shar return SurvivalMode::useItemOn(player, level, item, x, y, z, face); } -void DemoMode::attack(std::shared_ptr player, std::shared_ptr entity) +void DemoMode::attack(shared_ptr player, shared_ptr entity) { if (demoHasEnded) { diff --git a/Minecraft.Client/DemoMode.h b/Minecraft.Client/DemoMode.h index 9b5f1940..429c9ec3 100644 --- a/Minecraft.Client/DemoMode.h +++ b/Minecraft.Client/DemoMode.h @@ -21,7 +21,7 @@ public: virtual void startDestroyBlock(int x, int y, int z, int face); virtual void continueDestroyBlock(int x, int y, int z, int face); virtual bool destroyBlock(int x, int y, int z, int face); - virtual bool useItem(std::shared_ptr player, Level *level, std::shared_ptr item); - virtual bool useItemOn(std::shared_ptr player, Level *level, std::shared_ptr item, int x, int y, int z, int face); - virtual void attack(std::shared_ptr player, std::shared_ptr entity); + virtual bool useItem(shared_ptr player, Level *level, shared_ptr item); + virtual bool useItemOn(shared_ptr player, Level *level, shared_ptr item, int x, int y, int z, int face); + virtual void attack(shared_ptr player, shared_ptr entity); }; diff --git a/Minecraft.Client/DerivedServerLevel.cpp b/Minecraft.Client/DerivedServerLevel.cpp index 114a7d45..a67408d7 100644 --- a/Minecraft.Client/DerivedServerLevel.cpp +++ b/Minecraft.Client/DerivedServerLevel.cpp @@ -3,7 +3,7 @@ #include "..\Minecraft.World\SavedDataStorage.h" #include "..\Minecraft.World\DerivedLevelData.h" -DerivedServerLevel::DerivedServerLevel(MinecraftServer *server, std::shared_ptr levelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings, ServerLevel *wrapped) +DerivedServerLevel::DerivedServerLevel(MinecraftServer *server, shared_ptr levelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings, ServerLevel *wrapped) : ServerLevel(server, levelStorage, levelName, dimension, levelSettings) { // 4J-PB - we're going to override the savedDataStorage, so we need to delete the current one diff --git a/Minecraft.Client/DerivedServerLevel.h b/Minecraft.Client/DerivedServerLevel.h index ada362f4..2d49e4fa 100644 --- a/Minecraft.Client/DerivedServerLevel.h +++ b/Minecraft.Client/DerivedServerLevel.h @@ -4,7 +4,7 @@ class DerivedServerLevel : public ServerLevel { public: - DerivedServerLevel(MinecraftServer *server, std::shared_ptrlevelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings, ServerLevel *wrapped); + DerivedServerLevel(MinecraftServer *server, shared_ptrlevelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings, ServerLevel *wrapped); ~DerivedServerLevel(); protected: diff --git a/Minecraft.Client/DirtyChunkSorter.cpp b/Minecraft.Client/DirtyChunkSorter.cpp index 0dd07a2a..1a7c10cc 100644 --- a/Minecraft.Client/DirtyChunkSorter.cpp +++ b/Minecraft.Client/DirtyChunkSorter.cpp @@ -3,7 +3,7 @@ #include "../Minecraft.World/net.minecraft.world.entity.player.h" #include "Chunk.h" -DirtyChunkSorter::DirtyChunkSorter(std::shared_ptr cameraEntity, int playerIndex) // 4J - added player index +DirtyChunkSorter::DirtyChunkSorter(shared_ptr cameraEntity, int playerIndex) // 4J - added player index { this->cameraEntity = cameraEntity; this->playerIndex = playerIndex; diff --git a/Minecraft.Client/DirtyChunkSorter.h b/Minecraft.Client/DirtyChunkSorter.h index 6d13c4e5..4caa2fac 100644 --- a/Minecraft.Client/DirtyChunkSorter.h +++ b/Minecraft.Client/DirtyChunkSorter.h @@ -2,13 +2,13 @@ class Chunk; class Mob; -class DirtyChunkSorter : public std::binary_function +class DirtyChunkSorter : public std::binary_function { private: - std::shared_ptr cameraEntity; + shared_ptr cameraEntity; int playerIndex; // 4J added public: - DirtyChunkSorter(std::shared_ptr cameraEntity, int playerIndex); // 4J - added player index + DirtyChunkSorter(shared_ptr cameraEntity, int playerIndex); // 4J - added player index bool operator()(const Chunk *a, const Chunk *b) const; }; \ No newline at end of file diff --git a/Minecraft.Client/DistanceChunkSorter.cpp b/Minecraft.Client/DistanceChunkSorter.cpp index 6bfeb6d9..80ac0cdf 100644 --- a/Minecraft.Client/DistanceChunkSorter.cpp +++ b/Minecraft.Client/DistanceChunkSorter.cpp @@ -3,7 +3,7 @@ #include "../Minecraft.World/net.minecraft.world.entity.player.h" #include "Chunk.h" -DistanceChunkSorter::DistanceChunkSorter(std::shared_ptr player) +DistanceChunkSorter::DistanceChunkSorter(shared_ptr player) { ix = -player->x; iy = -player->y; @@ -15,7 +15,7 @@ bool DistanceChunkSorter::operator()(const Chunk *c0, const Chunk *c1) const double xd0 = c0->xm + ix; double yd0 = c0->ym + iy; double zd0 = c0->zm + iz; - + double xd1 = c1->xm + ix; double yd1 = c1->ym + iy; double zd1 = c1->zm + iz; diff --git a/Minecraft.Client/DistanceChunkSorter.h b/Minecraft.Client/DistanceChunkSorter.h index 952c1656..4789070d 100644 --- a/Minecraft.Client/DistanceChunkSorter.h +++ b/Minecraft.Client/DistanceChunkSorter.h @@ -2,12 +2,12 @@ class Entity; class Chunk; -class DistanceChunkSorter : public std::binary_function +class DistanceChunkSorter : public std::binary_function { private: double ix, iy, iz; public: - DistanceChunkSorter(std::shared_ptr player); + DistanceChunkSorter(shared_ptr player); bool operator()(const Chunk *a, const Chunk *b) const; }; \ No newline at end of file diff --git a/Minecraft.Client/DragonModel.cpp b/Minecraft.Client/DragonModel.cpp index e3ff4c53..39861829 100644 --- a/Minecraft.Client/DragonModel.cpp +++ b/Minecraft.Client/DragonModel.cpp @@ -106,15 +106,15 @@ DragonModel::DragonModel(float g) : Model() rearFoot->compile(1.0f/16.0f); } -void DragonModel::prepareMobModel(std::shared_ptr mob, float time, float r, float a) +void DragonModel::prepareMobModel(shared_ptr mob, float time, float r, float a) { this->a = a; } -void DragonModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void DragonModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { glPushMatrix(); - std::shared_ptr dragon = dynamic_pointer_cast(entity); + shared_ptr dragon = dynamic_pointer_cast(entity); float ttt = dragon->oFlapTime + (dragon->flapTime - dragon->oFlapTime) * a; jaw->xRot = (float) (Mth::sin(ttt * PI * 2) + 1) * 0.2f; @@ -153,7 +153,7 @@ void DragonModel::render(std::shared_ptr entity, float time, float r, fl double pComponents[3]; doubleArray p = doubleArray(pComponents,3); - for (int i = 0; i < 5; i++) + for (int i = 0; i < 5; i++) { dragon->getLatencyPos(p, 5 - i, a); @@ -185,9 +185,9 @@ void DragonModel::render(std::shared_ptr entity, float time, float r, fl glTranslatef(0, -1, 0); body->zRot = 0; body->render(scale,usecompiled); - + glEnable(GL_CULL_FACE); - for (int i = 0; i < 2; i++) + for (int i = 0; i < 2; i++) { float flapTime = ttt * PI * 2; wing->xRot = 0.125f - (float) (Mth::cos(flapTime)) * 0.2f; @@ -206,7 +206,7 @@ void DragonModel::render(std::shared_ptr entity, float time, float r, fl frontLeg->render(scale,usecompiled); rearLeg->render(scale,usecompiled); glScalef(-1, 1, 1); - if (i == 0) + if (i == 0) { glCullFace(GL_FRONT); } @@ -221,7 +221,7 @@ void DragonModel::render(std::shared_ptr entity, float time, float r, fl zz = 60; xx = 0; dragon->getLatencyPos(start, 11, a); - for (int i = 0; i < 12; i++) + for (int i = 0; i < 12; i++) { dragon->getLatencyPos(p, 12 + i, a); rr += Mth::sin(i * 0.45f + roff) * 0.05f; @@ -238,7 +238,7 @@ void DragonModel::render(std::shared_ptr entity, float time, float r, fl } glPopMatrix(); } -float DragonModel::rotWrap(double d) +float DragonModel::rotWrap(double d) { while (d >= 180) d -= 360; diff --git a/Minecraft.Client/DragonModel.h b/Minecraft.Client/DragonModel.h index baee83de..47c20cba 100644 --- a/Minecraft.Client/DragonModel.h +++ b/Minecraft.Client/DragonModel.h @@ -26,8 +26,8 @@ public: ModelPart *cubes[5]; DragonModel(float g); - void prepareMobModel(std::shared_ptr mob, float time, float r, float a); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + void prepareMobModel(shared_ptr mob, float time, float r, float a); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); private: float rotWrap(double d); diff --git a/Minecraft.Client/Durango/Network/ChatIntegrationLayer.cpp b/Minecraft.Client/Durango/Network/ChatIntegrationLayer.cpp index a3b3c981..232b4dd3 100644 --- a/Minecraft.Client/Durango/Network/ChatIntegrationLayer.cpp +++ b/Minecraft.Client/Durango/Network/ChatIntegrationLayer.cpp @@ -12,7 +12,7 @@ using namespace Windows::Foundation; using namespace Windows::Xbox::System; -// To integrate the Chat DLL in your game, you can use this ChatIntegrationLayer class with modifications, +// To integrate the Chat DLL in your game, you can use this ChatIntegrationLayer class with modifications, // or create your own design your own class using the code in this file a guide. std::shared_ptr GetChatIntegrationLayer() { @@ -25,12 +25,12 @@ std::shared_ptr GetChatIntegrationLayer() return chatIntegrationLayerInstance; } -ChatIntegrationLayer::ChatIntegrationLayer() +ChatIntegrationLayer::ChatIntegrationLayer() { ZeroMemory( m_chatVoicePacketsStatistic, sizeof(m_chatVoicePacketsStatistic) ); } -void ChatIntegrationLayer::InitializeChatManager( +void ChatIntegrationLayer::InitializeChatManager( __in bool combineCaptureBuffersIntoSinglePacket, __in bool useKinectAsCaptureSource, __in bool applySoundEffectsToCapturedAudio, @@ -69,9 +69,9 @@ void ChatIntegrationLayer::InitializeChatManager( m_chatManager->ChatSettings->PerformanceCountersEnabled = true; #endif - // Upon enter constrained mode, mute everyone. + // Upon enter constrained mode, mute everyone. // Upon leaving constrained mode, unmute everyone who was previously muted. - m_tokenResourceAvailabilityChanged = Windows::ApplicationModel::Core::CoreApplication::ResourceAvailabilityChanged += + m_tokenResourceAvailabilityChanged = Windows::ApplicationModel::Core::CoreApplication::ResourceAvailabilityChanged += ref new EventHandler< Platform::Object^ >( [weakPtrToThis] (Platform::Object^, Platform::Object^ ) { // Using a std::weak_ptr instead of 'this' to avoid dangling pointer if caller class is released. @@ -99,7 +99,7 @@ void ChatIntegrationLayer::InitializeChatManager( } }); - m_tokenOnDebugMessage = m_chatManager->OnDebugMessage += + m_tokenOnDebugMessage = m_chatManager->OnDebugMessage += ref new Windows::Foundation::EventHandler( [weakPtrToThis] ( Platform::Object^, Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args ) { @@ -112,8 +112,8 @@ void ChatIntegrationLayer::InitializeChatManager( } }); - m_tokenOnOutgoingChatPacketReady = m_chatManager->OnOutgoingChatPacketReady += - ref new Windows::Foundation::EventHandler( + m_tokenOnOutgoingChatPacketReady = m_chatManager->OnOutgoingChatPacketReady += + ref new Windows::Foundation::EventHandler( [weakPtrToThis] ( Platform::Object^, Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args ) { // Using a std::weak_ptr instead of 'this' to avoid dangling pointer if caller class is released. @@ -125,16 +125,16 @@ void ChatIntegrationLayer::InitializeChatManager( } }); - m_tokenOnCompareUniqueConsoleIdentifiers = m_chatManager->OnCompareUniqueConsoleIdentifiers += - ref new Microsoft::Xbox::GameChat::CompareUniqueConsoleIdentifiersHandler( - [weakPtrToThis] ( Platform::Object^ obj1, Platform::Object^ obj2 ) - { + m_tokenOnCompareUniqueConsoleIdentifiers = m_chatManager->OnCompareUniqueConsoleIdentifiers += + ref new Microsoft::Xbox::GameChat::CompareUniqueConsoleIdentifiersHandler( + [weakPtrToThis] ( Platform::Object^ obj1, Platform::Object^ obj2 ) + { // Using a std::weak_ptr instead of 'this' to avoid dangling pointer if caller class is released. // Simply unregistering the callback in the destructor isn't enough to prevent a dangling pointer std::shared_ptr sharedPtrToThis(weakPtrToThis.lock()); if( sharedPtrToThis != nullptr ) { - return sharedPtrToThis->CompareUniqueConsoleIdentifiers(obj1, obj2); + return sharedPtrToThis->CompareUniqueConsoleIdentifiers(obj1, obj2); } else { @@ -142,10 +142,10 @@ void ChatIntegrationLayer::InitializeChatManager( } }); - m_tokenUserAudioDeviceAdded = WXS::User::AudioDeviceAdded += + m_tokenUserAudioDeviceAdded = WXS::User::AudioDeviceAdded += ref new Windows::Foundation::EventHandler( - [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceAddedEventArgs^ value ) - { + [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceAddedEventArgs^ value ) + { std::shared_ptr sharedPtrToThis(weakPtrToThis.lock()); if( sharedPtrToThis != nullptr ) { @@ -153,10 +153,10 @@ void ChatIntegrationLayer::InitializeChatManager( } }); - m_tokenUserAudioDeviceRemoved = WXS::User::AudioDeviceRemoved += + m_tokenUserAudioDeviceRemoved = WXS::User::AudioDeviceRemoved += ref new Windows::Foundation::EventHandler( - [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceRemovedEventArgs^ value ) - { + [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceRemovedEventArgs^ value ) + { std::shared_ptr sharedPtrToThis(weakPtrToThis.lock()); if( sharedPtrToThis != nullptr ) { @@ -164,10 +164,10 @@ void ChatIntegrationLayer::InitializeChatManager( } }); - m_tokenUserAudioDeviceChanged = WXS::User::AudioDeviceChanged += + m_tokenUserAudioDeviceChanged = WXS::User::AudioDeviceChanged += ref new Windows::Foundation::EventHandler( - [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceChangedEventArgs^ value ) - { + [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceChangedEventArgs^ value ) + { std::shared_ptr sharedPtrToThis(weakPtrToThis.lock()); if( sharedPtrToThis != nullptr ) { @@ -175,16 +175,16 @@ void ChatIntegrationLayer::InitializeChatManager( } }); - //m_tokenSuspending = Windows::ApplicationModel::Core::CoreApplication::Suspending += + //m_tokenSuspending = Windows::ApplicationModel::Core::CoreApplication::Suspending += // ref new EventHandler< Windows::ApplicationModel::SuspendingEventArgs^ >( [weakPtrToThis] (Platform::Object^, Windows::ApplicationModel::SuspendingEventArgs^ args) //{ - // // Upon Suspending, nothing needs to be done + // // Upon Suspending, nothing needs to be done //}); - //m_tokenResuming = Windows::ApplicationModel::Core::CoreApplication::Resuming += + //m_tokenResuming = Windows::ApplicationModel::Core::CoreApplication::Resuming += // ref new EventHandler< Platform::Object^ >( [weakPtrToThis] (Platform::Object^, Windows::ApplicationModel::SuspendingEventArgs^ args) //{ - // // Upon Resuming, re-initialize the network, and reinitialize the chat session + // // Upon Resuming, re-initialize the network, and reinitialize the chat session //}); } @@ -215,14 +215,14 @@ void ChatIntegrationLayer::Shutdown() } } -void ChatIntegrationLayer::OnDebugMessageReceived( - __in Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args +void ChatIntegrationLayer::OnDebugMessageReceived( + __in Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args ) { - // To integrate the Chat DLL in your game, - // change this to false and remove the LogComment calls, + // To integrate the Chat DLL in your game, + // change this to false and remove the LogComment calls, // or integrate with your game's own UI/debug message logging system - bool outputToUI = false; + bool outputToUI = false; if( outputToUI ) { @@ -237,14 +237,14 @@ void ChatIntegrationLayer::OnDebugMessageReceived( } else { - // The string appear in the Visual Studio Output window + // The string appear in the Visual Studio Output window #ifndef _CONTENT_PACKAGE OutputDebugString( args->Message->Data() ); #endif } } -void ChatIntegrationLayer::GameUI_RecordPacketStatistic( +void ChatIntegrationLayer::GameUI_RecordPacketStatistic( __in Microsoft::Xbox::GameChat::ChatMessageType messageType, __in ChatPacketType chatPacketType ) @@ -261,7 +261,7 @@ void ChatIntegrationLayer::GameUI_RecordPacketStatistic( } } -int ChatIntegrationLayer::GameUI_GetPacketStatistic( +int ChatIntegrationLayer::GameUI_GetPacketStatistic( __in Microsoft::Xbox::GameChat::ChatMessageType messageType, __in ChatPacketType chatPacketType ) @@ -278,8 +278,8 @@ int ChatIntegrationLayer::GameUI_GetPacketStatistic( } } -void ChatIntegrationLayer::OnOutgoingChatPacketReady( - __in Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args +void ChatIntegrationLayer::OnOutgoingChatPacketReady( + __in Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args ) { byte *bytes; @@ -298,7 +298,7 @@ void ChatIntegrationLayer::OnOutgoingChatPacketReady( } -void ChatIntegrationLayer::OnIncomingChatMessage( +void ChatIntegrationLayer::OnIncomingChatMessage( unsigned int sessionAddress, Platform::Array^ message ) @@ -308,8 +308,8 @@ void ChatIntegrationLayer::OnIncomingChatMessage( // Instead your title should upon receiving a packet, extract the chat message from it, and then call m_chatManager->ProcessIncomingChatMessage as shown below // You will need to isolate chat messages to be unique from the rest of you game's other message types. - // uniqueRemoteConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types. - // What exactly you use doesn't matter, but optimally it would be something that uniquely identifies a console on in the session. + // uniqueRemoteConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types. + // What exactly you use doesn't matter, but optimally it would be something that uniquely identifies a console on in the session. // A Windows::Xbox::Networking::SecureDeviceAssociation^ is perfect to use if you have access to it. // This is how you would convert from byte array to a IBuffer^ @@ -331,7 +331,7 @@ void ChatIntegrationLayer::OnIncomingChatMessage( { Microsoft::Xbox::GameChat::ChatMessageType chatMessageType = m_chatManager->ProcessIncomingChatMessage(chatMessage, uniqueRemoteConsoleIdentifier); - GameUI_RecordPacketStatistic( chatMessageType, ChatPacketType::IncomingPacket ); + GameUI_RecordPacketStatistic( chatMessageType, ChatPacketType::IncomingPacket ); } } @@ -341,7 +341,7 @@ void ChatIntegrationLayer::AddAllLocallySignedInUsersToChatClient( __in Windows::Foundation::Collections::IVectorView^ locallySignedInUsers ) { - // To integrate the Chat DLL in your game, + // To integrate the Chat DLL in your game, // add all locally signed in users to the chat client for each( Windows::Xbox::System::User^ user in locallySignedInUsers ) { @@ -486,10 +486,10 @@ void ChatIntegrationLayer::AddLocalUserToChatChannel( __in Windows::Xbox::System::IUser^ user ) { - // Adds a local user to a specific channel. + // Adds a local user to a specific channel. - // This is helper function waits for the task to cm_chatManageromplete so shouldn't be called from the UI thread - // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread + // This is helper function waits for the task to cm_chatManageromplete so shouldn't be called from the UI thread + // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread // and chain PPL tasks together m_pDQRNet->LogComment( L">>>>>>>>>>>>> AddLocalUserToChatChannel" ); @@ -502,7 +502,7 @@ void ChatIntegrationLayer::AddLocalUserToChatChannel( // Error handling try { - t.get(); + t.get(); } catch ( Platform::Exception^ ex ) { @@ -513,19 +513,19 @@ void ChatIntegrationLayer::AddLocalUserToChatChannel( } } -void ChatIntegrationLayer::RemoveRemoteConsole( +void ChatIntegrationLayer::RemoveRemoteConsole( unsigned int address ) { - // uniqueConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types. - // What exactly you use doesn't matter, but optimally it would be something that uniquely identifies a console on in the session. + // uniqueConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types. + // What exactly you use doesn't matter, but optimally it would be something that uniquely identifies a console on in the session. // A Windows::Xbox::Networking::SecureDeviceAssociation^ is perfect to use if you have access to it. // This is how you would convert from an int to a Platform::Object^ // Platform::Object obj = IntToPlatformObject(5); - // This is helper function waits for the task to complete so shouldn't be called from the UI thread - // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread + // This is helper function waits for the task to complete so shouldn't be called from the UI thread + // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread // and chain PPL tasks together Platform::Object^ uniqueRemoteConsoleIdentifier = (Platform::Object^)address; @@ -538,7 +538,7 @@ void ChatIntegrationLayer::RemoveRemoteConsole( // Error handling try { - t.get(); + t.get(); } catch ( Platform::Exception^ ex ) { @@ -549,15 +549,15 @@ void ChatIntegrationLayer::RemoveRemoteConsole( } } -void ChatIntegrationLayer::RemoveUserFromChatChannel( +void ChatIntegrationLayer::RemoveUserFromChatChannel( __in uint8 channelIndex, - __in Windows::Xbox::System::IUser^ user + __in Windows::Xbox::System::IUser^ user ) { if( m_chatManager != nullptr ) { - // This is helper function waits for the task to complete so shouldn't be called from the UI thread - // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread + // This is helper function waits for the task to complete so shouldn't be called from the UI thread + // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread // and chain PPL tasks together auto asyncOp = m_chatManager->RemoveLocalUserFromChatChannelAsync( channelIndex, user ); @@ -577,13 +577,13 @@ void ChatIntegrationLayer::RemoveUserFromChatChannel( } } -void ChatIntegrationLayer::OnNewSessionAddressAdded( +void ChatIntegrationLayer::OnNewSessionAddressAdded( __in unsigned int address ) { m_pDQRNet->LogCommentFormat( L">>>>>>>>>>>>> OnNewSessionAddressAdded (%d)",address ); Platform::Object^ uniqueConsoleIdentifier = (Platform::Object^)address; - /// Call this when a new console connects. + /// Call this when a new console connects. /// This adds this console to the chat layer if( m_chatManager != nullptr ) { @@ -611,8 +611,8 @@ bool ChatIntegrationLayer::HasMicFocus() return false; } -Platform::Object^ ChatIntegrationLayer::IntToPlatformObject( - __in int val +Platform::Object^ ChatIntegrationLayer::IntToPlatformObject( + __in int val ) { return (Platform::Object^)val; @@ -621,23 +621,23 @@ Platform::Object^ ChatIntegrationLayer::IntToPlatformObject( //return Windows::Foundation::PropertyValue::CreateInt32(val); } -int ChatIntegrationLayer::PlatformObjectToInt( - __in Platform::Object^ uniqueRemoteConsoleIdentifier +int ChatIntegrationLayer::PlatformObjectToInt( + __in Platform::Object^ uniqueRemoteConsoleIdentifier ) { - return safe_cast( uniqueRemoteConsoleIdentifier ); + return safe_cast( uniqueRemoteConsoleIdentifier ); // You can also do the same using a PropertyValue. //return safe_cast(uniqueRemoteConsoleIdentifier)->GetInt32(); } -void ChatIntegrationLayer::HandleChatChannelChanged( - __in uint8 oldChatChannelIndex, - __in uint8 newChatChannelIndex, - __in Microsoft::Xbox::GameChat::ChatUser^ chatUser +void ChatIntegrationLayer::HandleChatChannelChanged( + __in uint8 oldChatChannelIndex, + __in uint8 newChatChannelIndex, + __in Microsoft::Xbox::GameChat::ChatUser^ chatUser ) { - // We remember if the local user was currently muted from all channels. And when we switch channels, + // We remember if the local user was currently muted from all channels. And when we switch channels, // we ensure that the state persists. For remote users, title should implement this themselves // based on title game design if they want to persist the muting state. @@ -674,8 +674,8 @@ void ChatIntegrationLayer::HandleChatChannelChanged( } } -void ChatIntegrationLayer::ChangeChatUserMuteState( - __in Microsoft::Xbox::GameChat::ChatUser^ chatUser +void ChatIntegrationLayer::ChangeChatUserMuteState( + __in Microsoft::Xbox::GameChat::ChatUser^ chatUser ) { /// Helper function to swap the mute state of a specific chat user @@ -692,8 +692,8 @@ void ChatIntegrationLayer::ChangeChatUserMuteState( } } -Microsoft::Xbox::GameChat::ChatUser^ ChatIntegrationLayer::GetChatUserByXboxUserId( - __in Platform::String^ xboxUserId +Microsoft::Xbox::GameChat::ChatUser^ ChatIntegrationLayer::GetChatUserByXboxUserId( + __in Platform::String^ xboxUserId ) { Windows::Foundation::Collections::IVectorView^ chatUsers = GetChatUsers(); @@ -704,14 +704,14 @@ Microsoft::Xbox::GameChat::ChatUser^ ChatIntegrationLayer::GetChatUserByXboxUser return chatUser; } } - + return nullptr; } -bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers( - __in Platform::Object^ uniqueRemoteConsoleIdentifier1, - __in Platform::Object^ uniqueRemoteConsoleIdentifier2 +bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers( + __in Platform::Object^ uniqueRemoteConsoleIdentifier1, + __in Platform::Object^ uniqueRemoteConsoleIdentifier2 ) { if (uniqueRemoteConsoleIdentifier1 == nullptr || uniqueRemoteConsoleIdentifier2 == nullptr) @@ -719,7 +719,7 @@ bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers( return false; } - // uniqueRemoteConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types. + // uniqueRemoteConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types. // We're using XRNS addresses, which are unsigned ints unsigned int address1 = safe_cast(uniqueRemoteConsoleIdentifier1); unsigned int address2 = safe_cast(uniqueRemoteConsoleIdentifier2); diff --git a/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h b/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h index 4470a22b..80b4e10a 100644 --- a/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h +++ b/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h @@ -16,7 +16,7 @@ enum ChatPacketType OutgoingPacket = 1 }; -class ChatIntegrationLayer +class ChatIntegrationLayer : public std::enable_shared_from_this // shared_from_this is needed to use a weak ref to 'this' when handling delegate callbacks { public: @@ -26,7 +26,7 @@ public: /// /// Initializes the chat manager /// - void InitializeChatManager( + void InitializeChatManager( __in bool combineCaptureBuffersIntoSinglePacketEnabled, __in bool useKinectAsCaptureSource, __in bool applySoundEffectToCapture, @@ -47,8 +47,8 @@ public: bool m_canCaptureAudio; }; - void AddLocalUser( __in Windows::Xbox::System::IUser^ user ); - void RemoveLocalUser( __in Windows::Xbox::System::IUser^ user ); + void AddLocalUser( __in Windows::Xbox::System::IUser^ user ); + void RemoveLocalUser( __in Windows::Xbox::System::IUser^ user ); void EvaluateDevicesForUser(__in Windows::Xbox::System::IUser^ user ); vector m_addedUsers; @@ -57,18 +57,18 @@ public: private: /// /// Adds a local user to a specific channel - /// This is helper function waits for the task to complete so shouldn't be called from the UI thread + /// This is helper function waits for the task to complete so shouldn't be called from the UI thread /// /// The channel to add the user to /// The local user to add - void AddLocalUserToChatChannel( + void AddLocalUserToChatChannel( __in uint8 channelIndex, __in Windows::Xbox::System::IUser^ user - ); + ); /// /// Removes a local user from a specific channel - /// This is helper function waits for the task to complete so shouldn't be called from the UI thread + /// This is helper function waits for the task to complete so shouldn't be called from the UI thread /// /// The channel to remove the user from /// The local user to remove @@ -80,10 +80,10 @@ public: /// /// Removes a remote console from chat - /// This is helper function waits for the task to complete so shouldn't be called from the UI thread + /// This is helper function waits for the task to complete so shouldn't be called from the UI thread /// /// A unique ID for the remote console - void RemoveRemoteConsole( + void RemoveRemoteConsole( unsigned int address ); @@ -92,7 +92,7 @@ public: /// /// A buffer containing the chat message /// A unique ID for the remote console - void OnIncomingChatMessage( + void OnIncomingChatMessage( unsigned int sessionAddress, Platform::Array^ message ); @@ -111,7 +111,7 @@ public: /// Helper function to swap the mute state of a specific chat user /// void ChangeChatUserMuteState( - __in Microsoft::Xbox::GameChat::ChatUser^ chatUser + __in Microsoft::Xbox::GameChat::ChatUser^ chatUser ); /// @@ -120,20 +120,20 @@ public: void HandleChatChannelChanged( __in uint8 oldChatChannelIndex, __in uint8 newChatChannelIndex, - __in Microsoft::Xbox::GameChat::ChatUser^ chatUser + __in Microsoft::Xbox::GameChat::ChatUser^ chatUser ); /// - /// Call this when a new console connects. + /// Call this when a new console connects. /// This adds this console to the chat layer /// - void OnNewSessionAddressAdded( - __in unsigned int address + void OnNewSessionAddressAdded( + __in unsigned int address ); /// /// Adds a list of locally signed in users that have intent to play to the chat session on a specific channel index. - /// Avoid adding any user who is signed in that doesn't have intent to play otherwise users who are biometrically + /// Avoid adding any user who is signed in that doesn't have intent to play otherwise users who are biometrically /// signed in automatically will be added to the chat session /// /// The channel to add the users to @@ -147,8 +147,8 @@ public: /// Handles when a debug message is received. Send this to the UI and OutputDebugString. Games should integrate with their existing log system. /// /// Contains the debug message to log - void OnDebugMessageReceived( - __in Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args + void OnDebugMessageReceived( + __in Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args ); /// @@ -161,8 +161,8 @@ public: /// It should send the chat message in order (if that feature is available) if args->SendInOrder is true /// /// Describes the packet to send - void OnOutgoingChatPacketReady( - __in Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args + void OnOutgoingChatPacketReady( + __in Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args ); /// @@ -189,13 +189,13 @@ public: /// /// Helper function to get specific ChatUser by xboxUserId /// - bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers( - __in Platform::Object^ uniqueRemoteConsoleIdentifier1, - __in Platform::Object^ uniqueRemoteConsoleIdentifier2 + bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers( + __in Platform::Object^ uniqueRemoteConsoleIdentifier1, + __in Platform::Object^ uniqueRemoteConsoleIdentifier2 ); /// - /// Helper function to return the ChatPerformanceCounters^ from the ChatManager so perf numbers can be shown on the UI + /// Helper function to return the ChatPerformanceCounters^ from the ChatManager so perf numbers can be shown on the UI /// These numbers will only be valid if m_chatManager->ChatSettings->PerformanceCountersEnabled is set to true. /// Microsoft::Xbox::GameChat::ChatPerformanceCounters^ GetChatPerformanceCounters(); @@ -204,13 +204,13 @@ public: /// Returns a count of the number of chat packets of a specific type that have been either sent or received. /// It is useful to monitor this number in the UI / logs to debug network issues. /// - int GameUI_GetPacketStatistic( + int GameUI_GetPacketStatistic( __in Microsoft::Xbox::GameChat::ChatMessageType messageType, __in ChatPacketType chatPacketType ); - - void OnControllerPairingChanged( - __in Windows::Xbox::Input::ControllerPairingChangedEventArgs^ args + + void OnControllerPairingChanged( + __in Windows::Xbox::Input::ControllerPairingChangedEventArgs^ args ); void ToggleRenderTargetVolume(); @@ -233,7 +233,7 @@ private: // Debug stats for chat packets. Use Debug_GetPacketStatistic() to get the values. /// It is useful to monitor this number in the UI / logs to debug network issues. - void GameUI_RecordPacketStatistic( + void GameUI_RecordPacketStatistic( __in Microsoft::Xbox::GameChat::ChatMessageType messageType, __in ChatPacketType chatPacketType ); diff --git a/Minecraft.Client/Durango/Sentient/DurangoTelemetry.cpp b/Minecraft.Client/Durango/Sentient/DurangoTelemetry.cpp index 1b4f5465..d51ce966 100644 --- a/Minecraft.Client/Durango/Sentient/DurangoTelemetry.cpp +++ b/Minecraft.Client/Durango/Sentient/DurangoTelemetry.cpp @@ -51,13 +51,13 @@ HRESULT CDurangoTelemetryManager::Flush() bool CDurangoTelemetryManager::RecordPlayerSessionStart(int iPad) { durangoStats()->generatePlayerSession(); - + return true; } bool CDurangoTelemetryManager::RecordPlayerSessionExit(int iPad, int exitStatus) { - PlayerUID puid; std::shared_ptr plr; + PlayerUID puid; shared_ptr plr; ProfileManager.GetXUID(iPad, &puid, true); plr = Minecraft::GetInstance()->localplayers[iPad]; @@ -123,11 +123,11 @@ bool CDurangoTelemetryManager::RecordPlayerSessionExit(int iPad, int exitStatus) bool CDurangoTelemetryManager::RecordLevelStart(int iPad, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, int numberOfLocalPlayers, int numberOfOnlinePlayers) { CTelemetryManager::RecordLevelStart(iPad, friendsOrMatch, competeOrCoop, difficulty, numberOfLocalPlayers, numberOfOnlinePlayers); - + ULONG hr = 0; // Grab player info. - PlayerUID puid; std::shared_ptr plr; + PlayerUID puid; shared_ptr plr; ProfileManager.GetXUID(iPad, &puid, true); plr = Minecraft::GetInstance()->localplayers[iPad]; @@ -191,10 +191,10 @@ bool CDurangoTelemetryManager::RecordLevelStart(int iPad, ESen_FriendOrMatch fri GetSubLevelId(iPad), GetLevelInstanceID(), &ZERO_GUID, - friendsOrMatch, - competeOrCoop, - difficulty, - numberOfLocalPlayers, + friendsOrMatch, + competeOrCoop, + difficulty, + numberOfLocalPlayers, numberOfOnlinePlayers, &ZERO_GUID ); @@ -219,10 +219,10 @@ bool CDurangoTelemetryManager::RecordLevelStart(int iPad, ESen_FriendOrMatch fri // Durango // /* GUID */ guid2str(DurangoStats::getPlayerSession()).c_str(), /* WSTR */ DurangoStats::getMultiplayerCorrelationId(), - /* int */ friendsOrMatch, - /* int */ competeOrCoop, - /* int */ difficulty, - /* int */ numberOfLocalPlayers, + /* int */ friendsOrMatch, + /* int */ competeOrCoop, + /* int */ difficulty, + /* int */ numberOfLocalPlayers, /* int */ numberOfOnlinePlayers ); @@ -577,7 +577,7 @@ bool CDurangoTelemetryManager::RecordMediaShareUpload(int iPad, ESen_MediaDestin mediaDestination, mediaType ); -#else +#else ULONG hr = -1; #endif diff --git a/Minecraft.Client/EnchantTableRenderer.cpp b/Minecraft.Client/EnchantTableRenderer.cpp index a16a0473..43f2b040 100644 --- a/Minecraft.Client/EnchantTableRenderer.cpp +++ b/Minecraft.Client/EnchantTableRenderer.cpp @@ -14,10 +14,10 @@ EnchantTableRenderer::~EnchantTableRenderer() delete bookModel; } -void EnchantTableRenderer::render(std::shared_ptr _table, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void EnchantTableRenderer::render(shared_ptr _table, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { // 4J Convert as we aren't using a templated class - std::shared_ptr table = dynamic_pointer_cast(_table); + shared_ptr table = dynamic_pointer_cast(_table); #ifdef __PSVITA__ // AP - the book pages are made with 0 depth so the front and back polys are at the same location. This can cause z-fighting if culling is disabled which can sometimes happen diff --git a/Minecraft.Client/EnchantTableRenderer.h b/Minecraft.Client/EnchantTableRenderer.h index 77485719..0b738ca9 100644 --- a/Minecraft.Client/EnchantTableRenderer.h +++ b/Minecraft.Client/EnchantTableRenderer.h @@ -15,5 +15,5 @@ public: EnchantTableRenderer(); ~EnchantTableRenderer(); - virtual void render(std::shared_ptr _table, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); + virtual void render(shared_ptr _table, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); }; diff --git a/Minecraft.Client/EnderChestRenderer.cpp b/Minecraft.Client/EnderChestRenderer.cpp index 67e27bf7..2996b65f 100644 --- a/Minecraft.Client/EnderChestRenderer.cpp +++ b/Minecraft.Client/EnderChestRenderer.cpp @@ -3,10 +3,10 @@ #include "ModelPart.h" #include "EnderChestRenderer.h" -void EnderChestRenderer::render(std::shared_ptr _chest, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void EnderChestRenderer::render(shared_ptr _chest, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { // 4J Convert as we aren't using a templated class - std::shared_ptr chest = dynamic_pointer_cast(_chest); + shared_ptr chest = dynamic_pointer_cast(_chest); int data = 0; diff --git a/Minecraft.Client/EnderChestRenderer.h b/Minecraft.Client/EnderChestRenderer.h index 0ff14e48..d0521ae0 100644 --- a/Minecraft.Client/EnderChestRenderer.h +++ b/Minecraft.Client/EnderChestRenderer.h @@ -9,5 +9,5 @@ private: ChestModel chestModel; public: - void render(std::shared_ptr _chest, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param + void render(shared_ptr _chest, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param }; diff --git a/Minecraft.Client/EnderCrystalModel.cpp b/Minecraft.Client/EnderCrystalModel.cpp index 4d664605..fde03cd8 100644 --- a/Minecraft.Client/EnderCrystalModel.cpp +++ b/Minecraft.Client/EnderCrystalModel.cpp @@ -3,7 +3,7 @@ -EnderCrystalModel::EnderCrystalModel(float g) +EnderCrystalModel::EnderCrystalModel(float g) { glass = new ModelPart(this, L"glass"); glass->texOffs(0, 0)->addBox(-4, -4, -4, 8, 8, 8); @@ -21,7 +21,7 @@ EnderCrystalModel::EnderCrystalModel(float g) } -void EnderCrystalModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void EnderCrystalModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { glPushMatrix(); glScalef(2, 2, 2); diff --git a/Minecraft.Client/EnderCrystalModel.h b/Minecraft.Client/EnderCrystalModel.h index 42ae1b3d..71f1db10 100644 --- a/Minecraft.Client/EnderCrystalModel.h +++ b/Minecraft.Client/EnderCrystalModel.h @@ -14,5 +14,5 @@ private: public: EnderCrystalModel(float g); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); }; \ No newline at end of file diff --git a/Minecraft.Client/EnderCrystalRenderer.cpp b/Minecraft.Client/EnderCrystalRenderer.cpp index f392824d..452206bc 100644 --- a/Minecraft.Client/EnderCrystalRenderer.cpp +++ b/Minecraft.Client/EnderCrystalRenderer.cpp @@ -9,11 +9,11 @@ EnderCrystalRenderer::EnderCrystalRenderer() this->shadowRadius = 0.5f; } -void EnderCrystalRenderer::render(std::shared_ptr _crystal, double x, double y, double z, float rot, float a) +void EnderCrystalRenderer::render(shared_ptr _crystal, double x, double y, double z, float rot, float a) { - // 4J - original version used generics and thus had an input parameter of type EnderCrystal rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type EnderCrystal rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr crystal = dynamic_pointer_cast(_crystal); + shared_ptr crystal = dynamic_pointer_cast(_crystal); if (currentModel != EnderCrystalModel::MODEL_ID) { model = new EnderCrystalModel(0); diff --git a/Minecraft.Client/EnderCrystalRenderer.h b/Minecraft.Client/EnderCrystalRenderer.h index 5ac644d1..de5dc820 100644 --- a/Minecraft.Client/EnderCrystalRenderer.h +++ b/Minecraft.Client/EnderCrystalRenderer.h @@ -13,5 +13,5 @@ private: public: EnderCrystalRenderer(); - virtual void render(std::shared_ptr _crystal, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr _crystal, double x, double y, double z, float rot, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/EnderDragonRenderer.cpp b/Minecraft.Client/EnderDragonRenderer.cpp index 7fe0bf3f..8c531d4e 100644 --- a/Minecraft.Client/EnderDragonRenderer.cpp +++ b/Minecraft.Client/EnderDragonRenderer.cpp @@ -5,7 +5,7 @@ #include "Lighting.h" #include "EnderDragonRenderer.h" -std::shared_ptr EnderDragonRenderer::bossInstance; +shared_ptr EnderDragonRenderer::bossInstance; int EnderDragonRenderer::currentModel; EnderDragonRenderer::EnderDragonRenderer() : MobRenderer(new DragonModel(0), 0.5f) @@ -15,10 +15,10 @@ EnderDragonRenderer::EnderDragonRenderer() : MobRenderer(new DragonModel(0), 0.5 this->setArmor(model); } -void EnderDragonRenderer::setupRotations(std::shared_ptr _mob, float bob, float bodyRot, float a) -{ +void EnderDragonRenderer::setupRotations(shared_ptr _mob, float bob, float bodyRot, float a) +{ // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); // 4J - reorganised a bit so we can free allocations double lpComponents[3]; @@ -32,7 +32,7 @@ void EnderDragonRenderer::setupRotations(std::shared_ptr _mob, float bob, f float rot2 = mob->getTilt(a); glRotatef(-yr, 0, 1, 0); - + glRotatef(rot2, 1, 0, 0); //glRotatef(rot2 * 10, 1, 0, 0); @@ -46,10 +46,10 @@ void EnderDragonRenderer::setupRotations(std::shared_ptr _mob, float bob, f } } -void EnderDragonRenderer::renderModel(std::shared_ptr _mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale) +void EnderDragonRenderer::renderModel(shared_ptr _mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); if (mob->dragonDeathTime > 0) { @@ -87,10 +87,10 @@ void EnderDragonRenderer::renderModel(std::shared_ptr _mob, float wp, fl } } -void EnderDragonRenderer::render(std::shared_ptr _mob, double x, double y, double z, float rot, float a) +void EnderDragonRenderer::render(shared_ptr _mob, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); EnderDragonRenderer::bossInstance = mob; if (currentModel != DragonModel::MODEL_ID) { @@ -167,10 +167,10 @@ void EnderDragonRenderer::render(std::shared_ptr _mob, double x, double } } -void EnderDragonRenderer::additionalRendering(std::shared_ptr _mob, float a) -{ +void EnderDragonRenderer::additionalRendering(shared_ptr _mob, float a) +{ // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); MobRenderer::additionalRendering(mob, a); Tesselator *t = Tesselator::getInstance(); @@ -227,10 +227,10 @@ void EnderDragonRenderer::additionalRendering(std::shared_ptr _mob, float a } -int EnderDragonRenderer::prepareArmor(std::shared_ptr _mob, int layer, float a) +int EnderDragonRenderer::prepareArmor(shared_ptr _mob, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); if (layer == 1) { diff --git a/Minecraft.Client/EnderDragonRenderer.h b/Minecraft.Client/EnderDragonRenderer.h index 095e2cf2..ab508d99 100644 --- a/Minecraft.Client/EnderDragonRenderer.h +++ b/Minecraft.Client/EnderDragonRenderer.h @@ -10,7 +10,7 @@ class DragonModel; class EnderDragonRenderer : public MobRenderer { public: - static std::shared_ptr bossInstance; + static shared_ptr bossInstance; private: static int currentModel; @@ -22,15 +22,15 @@ public: EnderDragonRenderer(); protected: - virtual void setupRotations(std::shared_ptr _mob, float bob, float bodyRot, float a); + virtual void setupRotations(shared_ptr _mob, float bob, float bodyRot, float a); protected: - void renderModel(std::shared_ptr _mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale); + void renderModel(shared_ptr _mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale); public: - virtual void render(std::shared_ptr _mob, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr _mob, double x, double y, double z, float rot, float a); protected: - virtual void additionalRendering(std::shared_ptr _mob, float a); - virtual int prepareArmor(std::shared_ptr _mob, int layer, float a); + virtual void additionalRendering(shared_ptr _mob, float a); + virtual int prepareArmor(shared_ptr _mob, int layer, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/EndermanRenderer.cpp b/Minecraft.Client/EndermanRenderer.cpp index cf96e693..8802376a 100644 --- a/Minecraft.Client/EndermanRenderer.cpp +++ b/Minecraft.Client/EndermanRenderer.cpp @@ -10,11 +10,11 @@ EndermanRenderer::EndermanRenderer() : MobRenderer(new EndermanModel(), 0.5f) this->setArmor(model); } -void EndermanRenderer::render(std::shared_ptr _mob, double x, double y, double z, float rot, float a) +void EndermanRenderer::render(shared_ptr _mob, double x, double y, double z, float rot, float a) { - // 4J - original version used generics and thus had an input parameter of type Boat rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type Boat rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); model->carrying = mob->getCarryingTile() > 0; model->creepy = mob->isCreepy(); @@ -29,11 +29,11 @@ void EndermanRenderer::render(std::shared_ptr _mob, double x, double y, MobRenderer::render(mob, x, y, z, rot, a); } -void EndermanRenderer::additionalRendering(std::shared_ptr _mob, float a) +void EndermanRenderer::additionalRendering(shared_ptr _mob, float a) { - // 4J - original version used generics and thus had an input parameter of type Boat rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type Boat rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); MobRenderer::additionalRendering(_mob, a); @@ -68,11 +68,11 @@ void EndermanRenderer::additionalRendering(std::shared_ptr _mob, float a) } } -int EndermanRenderer::prepareArmor(std::shared_ptr _mob, int layer, float a) +int EndermanRenderer::prepareArmor(shared_ptr _mob, int layer, float a) { - // 4J - original version used generics and thus had an input parameter of type Boat rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type Boat rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); if (layer != 0) return -1; diff --git a/Minecraft.Client/EndermanRenderer.h b/Minecraft.Client/EndermanRenderer.h index eaf6393e..6f5126bd 100644 --- a/Minecraft.Client/EndermanRenderer.h +++ b/Minecraft.Client/EndermanRenderer.h @@ -14,9 +14,9 @@ private: public: EndermanRenderer(); - virtual void render(std::shared_ptr _mob, double x, double y, double z, float rot, float a); - virtual void additionalRendering(std::shared_ptr _mob, float a); + virtual void render(shared_ptr _mob, double x, double y, double z, float rot, float a); + virtual void additionalRendering(shared_ptr _mob, float a); protected: - virtual int prepareArmor(std::shared_ptr _mob, int layer, float a); + virtual int prepareArmor(shared_ptr _mob, int layer, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/EntityRenderDispatcher.cpp b/Minecraft.Client/EntityRenderDispatcher.cpp index 352d05e9..dfc9a11e 100644 --- a/Minecraft.Client/EntityRenderDispatcher.cpp +++ b/Minecraft.Client/EntityRenderDispatcher.cpp @@ -168,12 +168,12 @@ EntityRenderer *EntityRenderDispatcher::getRenderer(eINSTANCEOF e) return it->second; } -EntityRenderer *EntityRenderDispatcher::getRenderer(std::shared_ptr e) +EntityRenderer *EntityRenderDispatcher::getRenderer(shared_ptr e) { return getRenderer(e->GetType()); } -void EntityRenderDispatcher::prepare(Level *level, Textures *textures, Font *font, std::shared_ptr player, Options *options, float a) +void EntityRenderDispatcher::prepare(Level *level, Textures *textures, Font *font, shared_ptr player, Options *options, float a) { this->level = level; this->textures = textures; @@ -197,7 +197,7 @@ void EntityRenderDispatcher::prepare(Level *level, Textures *textures, Font *fon playerRotX = player->xRotO + (player->xRot - player->xRotO) * a; } - std::shared_ptr pl = dynamic_pointer_cast(player); + shared_ptr pl = dynamic_pointer_cast(player); if (pl->ThirdPersonView() == 2) { playerRotY += 180; @@ -209,7 +209,7 @@ void EntityRenderDispatcher::prepare(Level *level, Textures *textures, Font *fon } -void EntityRenderDispatcher::render(std::shared_ptr entity, float a) +void EntityRenderDispatcher::render(shared_ptr entity, float a) { double x = entity->xOld + (entity->x - entity->xOld) * a; double y = entity->yOld + (entity->y - entity->yOld) * a; @@ -230,7 +230,7 @@ void EntityRenderDispatcher::render(std::shared_ptr entity, float a) } } float r = entity->yRotO + (rotDiff) * a; - + int col = entity->getLightColor(a); if (entity->isOnFire()) { @@ -244,13 +244,13 @@ void EntityRenderDispatcher::render(std::shared_ptr entity, float a) render(entity, x - xOff, y - yOff, z - zOff, r, a); } -void EntityRenderDispatcher::render(std::shared_ptr entity, double x, double y, double z, float rot, float a, bool bItemFrame, bool bRenderPlayerShadow) +void EntityRenderDispatcher::render(shared_ptr entity, double x, double y, double z, float rot, float a, bool bItemFrame, bool bRenderPlayerShadow) { EntityRenderer *renderer = getRenderer(entity); if (renderer != NULL) - { + { renderer->SetItemFrame(bItemFrame); - + renderer->render(entity, x, y, z, rot, a); renderer->postRender(entity, x, y, z, rot, a, bRenderPlayerShadow); } diff --git a/Minecraft.Client/EntityRenderDispatcher.h b/Minecraft.Client/EntityRenderDispatcher.h index a750a109..248be18f 100644 --- a/Minecraft.Client/EntityRenderDispatcher.h +++ b/Minecraft.Client/EntityRenderDispatcher.h @@ -26,7 +26,7 @@ public: Textures *textures; ItemInHandRenderer *itemInHandRenderer; Level *level; - std::shared_ptr cameraEntity; + shared_ptr cameraEntity; float playerRotY; float playerRotX; Options *options; @@ -38,10 +38,10 @@ private: EntityRenderDispatcher(); public: EntityRenderer *getRenderer(eINSTANCEOF e); - EntityRenderer *getRenderer(std::shared_ptr e); - void prepare(Level *level, Textures *textures, Font *font, std::shared_ptr player, Options *options, float a); - void render(std::shared_ptr entity, float a); - void render(std::shared_ptr entity, double x, double y, double z, float rot, float a, bool bItemFrame = false, bool bRenderPlayerShadow = true); + EntityRenderer *getRenderer(shared_ptr e); + void prepare(Level *level, Textures *textures, Font *font, shared_ptr player, Options *options, float a); + void render(shared_ptr entity, float a); + void render(shared_ptr entity, double x, double y, double z, float rot, float a, bool bItemFrame = false, bool bRenderPlayerShadow = true); void setLevel(Level *level); double distanceToSqr(double x, double y, double z); Font *getFont(); diff --git a/Minecraft.Client/EntityRenderer.cpp b/Minecraft.Client/EntityRenderer.cpp index 3c09382f..6c0247ed 100644 --- a/Minecraft.Client/EntityRenderer.cpp +++ b/Minecraft.Client/EntityRenderer.cpp @@ -41,7 +41,7 @@ bool EntityRenderer::bindTexture(const wstring& urlTexture, int backupTexture) Textures *t = entityRenderDispatcher->textures; // 4J-PB - no http textures on the xbox, mem textures instead - + //int id = t->loadHttpTexture(urlTexture, backupTexture); int id = t->loadMemTexture(urlTexture, backupTexture); @@ -62,7 +62,7 @@ bool EntityRenderer::bindTexture(const wstring& urlTexture, const wstring& backu Textures *t = entityRenderDispatcher->textures; // 4J-PB - no http textures on the xbox, mem textures instead - + //int id = t->loadHttpTexture(urlTexture, backupTexture); int id = t->loadMemTexture(urlTexture, backupTexture); @@ -78,7 +78,7 @@ bool EntityRenderer::bindTexture(const wstring& urlTexture, const wstring& backu } } -void EntityRenderer::renderFlame(std::shared_ptr e, double x, double y, double z, float a) +void EntityRenderer::renderFlame(shared_ptr e, double x, double y, double z, float a) { glDisable(GL_LIGHTING); @@ -146,7 +146,7 @@ void EntityRenderer::renderFlame(std::shared_ptr e, double x, double y, glEnable(GL_LIGHTING); } -void EntityRenderer::renderShadow(std::shared_ptr e, double x, double y, double z, float pow, float a) +void EntityRenderer::renderShadow(shared_ptr e, double x, double y, double z, float pow, float a) { glDisable(GL_LIGHTING); glEnable(GL_BLEND); @@ -160,17 +160,17 @@ void EntityRenderer::renderShadow(std::shared_ptr e, double x, double y, glDepthMask(false); float r = shadowRadius; - std::shared_ptr mob = dynamic_pointer_cast(e); + shared_ptr mob = dynamic_pointer_cast(e); bool isLocalPlayer = false; float fYLocalPlayerShadowOffset=0.0f; //if (dynamic_pointer_cast(e) != NULL) if (mob != NULL) { - //std::shared_ptr mob = dynamic_pointer_cast(e); + //shared_ptr mob = dynamic_pointer_cast(e); r *= mob->getSizeScale(); - std::shared_ptr animal = dynamic_pointer_cast(mob); + shared_ptr animal = dynamic_pointer_cast(mob); if (animal != NULL) { if (animal->isBaby()) @@ -213,12 +213,12 @@ void EntityRenderer::renderShadow(std::shared_ptr e, double x, double y, for (int xt = x0; xt <= x1; xt++) for (int yt = y0; yt <= y1; yt++) for (int zt = z0; zt <= z1; zt++) - { + { int t = level->getTile(xt, yt - 1, zt); if (t > 0 && level->getRawBrightness(xt, yt, zt) > 3) { renderTileShadow(Tile::tiles[t], x, y + e->getShadowHeightOffs() + fYLocalPlayerShadowOffset, z, xt, yt , zt, pow, r, xo, yo + e->getShadowHeightOffs() + fYLocalPlayerShadowOffset, zo); - } + } } tt->end(); @@ -242,7 +242,7 @@ void EntityRenderer::renderTileShadow(Tile *tt, double x, double y, double z, in double a = ((pow - (y - (yt + yo)) / 2) * 0.5f) * getLevel()->getBrightness(xt, yt, zt); if (a < 0) return; if (a > 1) a = 1; - + t->color(1.0f, 1.0f, 1.0f, (float) a); // glColor4f(1, 1, 1, (float) a); @@ -383,7 +383,7 @@ void EntityRenderer::init(EntityRenderDispatcher *entityRenderDispatcher) this->entityRenderDispatcher = entityRenderDispatcher; } -void EntityRenderer::postRender(std::shared_ptr entity, double x, double y, double z, float rot, float a, bool bRenderPlayerShadow) +void EntityRenderer::postRender(shared_ptr entity, double x, double y, double z, float rot, float a, bool bRenderPlayerShadow) { if( !entityRenderDispatcher->isGuiRender ) // 4J - added, don't render shadow in gui as it uses its own blending, and we have globally enabled blending for interface opacity { diff --git a/Minecraft.Client/EntityRenderer.h b/Minecraft.Client/EntityRenderer.h index f8c91685..e0c264a5 100644 --- a/Minecraft.Client/EntityRenderer.h +++ b/Minecraft.Client/EntityRenderer.h @@ -36,16 +36,16 @@ public: EntityRenderer(); // 4J - added virtual ~EntityRenderer(); public: - virtual void render(std::shared_ptr entity, double x, double y, double z, float rot, float a) = 0; + virtual void render(shared_ptr entity, double x, double y, double z, float rot, float a) = 0; protected: virtual void bindTexture(int resourceName); // 4J - added virtual void bindTexture(const wstring& resourceName); virtual bool bindTexture(const wstring& urlTexture, int backupTexture); // 4J added - virtual bool bindTexture(const wstring& urlTexture, const wstring& backupTexture); + virtual bool bindTexture(const wstring& urlTexture, const wstring& backupTexture); private: - virtual void renderFlame(std::shared_ptr e, double x, double y, double z, float a); - virtual void renderShadow(std::shared_ptr e, double x, double y, double z, float pow, float a); + virtual void renderFlame(shared_ptr e, double x, double y, double z, float a); + virtual void renderShadow(shared_ptr e, double x, double y, double z, float pow, float a); virtual Level *getLevel(); virtual void renderTileShadow(Tile *tt, double x, double y, double z, int xt, int yt, int zt, float pow, float r, double xo, double yo, double zo); @@ -54,7 +54,7 @@ public: static void renderFlat(AABB *bb); static void renderFlat(float x0, float y0, float z0, float x1, float y1, float z1); virtual void init(EntityRenderDispatcher *entityRenderDispatcher); - virtual void postRender(std::shared_ptr entity, double x, double y, double z, float rot, float a, bool bRenderPlayerShadow); + virtual void postRender(shared_ptr entity, double x, double y, double z, float rot, float a, bool bRenderPlayerShadow); virtual Font *getFont(); virtual void registerTerrainTextures(IconRegister *iconRegister); diff --git a/Minecraft.Client/EntityTileRenderer.cpp b/Minecraft.Client/EntityTileRenderer.cpp index 2898de27..a2301d42 100644 --- a/Minecraft.Client/EntityTileRenderer.cpp +++ b/Minecraft.Client/EntityTileRenderer.cpp @@ -7,8 +7,8 @@ EntityTileRenderer *EntityTileRenderer::instance = new EntityTileRenderer; EntityTileRenderer::EntityTileRenderer() { - chest = std::shared_ptr(new ChestTileEntity()); - enderChest = std::shared_ptr(new EnderChestTileEntity()); + chest = shared_ptr(new ChestTileEntity()); + enderChest = shared_ptr(new EnderChestTileEntity()); } void EntityTileRenderer::render(Tile *tile, int data, float brightness, float alpha, bool setColor, bool useCompiled) diff --git a/Minecraft.Client/EntityTileRenderer.h b/Minecraft.Client/EntityTileRenderer.h index 14ba6bfc..cc572cad 100644 --- a/Minecraft.Client/EntityTileRenderer.h +++ b/Minecraft.Client/EntityTileRenderer.h @@ -10,8 +10,8 @@ class EntityTileRenderer static EntityTileRenderer *instance; private: - std::shared_ptr chest; - std::shared_ptr enderChest; + shared_ptr chest; + shared_ptr enderChest; public: EntityTileRenderer(); diff --git a/Minecraft.Client/EntityTracker.cpp b/Minecraft.Client/EntityTracker.cpp index ca31c03e..8f1dbcd8 100644 --- a/Minecraft.Client/EntityTracker.cpp +++ b/Minecraft.Client/EntityTracker.cpp @@ -26,12 +26,12 @@ EntityTracker::EntityTracker(ServerLevel *level) maxRange = level->getServer()->getPlayers()->getMaxRange(); } -void EntityTracker::addEntity(std::shared_ptr e) +void EntityTracker::addEntity(shared_ptr e) { if (e->GetType() == eTYPE_SERVERPLAYER) { addEntity(e, 32 * 16, 2); - std::shared_ptr player = dynamic_pointer_cast(e); + shared_ptr player = dynamic_pointer_cast(e); for( AUTO_VAR(it, entities.begin()); it != entities.end(); it++ ) { if( (*it)->e != player ) @@ -65,12 +65,12 @@ void EntityTracker::addEntity(std::shared_ptr e) else if (e->GetType() == eTYPE_ITEM_FRAME) addEntity(e, 16 * 10, INT_MAX, false); } -void EntityTracker::addEntity(std::shared_ptr e, int range, int updateInterval) +void EntityTracker::addEntity(shared_ptr e, int range, int updateInterval) { addEntity(e, range, updateInterval, false); } -void EntityTracker::addEntity(std::shared_ptr e, int range, int updateInterval, bool trackDeltas) +void EntityTracker::addEntity(shared_ptr e, int range, int updateInterval, bool trackDeltas) { if (range > maxRange) range = maxRange; if (entityMap.find(e->entityId) != entityMap.end()) @@ -81,7 +81,7 @@ void EntityTracker::addEntity(std::shared_ptr e, int range, int updateIn { __debugbreak(); } - std::shared_ptr te = std::shared_ptr( new TrackedEntity(e, range, updateInterval, trackDeltas) ); + shared_ptr te = shared_ptr( new TrackedEntity(e, range, updateInterval, trackDeltas) ); entities.insert(te); entityMap[e->entityId] = te; te->updatePlayers(this, &level->players); @@ -89,23 +89,23 @@ void EntityTracker::addEntity(std::shared_ptr e, int range, int updateIn // 4J - have split removeEntity into two bits - it used to do the equivalent of EntityTracker::removePlayer followed by EntityTracker::removeEntity. // This is to allow us to now choose to remove the player as a "seenBy" only when the player has actually been removed from the level's own player array -void EntityTracker::removeEntity(std::shared_ptr e) +void EntityTracker::removeEntity(shared_ptr e) { AUTO_VAR(it, entityMap.find(e->entityId)); if( it != entityMap.end() ) { - std::shared_ptr te = it->second; + shared_ptr te = it->second; entityMap.erase(it); entities.erase(te); te->broadcastRemoved(); } } -void EntityTracker::removePlayer(std::shared_ptr e) +void EntityTracker::removePlayer(shared_ptr e) { if (e->GetType() == eTYPE_SERVERPLAYER) { - std::shared_ptr player = dynamic_pointer_cast(e); + shared_ptr player = dynamic_pointer_cast(e); for( AUTO_VAR(it, entities.begin()); it != entities.end(); it++ ) { (*it)->removePlayer(player); @@ -115,10 +115,10 @@ void EntityTracker::removePlayer(std::shared_ptr e) void EntityTracker::tick() { - vector > movedPlayers; + vector > movedPlayers; for( AUTO_VAR(it, entities.begin()); it != entities.end(); it++ ) { - std::shared_ptr te = *it; + shared_ptr te = *it; te->tick(this, &level->players); if (te->moved && te->e->GetType() == eTYPE_SERVERPLAYER) { @@ -132,7 +132,7 @@ void EntityTracker::tick() MinecraftServer *server = MinecraftServer::getInstance(); for( unsigned int i = 0; i < server->getPlayers()->players.size(); i++ ) { - std::shared_ptr ep = server->getPlayers()->players[i]; + shared_ptr ep = server->getPlayers()->players[i]; if( ep->dimension != level->dimension->id ) continue; if( ep->connection == NULL ) continue; @@ -142,7 +142,7 @@ void EntityTracker::tick() bool addPlayer = false; for (unsigned int j = 0; j < movedPlayers.size(); j++) { - std::shared_ptr sp = movedPlayers[j]; + shared_ptr sp = movedPlayers[j]; if( sp == ep ) break; @@ -153,17 +153,17 @@ void EntityTracker::tick() addPlayer = true; break; } - } + } if( addPlayer ) movedPlayers.push_back( ep ); } for (unsigned int i = 0; i < movedPlayers.size(); i++) { - std::shared_ptr player = movedPlayers[i]; + shared_ptr player = movedPlayers[i]; if(player->connection == NULL) continue; for( AUTO_VAR(it, entities.begin()); it != entities.end(); it++ ) { - std::shared_ptr te = *it; + shared_ptr te = *it; if (te->e != player) { te->updatePlayer(this, player); @@ -174,7 +174,7 @@ void EntityTracker::tick() // 4J Stu - We want to do this for dead players as they don't tick normally for(AUTO_VAR(it, level->players.begin()); it != level->players.end(); ++it) { - std::shared_ptr player = dynamic_pointer_cast(*it); + shared_ptr player = dynamic_pointer_cast(*it); if(!player->isAlive()) { player->flushEntitiesToRemove(); @@ -182,31 +182,31 @@ void EntityTracker::tick() } } -void EntityTracker::broadcast(std::shared_ptr e, std::shared_ptr packet) +void EntityTracker::broadcast(shared_ptr e, shared_ptr packet) { AUTO_VAR(it, entityMap.find( e->entityId )); if( it != entityMap.end() ) { - std::shared_ptr te = it->second; + shared_ptr te = it->second; te->broadcast(packet); } } -void EntityTracker::broadcastAndSend(std::shared_ptr e, std::shared_ptr packet) +void EntityTracker::broadcastAndSend(shared_ptr e, shared_ptr packet) { AUTO_VAR(it, entityMap.find( e->entityId )); if( it != entityMap.end() ) { - std::shared_ptr te = it->second; + shared_ptr te = it->second; te->broadcastAndSend(packet); } } -void EntityTracker::clear(std::shared_ptr serverPlayer) +void EntityTracker::clear(shared_ptr serverPlayer) { for( AUTO_VAR(it, entities.begin()); it != entities.end(); it++ ) { - std::shared_ptr te = *it; + shared_ptr te = *it; te->clear(serverPlayer); } } @@ -218,7 +218,7 @@ void EntityTracker::updateMaxRange() } -std::shared_ptr EntityTracker::getTracker(std::shared_ptr e) +shared_ptr EntityTracker::getTracker(shared_ptr e) { AUTO_VAR(it, entityMap.find(e->entityId)); if( it != entityMap.end() ) diff --git a/Minecraft.Client/EntityTracker.h b/Minecraft.Client/EntityTracker.h index 3fabc4b1..82b01d07 100644 --- a/Minecraft.Client/EntityTracker.h +++ b/Minecraft.Client/EntityTracker.h @@ -13,24 +13,24 @@ class EntityTracker { private: ServerLevel *level; - unordered_set > entities; - unordered_map , IntKeyHash2, IntKeyEq> entityMap; // was IntHashMap + unordered_set > entities; + unordered_map , IntKeyHash2, IntKeyEq> entityMap; // was IntHashMap int maxRange; public: EntityTracker(ServerLevel *level); - void addEntity(std::shared_ptr e); - void addEntity(std::shared_ptr e, int range, int updateInterval); - void addEntity(std::shared_ptr e, int range, int updateInterval, bool trackDeltas); - void removeEntity(std::shared_ptr e); - void removePlayer(std::shared_ptr e); // 4J added + void addEntity(shared_ptr e); + void addEntity(shared_ptr e, int range, int updateInterval); + void addEntity(shared_ptr e, int range, int updateInterval, bool trackDeltas); + void removeEntity(shared_ptr e); + void removePlayer(shared_ptr e); // 4J added void tick(); - void broadcast(std::shared_ptr e, std::shared_ptr packet); - void broadcastAndSend(std::shared_ptr e, std::shared_ptr packet); - void clear(std::shared_ptr serverPlayer); + void broadcast(shared_ptr e, shared_ptr packet); + void broadcastAndSend(shared_ptr e, shared_ptr packet); + void clear(shared_ptr serverPlayer); void updateMaxRange(); // AP added for Vita // 4J-JEV: Added, needed access to tracked entity of a riders mount. - std::shared_ptr getTracker(std::shared_ptr entity); + shared_ptr getTracker(shared_ptr entity); }; diff --git a/Minecraft.Client/ExperienceOrbRenderer.cpp b/Minecraft.Client/ExperienceOrbRenderer.cpp index 97d00f79..1771f833 100644 --- a/Minecraft.Client/ExperienceOrbRenderer.cpp +++ b/Minecraft.Client/ExperienceOrbRenderer.cpp @@ -19,9 +19,9 @@ ExperienceOrbRenderer::ExperienceOrbRenderer() } -void ExperienceOrbRenderer::render(std::shared_ptr _orb, double x, double y, double z, float rot, float a) +void ExperienceOrbRenderer::render(shared_ptr _orb, double x, double y, double z, float rot, float a) { - std::shared_ptr orb = dynamic_pointer_cast(_orb); + shared_ptr orb = dynamic_pointer_cast(_orb); glPushMatrix(); glTranslatef((float) x, (float) y, (float) z); diff --git a/Minecraft.Client/ExperienceOrbRenderer.h b/Minecraft.Client/ExperienceOrbRenderer.h index 5237ecb8..ebd166f4 100644 --- a/Minecraft.Client/ExperienceOrbRenderer.h +++ b/Minecraft.Client/ExperienceOrbRenderer.h @@ -12,6 +12,6 @@ public: ExperienceOrbRenderer(); - void render(std::shared_ptr _orb, double x, double y, double z, float rot, float a); + void render(shared_ptr _orb, double x, double y, double z, float rot, float a); void blit(int x, int y, int sx, int sy, int w, int h); }; \ No newline at end of file diff --git a/Minecraft.Client/FallingTileRenderer.cpp b/Minecraft.Client/FallingTileRenderer.cpp index ad3d9ce3..02e23dad 100644 --- a/Minecraft.Client/FallingTileRenderer.cpp +++ b/Minecraft.Client/FallingTileRenderer.cpp @@ -12,10 +12,10 @@ FallingTileRenderer::FallingTileRenderer() : EntityRenderer() this->shadowRadius = 0.5f; } -void FallingTileRenderer::render(std::shared_ptr _tile, double x, double y, double z, float rot, float a) +void FallingTileRenderer::render(shared_ptr _tile, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr tile = dynamic_pointer_cast(_tile); + shared_ptr tile = dynamic_pointer_cast(_tile); glPushMatrix(); glTranslatef((float) x, (float) y, (float) z); diff --git a/Minecraft.Client/FallingTileRenderer.h b/Minecraft.Client/FallingTileRenderer.h index c3181c96..0ece6033 100644 --- a/Minecraft.Client/FallingTileRenderer.h +++ b/Minecraft.Client/FallingTileRenderer.h @@ -10,5 +10,5 @@ private: public: FallingTileRenderer(); - virtual void render(std::shared_ptr _tile, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr _tile, double x, double y, double z, float rot, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/FireballRenderer.cpp b/Minecraft.Client/FireballRenderer.cpp index c5f379a6..836e8be3 100644 --- a/Minecraft.Client/FireballRenderer.cpp +++ b/Minecraft.Client/FireballRenderer.cpp @@ -12,10 +12,10 @@ FireballRenderer::FireballRenderer(float scale) this->scale = scale; } -void FireballRenderer::render(std::shared_ptr _fireball, double x, double y, double z, float rot, float a) +void FireballRenderer::render(shared_ptr _fireball, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr fireball = dynamic_pointer_cast(_fireball); + shared_ptr fireball = dynamic_pointer_cast(_fireball); glPushMatrix(); @@ -54,7 +54,7 @@ void FireballRenderer::render(std::shared_ptr _fireball, double x, doubl } // 4J Added override. Based on EntityRenderer::renderFlame -void FireballRenderer::renderFlame(std::shared_ptr e, double x, double y, double z, float a) +void FireballRenderer::renderFlame(shared_ptr e, double x, double y, double z, float a) { glDisable(GL_LIGHTING); Icon *tex = Tile::fire->getTextureLayer(0); @@ -78,7 +78,7 @@ void FireballRenderer::renderFlame(std::shared_ptr e, double x, double y //glRotatef(-entityRenderDispatcher->playerRotY, 0, 1, 0); - + glRotatef(180 - entityRenderDispatcher->playerRotY, 0, 1, 0); glRotatef(-entityRenderDispatcher->playerRotX, 1, 0, 0); glTranslatef(0,0,0.1f); diff --git a/Minecraft.Client/FireballRenderer.h b/Minecraft.Client/FireballRenderer.h index 201e3aad..9b22e74a 100644 --- a/Minecraft.Client/FireballRenderer.h +++ b/Minecraft.Client/FireballRenderer.h @@ -9,9 +9,9 @@ private: public: FireballRenderer(float scale); - virtual void render(std::shared_ptr _fireball, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr _fireball, double x, double y, double z, float rot, float a); private: // 4J Added override - virtual void renderFlame(std::shared_ptr e, double x, double y, double z, float a); + virtual void renderFlame(shared_ptr e, double x, double y, double z, float a); }; diff --git a/Minecraft.Client/FishingHookRenderer.cpp b/Minecraft.Client/FishingHookRenderer.cpp index a746db18..0408e96e 100644 --- a/Minecraft.Client/FishingHookRenderer.cpp +++ b/Minecraft.Client/FishingHookRenderer.cpp @@ -8,10 +8,10 @@ #include "..\Minecraft.World\Mth.h" #include "MultiPlayerLocalPlayer.h" -void FishingHookRenderer::render(std::shared_ptr _hook, double x, double y, double z, float rot, float a) +void FishingHookRenderer::render(shared_ptr _hook, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr hook = dynamic_pointer_cast(_hook); + shared_ptr hook = dynamic_pointer_cast(_hook); glPushMatrix(); diff --git a/Minecraft.Client/FishingHookRenderer.h b/Minecraft.Client/FishingHookRenderer.h index 8bcfd252..2683f187 100644 --- a/Minecraft.Client/FishingHookRenderer.h +++ b/Minecraft.Client/FishingHookRenderer.h @@ -3,6 +3,6 @@ class FishingHookRenderer : public EntityRenderer { -public: - virtual void render(std::shared_ptr _hook, double x, double y, double z, float rot, float a); +public: + virtual void render(shared_ptr _hook, double x, double y, double z, float rot, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/FurnaceScreen.cpp b/Minecraft.Client/FurnaceScreen.cpp index 3e6b76e5..20ec7104 100644 --- a/Minecraft.Client/FurnaceScreen.cpp +++ b/Minecraft.Client/FurnaceScreen.cpp @@ -6,7 +6,7 @@ #include "..\Minecraft.World\net.minecraft.world.inventory.h" #include "..\Minecraft.World\FurnaceTileEntity.h" -FurnaceScreen::FurnaceScreen(std::shared_ptr inventory, std::shared_ptr furnace) : AbstractContainerScreen(new FurnaceMenu(inventory, furnace)) +FurnaceScreen::FurnaceScreen(shared_ptr inventory, shared_ptr furnace) : AbstractContainerScreen(new FurnaceMenu(inventory, furnace)) { this->furnace = furnace; } diff --git a/Minecraft.Client/FurnaceScreen.h b/Minecraft.Client/FurnaceScreen.h index 98c0bba7..f018093f 100644 --- a/Minecraft.Client/FurnaceScreen.h +++ b/Minecraft.Client/FurnaceScreen.h @@ -7,10 +7,10 @@ class Inventory; class FurnaceScreen : public AbstractContainerScreen { private: - std::shared_ptr furnace; + shared_ptr furnace; public: - FurnaceScreen(std::shared_ptr inventory, std::shared_ptr furnace); + FurnaceScreen(shared_ptr inventory, shared_ptr furnace); protected: virtual void renderLabels(); virtual void renderBg(float a); diff --git a/Minecraft.Client/GameMode.cpp b/Minecraft.Client/GameMode.cpp index 975f81f8..a11d6c07 100644 --- a/Minecraft.Client/GameMode.cpp +++ b/Minecraft.Client/GameMode.cpp @@ -46,11 +46,11 @@ void GameMode::render(float a) { } -bool GameMode::useItem(std::shared_ptr player, Level *level, std::shared_ptr item, bool bTestUseOnly) +bool GameMode::useItem(shared_ptr player, Level *level, shared_ptr item, bool bTestUseOnly) { } -void GameMode::initPlayer(std::shared_ptr player) +void GameMode::initPlayer(shared_ptr player) { } @@ -58,11 +58,11 @@ void GameMode::tick() { } -void GameMode::adjustPlayer(std::shared_ptr player) +void GameMode::adjustPlayer(shared_ptr player) { } -//bool GameMode::useItemOn(std::shared_ptr player, Level *level, std::shared_ptr item, int x, int y, int z, int face, bool bTestUseOnOnly) +//bool GameMode::useItemOn(shared_ptr player, Level *level, shared_ptr item, int x, int y, int z, int face, bool bTestUseOnOnly) //{ // // 4J-PB - Adding a test only version to allow tooltips to be displayed // int t = level->getTile(x, y, z); @@ -72,9 +72,9 @@ void GameMode::adjustPlayer(std::shared_ptr player) // { // switch(t) // { -// case Tile::recordPlayer_Id: +// case Tile::recordPlayer_Id: // case Tile::bed_Id: // special case for a bed -// if (Tile::tiles[t]->TestUse(level, x, y, z, player )) +// if (Tile::tiles[t]->TestUse(level, x, y, z, player )) // { // return true; // } @@ -89,38 +89,38 @@ void GameMode::adjustPlayer(std::shared_ptr player) // break; // } // } -// else +// else // { // if (Tile::tiles[t]->use(level, x, y, z, player )) return true; // } // } -// +// // if (item == NULL) return false; // return item->useOn(player, level, x, y, z, face, bTestUseOnOnly); //} -std::shared_ptr GameMode::createPlayer(Level *level) +shared_ptr GameMode::createPlayer(Level *level) { - return std::shared_ptr( new LocalPlayer(minecraft, level, minecraft->user, level->dimension->id) ); + return shared_ptr( new LocalPlayer(minecraft, level, minecraft->user, level->dimension->id) ); } -bool GameMode::interact(std::shared_ptr player, std::shared_ptr entity) +bool GameMode::interact(shared_ptr player, shared_ptr entity) { return player->interact(entity); } -void GameMode::attack(std::shared_ptr player, std::shared_ptr entity) +void GameMode::attack(shared_ptr player, shared_ptr entity) { player->attack(entity); } -std::shared_ptr GameMode::handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, std::shared_ptr player) +shared_ptr GameMode::handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, shared_ptr player) { return nullptr; } -void GameMode::handleCloseInventory(int containerId, std::shared_ptr player) +void GameMode::handleCloseInventory(int containerId, shared_ptr player) { player->containerMenu->removed(player); delete player->containerMenu; @@ -137,7 +137,7 @@ bool GameMode::isCutScene() return false; } -void GameMode::releaseUsingItem(std::shared_ptr player) +void GameMode::releaseUsingItem(shared_ptr player) { player->releaseUsingItem(); } @@ -162,21 +162,21 @@ bool GameMode::hasFarPickRange() return false; } -void GameMode::handleCreativeModeItemAdd(std::shared_ptr clicked, int i) +void GameMode::handleCreativeModeItemAdd(shared_ptr clicked, int i) { } -void GameMode::handleCreativeModeItemDrop(std::shared_ptr clicked) +void GameMode::handleCreativeModeItemDrop(shared_ptr clicked) { } -bool GameMode::handleCraftItem(int recipe, std::shared_ptr player) +bool GameMode::handleCraftItem(int recipe, shared_ptr player) { return true; } // 4J-PB -void GameMode::handleDebugOptions(unsigned int uiVal, std::shared_ptr player) +void GameMode::handleDebugOptions(unsigned int uiVal, shared_ptr player) { player->SetDebugOptions(uiVal); } diff --git a/Minecraft.Client/GameMode.h b/Minecraft.Client/GameMode.h index 71559708..ab9ec9d1 100644 --- a/Minecraft.Client/GameMode.h +++ b/Minecraft.Client/GameMode.h @@ -25,32 +25,32 @@ public: virtual void stopDestroyBlock() = 0; virtual void render(float a); virtual float getPickRange() = 0; - virtual void initPlayer(std::shared_ptr player); + virtual void initPlayer(shared_ptr player); virtual void tick(); virtual bool canHurtPlayer() = 0; - virtual void adjustPlayer(std::shared_ptr player); - virtual bool useItem(std::shared_ptr player, Level *level, std::shared_ptr item, bool bTestUseOnly=false); - virtual bool useItemOn(std::shared_ptr player, Level *level, std::shared_ptr item, int x, int y, int z, int face, bool bTestUseOnOnly=false, bool *pbUsedItem = NULL) = 0; - - virtual std::shared_ptr createPlayer(Level *level); - virtual bool interact(std::shared_ptr player, std::shared_ptr entity); - virtual void attack(std::shared_ptr player, std::shared_ptr entity); - virtual std::shared_ptr handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, std::shared_ptr player); - virtual void handleCloseInventory(int containerId, std::shared_ptr player); + virtual void adjustPlayer(shared_ptr player); + virtual bool useItem(shared_ptr player, Level *level, shared_ptr item, bool bTestUseOnly=false); + virtual bool useItemOn(shared_ptr player, Level *level, shared_ptr item, int x, int y, int z, int face, bool bTestUseOnOnly=false, bool *pbUsedItem = NULL) = 0; + + virtual shared_ptr createPlayer(Level *level); + virtual bool interact(shared_ptr player, shared_ptr entity); + virtual void attack(shared_ptr player, shared_ptr entity); + virtual shared_ptr handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, shared_ptr player); + virtual void handleCloseInventory(int containerId, shared_ptr player); virtual void handleInventoryButtonClick(int containerId, int buttonId); virtual bool isCutScene(); - virtual void releaseUsingItem(std::shared_ptr player); + virtual void releaseUsingItem(shared_ptr player); virtual bool hasExperience(); virtual bool hasMissTime(); virtual bool hasInfiniteItems(); virtual bool hasFarPickRange(); - virtual void handleCreativeModeItemAdd(std::shared_ptr clicked, int i); - virtual void handleCreativeModeItemDrop(std::shared_ptr clicked); + virtual void handleCreativeModeItemAdd(shared_ptr clicked, int i); + virtual void handleCreativeModeItemDrop(shared_ptr clicked); // 4J Stu - Added so we can send packets for this in the network game - virtual bool handleCraftItem(int recipe, std::shared_ptr player); - virtual void handleDebugOptions(unsigned int uiVal, std::shared_ptr player); + virtual bool handleCraftItem(int recipe, shared_ptr player); + virtual void handleDebugOptions(unsigned int uiVal, shared_ptr player); // 4J Stu - Added for tutorial checks virtual bool isInputAllowed(int mapping) { return true; } diff --git a/Minecraft.Client/GameRenderer.cpp b/Minecraft.Client/GameRenderer.cpp index 1cc1044f..716d3307 100644 --- a/Minecraft.Client/GameRenderer.cpp +++ b/Minecraft.Client/GameRenderer.cpp @@ -352,13 +352,13 @@ void GameRenderer::pick(float a) Vec3 *to = from->add(b->x * range, b->y * range, b->z * range); hovered = nullptr; float overlap = 1; - vector > *objects = mc->level->getEntities(mc->cameraTargetPlayer, mc->cameraTargetPlayer->bb->expand(b->x * (range), b->y * (range), b->z * (range))->grow(overlap, overlap, overlap)); + vector > *objects = mc->level->getEntities(mc->cameraTargetPlayer, mc->cameraTargetPlayer->bb->expand(b->x * (range), b->y * (range), b->z * (range))->grow(overlap, overlap, overlap)); double nearest = dist; AUTO_VAR(itEnd, objects->end()); for (AUTO_VAR(it, objects->begin()); it != itEnd; it++) { - std::shared_ptr e = *it; //objects->at(i); + shared_ptr e = *it; //objects->at(i); if (!e->isPickable()) continue; float rr = e->getPickRadius(); @@ -407,7 +407,7 @@ float GameRenderer::GetFovVal() void GameRenderer::tickFov() { - std::shared_ptrplayer = dynamic_pointer_cast(mc->cameraTargetPlayer); + shared_ptrplayer = dynamic_pointer_cast(mc->cameraTargetPlayer); int playerIdx = player ? player->GetXboxPad() : 0; tFov[playerIdx] = player->getFieldOfViewModifier(); @@ -420,7 +420,7 @@ float GameRenderer::getFov(float a, bool applyEffects) { if (cameraFlip > 0 ) return 90; - std::shared_ptr player = dynamic_pointer_cast(mc->cameraTargetPlayer); + shared_ptr player = dynamic_pointer_cast(mc->cameraTargetPlayer); int playerIdx = player ? player->GetXboxPad() : 0; float fov = m_fov;//70; if (applyEffects) @@ -444,7 +444,7 @@ float GameRenderer::getFov(float a, bool applyEffects) void GameRenderer::bobHurt(float a) { - std::shared_ptr player = mc->cameraTargetPlayer; + shared_ptr player = mc->cameraTargetPlayer; float hurt = player->hurtTime - a; @@ -470,12 +470,12 @@ void GameRenderer::bobHurt(float a) void GameRenderer::bobView(float a) { - std::shared_ptr player = dynamic_pointer_cast(mc->cameraTargetPlayer); + shared_ptr player = dynamic_pointer_cast(mc->cameraTargetPlayer); if(player==NULL) { return; } - //std::shared_ptr player = dynamic_pointer_cast(mc->cameraTargetPlayer); + //shared_ptr player = dynamic_pointer_cast(mc->cameraTargetPlayer); float wda = player->walkDist - player->walkDistO; float b = -(player->walkDist + wda * a); @@ -489,8 +489,8 @@ void GameRenderer::bobView(float a) void GameRenderer::moveCameraToPlayer(float a) { - std::shared_ptr player = mc->cameraTargetPlayer; - std::shared_ptr localplayer = dynamic_pointer_cast(mc->cameraTargetPlayer); + shared_ptr player = mc->cameraTargetPlayer; + shared_ptr localplayer = dynamic_pointer_cast(mc->cameraTargetPlayer); float heightOffset = player->heightOffset - 1.62f; double x = player->xo + (player->x - player->xo) * a; @@ -719,12 +719,12 @@ void GameRenderer::renderItemInHand(float a, int eye) { if (cameraFlip > 0) return; - std::shared_ptr localplayer = dynamic_pointer_cast(mc->cameraTargetPlayer); + shared_ptr localplayer = dynamic_pointer_cast(mc->cameraTargetPlayer); // 4J-PB - to turn off the hand for screenshots, but not when the item held is a map if ( localplayer!=NULL) { - std::shared_ptr item = localplayer->inventory->getSelected(); + shared_ptr item = localplayer->inventory->getSelected(); if(!(item && item->getItem()->id==Item::map_Id) && app.GetGameSettings(localplayer->GetXboxPad(),eGameSetting_DisplayHand)==0 ) return; } @@ -864,7 +864,7 @@ void GameRenderer::updateLightTexture(float a) for(int j = 0; j < XUSER_MAX_COUNT; j++ ) { // Loop over all the players - std::shared_ptr player = Minecraft::GetInstance()->localplayers[j]; + shared_ptr player = Minecraft::GetInstance()->localplayers[j]; if (player == NULL) continue; Level *level = player->level; // 4J - was mc->level when it was just to update the one light texture @@ -969,7 +969,7 @@ void GameRenderer::updateLightTexture(float a) } } -float GameRenderer::getNightVisionScale(std::shared_ptr player, float a) +float GameRenderer::getNightVisionScale(shared_ptr player, float a) { int duration = player->getEffect(MobEffect::nightVision)->getDuration(); if (duration > (SharedConstants::TICKS_PER_SECOND * 10)) @@ -1269,7 +1269,7 @@ void GameRenderer::renderLevel(float a, int64_t until) } pick(a); - std::shared_ptr cameraEntity = mc->cameraTargetPlayer; + shared_ptr cameraEntity = mc->cameraTargetPlayer; LevelRenderer *levelRenderer = mc->levelRenderer; ParticleEngine *particleEngine = mc->particleEngine; double xOff = cameraEntity->xOld + (cameraEntity->x - cameraEntity->xOld) * a; @@ -1383,10 +1383,10 @@ void GameRenderer::renderLevel(float a, int64_t until) PIXEndNamedEvent(); turnOffLightLayer(a); // 4J - brought forward from 1.8.2 - std::shared_ptr player = dynamic_pointer_cast(cameraEntity); + shared_ptr player = dynamic_pointer_cast(cameraEntity); if (mc->hitResult != NULL && cameraEntity->isUnderLiquid(Material::water) && player!=NULL) //&& !mc->options.hideGui) { - //std::shared_ptr player = dynamic_pointer_cast(cameraEntity); + //shared_ptr player = dynamic_pointer_cast(cameraEntity); glDisable(GL_ALPHA_TEST); levelRenderer->renderHit(player, mc->hitResult, 0, player->inventory->getSelected(), a); levelRenderer->renderHitOutline(player, mc->hitResult, 0, player->inventory->getSelected(), a); @@ -1445,7 +1445,7 @@ void GameRenderer::renderLevel(float a, int64_t until) { if (mc->hitResult != NULL && !cameraEntity->isUnderLiquid(Material::water)) { - std::shared_ptr player = dynamic_pointer_cast(cameraEntity); + shared_ptr player = dynamic_pointer_cast(cameraEntity); glDisable(GL_ALPHA_TEST); levelRenderer->renderHit(player, mc->hitResult, 0, player->inventory->getSelected(), a); levelRenderer->renderHitOutline(player, mc->hitResult, 0, player->inventory->getSelected(), a); @@ -1512,7 +1512,7 @@ void GameRenderer::tickRain() rainLevel /= ( mc->levelRenderer->activePlayers() + 1 ); random->setSeed(_tick * 312987231l); - std::shared_ptr player = mc->cameraTargetPlayer; + shared_ptr player = mc->cameraTargetPlayer; Level *level = mc->level; int x0 = Mth::floor(player->x); @@ -1549,7 +1549,7 @@ void GameRenderer::tickRain() { if (Tile::tiles[t]->material == Material::lava) { - mc->particleEngine->add( std::shared_ptr( new SmokeParticle(level, x + xa, y + 0.1f - Tile::tiles[t]->getShapeY0(), z + za, 0, 0, 0) ) ); + mc->particleEngine->add( shared_ptr( new SmokeParticle(level, x + xa, y + 0.1f - Tile::tiles[t]->getShapeY0(), z + za, 0, 0, 0) ) ); } else { @@ -1559,7 +1559,7 @@ void GameRenderer::tickRain() rainPosY = y + 0.1f - Tile::tiles[t]->getShapeY0(); rainPosZ = z + za; } - mc->particleEngine->add( std::shared_ptr( new WaterDropParticle(level, x + xa, y + 0.1f - Tile::tiles[t]->getShapeY0(), z + za) ) ); + mc->particleEngine->add( shared_ptr( new WaterDropParticle(level, x + xa, y + 0.1f - Tile::tiles[t]->getShapeY0(), z + za) ) ); } } } @@ -1612,7 +1612,7 @@ void GameRenderer::renderSnowAndRain(float a) } } - std::shared_ptr player = mc->cameraTargetPlayer; + shared_ptr player = mc->cameraTargetPlayer; Level *level = mc->level; int x0 = Mth::floor(player->x); @@ -1796,7 +1796,7 @@ void GameRenderer::setupGuiScreen(int forceScale /*=-1*/) void GameRenderer::setupClearColor(float a) { Level *level = mc->level; - std::shared_ptr player = mc->cameraTargetPlayer; + shared_ptr player = mc->cameraTargetPlayer; float whiteness = 1.0f / (4 - mc->options->viewDistance); whiteness = 1 - (float) pow((double)whiteness, 0.25); @@ -1953,7 +1953,7 @@ void GameRenderer::setupClearColor(float a) void GameRenderer::setupFog(int i, float alpha) { - std::shared_ptr player = mc->cameraTargetPlayer; + shared_ptr player = mc->cameraTargetPlayer; // 4J - check for creative mode brought forward from 1.2.3 bool creative = false; diff --git a/Minecraft.Client/GameRenderer.h b/Minecraft.Client/GameRenderer.h index 6be8d03e..fca091a1 100644 --- a/Minecraft.Client/GameRenderer.h +++ b/Minecraft.Client/GameRenderer.h @@ -25,7 +25,7 @@ public: ItemInHandRenderer *itemInHandRenderer; private: int _tick; - std::shared_ptr hovered; + shared_ptr hovered; // smooth camera movement SmoothFloat smoothTurnX; @@ -108,7 +108,7 @@ public: private: void tickLightTexture(); void updateLightTexture(float a); - float getNightVisionScale(std::shared_ptr player, float a); + float getNightVisionScale(shared_ptr player, float a); public: void render(float a, bool bFirst); // 4J added bFirst void renderLevel(float a); diff --git a/Minecraft.Client/GhastModel.cpp b/Minecraft.Client/GhastModel.cpp index bc41c774..460c28ff 100644 --- a/Minecraft.Client/GhastModel.cpp +++ b/Minecraft.Client/GhastModel.cpp @@ -42,7 +42,7 @@ void GhastModel::setupAnim(float time, float r, float bob, float yRot, float xRo } } -void GhastModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void GhastModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/GhastModel.h b/Minecraft.Client/GhastModel.h index 59ce7b7d..22e9023c 100644 --- a/Minecraft.Client/GhastModel.h +++ b/Minecraft.Client/GhastModel.h @@ -10,5 +10,5 @@ public: GhastModel(); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); }; \ No newline at end of file diff --git a/Minecraft.Client/GhastRenderer.cpp b/Minecraft.Client/GhastRenderer.cpp index 59dd361e..1d8a2833 100644 --- a/Minecraft.Client/GhastRenderer.cpp +++ b/Minecraft.Client/GhastRenderer.cpp @@ -7,10 +7,10 @@ GhastRenderer::GhastRenderer() : MobRenderer(new GhastModel(), 0.5f) { } -void GhastRenderer::scale(std::shared_ptr mob, float a) +void GhastRenderer::scale(shared_ptr mob, float a) { - std::shared_ptr ghast = dynamic_pointer_cast(mob); - + shared_ptr ghast = dynamic_pointer_cast(mob); + float ss = (ghast->oCharge+(ghast->charge-ghast->oCharge)*a)/20.0f; if (ss<0) ss = 0; ss = 1/(ss*ss*ss*ss*ss*2+1); diff --git a/Minecraft.Client/GhastRenderer.h b/Minecraft.Client/GhastRenderer.h index 1bd3131f..6778b9a5 100644 --- a/Minecraft.Client/GhastRenderer.h +++ b/Minecraft.Client/GhastRenderer.h @@ -7,5 +7,5 @@ public: GhastRenderer(); protected: - virtual void scale(std::shared_ptr mob, float a); + virtual void scale(shared_ptr mob, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/GiantMobRenderer.cpp b/Minecraft.Client/GiantMobRenderer.cpp index 7df83317..6dabf7cb 100644 --- a/Minecraft.Client/GiantMobRenderer.cpp +++ b/Minecraft.Client/GiantMobRenderer.cpp @@ -1,12 +1,12 @@ #include "stdafx.h" -#include "GiantMobRenderer.h" +#include "GiantMobRenderer.h" GiantMobRenderer::GiantMobRenderer(Model *model, float shadow, float _scale) : MobRenderer(model, shadow *_scale) { this->_scale = _scale; } -void GiantMobRenderer::scale(std::shared_ptr mob, float a) +void GiantMobRenderer::scale(shared_ptr mob, float a) { glScalef(_scale, _scale, _scale); } \ No newline at end of file diff --git a/Minecraft.Client/GiantMobRenderer.h b/Minecraft.Client/GiantMobRenderer.h index c4070863..5b1cce1d 100644 --- a/Minecraft.Client/GiantMobRenderer.h +++ b/Minecraft.Client/GiantMobRenderer.h @@ -10,5 +10,5 @@ public: GiantMobRenderer(Model *model, float shadow, float scale); protected: - virtual void scale(std::shared_ptr mob, float a); + virtual void scale(shared_ptr mob, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/Gui.cpp b/Minecraft.Client/Gui.cpp index ff1f407d..ffdf5055 100644 --- a/Minecraft.Client/Gui.cpp +++ b/Minecraft.Client/Gui.cpp @@ -225,7 +225,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) // Display the pumpkin screen effect ///////////////////////////////////////////////////////////////////////////////////// - std::shared_ptr headGear = minecraft->player->inventory->getArmor(3); + shared_ptr headGear = minecraft->player->inventory->getArmor(3); // 4J-PB - changing this to be per player //if (!minecraft->options->thirdPersonView && headGear != NULL && headGear->id == Tile::pumpkin_Id) renderPumpkin(screenWidth, screenHeight); @@ -302,7 +302,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) minecraft->textures->bindTexture(TN_GUI_GUI); // 4J was L"/gui/gui.png" MemSect(0); - std::shared_ptr inventory = minecraft->player->inventory; + shared_ptr inventory = minecraft->player->inventory; if(bTwoPlayerSplitscreen) { // need to apply scale factors depending on the mode @@ -1027,7 +1027,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) // { // if (EnderDragonRenderer::bossInstance == NULL) return; // -// std::shared_ptr boss = EnderDragonRenderer::bossInstance; +// shared_ptr boss = EnderDragonRenderer::bossInstance; // EnderDragonRenderer::bossInstance = NULL; // // Minecraft *pMinecraft=Minecraft::GetInstance(); @@ -1148,7 +1148,7 @@ void Gui::renderTp(float br, int w, int h) void Gui::renderSlot(int slot, int x, int y, float a) { - std::shared_ptr item = minecraft->player->inventory->items[slot]; + shared_ptr item = minecraft->player->inventory->items[slot]; if (item == NULL) return; float pop = item->popTime - a; diff --git a/Minecraft.Client/HumanoidMobRenderer.cpp b/Minecraft.Client/HumanoidMobRenderer.cpp index af2dc0a2..389116ed 100644 --- a/Minecraft.Client/HumanoidMobRenderer.cpp +++ b/Minecraft.Client/HumanoidMobRenderer.cpp @@ -36,12 +36,12 @@ void HumanoidMobRenderer::createArmorParts() armorParts2 = new HumanoidModel(0.5f); } -void HumanoidMobRenderer::additionalRendering(std::shared_ptr mob, float a) +void HumanoidMobRenderer::additionalRendering(shared_ptr mob, float a) { float brightness = SharedConstants::TEXTURE_LIGHTING ? 1 : mob->getBrightness(a); glColor3f(brightness, brightness, brightness); - std::shared_ptr item = mob->getCarriedItem(); - std::shared_ptr headGear = mob->getArmor(3); + shared_ptr item = mob->getCarriedItem(); + shared_ptr headGear = mob->getArmor(3); if (headGear != NULL) { @@ -49,7 +49,7 @@ void HumanoidMobRenderer::additionalRendering(std::shared_ptr mob, float a) // 4J-PB - need to disable rendering armour/skulls/pumpkins for some special skins (Daleks) if((mob->getAnimOverrideBitmask()&(1<head->translateTo(1 / 16.0f); @@ -138,13 +138,13 @@ void HumanoidMobRenderer::additionalRendering(std::shared_ptr mob, float a) { this->entityRenderDispatcher->itemInHandRenderer->renderItem(mob, item, 1); } - + glPopMatrix(); } } -void HumanoidMobRenderer::scale(std::shared_ptr mob, float a) +void HumanoidMobRenderer::scale(shared_ptr mob, float a) { glScalef(_scale, _scale, _scale); } \ No newline at end of file diff --git a/Minecraft.Client/HumanoidMobRenderer.h b/Minecraft.Client/HumanoidMobRenderer.h index 6654f765..6c718fb9 100644 --- a/Minecraft.Client/HumanoidMobRenderer.h +++ b/Minecraft.Client/HumanoidMobRenderer.h @@ -7,7 +7,7 @@ class HumanoidMobRenderer : public MobRenderer { protected: HumanoidModel *humanoidModel; - float _scale; + float _scale; HumanoidModel *armorParts1; HumanoidModel *armorParts2; @@ -17,6 +17,6 @@ public: HumanoidMobRenderer(HumanoidModel *humanoidModel, float shadow, float scale); protected: virtual void createArmorParts(); - virtual void additionalRendering(std::shared_ptr mob, float a); - void scale(std::shared_ptr mob, float a); + virtual void additionalRendering(shared_ptr mob, float a); + void scale(shared_ptr mob, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/HumanoidModel.cpp b/Minecraft.Client/HumanoidModel.cpp index 5a9c465a..444d9c90 100644 --- a/Minecraft.Client/HumanoidModel.cpp +++ b/Minecraft.Client/HumanoidModel.cpp @@ -4,7 +4,7 @@ #include "..\Minecraft.World\Entity.h" #include "ModelPart.h" -// 4J added +// 4J added ModelPart * HumanoidModel::AddOrRetrievePart(SKIN_BOX *pBox) { @@ -49,9 +49,9 @@ ModelPart * HumanoidModel::AddOrRetrievePart(SKIN_BOX *pBox) pNewBox = new ModelPart(this, (int)pBox->fU, (int)pBox->fV); pNewBox->visible=false; - pNewBox->addHumanoidBox(pBox->fX, pBox->fY, pBox->fZ, pBox->fW, pBox->fH, pBox->fD, 0); + pNewBox->addHumanoidBox(pBox->fX, pBox->fY, pBox->fZ, pBox->fW, pBox->fH, pBox->fD, 0); // 4J-PB - don't compile here, since the lighting isn't set up. It'll be compiled on first use. - //pNewBox->compile(1.0f/16.0f); + //pNewBox->compile(1.0f/16.0f); pAttachTo->addChild(pNewBox); } @@ -69,7 +69,7 @@ void HumanoidModel::_init(float g, float yOffset, int texWidth, int texHeight) ear = new ModelPart(this, 24, 0); ear->addHumanoidBox(-3, -6, -1, 6, 6, 1, g); // Ear - + head = new ModelPart(this, 0, 0); head->addHumanoidBox(-4, -8, -4, 8, 8, 8, g); // Head head->setPos(0, 0 + yOffset, 0); @@ -140,8 +140,8 @@ HumanoidModel::HumanoidModel(float g, float yOffset, int texWidth, int texHeight _init(g,yOffset,texWidth,texHeight); } -void HumanoidModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) -{ +void HumanoidModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +{ if(entity!=NULL) { m_uiAnimOverrideBitmask=entity->getAnimOverrideBitmask(); @@ -183,7 +183,7 @@ void HumanoidModel::render(std::shared_ptr entity, float time, float r, void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim) { //bool bIsAttacking = (attackTime > -9990.0f); - + { head->yRot = yRot / (float) (180.0f / PI); head->xRot = xRot / (float) (180.0f / PI); @@ -253,7 +253,7 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float leg1->xRot = -HALF_PI; leg0->yRot = HALF_PI * 0.2f; leg1->yRot = -HALF_PI * 0.2f; - } + } else if(uiBitmaskOverrideAnim&(1<xRot=0.0f; @@ -261,7 +261,7 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float leg1->xRot=0.0f; leg1->zRot=0.0f; leg0->yRot = 0.0f; - leg1->yRot = 0.0f; + leg1->yRot = 0.0f; } else if(uiBitmaskOverrideAnim&(1<xRot = arm1->xRot * 0.5f - HALF_PI * 0.2f * holdingLeftHand; } - if (holdingRightHand != 0) + if (holdingRightHand != 0) { arm0->xRot = arm0->xRot * 0.5f - HALF_PI * 0.2f * holdingRightHand; } @@ -305,7 +305,7 @@ void HumanoidModel::setupAnim(float time, float r, float bob, float yRot, float float aa = Mth::sin(swing * PI); float bb = Mth::sin(attackTime * PI) * -(head->xRot - 0.7f) * 0.75f; arm0->xRot -= aa * 1.2f + bb; // 4J - changed 1.2 -> 1.2f - arm0->yRot += body->yRot * 2.0f; + arm0->yRot += body->yRot * 2.0f; if((uiBitmaskOverrideAnim&(1<xRot += ((Mth::sin(bob * 0.067f)) * 0.05f); arm1->xRot -= ((Mth::sin(bob * 0.067f)) * 0.05f); - if (bowAndArrow) + if (bowAndArrow) { float attack2 = 0.0f; float attack = 0.0f; @@ -441,15 +441,15 @@ void HumanoidModel::render(HumanoidModel *model, float scale, bool usecompiled) hair->xRot = head->xRot; body->yRot = model->body->yRot; - + arm0->xRot = model->arm0->xRot; arm0->yRot = model->arm0->yRot; arm0->zRot = model->arm0->zRot; - + arm1->xRot = model->arm1->xRot; arm1->yRot = model->arm1->yRot; arm1->zRot = model->arm1->zRot; - + leg0->xRot = model->leg0->xRot; leg1->xRot = model->leg1->xRot; diff --git a/Minecraft.Client/HumanoidModel.h b/Minecraft.Client/HumanoidModel.h index e0ebca55..0ca10f4b 100644 --- a/Minecraft.Client/HumanoidModel.h +++ b/Minecraft.Client/HumanoidModel.h @@ -5,7 +5,7 @@ class HumanoidModel : public Model { public: ModelPart *head, *hair, *body, *arm0, *arm1, *leg0, *leg1, *ear, *cloak; - //ModelPart *hat; + //ModelPart *hat; int holdingLeftHand; int holdingRightHand; @@ -53,11 +53,11 @@ public: HumanoidModel(); HumanoidModel(float g); HumanoidModel(float g, float yOffset, int texWidth, int texHeight); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); void renderHair(float scale, bool usecompiled); void renderEars(float scale, bool usecompiled); - void renderCloak(float scale, bool usecompiled); + void renderCloak(float scale, bool usecompiled); void render(HumanoidModel *model, float scale, bool usecompiled); // Add new bits to models diff --git a/Minecraft.Client/InventoryScreen.cpp b/Minecraft.Client/InventoryScreen.cpp index 61f06bae..726a5e8d 100644 --- a/Minecraft.Client/InventoryScreen.cpp +++ b/Minecraft.Client/InventoryScreen.cpp @@ -10,7 +10,7 @@ #include "StatsScreen.h" #include "..\Minecraft.World\net.minecraft.stats.h" -InventoryScreen::InventoryScreen(std::shared_ptr player) : AbstractContainerScreen(player->inventoryMenu) +InventoryScreen::InventoryScreen(shared_ptr player) : AbstractContainerScreen(player->inventoryMenu) { xMouse = yMouse = 0.0f; // 4J added diff --git a/Minecraft.Client/InventoryScreen.h b/Minecraft.Client/InventoryScreen.h index 4f62ce35..c39edfe0 100644 --- a/Minecraft.Client/InventoryScreen.h +++ b/Minecraft.Client/InventoryScreen.h @@ -6,7 +6,7 @@ class Button; class InventoryScreen : public AbstractContainerScreen { public: - InventoryScreen(std::shared_ptr player); + InventoryScreen(shared_ptr player); virtual void init(); protected: virtual void renderLabels(); diff --git a/Minecraft.Client/ItemFrameRenderer.cpp b/Minecraft.Client/ItemFrameRenderer.cpp index 06f8992e..40769fb9 100644 --- a/Minecraft.Client/ItemFrameRenderer.cpp +++ b/Minecraft.Client/ItemFrameRenderer.cpp @@ -23,11 +23,11 @@ void ItemFrameRenderer::registerTerrainTextures(IconRegister *iconRegister) backTexture = iconRegister->registerIcon(L"itemframe_back"); } -void ItemFrameRenderer::render(std::shared_ptr _itemframe, double x, double y, double z, float rot, float a) +void ItemFrameRenderer::render(shared_ptr _itemframe, double x, double y, double z, float rot, float a) { - // 4J - original version used generics and thus had an input parameter of type EnderCrystal rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type EnderCrystal rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr itemFrame = dynamic_pointer_cast(_itemframe); + shared_ptr itemFrame = dynamic_pointer_cast(_itemframe); glPushMatrix(); float xOffs = (float) (itemFrame->x - x) - 0.5f; @@ -47,7 +47,7 @@ void ItemFrameRenderer::render(std::shared_ptr _itemframe, double x, do } -void ItemFrameRenderer::drawFrame(std::shared_ptr itemFrame) +void ItemFrameRenderer::drawFrame(shared_ptr itemFrame) { Minecraft *pMinecraft=Minecraft::GetInstance(); @@ -102,14 +102,14 @@ void ItemFrameRenderer::drawFrame(std::shared_ptr itemFrame) glPopMatrix(); } -void ItemFrameRenderer::drawItem(std::shared_ptr entity) +void ItemFrameRenderer::drawItem(shared_ptr entity) { Minecraft *pMinecraft=Minecraft::GetInstance(); - std::shared_ptr instance = entity->getItem(); + shared_ptr instance = entity->getItem(); if (instance == NULL) return; - std::shared_ptr itemEntity = std::shared_ptr(new ItemEntity(entity->level, 0, 0, 0, instance)); + shared_ptr itemEntity = shared_ptr(new ItemEntity(entity->level, 0, 0, 0, instance)); itemEntity->getItem()->count = 1; itemEntity->bobOffs = 0; @@ -119,7 +119,7 @@ void ItemFrameRenderer::drawItem(std::shared_ptr entity) glRotatef(180 + entity->yRot, 0, 1, 0); glRotatef(-90 * entity->getRotation(), 0, 0, 1); - switch (entity->getRotation()) + switch (entity->getRotation()) { case 1: glTranslatef(-0.16f, -0.16f, 0); @@ -132,7 +132,7 @@ void ItemFrameRenderer::drawItem(std::shared_ptr entity) break; } - if (itemEntity->getItem()->getItem() == Item::map) + if (itemEntity->getItem()->getItem() == Item::map) { entityRenderDispatcher->textures->bindTexture(TN_MISC_MAPBG); Tesselator *t = Tesselator::getInstance(); @@ -150,13 +150,13 @@ void ItemFrameRenderer::drawItem(std::shared_ptr entity) t->vertexUV(0 - vo, 0 - vo, 0, 0, 0); t->end(); - std::shared_ptr data = Item::map->getSavedData(itemEntity->getItem(), entity->level); - if (data != NULL) + shared_ptr data = Item::map->getSavedData(itemEntity->getItem(), entity->level); + if (data != NULL) { entityRenderDispatcher->itemInHandRenderer->minimap->render(nullptr, entityRenderDispatcher->textures, data, entity->entityId); } - } - else + } + else { if (itemEntity->getItem()->getItem() == Item::compass) { @@ -178,7 +178,7 @@ void ItemFrameRenderer::drawItem(std::shared_ptr entity) ct->cycleFrames(); } } - + glPopMatrix(); } diff --git a/Minecraft.Client/ItemFrameRenderer.h b/Minecraft.Client/ItemFrameRenderer.h index b63ebf83..47f2fe90 100644 --- a/Minecraft.Client/ItemFrameRenderer.h +++ b/Minecraft.Client/ItemFrameRenderer.h @@ -9,9 +9,9 @@ private: //@Override public: void registerTerrainTextures(IconRegister *iconRegister); - virtual void render(std::shared_ptr _itemframe, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr _itemframe, double x, double y, double z, float rot, float a); private: - void drawFrame(std::shared_ptr itemFrame); - void drawItem(std::shared_ptr entity); + void drawFrame(shared_ptr itemFrame); + void drawItem(shared_ptr entity); }; diff --git a/Minecraft.Client/ItemInHandRenderer.cpp b/Minecraft.Client/ItemInHandRenderer.cpp index 14c28f02..cee9254d 100644 --- a/Minecraft.Client/ItemInHandRenderer.cpp +++ b/Minecraft.Client/ItemInHandRenderer.cpp @@ -87,7 +87,7 @@ ItemInHandRenderer::ItemInHandRenderer(Minecraft *mc, bool optimisedMinimap) t->vertexUV(x0, y1, z1, u, v); t->vertexUV(x0, y1, z0, u, v); t->vertexUV(x1, y1, z0, u, v); - } + } t->end(); glEndList(); } @@ -150,7 +150,7 @@ ItemInHandRenderer::ItemInHandRenderer(Minecraft *mc, bool optimisedMinimap) t->vertexUV(x0, y1, z1, u0, v1); t->vertexUV(x0, y1, z0, u0, v1); t->vertexUV(x1, y1, z0, u1, v1); - } + } t->end(); glDepthFunc(GL_LEQUAL); glEndList(); @@ -158,7 +158,7 @@ ItemInHandRenderer::ItemInHandRenderer(Minecraft *mc, bool optimisedMinimap) } -void ItemInHandRenderer::renderItem(std::shared_ptr mob, std::shared_ptr item, int layer, bool setColor/* = true*/) +void ItemInHandRenderer::renderItem(shared_ptr mob, shared_ptr item, int layer, bool setColor/* = true*/) { // 4J - code borrowed from render method below, although not factoring in brightness as that should already be being taken into account // by texture lighting. This is for colourising things held in 3rd person view. @@ -203,7 +203,7 @@ void ItemInHandRenderer::renderItem(std::shared_ptr mob, std::shared_ptrgetWidth(); int LOD = -1; // Default to not doing anything special with LOD forcing if( iconWidth == 32 ) @@ -312,14 +312,14 @@ void ItemInHandRenderer::renderItem3D(Tesselator *t, float u0, float v0, float u void ItemInHandRenderer::render(float a) { float h = oHeight + (height - oHeight) * a; - std::shared_ptr player = mc->player; + shared_ptr player = mc->player; // 4J - added so we can adjust the position of the hands for horizontal & vertical split screens float fudgeX = 0.0f; float fudgeY = 0.0f; float fudgeZ = 0.0f; bool splitHoriz = false; - std::shared_ptr localPlayer = dynamic_pointer_cast(player); + shared_ptr localPlayer = dynamic_pointer_cast(player); if( localPlayer ) { if( localPlayer->m_iScreenSection == C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM || @@ -353,7 +353,7 @@ void ItemInHandRenderer::render(float a) glRotatef((yr - yrr) * 0.1f, 0, 1, 0); } - std::shared_ptr item = selectedItem; + shared_ptr item = selectedItem; float br = mc->level->getBrightness(Mth::floor(player->x), Mth::floor(player->y), Mth::floor(player->z)); // 4J - change brought forward from 1.8.2 @@ -433,7 +433,7 @@ void ItemInHandRenderer::render(float a) glScalef(ss, ss, ss); // Can't turn off the hand if the player is holding a map - std::shared_ptr itemInstance = player->inventory->getSelected(); + shared_ptr itemInstance = player->inventory->getSelected(); if ((itemInstance && (itemInstance->getItem()->id==Item::map_Id)) || app.GetGameSettings(localPlayer->GetXboxPad(),eGameSetting_DisplayHand)!=0 ) { playerRenderer->renderHand(); @@ -477,7 +477,7 @@ void ItemInHandRenderer::render(float a) t->vertexUV((float)(0 - vo), (float)( 0 - vo), (float)( 0), (float)( 0), (float)( 0)); t->end(); - std::shared_ptr data = Item::map->getSavedData(item, mc->level); + shared_ptr data = Item::map->getSavedData(item, mc->level); PIXBeginNamedEvent(0,"Minimap render"); if(data != NULL) minimap->render(mc->player, mc->textures, data, mc->player->entityId); PIXEndNamedEvent(); @@ -652,7 +652,7 @@ void ItemInHandRenderer::render(float a) glScalef(ss, ss, ss); MemSect(31); // Can't turn off the hand if the player is holding a map - std::shared_ptr itemInstance = player->inventory->getSelected(); + shared_ptr itemInstance = player->inventory->getSelected(); if ( (itemInstance && (itemInstance->getItem()->id==Item::map_Id)) || app.GetGameSettings(localPlayer->GetXboxPad(),eGameSetting_DisplayHand)!=0 ) { @@ -837,8 +837,8 @@ void ItemInHandRenderer::tick() oHeight = height; - std::shared_ptr player = mc->player; - std::shared_ptr nextTile = player->inventory->getSelected(); + shared_ptr player = mc->player; + shared_ptr nextTile = player->inventory->getSelected(); bool matches = lastSlot == player->inventory->selected && nextTile == selectedItem; if (selectedItem == NULL && nextTile == NULL) diff --git a/Minecraft.Client/ItemInHandRenderer.h b/Minecraft.Client/ItemInHandRenderer.h index 975dd360..dee51a7f 100644 --- a/Minecraft.Client/ItemInHandRenderer.h +++ b/Minecraft.Client/ItemInHandRenderer.h @@ -11,7 +11,7 @@ class ItemInHandRenderer { private: Minecraft *mc; - std::shared_ptr selectedItem; + shared_ptr selectedItem; float height; float oHeight; TileRenderer *tileRenderer; @@ -23,7 +23,7 @@ public: public: ItemInHandRenderer(Minecraft *mc, bool optimisedMinimap = true); // 4J Added optimisedMinimap param - void renderItem(std::shared_ptr mob, std::shared_ptr item, int layer, bool setColor = true); // 4J added setColor parameter + void renderItem(shared_ptr mob, shared_ptr item, int layer, bool setColor = true); // 4J added setColor parameter static void renderItem3D(Tesselator *t, float u0, float v0, float u1, float v1, int width, int height, float depth, bool isGlint); // 4J added isGlint parameter public: void render(float a); diff --git a/Minecraft.Client/ItemRenderer.cpp b/Minecraft.Client/ItemRenderer.cpp index fc5e5fde..03d0d3a5 100644 --- a/Minecraft.Client/ItemRenderer.cpp +++ b/Minecraft.Client/ItemRenderer.cpp @@ -29,13 +29,13 @@ ItemRenderer::~ItemRenderer() delete random; } -void ItemRenderer::render(std::shared_ptr _itemEntity, double x, double y, double z, float rot, float a) +void ItemRenderer::render(shared_ptr _itemEntity, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr itemEntity = dynamic_pointer_cast(_itemEntity); + shared_ptr itemEntity = dynamic_pointer_cast(_itemEntity); random->setSeed(187); - std::shared_ptr item = itemEntity->getItem(); + shared_ptr item = itemEntity->getItem(); glPushMatrix(); float bob = Mth::sin((itemEntity->age + a) / 10.0f + itemEntity->bobOffs) * 0.1f + 0.1f; @@ -54,7 +54,7 @@ void ItemRenderer::render(std::shared_ptr _itemEntity, double x, double { glRotatef(spin, 0, 1, 0); - if (m_bItemFrame) + if (m_bItemFrame) { glScalef(1.25f, 1.25f, 1.25f); glTranslatef(0, 0.05f, 0); @@ -73,7 +73,7 @@ void ItemRenderer::render(std::shared_ptr _itemEntity, double x, double for (int i = 0; i < count; i++) { glPushMatrix(); - if (i > 0) + if (i > 0) { float xo = (random->nextFloat() * 2 - 1) * 0.2f / s; float yo = (random->nextFloat() * 2 - 1) * 0.2f / s; @@ -88,13 +88,13 @@ void ItemRenderer::render(std::shared_ptr _itemEntity, double x, double } else if (item->getItem()->hasMultipleSpriteLayers()) { - if (m_bItemFrame) + if (m_bItemFrame) { glScalef(1 / 1.95f, 1 / 1.95f, 1 / 1.95f); glTranslatef(0, -0.05f, 0); glDisable(GL_LIGHTING); - } - else + } + else { glScalef(1 / 2.0f, 1 / 2.0f, 1 / 2.0f); } @@ -124,17 +124,17 @@ void ItemRenderer::render(std::shared_ptr _itemEntity, double x, double } else { - if (m_bItemFrame) + if (m_bItemFrame) { glScalef(1 / 1.95f, 1 / 1.95f, 1 / 1.95f); glTranslatef(0, -0.05f, 0); glDisable(GL_LIGHTING); - } - else + } + else { glScalef(1 / 2.0f, 1 / 2.0f, 1 / 2.0f); } - + // 4J Stu - For rendering the static compass, we give it a non-zero aux value if(item->id == Item::compass_Id) item->setAuxValue(255); Icon *icon = item->getIcon(); @@ -172,7 +172,7 @@ void ItemRenderer::render(std::shared_ptr _itemEntity, double x, double } } -void ItemRenderer::renderItemBillboard(std::shared_ptr entity, Icon *icon, int count, float a, float red, float green, float blue) +void ItemRenderer::renderItemBillboard(shared_ptr entity, Icon *icon, int count, float a, float red, float green, float blue) { Tesselator *t = Tesselator::getInstance(); @@ -188,7 +188,7 @@ void ItemRenderer::renderItemBillboard(std::shared_ptr entity, Icon if (entityRenderDispatcher->options->fancyGraphics) { - // Consider forcing the mipmap LOD level to use, if this is to be rendered from a larger than standard source texture. + // Consider forcing the mipmap LOD level to use, if this is to be rendered from a larger than standard source texture. int iconWidth = icon->getWidth(); int LOD = -1; // Default to not doing anything special with LOD forcing if( iconWidth == 32 ) @@ -213,7 +213,7 @@ void ItemRenderer::renderItemBillboard(std::shared_ptr entity, Icon float width = 1 / 16.0f; float margin = 0.35f / 16.0f; - std::shared_ptr item = entity->getItem(); + shared_ptr item = entity->getItem(); int items = item->count; if (items < 2) @@ -315,7 +315,7 @@ void ItemRenderer::renderItemBillboard(std::shared_ptr entity, Icon } } -void ItemRenderer::renderGuiItem(Font *font, Textures *textures, std::shared_ptr item, float x, float y, float fScale, float fAlpha) +void ItemRenderer::renderGuiItem(Font *font, Textures *textures, shared_ptr item, float x, float y, float fScale, float fAlpha) { renderGuiItem(font,textures,item,x,y,fScale,fScale,fAlpha, true); } @@ -325,7 +325,7 @@ extern IDirect3DDevice9 *g_pD3DDevice; #endif // 4J - this used to take x and y as ints, and no scale and alpha - but this interface is now implemented as a wrapper round this more fully featured one -void ItemRenderer::renderGuiItem(Font *font, Textures *textures, std::shared_ptr item, float x, float y, float fScaleX,float fScaleY, float fAlpha, bool useCompiled) +void ItemRenderer::renderGuiItem(Font *font, Textures *textures, shared_ptr item, float x, float y, float fScaleX,float fScaleY, float fAlpha, bool useCompiled) { int itemId = item->id; int itemAuxValue = item->getAuxValue(); @@ -447,13 +447,13 @@ void ItemRenderer::renderGuiItem(Font *font, Textures *textures, std::shared_ptr } // 4J - original interface, now just a wrapper for preceding overload -void ItemRenderer::renderGuiItem(Font *font, Textures *textures, std::shared_ptr item, int x, int y) +void ItemRenderer::renderGuiItem(Font *font, Textures *textures, shared_ptr item, int x, int y) { renderGuiItem(font, textures, item, (float)x, (float)y, 1.0f, 1.0f ); } // 4J - this used to take x and y as ints, and no scale, alpha or foil - but this interface is now implemented as a wrapper round this more fully featured one -void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const std::shared_ptr item, float x, float y,float fScale,float fAlpha, bool isFoil) +void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const shared_ptr item, float x, float y,float fScale,float fAlpha, bool isFoil) { if(item==NULL) return; renderAndDecorateItem(font, textures, item, x, y,fScale, fScale, fAlpha, isFoil, true); @@ -461,7 +461,7 @@ void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const s // 4J - added isConstantBlended and blendFactor parameters. This is true if the gui item is being rendered from a context where it already has blending enabled to do general interface fading // (ie from the gui rather than xui). In this case we dno't want to enable/disable blending, and do need to restore the blend state when we are done. -void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const std::shared_ptr item, float x, float y,float fScaleX, float fScaleY,float fAlpha, bool isFoil, bool isConstantBlended, bool useCompiled) +void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const shared_ptr item, float x, float y,float fScaleX, float fScaleY,float fAlpha, bool isFoil, bool isConstantBlended, bool useCompiled) { if (item == NULL) { @@ -469,7 +469,7 @@ void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const s } renderGuiItem(font, textures, item, x, y,fScaleX,fScaleY,fAlpha, useCompiled); - + if (isFoil || item->isFoil()) { glDepthFunc(GL_GREATER); @@ -478,7 +478,7 @@ void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const s textures->bindTexture(TN__BLUR__MISC_GLINT); // 4J was "%blur%/misc/glint.png" blitOffset -= 50; if( !isConstantBlended ) glEnable(GL_BLEND); - + glBlendFunc(GL_DST_COLOR, GL_ONE); // 4J - changed blend equation from GL_DST_COLOR, GL_DST_COLOR so we can fade this out float blendFactor = isConstantBlended ? Gui::currentGuiBlendFactor : 1.0f; @@ -507,7 +507,7 @@ void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const s } // 4J - original interface, now just a wrapper for preceding overload -void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const std::shared_ptr item, int x, int y) +void ItemRenderer::renderAndDecorateItem(Font *font, Textures *textures, const shared_ptr item, int x, int y) { renderAndDecorateItem( font, textures, item, (float)x, (float)y, 1.0f, 1.0f, item->isFoil() ); } @@ -560,18 +560,18 @@ void ItemRenderer::blitGlint(int id, float x, float y, float w, float h) } } -void ItemRenderer::renderGuiItemDecorations(Font *font, Textures *textures, std::shared_ptr item, int x, int y, float fAlpha) +void ItemRenderer::renderGuiItemDecorations(Font *font, Textures *textures, shared_ptr item, int x, int y, float fAlpha) { renderGuiItemDecorations(font, textures, item, x, y, L"", fAlpha); } -void ItemRenderer::renderGuiItemDecorations(Font *font, Textures *textures, std::shared_ptr item, int x, int y, const wstring &countText, float fAlpha) +void ItemRenderer::renderGuiItemDecorations(Font *font, Textures *textures, shared_ptr item, int x, int y, const wstring &countText, float fAlpha) { if (item == NULL) { return; } - + glEnable(GL_BLEND); RenderManager.StateSetBlendFactor(0xffffff |(((unsigned int)(fAlpha * 0xff))<<24)); glBlendFunc(GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA); diff --git a/Minecraft.Client/ItemRenderer.h b/Minecraft.Client/ItemRenderer.h index 830e8510..9690f77c 100644 --- a/Minecraft.Client/ItemRenderer.h +++ b/Minecraft.Client/ItemRenderer.h @@ -18,20 +18,20 @@ public: ItemRenderer(); virtual ~ItemRenderer(); - virtual void render(std::shared_ptr _itemEntity, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr _itemEntity, double x, double y, double z, float rot, float a); private: - virtual void renderItemBillboard(std::shared_ptr entity, Icon *icon, int count, float a, float red, float green, float blue); + virtual void renderItemBillboard(shared_ptr entity, Icon *icon, int count, float a, float red, float green, float blue); public: // 4J - original 2 interface variants - void renderGuiItem(Font *font, Textures *textures, std::shared_ptr item, int x, int y); - void renderAndDecorateItem(Font *font, Textures *textures, const std::shared_ptr item, int x, int y); + void renderGuiItem(Font *font, Textures *textures, shared_ptr item, int x, int y); + void renderAndDecorateItem(Font *font, Textures *textures, const shared_ptr item, int x, int y); // 4J - new interfaces added - void renderGuiItem(Font *font, Textures *textures, std::shared_ptr item, float x, float y, float fScale, float fAlpha); - void renderGuiItem(Font *font, Textures *textures, std::shared_ptr item, float x, float y, float fScaleX,float fScaleY, float fAlpha, bool useCompiled); // 4J Added useCompiled - void renderAndDecorateItem(Font *font, Textures *textures, const std::shared_ptr item, float x, float y, float fScale, float fAlpha, bool isFoil); - void renderAndDecorateItem(Font *font, Textures *textures, const std::shared_ptr item, float x, float y, float fScaleX, float fScaleY, float fAlpha, bool isFoil, bool isConstantBlended, bool useCompiled = true); // 4J - added isConstantBlended and useCompiled + void renderGuiItem(Font *font, Textures *textures, shared_ptr item, float x, float y, float fScale, float fAlpha); + void renderGuiItem(Font *font, Textures *textures, shared_ptr item, float x, float y, float fScaleX,float fScaleY, float fAlpha, bool useCompiled); // 4J Added useCompiled + void renderAndDecorateItem(Font *font, Textures *textures, const shared_ptr item, float x, float y, float fScale, float fAlpha, bool isFoil); + void renderAndDecorateItem(Font *font, Textures *textures, const shared_ptr item, float x, float y, float fScaleX, float fScaleY, float fAlpha, bool isFoil, bool isConstantBlended, bool useCompiled = true); // 4J - added isConstantBlended and useCompiled // 4J Added virtual void SetItemFrame(bool bSet) {m_bItemFrame=bSet;} @@ -42,8 +42,8 @@ private: void blitGlint(int id, float x, float y, float w, float h); // 4J - changed x,y,w,h to floats public: - void renderGuiItemDecorations(Font *font, Textures *textures, std::shared_ptr item, int x, int y, float fAlpha = 1.0f); - void renderGuiItemDecorations(Font *font, Textures *textures, std::shared_ptr item, int x, int y, const wstring &countText, float fAlpha = 1.0f); + void renderGuiItemDecorations(Font *font, Textures *textures, shared_ptr item, int x, int y, float fAlpha = 1.0f); + void renderGuiItemDecorations(Font *font, Textures *textures, shared_ptr item, int x, int y, const wstring &countText, float fAlpha = 1.0f); private: void fillRect(Tesselator *t, int x, int y, int w, int h, int c); public: diff --git a/Minecraft.Client/ItemSpriteRenderer.cpp b/Minecraft.Client/ItemSpriteRenderer.cpp index 1cc60b62..5a1ea620 100644 --- a/Minecraft.Client/ItemSpriteRenderer.cpp +++ b/Minecraft.Client/ItemSpriteRenderer.cpp @@ -17,7 +17,7 @@ ItemSpriteRenderer::ItemSpriteRenderer(Item *sourceItem, int sourceItemAuxValue // this(sourceItem, 0); //} -void ItemSpriteRenderer::render(std::shared_ptr e, double x, double y, double z, float rot, float a) +void ItemSpriteRenderer::render(shared_ptr e, double x, double y, double z, float rot, float a) { // the icon is already cached in the item object, so there should not be any performance impact by not caching it here Icon *icon = sourceItem->getIcon(sourceItemAuxValue); diff --git a/Minecraft.Client/ItemSpriteRenderer.h b/Minecraft.Client/ItemSpriteRenderer.h index e8359783..e60feece 100644 --- a/Minecraft.Client/ItemSpriteRenderer.h +++ b/Minecraft.Client/ItemSpriteRenderer.h @@ -11,7 +11,7 @@ private: public: ItemSpriteRenderer(Item *sourceItem, int sourceItemAuxValue = 0); //ItemSpriteRenderer(Item *icon); - virtual void render(std::shared_ptr e, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr e, double x, double y, double z, float rot, float a); private: void renderIcon(Tesselator *t, Icon *icon); diff --git a/Minecraft.Client/LavaSlimeModel.cpp b/Minecraft.Client/LavaSlimeModel.cpp index 4c024cfe..427b9547 100644 --- a/Minecraft.Client/LavaSlimeModel.cpp +++ b/Minecraft.Client/LavaSlimeModel.cpp @@ -5,18 +5,18 @@ #include "..\Minecraft.World\LavaSlime.h" -LavaSlimeModel::LavaSlimeModel() +LavaSlimeModel::LavaSlimeModel() { - for (int i = 0; i < BODYCUBESLENGTH; i++) + for (int i = 0; i < BODYCUBESLENGTH; i++) { int u = 0; int v = i; - if (i == 2) + if (i == 2) { u = 24; v = 10; - } - else if (i == 3) + } + else if (i == 3) { u = 24; v = 19; @@ -36,33 +36,33 @@ LavaSlimeModel::LavaSlimeModel() } } -int LavaSlimeModel::getModelVersion() +int LavaSlimeModel::getModelVersion() { return 5; } -void LavaSlimeModel::prepareMobModel(std::shared_ptr mob, float time, float r, float a) +void LavaSlimeModel::prepareMobModel(shared_ptr mob, float time, float r, float a) { - std::shared_ptr lavaSlime = dynamic_pointer_cast(mob); + shared_ptr lavaSlime = dynamic_pointer_cast(mob); float slimeSquish = (lavaSlime->oSquish + (lavaSlime->squish - lavaSlime->oSquish) * a); - if (slimeSquish < 0) + if (slimeSquish < 0) { slimeSquish = 0.0f; } - for (int i = 0; i < BODYCUBESLENGTH; i++) + for (int i = 0; i < BODYCUBESLENGTH; i++) { bodyCubes[i]->y = -(4 - i) * slimeSquish * 1.7f; } } -void LavaSlimeModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void LavaSlimeModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); insideCube->render(scale, usecompiled); - for (int i = 0; i < BODYCUBESLENGTH; i++) + for (int i = 0; i < BODYCUBESLENGTH; i++) { bodyCubes[i]->render(scale, usecompiled); } diff --git a/Minecraft.Client/LavaSlimeModel.h b/Minecraft.Client/LavaSlimeModel.h index ead7147f..44bd1663 100644 --- a/Minecraft.Client/LavaSlimeModel.h +++ b/Minecraft.Client/LavaSlimeModel.h @@ -1,7 +1,7 @@ #pragma once #include "Model.h" -class LavaSlimeModel : public Model +class LavaSlimeModel : public Model { static const int BODYCUBESLENGTH=8; ModelPart *bodyCubes[BODYCUBESLENGTH]; @@ -10,6 +10,6 @@ class LavaSlimeModel : public Model public: LavaSlimeModel(); int getModelVersion(); - virtual void prepareMobModel(std::shared_ptr mob, float time, float r, float a); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void prepareMobModel(shared_ptr mob, float time, float r, float a); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); }; diff --git a/Minecraft.Client/LavaSlimeRenderer.cpp b/Minecraft.Client/LavaSlimeRenderer.cpp index 6bb75720..3d2cbf47 100644 --- a/Minecraft.Client/LavaSlimeRenderer.cpp +++ b/Minecraft.Client/LavaSlimeRenderer.cpp @@ -8,11 +8,11 @@ LavaSlimeRenderer::LavaSlimeRenderer() : MobRenderer(new LavaSlimeModel(), .25f) this->modelVersion = ((LavaSlimeModel *) model)->getModelVersion(); } -void LavaSlimeRenderer::render(std::shared_ptr _mob, double x, double y, double z, float rot, float a) -{ - // 4J - original version used generics and thus had an input parameter of type LavaSlime rather than std::shared_ptr we have here - +void LavaSlimeRenderer::render(shared_ptr _mob, double x, double y, double z, float rot, float a) +{ + // 4J - original version used generics and thus had an input parameter of type LavaSlime rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); int modelVersion = ((LavaSlimeModel *) model)->getModelVersion(); if (modelVersion != this->modelVersion) { @@ -23,11 +23,11 @@ void LavaSlimeRenderer::render(std::shared_ptr _mob, double x, double y, MobRenderer::render(mob, x, y, z, rot, a); } -void LavaSlimeRenderer::scale(std::shared_ptr _slime, float a) +void LavaSlimeRenderer::scale(shared_ptr _slime, float a) { - // 4J - original version used generics and thus had an input parameter of type LavaSlime rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type LavaSlime rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr slime = dynamic_pointer_cast(_slime); + shared_ptr slime = dynamic_pointer_cast(_slime); int size = slime->getSize(); float ss = (slime->oSquish + (slime->squish - slime->oSquish) * a) / (size * 0.5f + 1); float w = 1 / (ss + 1); diff --git a/Minecraft.Client/LavaSlimeRenderer.h b/Minecraft.Client/LavaSlimeRenderer.h index 29afb390..b0c44d1e 100644 --- a/Minecraft.Client/LavaSlimeRenderer.h +++ b/Minecraft.Client/LavaSlimeRenderer.h @@ -10,8 +10,8 @@ private: public: LavaSlimeRenderer(); - virtual void render(std::shared_ptr _mob, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr _mob, double x, double y, double z, float rot, float a); protected: - virtual void scale(std::shared_ptr _slime, float a); + virtual void scale(shared_ptr _slime, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/LevelRenderer.cpp b/Minecraft.Client/LevelRenderer.cpp index 4cdb0cbe..917fa9f3 100644 --- a/Minecraft.Client/LevelRenderer.cpp +++ b/Minecraft.Client/LevelRenderer.cpp @@ -475,7 +475,7 @@ void LevelRenderer::allChanged(int playerIndex) if (level != NULL) { - std::shared_ptr player = mc->cameraTargetPlayer; + shared_ptr player = mc->cameraTargetPlayer; if (player != NULL) { this->resortChunks(Mth::floor(player->x), Mth::floor(player->y), Mth::floor(player->z)); @@ -509,7 +509,7 @@ void LevelRenderer::renderEntities(Vec3 *cam, Culler *culler, float a) renderedEntities = 0; culledEntities = 0; - std::shared_ptr player = mc->cameraTargetPlayer; + shared_ptr player = mc->cameraTargetPlayer; EntityRenderDispatcher::xOff = (player->xOld + (player->x - player->xOld) * a); EntityRenderDispatcher::yOff = (player->yOld + (player->y - player->yOld) * a); @@ -520,13 +520,13 @@ void LevelRenderer::renderEntities(Vec3 *cam, Culler *culler, float a) mc->gameRenderer->turnOnLightLayer(a); // 4J - brought forward from 1.8.2 - vector > entities = level[playerIndex]->getAllEntities(); + vector > entities = level[playerIndex]->getAllEntities(); totalEntities = (int)entities.size(); AUTO_VAR(itEndGE, level[playerIndex]->globalEntities.end()); for (AUTO_VAR(it, level[playerIndex]->globalEntities.begin()); it != itEndGE; it++) { - std::shared_ptr entity = *it; //level->globalEntities[i]; + shared_ptr entity = *it; //level->globalEntities[i]; renderedEntities++; if (entity->shouldRender(cam)) EntityRenderDispatcher::instance->render(entity, a); } @@ -534,13 +534,13 @@ void LevelRenderer::renderEntities(Vec3 *cam, Culler *culler, float a) AUTO_VAR(itEndEnts, entities.end()); for (AUTO_VAR(it, entities.begin()); it != itEndEnts; it++) { - std::shared_ptr entity = *it; //entities[i]; + shared_ptr entity = *it; //entities[i]; if ((entity->shouldRender(cam) && (entity->noCulling || culler->isVisible(entity->bb)))) { // 4J-PB - changing this to be per player //if (entity == mc->cameraTargetPlayer && !mc->options->thirdPersonView && !mc->cameraTargetPlayer->isSleeping()) continue; - std::shared_ptr localplayer = dynamic_pointer_cast(mc->cameraTargetPlayer); + shared_ptr localplayer = dynamic_pointer_cast(mc->cameraTargetPlayer); if (localplayer && entity == mc->cameraTargetPlayer && !localplayer->ThirdPersonView() && !mc->cameraTargetPlayer->isSleeping()) continue; @@ -669,7 +669,7 @@ void LevelRenderer::resortChunks(int xc, int yc, int zc) LeaveCriticalSection(&m_csDirtyChunks); } -int LevelRenderer::render(std::shared_ptr player, int layer, double alpha, bool updateChunks) +int LevelRenderer::render(shared_ptr player, int layer, double alpha, bool updateChunks) { int playerIndex = mc->player->GetXboxPad(); @@ -741,7 +741,7 @@ int LevelRenderer::renderChunks(int from, int to, int layer, double alpha) #if 1 // 4J - cut down version, we're not using offsetted render lists, or a sorted chunk list, anymore mc->gameRenderer->turnOnLightLayer(alpha); // 4J - brought forward from 1.8.2 - std::shared_ptr player = mc->cameraTargetPlayer; + shared_ptr player = mc->cameraTargetPlayer; double xOff = player->xOld + (player->x - player->xOld) * alpha; double yOff = player->yOld + (player->y - player->yOld) * alpha; double zOff = player->zOld + (player->z - player->zOld) * alpha; @@ -854,7 +854,7 @@ int LevelRenderer::renderChunks(int from, int to, int layer, double alpha) } } - std::shared_ptr player = mc->cameraTargetPlayer; + shared_ptr player = mc->cameraTargetPlayer; double xOff = player->xOld + (player->x - player->xOld) * alpha; double yOff = player->yOld + (player->y - player->yOld) * alpha; double zOff = player->zOld + (player->z - player->zOld) * alpha; @@ -1909,8 +1909,8 @@ bool LevelRenderer::updateDirtyChunks() for( int p = 0; p < XUSER_MAX_COUNT; p++ ) { // It's possible that the localplayers member can be set to NULL on the main thread when a player chooses to exit the game - // So take a reference to the player object now. As it is a std::shared_ptr it should live as long as we need it - std::shared_ptr player = mc->localplayers[p]; + // So take a reference to the player object now. As it is a shared_ptr it should live as long as we need it + shared_ptr player = mc->localplayers[p]; if( player == NULL ) continue; if( chunks[p].data == NULL ) continue; if( level[p] == NULL ) continue; @@ -2161,7 +2161,7 @@ bool LevelRenderer::updateDirtyChunks() } -void LevelRenderer::renderHit(std::shared_ptr player, HitResult *h, int mode, std::shared_ptr inventoryItem, float a) +void LevelRenderer::renderHit(shared_ptr player, HitResult *h, int mode, shared_ptr inventoryItem, float a) { Tesselator *t = Tesselator::getInstance(); glEnable(GL_BLEND); @@ -2180,7 +2180,7 @@ void LevelRenderer::renderHit(std::shared_ptr player, HitResult *h, int glDisable(GL_ALPHA_TEST); } -void LevelRenderer::renderDestroyAnimation(Tesselator *t, std::shared_ptr player, float a) +void LevelRenderer::renderDestroyAnimation(Tesselator *t, shared_ptr player, float a) { double xo = player->xOld + (player->x - player->xOld) * a; double yo = player->yOld + (player->y - player->yOld) * a; @@ -2246,7 +2246,7 @@ void LevelRenderer::renderDestroyAnimation(Tesselator *t, std::shared_ptr player, HitResult *h, int mode, std::shared_ptr inventoryItem, float a) +void LevelRenderer::renderHitOutline(shared_ptr player, HitResult *h, int mode, shared_ptr inventoryItem, float a) { if (mode == 0 && h->type == HitResult::TILE) @@ -2586,7 +2586,7 @@ void LevelRenderer::playSound(int iSound, double x, double y, double z, float vo } */ } -void LevelRenderer::playSound(std::shared_ptr entity,int iSound, double x, double y, double z, float volume, float pitch, float fSoundClipDist) +void LevelRenderer::playSound(shared_ptr entity,int iSound, double x, double y, double z, float volume, float pitch, float fSoundClipDist) { } @@ -2606,21 +2606,21 @@ if (xd * xd + yd * yd + zd * zd > particleDistance * particleDistance) return; int playerIndex = mc->player->GetXboxPad(); // 4J added -if (name== L"bubble") mc->particleEngine->add(std::shared_ptr( new BubbleParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"smoke") mc->particleEngine->add(std::shared_ptr( new SmokeParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"note") mc->particleEngine->add(std::shared_ptr( new NoteParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"portal") mc->particleEngine->add(std::shared_ptr( new PortalParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"explode") mc->particleEngine->add(std::shared_ptr( new ExplodeParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"flame") mc->particleEngine->add(std::shared_ptr( new FlameParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"lava") mc->particleEngine->add(std::shared_ptr( new LavaParticle(level[playerIndex], x, y, z) ) ); -else if (name== L"footstep") mc->particleEngine->add(std::shared_ptr( new FootstepParticle(textures, level[playerIndex], x, y, z) ) ); -else if (name== L"splash") mc->particleEngine->add(std::shared_ptr( new SplashParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"largesmoke") mc->particleEngine->add(std::shared_ptr( new SmokeParticle(level[playerIndex], x, y, z, xa, ya, za, 2.5f) ) ); -else if (name== L"reddust") mc->particleEngine->add(std::shared_ptr( new RedDustParticle(level[playerIndex], x, y, z, (float) xa, (float) ya, (float) za) ) ); -else if (name== L"snowballpoof") mc->particleEngine->add(std::shared_ptr( new BreakingItemParticle(level[playerIndex], x, y, z, Item::snowBall) ) ); -else if (name== L"snowshovel") mc->particleEngine->add(std::shared_ptr( new SnowShovelParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); -else if (name== L"slime") mc->particleEngine->add(std::shared_ptr( new BreakingItemParticle(level[playerIndex], x, y, z, Item::slimeBall)) ) ; -else if (name== L"heart") mc->particleEngine->add(std::shared_ptr( new HeartParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +if (name== L"bubble") mc->particleEngine->add(shared_ptr( new BubbleParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"smoke") mc->particleEngine->add(shared_ptr( new SmokeParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"note") mc->particleEngine->add(shared_ptr( new NoteParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"portal") mc->particleEngine->add(shared_ptr( new PortalParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"explode") mc->particleEngine->add(shared_ptr( new ExplodeParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"flame") mc->particleEngine->add(shared_ptr( new FlameParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"lava") mc->particleEngine->add(shared_ptr( new LavaParticle(level[playerIndex], x, y, z) ) ); +else if (name== L"footstep") mc->particleEngine->add(shared_ptr( new FootstepParticle(textures, level[playerIndex], x, y, z) ) ); +else if (name== L"splash") mc->particleEngine->add(shared_ptr( new SplashParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"largesmoke") mc->particleEngine->add(shared_ptr( new SmokeParticle(level[playerIndex], x, y, z, xa, ya, za, 2.5f) ) ); +else if (name== L"reddust") mc->particleEngine->add(shared_ptr( new RedDustParticle(level[playerIndex], x, y, z, (float) xa, (float) ya, (float) za) ) ); +else if (name== L"snowballpoof") mc->particleEngine->add(shared_ptr( new BreakingItemParticle(level[playerIndex], x, y, z, Item::snowBall) ) ); +else if (name== L"snowshovel") mc->particleEngine->add(shared_ptr( new SnowShovelParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); +else if (name== L"slime") mc->particleEngine->add(shared_ptr( new BreakingItemParticle(level[playerIndex], x, y, z, Item::slimeBall)) ) ; +else if (name== L"heart") mc->particleEngine->add(shared_ptr( new HeartParticle(level[playerIndex], x, y, z, xa, ya, za) ) ); } */ @@ -2629,7 +2629,7 @@ void LevelRenderer::addParticle(ePARTICLE_TYPE eParticleType, double x, double y addParticleInternal( eParticleType, x, y, z, xa, ya, za ); } -std::shared_ptr LevelRenderer::addParticleInternal(ePARTICLE_TYPE eParticleType, double x, double y, double z, double xa, double ya, double za) +shared_ptr LevelRenderer::addParticleInternal(ePARTICLE_TYPE eParticleType, double x, double y, double z, double xa, double ya, double za) { if (mc == NULL || mc->cameraTargetPlayer == NULL || mc->particleEngine == NULL) { @@ -2683,7 +2683,7 @@ std::shared_ptr LevelRenderer::addParticleInternal(ePARTICLE_TYPE ePar bool inRange = false; for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { - std::shared_ptr thisPlayer = mc->localplayers[i]; + shared_ptr thisPlayer = mc->localplayers[i]; if(thisPlayer != NULL && level[i] == lev) { xd = thisPlayer->x - x; @@ -2706,35 +2706,35 @@ std::shared_ptr LevelRenderer::addParticleInternal(ePARTICLE_TYPE ePar return nullptr; } - std::shared_ptr particle; + shared_ptr particle; switch(eParticleType) { case eParticleType_hugeexplosion: - particle = std::shared_ptr(new HugeExplosionSeedParticle(lev, x, y, z, xa, ya, za)); + particle = shared_ptr(new HugeExplosionSeedParticle(lev, x, y, z, xa, ya, za)); break; case eParticleType_largeexplode: - particle = std::shared_ptr(new HugeExplosionParticle(textures, lev, x, y, z, xa, ya, za)); + particle = shared_ptr(new HugeExplosionParticle(textures, lev, x, y, z, xa, ya, za)); break; case eParticleType_bubble: - particle = std::shared_ptr( new BubbleParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new BubbleParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_suspended: - particle = std::shared_ptr( new SuspendedParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new SuspendedParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_depthsuspend: - particle = std::shared_ptr( new SuspendedTownParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new SuspendedTownParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_townaura: - particle = std::shared_ptr( new SuspendedTownParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new SuspendedTownParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_crit: { - std::shared_ptr critParticle2 = std::shared_ptr(new CritParticle2(lev, x, y, z, xa, ya, za)); + shared_ptr critParticle2 = shared_ptr(new CritParticle2(lev, x, y, z, xa, ya, za)); critParticle2->CritParticle2PostConstructor(); - particle = std::shared_ptr( critParticle2 ); + particle = shared_ptr( critParticle2 ); // request from 343 to set pink for the needler in the Halo Texture Pack // Set particle colour from colour-table. unsigned int cStart = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Particle_CritStart ); @@ -2758,15 +2758,15 @@ std::shared_ptr LevelRenderer::addParticleInternal(ePARTICLE_TYPE ePar break; case eParticleType_magicCrit: { - std::shared_ptr critParticle2 = std::shared_ptr(new CritParticle2(lev, x, y, z, xa, ya, za)); + shared_ptr critParticle2 = shared_ptr(new CritParticle2(lev, x, y, z, xa, ya, za)); critParticle2->CritParticle2PostConstructor(); - particle = std::shared_ptr(critParticle2); + particle = shared_ptr(critParticle2); particle->setColor(particle->getRedCol() * 0.3f, particle->getGreenCol() * 0.8f, particle->getBlueCol()); particle->setNextMiscAnimTex(); } break; case eParticleType_smoke: - particle = std::shared_ptr( new SmokeParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new SmokeParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_endportal: // 4J - Added. { @@ -2776,94 +2776,94 @@ std::shared_ptr LevelRenderer::addParticleInternal(ePARTICLE_TYPE ePar unsigned int col = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_Particle_EnderPortal ); tmp->setColor( ( (col>>16)&0xFF )/255.0f, ( (col>>8)&0xFF )/255.0, ( col&0xFF )/255.0 ); - particle = std::shared_ptr(tmp); + particle = shared_ptr(tmp); } break; case eParticleType_mobSpell: - particle = std::shared_ptr(new SpellParticle(lev, x, y, z, 0, 0, 0)); + particle = shared_ptr(new SpellParticle(lev, x, y, z, 0, 0, 0)); particle->setColor((float) xa, (float) ya, (float) za); break; case eParticleType_spell: - particle = std::shared_ptr( new SpellParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new SpellParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_instantSpell: - particle = std::shared_ptr(new SpellParticle(lev, x, y, z, xa, ya, za)); + particle = shared_ptr(new SpellParticle(lev, x, y, z, xa, ya, za)); dynamic_pointer_cast(particle)->setBaseTex(9 * 16); break; case eParticleType_note: - particle = std::shared_ptr( new NoteParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new NoteParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_netherportal: - particle = std::shared_ptr( new NetherPortalParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new NetherPortalParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_ender: - particle = std::shared_ptr( new EnderParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new EnderParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_enchantmenttable: - particle = std::shared_ptr(new EchantmentTableParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr(new EchantmentTableParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_explode: - particle = std::shared_ptr( new ExplodeParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new ExplodeParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_flame: - particle = std::shared_ptr( new FlameParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new FlameParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_lava: - particle = std::shared_ptr( new LavaParticle(lev, x, y, z) ); + particle = shared_ptr( new LavaParticle(lev, x, y, z) ); break; case eParticleType_footstep: - particle = std::shared_ptr( new FootstepParticle(textures, lev, x, y, z) ); + particle = shared_ptr( new FootstepParticle(textures, lev, x, y, z) ); break; case eParticleType_splash: - particle = std::shared_ptr( new SplashParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new SplashParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_largesmoke: - particle = std::shared_ptr( new SmokeParticle(lev, x, y, z, xa, ya, za, 2.5f) ); + particle = shared_ptr( new SmokeParticle(lev, x, y, z, xa, ya, za, 2.5f) ); break; case eParticleType_reddust: - particle = std::shared_ptr( new RedDustParticle(lev, x, y, z, (float) xa, (float) ya, (float) za) ); + particle = shared_ptr( new RedDustParticle(lev, x, y, z, (float) xa, (float) ya, (float) za) ); break; case eParticleType_snowballpoof: - particle = std::shared_ptr( new BreakingItemParticle(lev, x, y, z, Item::snowBall, textures) ); + particle = shared_ptr( new BreakingItemParticle(lev, x, y, z, Item::snowBall, textures) ); break; case eParticleType_dripWater: - particle = std::shared_ptr( new DripParticle(lev, x, y, z, Material::water) ); + particle = shared_ptr( new DripParticle(lev, x, y, z, Material::water) ); break; case eParticleType_dripLava: - particle = std::shared_ptr( new DripParticle(lev, x, y, z, Material::lava) ); + particle = shared_ptr( new DripParticle(lev, x, y, z, Material::lava) ); break; case eParticleType_snowshovel: - particle = std::shared_ptr( new SnowShovelParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new SnowShovelParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_slime: - particle = std::shared_ptr( new BreakingItemParticle(lev, x, y, z, Item::slimeBall, textures)); + particle = shared_ptr( new BreakingItemParticle(lev, x, y, z, Item::slimeBall, textures)); break; case eParticleType_heart: - particle = std::shared_ptr( new HeartParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new HeartParticle(lev, x, y, z, xa, ya, za) ); break; case eParticleType_angryVillager: - particle = std::shared_ptr( new HeartParticle(lev, x, y + 0.5f, z, xa, ya, za) ); + particle = shared_ptr( new HeartParticle(lev, x, y + 0.5f, z, xa, ya, za) ); particle->setMiscTex(1 + 16 * 5); particle->setColor(1, 1, 1); break; case eParticleType_happyVillager: - particle = std::shared_ptr( new SuspendedTownParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new SuspendedTownParticle(lev, x, y, z, xa, ya, za) ); particle->setMiscTex(2 + 16 * 5); particle->setColor(1, 1, 1); break; case eParticleType_dragonbreath: - particle = std::shared_ptr( new DragonBreathParticle(lev, x, y, z, xa, ya, za) ); + particle = shared_ptr( new DragonBreathParticle(lev, x, y, z, xa, ya, za) ); break; default: if( ( eParticleType >= eParticleType_iconcrack_base ) && ( eParticleType <= eParticleType_iconcrack_last ) ) { int id = PARTICLE_CRACK_ID(eParticleType), data = PARTICLE_CRACK_DATA(eParticleType); - particle = std::shared_ptr(new BreakingItemParticle(lev, x, y, z, xa, ya, za, Item::items[id], textures, data)); + particle = shared_ptr(new BreakingItemParticle(lev, x, y, z, xa, ya, za, Item::items[id], textures, data)); } else if( ( eParticleType >= eParticleType_tilecrack_base ) && ( eParticleType <= eParticleType_tilecrack_last ) ) { int id = PARTICLE_CRACK_ID(eParticleType), data = PARTICLE_CRACK_DATA(eParticleType); - particle = dynamic_pointer_cast( std::shared_ptr(new TerrainParticle(lev, x, y, z, xa, ya, za, Tile::tiles[id], 0, data, textures))->init(data) ); + particle = dynamic_pointer_cast( shared_ptr(new TerrainParticle(lev, x, y, z, xa, ya, za, Tile::tiles[id], 0, data, textures))->init(data) ); } } @@ -2875,7 +2875,7 @@ std::shared_ptr LevelRenderer::addParticleInternal(ePARTICLE_TYPE ePar return particle; } -void LevelRenderer::entityAdded(std::shared_ptr entity) +void LevelRenderer::entityAdded(shared_ptr entity) { entity->prepareCustomTextures(); // 4J - these empty string comparisons used to check for NULL references, but we don't have string pointers (currently) in entities, @@ -2899,7 +2899,7 @@ void LevelRenderer::entityAdded(std::shared_ptr entity) } -void LevelRenderer::entityRemoved(std::shared_ptr entity) +void LevelRenderer::entityRemoved(shared_ptr entity) { /* 4J - removed temp if (entity->customTextureUrl != L"") textures->removeHttpTexture(entity->customTextureUrl); @@ -2936,7 +2936,7 @@ void LevelRenderer::clear() MemoryTracker::releaseLists(chunkLists); } -void LevelRenderer::levelEvent(std::shared_ptr source, int type, int x, int y, int z, int data) +void LevelRenderer::levelEvent(shared_ptr source, int type, int x, int y, int z, int data) { int playerIndex = mc->player->GetXboxPad(); // 4J added Random *random = level[playerIndex]->random; @@ -3048,7 +3048,7 @@ void LevelRenderer::levelEvent(std::shared_ptr source, int type, int x, double ys = 0.01 + random->nextDouble() * 0.5; double zs = sin(angle) * dist; - std::shared_ptr spellParticle = addParticleInternal(particleName, xp + xs * 0.1, yp + 0.3, zp + zs * 0.1, xs, ys, zs); + shared_ptr spellParticle = addParticleInternal(particleName, xp + xs * 0.1, yp + 0.3, zp + zs * 0.1, xs, ys, zs); if (spellParticle != NULL) { float randBrightness = 0.75f + random->nextFloat() * 0.25f; @@ -3075,7 +3075,7 @@ void LevelRenderer::levelEvent(std::shared_ptr source, int type, int x, double ys = 0.01 + random->nextDouble() * 0.5; double zs = sin(angle) * dist; - std::shared_ptr acidParticle = addParticleInternal(particleName, xp + xs * 0.1, yp + 0.3, zp + zs * 0.1, xs, ys, zs); + shared_ptr acidParticle = addParticleInternal(particleName, xp + xs * 0.1, yp + 0.3, zp + zs * 0.1, xs, ys, zs); if (acidParticle != NULL) { float randBrightness = 0.75f + random->nextFloat() * 0.25f; diff --git a/Minecraft.Client/LevelRenderer.h b/Minecraft.Client/LevelRenderer.h index 7db67d08..b2bd5eb2 100644 --- a/Minecraft.Client/LevelRenderer.h +++ b/Minecraft.Client/LevelRenderer.h @@ -71,7 +71,7 @@ public: private: void resortChunks(int xc, int yc, int zc); public: - int render(std::shared_ptr player, int layer, double alpha, bool updateChunks); + int render(shared_ptr player, int layer, double alpha, bool updateChunks); private: int renderChunks(int from, int to, int layer, double alpha); public: @@ -87,9 +87,9 @@ public: bool updateDirtyChunks(); public: - void renderHit(std::shared_ptr player, HitResult *h, int mode, std::shared_ptr inventoryItem, float a); - void renderDestroyAnimation(Tesselator *t, std::shared_ptr player, float a); - void renderHitOutline(std::shared_ptr player, HitResult *h, int mode, std::shared_ptr inventoryItem, float a); + void renderHit(shared_ptr player, HitResult *h, int mode, shared_ptr inventoryItem, float a); + void renderDestroyAnimation(Tesselator *t, shared_ptr player, float a); + void renderHitOutline(shared_ptr player, HitResult *h, int mode, shared_ptr inventoryItem, float a); void render(AABB *b); void setDirty(int x0, int y0, int z0, int x1, int y1, int z1, Level *level); // 4J - added level param void tileChanged(int x, int y, int z); @@ -106,26 +106,26 @@ public: void cull(Culler *culler, float a); void playStreamingMusic(const wstring& name, int x, int y, int z); void playSound(int iSound, double x, double y, double z, float volume, float pitch, float fSoundClipDist=16.0f); - void playSound(std::shared_ptr entity,int iSound, double x, double y, double z, float volume, float pitch, float fSoundClipDist=16.0f); + void playSound(shared_ptr entity,int iSound, double x, double y, double z, float volume, float pitch, float fSoundClipDist=16.0f); void addParticle(ePARTICLE_TYPE eParticleType, double x, double y, double z, double xa, double ya, double za); // 4J added - std::shared_ptr addParticleInternal(ePARTICLE_TYPE eParticleType, double x, double y, double z, double xa, double ya, double za); // 4J added - void entityAdded(std::shared_ptr entity); - void entityRemoved(std::shared_ptr entity); - void playerRemoved(std::shared_ptr entity) {} // 4J added - for when a player is removed from the level's player array, not just the entity storage + shared_ptr addParticleInternal(ePARTICLE_TYPE eParticleType, double x, double y, double z, double xa, double ya, double za); // 4J added + void entityAdded(shared_ptr entity); + void entityRemoved(shared_ptr entity); + void playerRemoved(shared_ptr entity) {} // 4J added - for when a player is removed from the level's player array, not just the entity storage void skyColorChanged(); void clear(); - void levelEvent(std::shared_ptr source, int type, int x, int y, int z, int data); + void levelEvent(shared_ptr source, int type, int x, int y, int z, int data); void destroyTileProgress(int id, int x, int y, int z, int progress); void registerTextures(IconRegister *iconRegister); - typedef unordered_map >, IntKeyHash, IntKeyEq> rteMap; + typedef unordered_map >, IntKeyHash, IntKeyEq> rteMap; private: // debug int m_freezeticks; // used to freeze the clouds // 4J - this block of declarations was scattered round the code but have gathered everything into one place - rteMap renderableTileEntities; // 4J - changed - was vector, now hashed by chunk so we can find them + rteMap renderableTileEntities; // 4J - changed - was vector, now hashed by chunk so we can find them CRITICAL_SECTION m_csRenderableTileEntities; MultiPlayerLevel *level[4]; // 4J - now one per player Textures *textures; diff --git a/Minecraft.Client/LightningBoltRenderer.cpp b/Minecraft.Client/LightningBoltRenderer.cpp index 9bf7af05..d02ea7f7 100644 --- a/Minecraft.Client/LightningBoltRenderer.cpp +++ b/Minecraft.Client/LightningBoltRenderer.cpp @@ -3,10 +3,10 @@ #include "Tesselator.h" #include "..\Minecraft.World\net.minecraft.world.entity.global.h" -void LightningBoltRenderer::render(std::shared_ptr _bolt, double x, double y, double z, float rot, float a) +void LightningBoltRenderer::render(shared_ptr _bolt, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr bolt = dynamic_pointer_cast(_bolt); + shared_ptr bolt = dynamic_pointer_cast(_bolt); Tesselator *t = Tesselator::getInstance(); diff --git a/Minecraft.Client/LightningBoltRenderer.h b/Minecraft.Client/LightningBoltRenderer.h index bf5c7c82..5a2b33a3 100644 --- a/Minecraft.Client/LightningBoltRenderer.h +++ b/Minecraft.Client/LightningBoltRenderer.h @@ -4,5 +4,5 @@ class LightningBoltRenderer : public EntityRenderer { public: - virtual void render(std::shared_ptr bolt, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr bolt, double x, double y, double z, float rot, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/LocalPlayer.cpp b/Minecraft.Client/LocalPlayer.cpp index 64fddbf1..ed286cd9 100644 --- a/Minecraft.Client/LocalPlayer.cpp +++ b/Minecraft.Client/LocalPlayer.cpp @@ -165,7 +165,7 @@ void LocalPlayer::calculateFlight(float xa, float ya, float za) void LocalPlayer::serverAiStep() { Player::serverAiStep(); - + if( abilities.flying && abilities.mayfly ) { // snap y rotation for flying to nearest 90 degrees in world space @@ -183,7 +183,7 @@ void LocalPlayer::serverAiStep() float yRotDiff = yRotSnapped - yRotFinal; // Apply the same difference to the player rotated space angle float yRotInputAdjust = yRotInput + yRotDiff; - + // Calculate final x/y player-space movement required this->xxa = cos(yRotInputAdjust * ( PI / 180.0f) ) * fMag; this->yya = sin(yRotInputAdjust * ( PI / 180.0f) ) * fMag; @@ -355,7 +355,7 @@ void LocalPlayer::aiStep() if (isSprinting() && (!forwardEnoughToContinueSprint || !enoughFoodToSprint || isSneaking() || isUsingItem())) { setSprinting(false); - } + } // 4J Stu - Fix for #52705 - Customer Encountered: Player can fly in bed while being in Creative mode. if (!isSleeping() && (abilities.mayfly || isAllowedToFly() )) @@ -396,7 +396,7 @@ void LocalPlayer::aiStep() abilities.flying = false; } } - + if (abilities.flying) { @@ -515,7 +515,7 @@ void LocalPlayer::aiStep() else { ProfileManager.SetCurrentGameActivity(m_iPad,CONTEXT_PRESENCE_MULTIPLAYER,false); - } + } } else { @@ -605,14 +605,14 @@ void LocalPlayer::closeContainer() ui.CloseUIScenes( m_iPad ); } -void LocalPlayer::openTextEdit(std::shared_ptr sign) +void LocalPlayer::openTextEdit(shared_ptr sign) { bool success = app.LoadSignEntryMenu(GetXboxPad(), sign ); if( success ) ui.PlayUISFX(eSFX_Press); //minecraft->setScreen(new TextEditScreen(sign)); } -bool LocalPlayer::openContainer(std::shared_ptr container) +bool LocalPlayer::openContainer(shared_ptr container) { bool success = app.LoadContainerMenu(GetXboxPad(), inventory, container ); if( success ) ui.PlayUISFX(eSFX_Press); @@ -645,7 +645,7 @@ bool LocalPlayer::startRepairing(int x, int y, int z) return success; } -bool LocalPlayer::openFurnace(std::shared_ptr furnace) +bool LocalPlayer::openFurnace(shared_ptr furnace) { bool success = app.LoadFurnaceMenu(GetXboxPad(),inventory, furnace); if( success ) ui.PlayUISFX(eSFX_Press); @@ -653,7 +653,7 @@ bool LocalPlayer::openFurnace(std::shared_ptr furnace) return success; } -bool LocalPlayer::openBrewingStand(std::shared_ptr brewingStand) +bool LocalPlayer::openBrewingStand(shared_ptr brewingStand) { bool success = app.LoadBrewingStandMenu(GetXboxPad(),inventory, brewingStand); if( success ) ui.PlayUISFX(eSFX_Press); @@ -661,7 +661,7 @@ bool LocalPlayer::openBrewingStand(std::shared_ptr brewi return success; } -bool LocalPlayer::openTrap(std::shared_ptr trap) +bool LocalPlayer::openTrap(shared_ptr trap) { bool success = app.LoadTrapMenu(GetXboxPad(),inventory, trap); if( success ) ui.PlayUISFX(eSFX_Press); @@ -669,7 +669,7 @@ bool LocalPlayer::openTrap(std::shared_ptr trap) return success; } -bool LocalPlayer::openTrading(std::shared_ptr traderTarget) +bool LocalPlayer::openTrading(shared_ptr traderTarget) { bool success = app.LoadTradingMenu(GetXboxPad(),inventory, traderTarget, level); if( success ) ui.PlayUISFX(eSFX_Press); @@ -677,23 +677,23 @@ bool LocalPlayer::openTrading(std::shared_ptr traderTarget) return success; } -void LocalPlayer::crit(std::shared_ptr e) +void LocalPlayer::crit(shared_ptr e) { - std::shared_ptr critParticle = std::shared_ptr( new CritParticle((Level *)minecraft->level, e) ); + shared_ptr critParticle = shared_ptr( new CritParticle((Level *)minecraft->level, e) ); critParticle->CritParticlePostConstructor(); minecraft->particleEngine->add(critParticle); } -void LocalPlayer::magicCrit(std::shared_ptr e) +void LocalPlayer::magicCrit(shared_ptr e) { - std::shared_ptr critParticle = std::shared_ptr( new CritParticle((Level *)minecraft->level, e, eParticleType_magicCrit) ); + shared_ptr critParticle = shared_ptr( new CritParticle((Level *)minecraft->level, e, eParticleType_magicCrit) ); critParticle->CritParticlePostConstructor(); minecraft->particleEngine->add(critParticle); } -void LocalPlayer::take(std::shared_ptr e, int orgCount) +void LocalPlayer::take(shared_ptr e, int orgCount) { - minecraft->particleEngine->add( std::shared_ptr( new TakeAnimationParticle((Level *)minecraft->level, e, shared_from_this(), -0.5f) ) ); + minecraft->particleEngine->add( shared_ptr( new TakeAnimationParticle((Level *)minecraft->level, e, shared_from_this(), -0.5f) ) ); } void LocalPlayer::chat(const wstring& message) @@ -761,7 +761,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param) { #ifdef _DURANGO // 4J-JEV: Maybe we want to fine tune this later? #TODO - if ( !ProfileManager.IsGuest(GetXboxPad()) + if ( !ProfileManager.IsGuest(GetXboxPad()) && app.CanRecordStatsAndAchievements() && ProfileManager.IsFullVersion() ) @@ -840,7 +840,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param) toolStats[0][2] = GenericStats::itemsCrafted(Item::shovel_iron->id); toolStats[0][3] = GenericStats::itemsCrafted(Item::shovel_diamond->id); toolStats[0][4] = GenericStats::itemsCrafted(Item::shovel_gold->id); - toolStats[1][0] = GenericStats::itemsCrafted(Item::pickAxe_wood->id); + toolStats[1][0] = GenericStats::itemsCrafted(Item::pickAxe_wood->id); toolStats[1][1] = GenericStats::itemsCrafted(Item::pickAxe_stone->id); toolStats[1][2] = GenericStats::itemsCrafted(Item::pickAxe_iron->id); toolStats[1][3] = GenericStats::itemsCrafted(Item::pickAxe_diamond->id); @@ -855,7 +855,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param) toolStats[3][2] = GenericStats::itemsCrafted(Item::hoe_iron->id); toolStats[3][3] = GenericStats::itemsCrafted(Item::hoe_diamond->id); toolStats[3][4] = GenericStats::itemsCrafted(Item::hoe_gold->id); - + bool justCraftedTool = false; for (int i=0; i<4; i++) { @@ -893,7 +893,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param) awardStat(GenericStats::MOARTools(), GenericStats::param_noArgs()); } } - + } #ifdef _XBOX @@ -977,7 +977,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param) numEmeraldMined = pStats->getTotalValue(emeraldMined); numEmeraldBought = pStats->getTotalValue(emeraldBought); totalSum = numEmeraldMined + numEmeraldBought; - + app.DebugPrintf( "[AwardStat] Check unlock 'The Haggler': " "emerald_mined=%i, emerald_bought=%i, sum=%i.\n", @@ -1033,7 +1033,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param) // AWARD : Rainbow Collection, collect all different colours of wool. { bool justPickedupWool = false; - + for (int i=0; i<16; i++) if ( stat == GenericStats::itemsCollected(Tile::cloth_Id, i) ) justPickedupWool = true; @@ -1041,7 +1041,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param) if (justPickedupWool) { unsigned int woolCount = 0; - + for (unsigned int i = 0; i < 16; i++) { if (pStats->getTotalValue(GenericStats::itemsCollected(Tile::cloth_Id, i)) > 0) @@ -1152,7 +1152,7 @@ bool LocalPlayer::hasPermission(EGameCommand command) return level->getLevelData()->getAllowCommands(); } -void LocalPlayer::onCrafted(std::shared_ptr item) +void LocalPlayer::onCrafted(shared_ptr item) { if( minecraft->localgameModes[m_iPad] != NULL ) { @@ -1195,7 +1195,7 @@ void LocalPlayer::mapPlayerChunk(const unsigned int flagTileType) cout << "O"; else for (unsigned int y = 127; y > 0; y--) { - int t = cc->getTile(x,y,z); + int t = cc->getTile(x,y,z); if (flagTileType != 0 && t == flagTileType) { cout << "@"; break; } else if (t != 0 && t < 10) { cout << t; break; } else if (t > 0) { cout << "#"; break; } @@ -1229,7 +1229,7 @@ void LocalPlayer::handleMouseDown(int button, bool down) if( ( ( y == 0 ) || ( ( y == 127 ) && level->dimension->hasCeiling ) ) && level->dimension->id != 1 ) return; minecraft->gameMode->continueDestroyBlock(x, y, z, minecraft->hitResult->f); - + if(mayBuild(x,y,z)) { minecraft->particleEngine->crack(x, y, z, minecraft->hitResult->f); @@ -1267,7 +1267,7 @@ bool LocalPlayer::creativeModeHandleMouseClick(int button, bool buttonPressed) } // Get distance from last click point in each axis - float dX = (float)x - lastClickX; + float dX = (float)x - lastClickX; float dY = (float)y - lastClickY; float dZ = (float)z - lastClickZ; bool newClick = false; @@ -1415,13 +1415,13 @@ bool LocalPlayer::handleMouseClick(int button) bool returnItemPlaced = false; if (button == 0 && missTime > 0) return false; - if (button == 0) + if (button == 0) { //app.DebugPrintf("handleMouseClick - Player %d is swinging\n",GetXboxPad()); swing(); } - bool mayUse = true; + bool mayUse = true; // 4J-PB - Adding a special case in here for sleeping in a bed in a multiplayer game - we need to wake up, and we don't have the inbedchatscreen with a button @@ -1430,10 +1430,10 @@ bool LocalPlayer::handleMouseClick(int button) if(lastClickState == lastClick_oldRepeat) return false; - std::shared_ptr mplp = dynamic_pointer_cast( shared_from_this() ); + shared_ptr mplp = dynamic_pointer_cast( shared_from_this() ); if(mplp && mplp->connection) mplp->StopSleeping(); - + } // 4J Stu - We should not accept any input while asleep, except the above to wake up if(isSleeping() && level != NULL && level->isClientSide) @@ -1441,7 +1441,7 @@ bool LocalPlayer::handleMouseClick(int button) return false; } - std::shared_ptr oldItem = inventory->getSelected(); + shared_ptr oldItem = inventory->getSelected(); if (minecraft->hitResult == NULL) { @@ -1455,15 +1455,15 @@ bool LocalPlayer::handleMouseClick(int button) } if (button == 1) { - // 4J-PB - if we milk a cow here, and end up with a bucket of milk, the if (mayUse && button == 1) further down will + // 4J-PB - if we milk a cow here, and end up with a bucket of milk, the if (mayUse && button == 1) further down will // then empty our bucket if we're pointing at a tile - // It looks like interact really should be returning a result so we can check this, but it's possibly just the + // It looks like interact really should be returning a result so we can check this, but it's possibly just the // milk bucket that causes a problem if(minecraft->hitResult->entity->GetType()==eTYPE_COW) { // If I have an empty bucket in my hand, it's going to be filled with milk, so turn off mayUse - std::shared_ptr item = inventory->getSelected(); + shared_ptr item = inventory->getSelected(); if(item && (item->id==Item::bucket_empty_Id)) { mayUse=false; @@ -1493,7 +1493,7 @@ bool LocalPlayer::handleMouseClick(int button) } else { - std::shared_ptr item = oldItem; + shared_ptr item = oldItem; int oldCount = item != NULL ? item->count : 0; bool usedItem = false; if (minecraft->gameMode->useItemOn(minecraft->localplayers[GetXboxPad()], level, item, x, y, z, face, minecraft->hitResult->pos, false, &usedItem)) @@ -1525,7 +1525,7 @@ bool LocalPlayer::handleMouseClick(int button) if (mayUse && button == 1) { - std::shared_ptr item = inventory->getSelected(); + shared_ptr item = inventory->getSelected(); if (item != NULL) { if (minecraft->gameMode->useItem(minecraft->localplayers[GetXboxPad()], level, item)) @@ -1541,7 +1541,7 @@ void LocalPlayer::updateRichPresence() { if((m_iPad!=-1)/* && !ui.GetMenuDisplayed(m_iPad)*/ ) { - std::shared_ptr selectedItem = inventory->getSelected(); + shared_ptr selectedItem = inventory->getSelected(); if(selectedItem != NULL && selectedItem->id == Item::fishingRod_Id) { app.SetRichPresenceContext(m_iPad,CONTEXT_GAME_STATE_FISHING); @@ -1549,7 +1549,7 @@ void LocalPlayer::updateRichPresence() else if(selectedItem != NULL && selectedItem->id == Item::map_Id) { app.SetRichPresenceContext(m_iPad,CONTEXT_GAME_STATE_MAP); - } + } else if(riding != NULL && dynamic_pointer_cast(riding) != NULL) { app.SetRichPresenceContext(m_iPad,CONTEXT_GAME_STATE_RIDING_MINECART); @@ -1597,7 +1597,7 @@ float LocalPlayer::getAndResetChangeDimensionTimer() return returnVal; } -void LocalPlayer::handleCollectItem(std::shared_ptr item) +void LocalPlayer::handleCollectItem(shared_ptr item) { if(item != NULL) { diff --git a/Minecraft.Client/LocalPlayer.h b/Minecraft.Client/LocalPlayer.h index e4c0142c..865af154 100644 --- a/Minecraft.Client/LocalPlayer.h +++ b/Minecraft.Client/LocalPlayer.h @@ -99,18 +99,18 @@ public: virtual void addAdditonalSaveData(CompoundTag *entityTag); virtual void readAdditionalSaveData(CompoundTag *entityTag); virtual void closeContainer(); - virtual void openTextEdit(std::shared_ptr sign); - virtual bool openContainer(std::shared_ptr container); // 4J added bool return + virtual void openTextEdit(shared_ptr sign); + virtual bool openContainer(shared_ptr container); // 4J added bool return virtual bool startCrafting(int x, int y, int z); // 4J added bool return virtual bool startEnchanting(int x, int y, int z); // 4J added bool return virtual bool startRepairing(int x, int y, int z); - virtual bool openFurnace(std::shared_ptr furnace); // 4J added bool return - virtual bool openBrewingStand(std::shared_ptr brewingStand); // 4J added bool return - virtual bool openTrap(std::shared_ptr trap); // 4J added bool return - virtual bool openTrading(std::shared_ptr traderTarget); - virtual void crit(std::shared_ptr e); - virtual void magicCrit(std::shared_ptr e); - virtual void take(std::shared_ptr e, int orgCount); + virtual bool openFurnace(shared_ptr furnace); // 4J added bool return + virtual bool openBrewingStand(shared_ptr brewingStand); // 4J added bool return + virtual bool openTrap(shared_ptr trap); // 4J added bool return + virtual bool openTrading(shared_ptr traderTarget); + virtual void crit(shared_ptr e); + virtual void magicCrit(shared_ptr e); + virtual void take(shared_ptr e, int orgCount); virtual void chat(const wstring& message); virtual bool isSneaking(); //virtual bool isIdle(); @@ -159,7 +159,7 @@ public: int lastClickState; // 4J Stu - Added to allow callback to tutorial to stay within Minecraft.Client - virtual void onCrafted(std::shared_ptr item); + virtual void onCrafted(shared_ptr item); virtual void setAndBroadcastCustomSkin(DWORD skinId); virtual void setAndBroadcastCustomCape(DWORD capeId); @@ -189,7 +189,7 @@ public: float getAndResetChangeDimensionTimer(); - virtual void handleCollectItem(std::shared_ptr item); + virtual void handleCollectItem(shared_ptr item); void SetPlayerAdditionalModelParts(vectorpAdditionalModelParts); private: diff --git a/Minecraft.Client/MinecartModel.cpp b/Minecraft.Client/MinecartModel.cpp index d4ff04c0..8a1ce0d7 100644 --- a/Minecraft.Client/MinecartModel.cpp +++ b/Minecraft.Client/MinecartModel.cpp @@ -18,22 +18,22 @@ MinecartModel::MinecartModel() : Model() cubes[0]->addBox((float)(-w / 2), (float)(-h / 2), -1, w, h, 2, 0); cubes[0]->setPos(0, (float)(0 + yOff), 0); - + cubes[5]->addBox((float)(-w / 2 + 1), (float)(-h / 2 + 1), -1, w - 2, h - 2, 1, 0); cubes[5]->setPos(0, (float)(0 + yOff), 0); - + cubes[1]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[1]->setPos((float)(-w / 2 + 1), (float)(0 + yOff), 0); - + cubes[2]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[2]->setPos((float)(+w / 2 - 1), (float)(0 + yOff), 0); - + cubes[3]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[3]->setPos(0, (float)(0 + yOff), (float)(-h / 2 + 1)); - + cubes[4]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0); cubes[4]->setPos(0, (float)(0 + yOff), (float)(+h / 2 - 1)); - + cubes[0]->xRot = PI / 2; cubes[1]->yRot = PI / 2 * 3; cubes[2]->yRot = PI / 2 * 1; @@ -47,7 +47,7 @@ MinecartModel::MinecartModel() : Model() } } -void MinecartModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void MinecartModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { cubes[5]->y = 4 - bob; for (int i = 0; i < MINECART_LENGTH; i++) diff --git a/Minecraft.Client/MinecartModel.h b/Minecraft.Client/MinecartModel.h index 2cf6d0ef..de925566 100644 --- a/Minecraft.Client/MinecartModel.h +++ b/Minecraft.Client/MinecartModel.h @@ -9,5 +9,5 @@ public: ModelPart *cubes[MINECART_LENGTH]; MinecartModel(); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); }; diff --git a/Minecraft.Client/MinecartRenderer.cpp b/Minecraft.Client/MinecartRenderer.cpp index cd274992..1fa4a1d9 100644 --- a/Minecraft.Client/MinecartRenderer.cpp +++ b/Minecraft.Client/MinecartRenderer.cpp @@ -10,10 +10,10 @@ MinecartRenderer::MinecartRenderer() model = new MinecartModel(); } -void MinecartRenderer::render(std::shared_ptr _cart, double x, double y, double z, float rot, float a) +void MinecartRenderer::render(shared_ptr _cart, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr cart = dynamic_pointer_cast(_cart); + shared_ptr cart = dynamic_pointer_cast(_cart); glPushMatrix(); diff --git a/Minecraft.Client/MinecartRenderer.h b/Minecraft.Client/MinecartRenderer.h index 6902a3bf..0335ba8d 100644 --- a/Minecraft.Client/MinecartRenderer.h +++ b/Minecraft.Client/MinecartRenderer.h @@ -8,5 +8,5 @@ protected: public: MinecartRenderer(); - void render(std::shared_ptr _cart, double x, double y, double z, float rot, float a); + void render(shared_ptr _cart, double x, double y, double z, float rot, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp index 315eb52b..aef61677 100644 --- a/Minecraft.Client/Minecraft.cpp +++ b/Minecraft.Client/Minecraft.cpp @@ -977,7 +977,7 @@ bool Minecraft::addLocalPlayer(int idx) if(success) { app.DebugPrintf("Adding temp local player on pad %d\n", idx); - localplayers[idx] = std::shared_ptr( new MultiplayerLocalPlayer(this, level, user, NULL ) ); + localplayers[idx] = shared_ptr( new MultiplayerLocalPlayer(this, level, user, NULL ) ); localgameModes[idx] = NULL; updatePlayerViewportAssignments(); @@ -1025,7 +1025,7 @@ void Minecraft::addPendingLocalConnection(int idx, ClientConnection *connection) m_pendingLocalConnections[idx] = connection; } -std::shared_ptr Minecraft::createExtraLocalPlayer(int idx, const wstring& name, int iPad, int iDimension, ClientConnection *clientConnection /*= NULL*/,MultiPlayerLevel *levelpassedin) +shared_ptr Minecraft::createExtraLocalPlayer(int idx, const wstring& name, int iPad, int iDimension, ClientConnection *clientConnection /*= NULL*/,MultiPlayerLevel *levelpassedin) { if( clientConnection == NULL) return nullptr; @@ -1141,7 +1141,7 @@ void Minecraft::removeLocalPlayerIdx(int idx) { if( getLevel( localplayers[idx]->dimension )->isClientSide ) { - std::shared_ptr mplp = localplayers[idx]; + shared_ptr mplp = localplayers[idx]; ( (MultiPlayerLevel *)getLevel( localplayers[idx]->dimension ) )->removeClientConnection(mplp->connection, true); delete mplp->connection; mplp->connection = NULL; @@ -1163,7 +1163,7 @@ void Minecraft::removeLocalPlayerIdx(int idx) } else if( m_pendingLocalConnections[idx] != NULL ) { - m_pendingLocalConnections[idx]->sendAndDisconnect( std::shared_ptr( new DisconnectPacket(DisconnectPacket::eDisconnect_Quitting) ) );; + m_pendingLocalConnections[idx]->sendAndDisconnect( shared_ptr( new DisconnectPacket(DisconnectPacket::eDisconnect_Quitting) ) );; delete m_pendingLocalConnections[idx]; m_pendingLocalConnections[idx] = NULL; g_NetworkManager.RemoveLocalPlayerByUserIndex(idx); @@ -1676,7 +1676,7 @@ void Minecraft::run_middle() else { // create the localplayer - std::shared_ptr player = localplayers[i]; + shared_ptr player = localplayers[i]; if( player == NULL) { player = createExtraLocalPlayer(i, (convStringToWstring( ProfileManager.GetGamertag(i) )).c_str(), i, level->dimension->id); @@ -1892,7 +1892,7 @@ void Minecraft::run_middle() // if (pause) timer.a = 1; PIXBeginNamedEvent(0,"Sound engine update"); - soundEngine->tick((std::shared_ptr *)localplayers, timer->a); + soundEngine->tick((shared_ptr *)localplayers, timer->a); PIXEndNamedEvent(); PIXBeginNamedEvent(0,"Light update"); @@ -2427,7 +2427,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) else { // no hit result, but we may have something in our hand that we can do something with - std::shared_ptr itemInstance = player->inventory->getSelected(); + shared_ptr itemInstance = player->inventory->getSelected(); // 4J-JEV: Moved all this here to avoid having it in 3 different places. if (itemInstance) @@ -2798,14 +2798,14 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) // is there an object in hand? if(player->inventory->IsHeldItem()) { - std::shared_ptr heldItem=player->inventory->getSelected(); + shared_ptr heldItem=player->inventory->getSelected(); int iID=heldItem->getItem()->id; switch(iID) { default: { - std::shared_ptr animal = dynamic_pointer_cast(hitResult->entity); + shared_ptr animal = dynamic_pointer_cast(hitResult->entity); if(!animal->isBaby() && !animal->isInLove() && (animal->getAge() == 0) && animal->isFood(heldItem)) { @@ -2822,7 +2822,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) // is there an object in hand? if(player->inventory->IsHeldItem()) { - std::shared_ptr heldItem=player->inventory->getSelected(); + shared_ptr heldItem=player->inventory->getSelected(); int iID=heldItem->getItem()->id; // It's an item @@ -2834,7 +2834,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) break; default: { - std::shared_ptr animal = dynamic_pointer_cast(hitResult->entity); + shared_ptr animal = dynamic_pointer_cast(hitResult->entity); if(!animal->isBaby() && !animal->isInLove() && (animal->getAge() == 0) && animal->isFood(heldItem)) { @@ -2851,7 +2851,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { if(player->isAllowedToAttackAnimals()) *piAction=IDS_TOOLTIPS_HIT; - std::shared_ptr heldItem=player->inventory->getSelected(); + shared_ptr heldItem=player->inventory->getSelected(); int iID=heldItem->getItem()->id; // It's an item @@ -2865,13 +2865,13 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) case Item::shears_Id: { if(player->isAllowedToAttackAnimals()) *piAction=IDS_TOOLTIPS_HIT; - std::shared_ptr animal = dynamic_pointer_cast(hitResult->entity); + shared_ptr animal = dynamic_pointer_cast(hitResult->entity); if(!animal->isBaby()) *piUse=IDS_TOOLTIPS_SHEAR; } break; default: { - std::shared_ptr animal = dynamic_pointer_cast(hitResult->entity); + shared_ptr animal = dynamic_pointer_cast(hitResult->entity); if(!animal->isBaby() && !animal->isInLove() && (animal->getAge() == 0) && animal->isFood(heldItem)) { @@ -2924,7 +2924,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) // is there an object in hand? if(player->inventory->IsHeldItem()) { - std::shared_ptr heldItem=player->inventory->getSelected(); + shared_ptr heldItem=player->inventory->getSelected(); int iID=heldItem->getItem()->id; if(iID==Item::coal->id) @@ -2946,14 +2946,14 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) if(player->isAllowedToAttackAnimals()) *piAction=IDS_TOOLTIPS_HIT; if(player->inventory->IsHeldItem()) { - std::shared_ptr heldItem=player->inventory->getSelected(); + shared_ptr heldItem=player->inventory->getSelected(); int iID=heldItem->getItem()->id; switch(iID) { case Item::dye_powder_Id: { - std::shared_ptr sheep = dynamic_pointer_cast(hitResult->entity); + shared_ptr sheep = dynamic_pointer_cast(hitResult->entity); // convert to tile-based color value (0 is white instead of black) int newColor = ClothTile::getTileDataForItemAuxValue(heldItem->getAuxValue()); @@ -2966,7 +2966,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) break; case Item::shears_Id: { - std::shared_ptr sheep = dynamic_pointer_cast(hitResult->entity); + shared_ptr sheep = dynamic_pointer_cast(hitResult->entity); // can only shear a sheep that hasn't been sheared if(!sheep->isSheared() ) @@ -2978,7 +2978,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) break; default: { - std::shared_ptr animal = dynamic_pointer_cast(hitResult->entity); + shared_ptr animal = dynamic_pointer_cast(hitResult->entity); if(!animal->isBaby() && !animal->isInLove() && (animal->getAge() == 0) && animal->isFood(heldItem)) { @@ -3008,7 +3008,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { if(player->inventory->IsHeldItem()) { - std::shared_ptr heldItem=player->inventory->getSelected(); + shared_ptr heldItem=player->inventory->getSelected(); int iID=heldItem->getItem()->id; switch(iID) @@ -3018,7 +3018,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) break; default: { - std::shared_ptr animal = dynamic_pointer_cast(hitResult->entity); + shared_ptr animal = dynamic_pointer_cast(hitResult->entity); if(!animal->isBaby() && !animal->isInLove() && (animal->getAge() == 0) && animal->isFood(heldItem)) { @@ -3036,8 +3036,8 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) // can be tamed, fed, and made to sit/stand, or enter love mode { int iID=-1; - std::shared_ptr heldItem=nullptr; - std::shared_ptr wolf = dynamic_pointer_cast(hitResult->entity); + shared_ptr heldItem=nullptr; + shared_ptr wolf = dynamic_pointer_cast(hitResult->entity); if(player->inventory->IsHeldItem()) { @@ -3126,8 +3126,8 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) case eTYPE_OZELOT: { int iID=-1; - std::shared_ptr heldItem=nullptr; - std::shared_ptr ocelot = dynamic_pointer_cast(hitResult->entity); + shared_ptr heldItem=nullptr; + shared_ptr ocelot = dynamic_pointer_cast(hitResult->entity); if(player->inventory->IsHeldItem()) { @@ -3188,7 +3188,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) case eTYPE_PLAYER: { // Fix for #58576 - TU6: Content: Gameplay: Hit button prompt is available when attacking a host who has "Invisible" option turned on - std::shared_ptr TargetPlayer = dynamic_pointer_cast(hitResult->entity); + shared_ptr TargetPlayer = dynamic_pointer_cast(hitResult->entity); if(!TargetPlayer->hasInvisiblePrivilege()) // This means they are invisible, not just that they have the privilege { @@ -3201,7 +3201,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) break; case eTYPE_ITEM_FRAME: { - std::shared_ptr itemFrame = dynamic_pointer_cast(hitResult->entity); + shared_ptr itemFrame = dynamic_pointer_cast(hitResult->entity); // is the frame occupied? if(itemFrame->getItem()!=NULL) @@ -3223,7 +3223,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) break; case eTYPE_VILLAGER: { - std::shared_ptr villager = dynamic_pointer_cast(hitResult->entity); + shared_ptr villager = dynamic_pointer_cast(hitResult->entity); if (!villager->isBaby()) { *piUse=IDS_TOOLTIPS_TRADE; @@ -3233,8 +3233,8 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) break; case eTYPE_ZOMBIE: { - std::shared_ptr zomb = dynamic_pointer_cast(hitResult->entity); - std::shared_ptr heldItem=nullptr; + shared_ptr zomb = dynamic_pointer_cast(hitResult->entity); + shared_ptr heldItem=nullptr; if(player->inventory->IsHeldItem()) { @@ -3470,9 +3470,9 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) if((player->ullButtonsPressed&(1LL< mob = dynamic_pointer_cast(Creeper::_class->newInstance( level )); - //std::shared_ptr mob = dynamic_pointer_cast(Wolf::_class->newInstance( level )); - std::shared_ptr mob = dynamic_pointer_cast(std::shared_ptr(new Spider( level ))); + //shared_ptr mob = dynamic_pointer_cast(Creeper::_class->newInstance( level )); + //shared_ptr mob = dynamic_pointer_cast(Wolf::_class->newInstance( level )); + shared_ptr mob = dynamic_pointer_cast(shared_ptr(new Spider( level ))); mob->moveTo(player->x+1, player->y, player->z+1, level->random->nextFloat() * 360, 0); level->addEntity(mob); } @@ -3502,14 +3502,14 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) if((player->ullButtonsPressed&(1LL<isInputAllowed(MINECRAFT_ACTION_INVENTORY)) { - std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->player ); + shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->player ); ui.PlayUISFX(eSFX_Press); app.LoadInventoryMenu(iPad,player); } if((player->ullButtonsPressed&(1LL<isInputAllowed(MINECRAFT_ACTION_CRAFTING)) { - std::shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->player ); + shared_ptr player = dynamic_pointer_cast( Minecraft::GetInstance()->player ); // 4J-PB - reordered the if statement so creative mode doesn't bring up the crafting table // Fix for #39014 - TU5: Creative Mode: Pressing X to access the creative menu while looking at a crafting table causes the crafting menu to display @@ -3573,7 +3573,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) if( selected || wheel != 0 || (player->ullButtonsPressed&(1LL< selectedItem = player->getSelectedItem(); + shared_ptr selectedItem = player->getSelectedItem(); // Dropping items happens over network, so if we only have one then assume that we dropped it and should hide the item int iCount=0; @@ -3841,7 +3841,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) setLocalPlayerIdx(idx); gameRenderer->setupCamera(timer->a, i); Camera::prepare(localplayers[idx], localplayers[idx]->ThirdPersonView() == 2); - std::shared_ptr cameraEntity = cameraTargetPlayer; + shared_ptr cameraEntity = cameraTargetPlayer; double xOff = cameraEntity->xOld + (cameraEntity->x - cameraEntity->xOld) * timer->a; double yOff = cameraEntity->yOld + (cameraEntity->y - cameraEntity->yOld) * timer->a; double zOff = cameraEntity->zOld + (cameraEntity->z - cameraEntity->zOld) * timer->a; @@ -3967,7 +3967,7 @@ MultiPlayerLevel *Minecraft::getLevel(int dimension) //} // Also causing ambiguous call for some reason -// as it is matching std::shared_ptr from the func below with bool from this one +// as it is matching shared_ptr from the func below with bool from this one //void Minecraft::setLevel(Level *level, const wstring& message, bool doForceStatsSave /*= true*/) //{ // setLevel(level, message, NULL, doForceStatsSave); @@ -3981,7 +3981,7 @@ void Minecraft::forceaddLevel(MultiPlayerLevel *level) else levels[0] = level; } -void Minecraft::setLevel(MultiPlayerLevel *level, int message /*=-1*/, std::shared_ptr forceInsertPlayer /*=NULL*/, bool doForceStatsSave /*=true*/, bool bPrimaryPlayerSignedOut /*=false*/) +void Minecraft::setLevel(MultiPlayerLevel *level, int message /*=-1*/, shared_ptr forceInsertPlayer /*=NULL*/, bool doForceStatsSave /*=true*/, bool bPrimaryPlayerSignedOut /*=false*/) { EnterCriticalSection(&m_setLevelCS); bool playerAdded = false; @@ -4046,7 +4046,7 @@ void Minecraft::setLevel(MultiPlayerLevel *level, int message /*=-1*/, std::shar // Delete all the player objects for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) { - std::shared_ptr mplp = localplayers[idx]; + shared_ptr mplp = localplayers[idx]; if(mplp != NULL && mplp->connection != NULL ) { delete mplp->connection; @@ -4293,7 +4293,7 @@ wstring Minecraft::gatherStats4() void Minecraft::respawnPlayer(int iPad, int dimension, int newEntityId) { gameRenderer->DisableUpdateThread(); // 4J - don't do updating whilst we are adjusting the player & localplayer array - std::shared_ptr localPlayer = localplayers[iPad]; + shared_ptr localPlayer = localplayers[iPad]; level->validateSpawn(); level->removeAllPendingEntityRemovals(); @@ -4304,7 +4304,7 @@ void Minecraft::respawnPlayer(int iPad, int dimension, int newEntityId) level->removeEntity(localPlayer); } - std::shared_ptr oldPlayer = localPlayer; + shared_ptr oldPlayer = localPlayer; cameraTargetPlayer = nullptr; // 4J-PB - copy and set the players xbox pad @@ -4692,7 +4692,7 @@ bool mayUse = true; if(button==1 && (player->isSleeping() && level != NULL && level->isClientSide)) { -std::shared_ptr mplp = dynamic_pointer_cast( player ); +shared_ptr mplp = dynamic_pointer_cast( player ); if(mplp) mplp->StopSleeping(); @@ -4741,7 +4741,7 @@ gameMode->startDestroyBlock(x, y, z, hitResult->f); } else { -std::shared_ptr item = player->inventory->getSelected(); +shared_ptr item = player->inventory->getSelected(); int oldCount = item != NULL ? item->count : 0; if (gameMode->useItemOn(player, level, item, x, y, z, face)) { @@ -4767,7 +4767,7 @@ gameRenderer->itemInHandRenderer->itemPlaced(); if (mayUse && button == 1) { -std::shared_ptr item = player->inventory->getSelected(); +shared_ptr item = player->inventory->getSelected(); if (item != NULL) { if (gameMode->useItem(player, level, item)) @@ -4854,7 +4854,7 @@ void Minecraft::inGameSignInCheckAllPrivilegesCallback(LPVOID lpParam, bool hasP else if( ProfileManager.IsSignedInLive(iPad) && ProfileManager.AllowedToPlayMultiplayer(iPad) ) { // create the local player for the iPad - std::shared_ptr player = pClass->localplayers[iPad]; + shared_ptr player = pClass->localplayers[iPad]; if( player == NULL) { if( pClass->level->isClientSide ) @@ -4864,7 +4864,7 @@ void Minecraft::inGameSignInCheckAllPrivilegesCallback(LPVOID lpParam, bool hasP else { // create the local player for the iPad - std::shared_ptr player = pClass->localplayers[iPad]; + shared_ptr player = pClass->localplayers[iPad]; if( player == NULL) { player = pClass->createExtraLocalPlayer(iPad, (convStringToWstring( ProfileManager.GetGamertag(iPad) )).c_str(), iPad, pClass->level->dimension->id); @@ -4935,7 +4935,7 @@ int Minecraft::InGame_SignInReturned(void *pParam,bool bContinue, int iPad) else { // create the local player for the iPad - std::shared_ptr player = pMinecraftClass->localplayers[iPad]; + shared_ptr player = pMinecraftClass->localplayers[iPad]; if( player == NULL) { player = pMinecraftClass->createExtraLocalPlayer(iPad, (convStringToWstring( ProfileManager.GetGamertag(iPad) )).c_str(), iPad, pMinecraftClass->level->dimension->id); @@ -4964,7 +4964,7 @@ void Minecraft::tickAllConnections() int oldIdx = getLocalPlayerIdx(); for(unsigned int i = 0; i < XUSER_MAX_COUNT; i++ ) { - std::shared_ptr mplp = localplayers[i]; + shared_ptr mplp = localplayers[i]; if( mplp && mplp->connection) { setLocalPlayerIdx(i); diff --git a/Minecraft.Client/Minecraft.h b/Minecraft.Client/Minecraft.h index cbe13e09..2e943de7 100644 --- a/Minecraft.Client/Minecraft.h +++ b/Minecraft.Client/Minecraft.h @@ -90,11 +90,11 @@ public: MultiPlayerLevel *level; LevelRenderer *levelRenderer; - std::shared_ptr player; + shared_ptr player; MultiPlayerLevelArray levels; - std::shared_ptr localplayers[XUSER_MAX_COUNT]; + shared_ptr localplayers[XUSER_MAX_COUNT]; MultiPlayerGameMode *localgameModes[XUSER_MAX_COUNT]; int localPlayerIdx; ItemInHandRenderer *localitemInHandRenderers[XUSER_MAX_COUNT]; @@ -110,7 +110,7 @@ public: void addPendingLocalConnection(int idx, ClientConnection *connection); void connectionDisconnected(int idx, DisconnectPacket::eDisconnectReason reason) { m_connectionFailed[idx] = true; m_connectionFailedReason[idx] = reason; } - std::shared_ptr createExtraLocalPlayer(int idx, const wstring& name, int pad, int iDimension, ClientConnection *clientConnection = NULL,MultiPlayerLevel *levelpassedin=NULL); + shared_ptr createExtraLocalPlayer(int idx, const wstring& name, int pad, int iDimension, ClientConnection *clientConnection = NULL,MultiPlayerLevel *levelpassedin=NULL); void createPrimaryLocalPlayer(int iPad); bool setLocalPlayerIdx(int idx); int getLocalPlayerIdx(); @@ -119,7 +119,7 @@ public: void updatePlayerViewportAssignments(); int unoccupiedQuadrant; // 4J - added - std::shared_ptr cameraTargetPlayer; + shared_ptr cameraTargetPlayer; ParticleEngine *particleEngine; User *user; wstring serverDomain; @@ -276,7 +276,7 @@ public: // 4J Stu - Added the doForceStatsSave param //void setLevel(Level *level, bool doForceStatsSave = true); //void setLevel(Level *level, const wstring& message, bool doForceStatsSave = true); - void setLevel(MultiPlayerLevel *level, int message = -1, std::shared_ptr forceInsertPlayer = nullptr, bool doForceStatsSave = true,bool bPrimaryPlayerSignedOut=false); + void setLevel(MultiPlayerLevel *level, int message = -1, shared_ptr forceInsertPlayer = nullptr, bool doForceStatsSave = true,bool bPrimaryPlayerSignedOut=false); // 4J-PB - added to force in the 'other' level when the main player creates the level at game load time void forceaddLevel(MultiPlayerLevel *level); void prepareLevel(int title); // 4J - changed to public diff --git a/Minecraft.Client/MinecraftServer.cpp b/Minecraft.Client/MinecraftServer.cpp index b94330d7..a57b798b 100644 --- a/Minecraft.Client/MinecraftServer.cpp +++ b/Minecraft.Client/MinecraftServer.cpp @@ -395,7 +395,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring if( app.GetGameHostOption(eGameHostOption_BonusChest ) ) levelSettings->enableStartingBonusItems(); // 4J - temp - load existing level - std::shared_ptr storage = nullptr; + shared_ptr storage = nullptr; bool levelChunksNeedConverted = false; if( initData->saveData != NULL ) { @@ -413,7 +413,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring levelChunksNeedConverted = true; pSave->ConvertToLocalPlatform(); // check if we need to convert this file from PS3->PS4 - storage = std::shared_ptr(new McRegionLevelStorage(pSave, File(L"."), name, true)); + storage = shared_ptr(new McRegionLevelStorage(pSave, File(L"."), name, true)); } else { @@ -438,9 +438,9 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring newFormatSave = new ConsoleSaveFileSplit( L"" ); } - storage = std::shared_ptr(new McRegionLevelStorage(newFormatSave, File(L"."), name, true)); + storage = shared_ptr(new McRegionLevelStorage(newFormatSave, File(L"."), name, true)); #else - storage = std::shared_ptr(new McRegionLevelStorage(new ConsoleSaveFileOriginal( L"" ), File(L"."), name, true)); + storage = shared_ptr(new McRegionLevelStorage(new ConsoleSaveFileOriginal( L"" ), File(L"."), name, true)); #endif } @@ -1245,7 +1245,7 @@ void MinecraftServer::run(int64_t seed, void *lpParameter) players->saveAll(Minecraft::GetInstance()->progressRenderer); } - players->broadcastAll( std::shared_ptr( new UpdateProgressPacket(20) ) ); + players->broadcastAll( shared_ptr( new UpdateProgressPacket(20) ) ); for (unsigned int j = 0; j < levels.length; j++) { @@ -1256,7 +1256,7 @@ void MinecraftServer::run(int64_t seed, void *lpParameter) ServerLevel *level = levels[levels.length - 1 - j]; level->save(true, Minecraft::GetInstance()->progressRenderer, (eAction==eXuiServerAction_AutoSaveGame)); - players->broadcastAll( std::shared_ptr( new UpdateProgressPacket(33 + (j*33) ) ) ); + players->broadcastAll( shared_ptr( new UpdateProgressPacket(33 + (j*33) ) ) ); } if( !s_bServerHalted ) { @@ -1269,16 +1269,16 @@ void MinecraftServer::run(int64_t seed, void *lpParameter) case eXuiServerAction_DropItem: // Find the player, and drop the id at their feet { - std::shared_ptr player = players->players.at(0); + shared_ptr player = players->players.at(0); size_t id = (size_t) param; - player->drop( std::shared_ptr( new ItemInstance(id, 1, 0 ) ) ); + player->drop( shared_ptr( new ItemInstance(id, 1, 0 ) ) ); } break; case eXuiServerAction_SpawnMob: { - std::shared_ptr player = players->players.at(0); + shared_ptr player = players->players.at(0); eINSTANCEOF factory = (eINSTANCEOF)((size_t)param); - std::shared_ptr mob = dynamic_pointer_cast(EntityIO::newByEnumType(factory,player->level )); + shared_ptr mob = dynamic_pointer_cast(EntityIO::newByEnumType(factory,player->level )); mob->moveTo(player->x+1, player->y, player->z+1, player->level->random->nextFloat() * 360, 0); mob->setDespawnProtected(); // 4J added, default to being protected against despawning (has to be done after initial position is set) player->level->addEntity(mob); @@ -1306,20 +1306,20 @@ void MinecraftServer::run(int64_t seed, void *lpParameter) } break; case eXuiServerAction_ServerSettingChanged_Gamertags: - players->broadcastAll( std::shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_OPTIONS, app.GetGameHostOption(eGameHostOption_Gamertags)) ) ); + players->broadcastAll( shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_OPTIONS, app.GetGameHostOption(eGameHostOption_Gamertags)) ) ); break; case eXuiServerAction_ServerSettingChanged_BedrockFog: - players->broadcastAll( std::shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, app.GetGameHostOption(eGameHostOption_All)) ) ); + players->broadcastAll( shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS, app.GetGameHostOption(eGameHostOption_All)) ) ); break; case eXuiServerAction_ServerSettingChanged_Difficulty: - players->broadcastAll( std::shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_DIFFICULTY, Minecraft::GetInstance()->options->difficulty) ) ); + players->broadcastAll( shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_DIFFICULTY, Minecraft::GetInstance()->options->difficulty) ) ); break; case eXuiServerAction_ExportSchematic: #ifndef _CONTENT_PACKAGE app.EnterSaveNotificationSection(); - //players->broadcastAll( std::shared_ptr( new UpdateProgressPacket(20) ) ); + //players->broadcastAll( shared_ptr( new UpdateProgressPacket(20) ) ); if( !s_bServerHalted ) { @@ -1357,7 +1357,7 @@ void MinecraftServer::run(int64_t seed, void *lpParameter) pos->m_yRot, pos->m_elev ); - std::shared_ptr player = players->players.at(pos->player); + shared_ptr player = players->players.at(pos->player); player->debug_setPosition( pos->m_camX, pos->m_camY, pos->m_camZ, pos->m_yRot, pos->m_elev ); @@ -1414,14 +1414,14 @@ void MinecraftServer::run(int64_t seed, void *lpParameter) void MinecraftServer::broadcastStartSavingPacket() { - players->broadcastAll( std::shared_ptr( new GameEventPacket(GameEventPacket::START_SAVING, 0) ) );; + players->broadcastAll( shared_ptr( new GameEventPacket(GameEventPacket::START_SAVING, 0) ) );; } void MinecraftServer::broadcastStopSavingPacket() { if( !s_bServerHalted ) { - players->broadcastAll( std::shared_ptr( new GameEventPacket(GameEventPacket::STOP_SAVING, 0) ) );; + players->broadcastAll( shared_ptr( new GameEventPacket(GameEventPacket::STOP_SAVING, 0) ) );; } } @@ -1456,7 +1456,7 @@ void MinecraftServer::tick() /* if(m_lastSentDifficulty != pMinecraft->options->difficulty) { m_lastSentDifficulty = pMinecraft->options->difficulty; - players->broadcastAll( std::shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_DIFFICULTY, pMinecraft->options->difficulty) ) ); + players->broadcastAll( shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_DIFFICULTY, pMinecraft->options->difficulty) ) ); }*/ for (unsigned int i = 0; i < levels.length; i++) @@ -1476,7 +1476,7 @@ void MinecraftServer::tick() if (tickCount % 20 == 0) { - players->broadcastAll( std::shared_ptr( new SetTimePacket(level->getTime() ) ), level->dimension->id); + players->broadcastAll( shared_ptr( new SetTimePacket(level->getTime() ) ), level->dimension->id); } // #ifndef __PS3__ static int64_t stc = 0; diff --git a/Minecraft.Client/Minimap.cpp b/Minecraft.Client/Minimap.cpp index 88552b01..c18cd267 100644 --- a/Minecraft.Client/Minimap.cpp +++ b/Minecraft.Client/Minimap.cpp @@ -85,7 +85,7 @@ void Minimap::reloadColours() LUT[i] = 255 << 24 | r << 16 | g << 8 | b; #elif defined __ORBIS__ r >>= 3; g >>= 3; b >>= 3; - LUT[i] = 1 << 15 | ( r << 10 ) | ( g << 5 ) | b; + LUT[i] = 1 << 15 | ( r << 10 ) | ( g << 5 ) | b; #else LUT[i] = r << 24 | g << 16 | b << 8 | 255; #endif @@ -98,7 +98,7 @@ void Minimap::reloadColours() } // 4J added entityId -void Minimap::render(std::shared_ptr player, Textures *textures, std::shared_ptr data, int entityId) +void Minimap::render(shared_ptr player, Textures *textures, shared_ptr data, int entityId) { // 4J - only update every 8 renders, as an optimisation // We don't want to use this for ItemFrame renders of maps, as then we can't have different maps together @@ -203,7 +203,7 @@ void Minimap::render(std::shared_ptr player, Textures *textures, std::sh for( AUTO_VAR(it,m_edgeIcons.begin()); it != m_edgeIcons.end(); it++ ) { MapItemSavedData::MapDecoration *dec = *it; - + char imgIndex = dec->img; imgIndex -= 16; @@ -253,7 +253,7 @@ void Minimap::render(std::shared_ptr player, Textures *textures, std::sh int posy = floor(player->y); int posz = floor(player->z); swprintf(playerPosText, 32, L"X: %d, Y: %d, Z: %d", posx, posy, posz); - + font->draw(playerPosText, x, y, Minecraft::GetInstance()->getColourTable()->getColour(eMinecraftColour_Map_Text)); } //#endif diff --git a/Minecraft.Client/Minimap.h b/Minecraft.Client/Minimap.h index 6b4776f9..758d8a8a 100644 --- a/Minecraft.Client/Minimap.h +++ b/Minecraft.Client/Minimap.h @@ -31,5 +31,5 @@ private: public: Minimap(Font *font, Options *options, Textures *textures, bool optimised = true); // 4J Added optimised param static void reloadColours(); - void render(std::shared_ptr player, Textures *textures, std::shared_ptr data, int entityId); // 4J added entityId param + void render(shared_ptr player, Textures *textures, shared_ptr data, int entityId); // 4J added entityId param }; diff --git a/Minecraft.Client/MobRenderer.cpp b/Minecraft.Client/MobRenderer.cpp index 7399f2c2..8874ab9c 100644 --- a/Minecraft.Client/MobRenderer.cpp +++ b/Minecraft.Client/MobRenderer.cpp @@ -31,11 +31,11 @@ float MobRenderer::rotlerp(float from, float to, float a) return from + a * diff; } -void MobRenderer::render(std::shared_ptr _mob, double x, double y, double z, float rot, float a) +void MobRenderer::render(shared_ptr _mob, double x, double y, double z, float rot, float a) { // 4J - added - this used to use generics so the input parameter could be a mob (or derived type), but we aren't // able to do that so dynamically casting to get the more specific type here. - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); glPushMatrix(); glDisable(GL_CULL_FACE); @@ -54,7 +54,7 @@ void MobRenderer::render(std::shared_ptr _mob, double x, double y, doubl if (mob->isRiding() && dynamic_pointer_cast(mob->riding)) { - std::shared_ptr riding = dynamic_pointer_cast(mob->riding); + shared_ptr riding = dynamic_pointer_cast(mob->riding); bodyRot = rotlerp(riding->yBodyRotO, riding->yBodyRot, a); float headDiff = Mth::wrapDegrees(headRot - bodyRot); @@ -233,9 +233,9 @@ void MobRenderer::render(std::shared_ptr _mob, double x, double y, doubl MemSect(0); } -void MobRenderer::renderModel(std::shared_ptr mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale) +void MobRenderer::renderModel(shared_ptr mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale) { - std::shared_ptr player = dynamic_pointer_cast(Minecraft::GetInstance()->player); + shared_ptr player = dynamic_pointer_cast(Minecraft::GetInstance()->player); bindTexture(mob->customTextureUrl, mob->getTexture()); if (!mob->isInvisible()) @@ -262,15 +262,15 @@ void MobRenderer::renderModel(std::shared_ptr mob, float wp, float ws, f } } -void MobRenderer::setupPosition(std::shared_ptr mob, double x, double y, double z) +void MobRenderer::setupPosition(shared_ptr mob, double x, double y, double z) { glTranslatef((float) x, (float) y, (float) z); } -void MobRenderer::setupRotations(std::shared_ptr mob, float bob, float bodyRot, float a) +void MobRenderer::setupRotations(shared_ptr mob, float bob, float bodyRot, float a) { glRotatef(180 - bodyRot, 0, 1, 0); - if (mob->deathTime > 0) + if (mob->deathTime > 0) { float fall = (mob->deathTime + a - 1) / 20.0f * 1.6f; fall = (float)sqrt(fall); @@ -279,49 +279,49 @@ void MobRenderer::setupRotations(std::shared_ptr mob, float bob, float body } } -float MobRenderer::getAttackAnim(std::shared_ptr mob, float a) +float MobRenderer::getAttackAnim(shared_ptr mob, float a) { return mob->getAttackAnim(a); } -float MobRenderer::getBob(std::shared_ptr mob, float a) +float MobRenderer::getBob(shared_ptr mob, float a) { return (mob->tickCount + a); } -void MobRenderer::additionalRendering(std::shared_ptr mob, float a) +void MobRenderer::additionalRendering(shared_ptr mob, float a) { } -int MobRenderer::prepareArmorOverlay(std::shared_ptr mob, int layer, float a) +int MobRenderer::prepareArmorOverlay(shared_ptr mob, int layer, float a) { return prepareArmor(mob, layer, a); } -int MobRenderer::prepareArmor(std::shared_ptr mob, int layer, float a) +int MobRenderer::prepareArmor(shared_ptr mob, int layer, float a) { return -1; } -void MobRenderer::prepareSecondPassArmor(std::shared_ptr mob, int layer, float a) +void MobRenderer::prepareSecondPassArmor(shared_ptr mob, int layer, float a) { } -float MobRenderer::getFlipDegrees(std::shared_ptr mob) +float MobRenderer::getFlipDegrees(shared_ptr mob) { return 90; } -int MobRenderer::getOverlayColor(std::shared_ptr mob, float br, float a) +int MobRenderer::getOverlayColor(shared_ptr mob, float br, float a) { return 0; } -void MobRenderer::scale(std::shared_ptr mob, float a) +void MobRenderer::scale(shared_ptr mob, float a) { } -void MobRenderer::renderName(std::shared_ptr mob, double x, double y, double z) +void MobRenderer::renderName(shared_ptr mob, double x, double y, double z) { if (Minecraft::renderDebug()) { @@ -330,7 +330,7 @@ void MobRenderer::renderName(std::shared_ptr mob, double x, double y, doubl } // 4J Added parameter for color here so that we can colour players names -void MobRenderer::renderNameTag(std::shared_ptr mob, const wstring& OriginalName, double x, double y, double z, int maxDist, int color /*= 0xffffffff*/) +void MobRenderer::renderNameTag(shared_ptr mob, const wstring& OriginalName, double x, double y, double z, int maxDist, int color /*= 0xffffffff*/) { if ( app.GetGameSettings(eGameSetting_DisplayHUD)==0 ) @@ -390,13 +390,13 @@ void MobRenderer::renderNameTag(std::shared_ptr mob, const wstring& Origina if( textOpacity < 0.0f ) textOpacity = 0.0f; if( textOpacity > 1.0f ) textOpacity = 1.0f; - + glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); Tesselator *t = Tesselator::getInstance(); int offs = 0; - std::shared_ptr player = dynamic_pointer_cast(mob); + shared_ptr player = dynamic_pointer_cast(mob); if (player != NULL && app.isXuidDeadmau5( player->getXuid() ) ) offs = -10; wstring playerName; @@ -415,7 +415,7 @@ void MobRenderer::renderNameTag(std::shared_ptr mob, const wstring& Origina else { memset(wchName,0,sizeof(WCHAR)*2); - swprintf(wchName, 2, L"%d",player->getPlayerIndex()+1); + swprintf(wchName, 2, L"%d",player->getPlayerIndex()+1); playerName=wchName; player->SetPlayerNameValidState(false); } @@ -425,8 +425,8 @@ void MobRenderer::renderNameTag(std::shared_ptr mob, const wstring& Origina break; case Player::ePlayerNameValid_False: memset(wchName,0,sizeof(WCHAR)*2); - swprintf(wchName, 2, L"%d",player->getPlayerIndex()+1); - playerName=wchName; + swprintf(wchName, 2, L"%d",player->getPlayerIndex()+1); + playerName=wchName; break; } @@ -459,7 +459,7 @@ void MobRenderer::renderNameTag(std::shared_ptr mob, const wstring& Origina t->vertex((float)(+w + 1), (float)( +8 + offs + 1), (float)( 0)); t->vertex((float)(+w + 1), (float)( -1 + offs), (float)( 0)); t->end(); - + glEnable(GL_DEPTH_TEST); glDepthMask(true); glDepthFunc(GL_ALWAYS); @@ -479,7 +479,7 @@ void MobRenderer::renderNameTag(std::shared_ptr mob, const wstring& Origina glEnable(GL_TEXTURE_2D); font->draw(playerName, -font->width(playerName) / 2, offs, 0x20ffffff); glEnable(GL_DEPTH_TEST); - + glDepthMask(true); } @@ -495,10 +495,10 @@ void MobRenderer::renderNameTag(std::shared_ptr mob, const wstring& Origina t->vertex((float)(-w - 1), (float)( +8 + offs), (float)( 0)); t->vertex((float)(+w + 1), (float)( +8 + offs), (float)( 0)); t->vertex((float)(+w + 1), (float)( -1 + offs), (float)( 0)); - t->end(); + t->end(); glDepthFunc(GL_LEQUAL); glEnable(GL_TEXTURE_2D); - + glTranslatef(0.0f, 0.0f, -0.04f); } @@ -507,7 +507,7 @@ void MobRenderer::renderNameTag(std::shared_ptr mob, const wstring& Origina int textColor = ( ( (int)(textOpacity*255) << 24 ) | 0xffffff ); font->draw(playerName, -font->width(playerName) / 2, offs, textColor); } - + glEnable(GL_LIGHTING); glDisable(GL_BLEND); glColor4f(1, 1, 1, 1); diff --git a/Minecraft.Client/MobRenderer.h b/Minecraft.Client/MobRenderer.h index 6a5df478..a8b2b93e 100644 --- a/Minecraft.Client/MobRenderer.h +++ b/Minecraft.Client/MobRenderer.h @@ -23,22 +23,22 @@ public: private: float rotlerp(float from, float to, float a); public: - virtual void render(std::shared_ptr mob, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr mob, double x, double y, double z, float rot, float a); protected: - virtual void renderModel(std::shared_ptr mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale); - virtual void setupPosition(std::shared_ptr mob, double x, double y, double z); - virtual void setupRotations(std::shared_ptr mob, float bob, float bodyRot, float a); - virtual float getAttackAnim(std::shared_ptr mob, float a); - virtual float getBob(std::shared_ptr mob, float a); - virtual void additionalRendering(std::shared_ptr mob, float a); - virtual int prepareArmorOverlay(std::shared_ptr mob, int layer, float a); - virtual int prepareArmor(std::shared_ptr mob, int layer, float a); - virtual void prepareSecondPassArmor(std::shared_ptr mob, int layer, float a); - virtual float getFlipDegrees(std::shared_ptr mob); - virtual int getOverlayColor(std::shared_ptr mob, float br, float a); - virtual void scale(std::shared_ptr mob, float a); - virtual void renderName(std::shared_ptr mob, double x, double y, double z); - virtual void renderNameTag(std::shared_ptr mob, const wstring& name, double x, double y, double z, int maxDist, int color = 0xff000000); + virtual void renderModel(shared_ptr mob, float wp, float ws, float bob, float headRotMinusBodyRot, float headRotx, float scale); + virtual void setupPosition(shared_ptr mob, double x, double y, double z); + virtual void setupRotations(shared_ptr mob, float bob, float bodyRot, float a); + virtual float getAttackAnim(shared_ptr mob, float a); + virtual float getBob(shared_ptr mob, float a); + virtual void additionalRendering(shared_ptr mob, float a); + virtual int prepareArmorOverlay(shared_ptr mob, int layer, float a); + virtual int prepareArmor(shared_ptr mob, int layer, float a); + virtual void prepareSecondPassArmor(shared_ptr mob, int layer, float a); + virtual float getFlipDegrees(shared_ptr mob); + virtual int getOverlayColor(shared_ptr mob, float br, float a); + virtual void scale(shared_ptr mob, float a); + virtual void renderName(shared_ptr mob, double x, double y, double z); + virtual void renderNameTag(shared_ptr mob, const wstring& name, double x, double y, double z, int maxDist, int color = 0xff000000); public: // 4J Added diff --git a/Minecraft.Client/MobSpawnerRenderer.cpp b/Minecraft.Client/MobSpawnerRenderer.cpp index 50a8cbb2..4ee772dd 100644 --- a/Minecraft.Client/MobSpawnerRenderer.cpp +++ b/Minecraft.Client/MobSpawnerRenderer.cpp @@ -5,15 +5,15 @@ #include "..\Minecraft.World\net.minecraft.world.level.tile.entity.h" #include "..\Minecraft.World\net.minecraft.world.entity.h" -void MobSpawnerRenderer::render(std::shared_ptr _spawner, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void MobSpawnerRenderer::render(shared_ptr _spawner, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr spawner = dynamic_pointer_cast(_spawner); + shared_ptr spawner = dynamic_pointer_cast(_spawner); glPushMatrix(); glTranslatef((float) x + 0.5f, (float) y, (float) z + 0.5f); - std::shared_ptr e = spawner->getDisplayEntity(); + shared_ptr e = spawner->getDisplayEntity(); if (e != NULL) { e->setLevel(spawner->level); diff --git a/Minecraft.Client/MobSpawnerRenderer.h b/Minecraft.Client/MobSpawnerRenderer.h index c8b392ad..ad7dfe67 100644 --- a/Minecraft.Client/MobSpawnerRenderer.h +++ b/Minecraft.Client/MobSpawnerRenderer.h @@ -5,7 +5,7 @@ using namespace std; class MobSpawnerRenderer : public TileEntityRenderer { private: - unordered_map > models; + unordered_map > models; public: - virtual void render(std::shared_ptr _spawner, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param + virtual void render(shared_ptr _spawner, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param }; diff --git a/Minecraft.Client/Model.h b/Minecraft.Client/Model.h index e7595845..e4161d0c 100644 --- a/Minecraft.Client/Model.h +++ b/Minecraft.Client/Model.h @@ -19,9 +19,9 @@ public: int texHeight; Model(); // 4J added - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) {} + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) {} virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0) {} - virtual void prepareMobModel(std::shared_ptr mob, float time, float r, float a) {} + virtual void prepareMobModel(shared_ptr mob, float time, float r, float a) {} virtual ModelPart *getRandomCube(Random random) {return cubes.at(random.nextInt((int)cubes.size()));} virtual ModelPart * AddOrRetrievePart(SKIN_BOX *pBox) { return NULL;} diff --git a/Minecraft.Client/MultiPlayerGameMode.cpp b/Minecraft.Client/MultiPlayerGameMode.cpp index 2f048d95..7de59803 100644 --- a/Minecraft.Client/MultiPlayerGameMode.cpp +++ b/Minecraft.Client/MultiPlayerGameMode.cpp @@ -38,7 +38,7 @@ void MultiPlayerGameMode::creativeDestroyBlock(Minecraft *minecraft, MultiPlayer } } -void MultiPlayerGameMode::adjustPlayer(std::shared_ptr player) +void MultiPlayerGameMode::adjustPlayer(shared_ptr player) { localPlayerMode->updatePlayerAbilities(&player->abilities); } @@ -54,7 +54,7 @@ void MultiPlayerGameMode::setLocalMode(GameType *mode) localPlayerMode->updatePlayerAbilities(&minecraft->player->abilities); } -void MultiPlayerGameMode::initPlayer(std::shared_ptr player) +void MultiPlayerGameMode::initPlayer(shared_ptr player) { player->yRot = -180; } @@ -87,7 +87,7 @@ bool MultiPlayerGameMode::destroyBlock(int x, int y, int z, int face) if (!localPlayerMode->isCreative()) { - std::shared_ptr item = minecraft->player->getSelectedItem(); + shared_ptr item = minecraft->player->getSelectedItem(); if (item != NULL) { item->mineBlock(level, oldTile->id, x, y, z, minecraft->player); @@ -102,7 +102,7 @@ bool MultiPlayerGameMode::destroyBlock(int x, int y, int z, int face) } void MultiPlayerGameMode::startDestroyBlock(int x, int y, int z, int face) -{ +{ if(!minecraft->player->isAllowedToMine()) return; if (localPlayerMode->isReadOnly()) { @@ -111,13 +111,13 @@ void MultiPlayerGameMode::startDestroyBlock(int x, int y, int z, int face) if (localPlayerMode->isCreative()) { - connection->send(std::shared_ptr( new PlayerActionPacket(PlayerActionPacket::START_DESTROY_BLOCK, x, y, z, face) )); + connection->send(shared_ptr( new PlayerActionPacket(PlayerActionPacket::START_DESTROY_BLOCK, x, y, z, face) )); creativeDestroyBlock(minecraft, this, x, y, z, face); destroyDelay = 5; } else if (!isDestroying || x != xDestroyBlock || y != yDestroyBlock || z != zDestroyBlock) { - connection->send( std::shared_ptr( new PlayerActionPacket(PlayerActionPacket::START_DESTROY_BLOCK, x, y, z, face) ) ); + connection->send( shared_ptr( new PlayerActionPacket(PlayerActionPacket::START_DESTROY_BLOCK, x, y, z, face) ) ); int t = minecraft->level->getTile(x, y, z); if (t > 0 && destroyProgress == 0) Tile::tiles[t]->attack(minecraft->level, x, y, z, minecraft->player); if (t > 0 && @@ -147,7 +147,7 @@ void MultiPlayerGameMode::stopDestroyBlock() { if (isDestroying) { - connection->send(std::shared_ptr(new PlayerActionPacket(PlayerActionPacket::ABORT_DESTROY_BLOCK, xDestroyBlock, yDestroyBlock, zDestroyBlock, -1))); + connection->send(shared_ptr(new PlayerActionPacket(PlayerActionPacket::ABORT_DESTROY_BLOCK, xDestroyBlock, yDestroyBlock, zDestroyBlock, -1))); } isDestroying = false; @@ -170,7 +170,7 @@ void MultiPlayerGameMode::continueDestroyBlock(int x, int y, int z, int face) if (localPlayerMode->isCreative()) { destroyDelay = 5; - connection->send(std::shared_ptr( new PlayerActionPacket(PlayerActionPacket::START_DESTROY_BLOCK, x, y, z, face) ) ); + connection->send(shared_ptr( new PlayerActionPacket(PlayerActionPacket::START_DESTROY_BLOCK, x, y, z, face) ) ); creativeDestroyBlock(minecraft, this, x, y, z, face); return; } @@ -202,7 +202,7 @@ void MultiPlayerGameMode::continueDestroyBlock(int x, int y, int z, int face) if (destroyProgress >= 1) { isDestroying = false; - connection->send( std::shared_ptr( new PlayerActionPacket(PlayerActionPacket::STOP_DESTROY_BLOCK, x, y, z, face) ) ); + connection->send( shared_ptr( new PlayerActionPacket(PlayerActionPacket::STOP_DESTROY_BLOCK, x, y, z, face) ) ); destroyBlock(x, y, z, face); destroyProgress = 0; oDestroyProgress = 0; @@ -241,11 +241,11 @@ void MultiPlayerGameMode::ensureHasSentCarriedItem() if (newItem != carriedItem) { carriedItem = newItem; - connection->send( std::shared_ptr( new SetCarriedItemPacket(carriedItem) ) ); + connection->send( shared_ptr( new SetCarriedItemPacket(carriedItem) ) ); } } -bool MultiPlayerGameMode::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 MultiPlayerGameMode::useItemOn(shared_ptr player, Level *level, shared_ptr item, int x, int y, int z, int face, Vec3 *hit, bool bTestUseOnly, bool *pbUsedItem) { if( pbUsedItem ) *pbUsedItem = false; // Did we actually use the held item? @@ -259,16 +259,16 @@ bool MultiPlayerGameMode::useItemOn(std::shared_ptr player, Level *level float clickZ = (float) hit->z - z; bool didSomething = false; int t = level->getTile(x, y, z); - + if (t > 0 && player->isAllowedToUse(Tile::tiles[t])) { if(bTestUseOnly) { switch(t) { - case Tile::recordPlayer_Id: + case Tile::recordPlayer_Id: case Tile::bed_Id: // special case for a bed - if (Tile::tiles[t]->TestUse(level, x, y, z, player )) + if (Tile::tiles[t]->TestUse(level, x, y, z, player )) { return true; } @@ -283,7 +283,7 @@ bool MultiPlayerGameMode::useItemOn(std::shared_ptr player, Level *level break; } } - else + else { if (Tile::tiles[t]->use(level, x, y, z, player, face, clickX, clickY, clickZ)) didSomething = true; } @@ -321,7 +321,7 @@ bool MultiPlayerGameMode::useItemOn(std::shared_ptr player, Level *level } else { - // 4J - Bit of a hack, however seems preferable to any larger changes which would have more chance of causing unwanted side effects. + // 4J - Bit of a hack, however seems preferable to any larger changes which would have more chance of causing unwanted side effects. // If we aren't going to be actually performing the use method locally, then call this method with its "soundOnly" parameter set to true. // This is an addition from the java version, and as its name suggests, doesn't actually perform the use locally but just makes any sounds that // are meant to be directly caused by this. If we don't do this, then the sounds never happen as the tile's use method is only called on the @@ -333,17 +333,17 @@ bool MultiPlayerGameMode::useItemOn(std::shared_ptr player, Level *level } } - // 4J Stu - Do the action before we send the packet, so that our predicted count is sent in the packet and the server + // 4J Stu - Do the action before we send the packet, so that our predicted count is sent in the packet and the server // doesn't think it has to update us // Fix for #7904 - Gameplay: Players can dupe torches by throwing them repeatedly into water. if(!bTestUseOnly) { - connection->send( std::shared_ptr( new UseItemPacket(x, y, z, face, player->inventory->getSelected(), clickX, clickY, clickZ) ) ); + connection->send( shared_ptr( new UseItemPacket(x, y, z, face, player->inventory->getSelected(), clickX, clickY, clickZ) ) ); } return didSomething; } -bool MultiPlayerGameMode::useItem(std::shared_ptr player, Level *level, std::shared_ptr item, bool bTestUseOnly) +bool MultiPlayerGameMode::useItem(shared_ptr player, Level *level, shared_ptr item, bool bTestUseOnly) { if(!player->isAllowedToUse(item)) return false; @@ -353,11 +353,11 @@ bool MultiPlayerGameMode::useItem(std::shared_ptr player, Level *level, ensureHasSentCarriedItem(); } - // 4J Stu - Do the action before we send the packet, so that our predicted count is sent in the packet and the server + // 4J Stu - Do the action before we send the packet, so that our predicted count is sent in the packet and the server // doesn't think it has to update us, or can update us if we are wrong // Fix for #13120 - Using a bucket of water or lava in the spawn area (centre of the map) causes the inventory to get out of sync bool result = false; - + // 4J-PB added for tooltips to test use only if(bTestUseOnly) { @@ -366,7 +366,7 @@ bool MultiPlayerGameMode::useItem(std::shared_ptr player, Level *level, else { int oldCount = item->count; - std::shared_ptr itemInstance = item->use(level, player); + shared_ptr itemInstance = item->use(level, player); if ((itemInstance != NULL && itemInstance != item) || (itemInstance != NULL && itemInstance->count != oldCount)) { player->inventory->items[player->inventory->selected] = itemInstance; @@ -377,68 +377,68 @@ bool MultiPlayerGameMode::useItem(std::shared_ptr player, Level *level, result = true; } } - + if(!bTestUseOnly) { - connection->send( std::shared_ptr( new UseItemPacket(-1, -1, -1, 255, player->inventory->getSelected(), 0, 0, 0) ) ); + connection->send( shared_ptr( new UseItemPacket(-1, -1, -1, 255, player->inventory->getSelected(), 0, 0, 0) ) ); } return result; } -std::shared_ptr MultiPlayerGameMode::createPlayer(Level *level) +shared_ptr MultiPlayerGameMode::createPlayer(Level *level) { - return std::shared_ptr( new MultiplayerLocalPlayer(minecraft, level, minecraft->user, connection) ); + return shared_ptr( new MultiplayerLocalPlayer(minecraft, level, minecraft->user, connection) ); } -void MultiPlayerGameMode::attack(std::shared_ptr player, std::shared_ptr entity) +void MultiPlayerGameMode::attack(shared_ptr player, shared_ptr entity) { ensureHasSentCarriedItem(); - connection->send( std::shared_ptr( new InteractPacket(player->entityId, entity->entityId, InteractPacket::ATTACK) ) ); + connection->send( shared_ptr( new InteractPacket(player->entityId, entity->entityId, InteractPacket::ATTACK) ) ); player->attack(entity); } -bool MultiPlayerGameMode::interact(std::shared_ptr player, std::shared_ptr entity) +bool MultiPlayerGameMode::interact(shared_ptr player, shared_ptr entity) { ensureHasSentCarriedItem(); - connection->send(std::shared_ptr( new InteractPacket(player->entityId, entity->entityId, InteractPacket::INTERACT) ) ); + connection->send(shared_ptr( new InteractPacket(player->entityId, entity->entityId, InteractPacket::INTERACT) ) ); return player->interact(entity); } -std::shared_ptr MultiPlayerGameMode::handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, std::shared_ptr player) +shared_ptr MultiPlayerGameMode::handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, shared_ptr player) { short changeUid = player->containerMenu->backup(player->inventory); - std::shared_ptr clicked = player->containerMenu->clicked(slotNum, buttonNum, quickKeyHeld?AbstractContainerMenu::CLICK_QUICK_MOVE:AbstractContainerMenu::CLICK_PICKUP, player); - connection->send( std::shared_ptr( new ContainerClickPacket(containerId, slotNum, buttonNum, quickKeyHeld, clicked, changeUid) ) ); + shared_ptr clicked = player->containerMenu->clicked(slotNum, buttonNum, quickKeyHeld?AbstractContainerMenu::CLICK_QUICK_MOVE:AbstractContainerMenu::CLICK_PICKUP, player); + connection->send( shared_ptr( new ContainerClickPacket(containerId, slotNum, buttonNum, quickKeyHeld, clicked, changeUid) ) ); return clicked; } void MultiPlayerGameMode::handleInventoryButtonClick(int containerId, int buttonId) { - connection->send(std::shared_ptr( new ContainerButtonClickPacket(containerId, buttonId) )); + connection->send(shared_ptr( new ContainerButtonClickPacket(containerId, buttonId) )); } -void MultiPlayerGameMode::handleCreativeModeItemAdd(std::shared_ptr clicked, int slot) +void MultiPlayerGameMode::handleCreativeModeItemAdd(shared_ptr clicked, int slot) { if (localPlayerMode->isCreative()) { - connection->send(std::shared_ptr( new SetCreativeModeSlotPacket(slot, clicked) ) ); + connection->send(shared_ptr( new SetCreativeModeSlotPacket(slot, clicked) ) ); } } -void MultiPlayerGameMode::handleCreativeModeItemDrop(std::shared_ptr clicked) +void MultiPlayerGameMode::handleCreativeModeItemDrop(shared_ptr clicked) { if (localPlayerMode->isCreative() && clicked != NULL) { - connection->send(std::shared_ptr( new SetCreativeModeSlotPacket(-1, clicked) ) ); + connection->send(shared_ptr( new SetCreativeModeSlotPacket(-1, clicked) ) ); } } -void MultiPlayerGameMode::releaseUsingItem(std::shared_ptr player) +void MultiPlayerGameMode::releaseUsingItem(shared_ptr player) { ensureHasSentCarriedItem(); - connection->send(std::shared_ptr( new PlayerActionPacket(PlayerActionPacket::RELEASE_USE_ITEM, 0, 0, 0, 255) ) ); + connection->send(shared_ptr( new PlayerActionPacket(PlayerActionPacket::RELEASE_USE_ITEM, 0, 0, 0, 255) ) ); player->releaseUsingItem(); } @@ -462,17 +462,17 @@ bool MultiPlayerGameMode::hasFarPickRange() return localPlayerMode->isCreative(); } -bool MultiPlayerGameMode::handleCraftItem(int recipe, std::shared_ptr player) +bool MultiPlayerGameMode::handleCraftItem(int recipe, shared_ptr player) { short changeUid = player->containerMenu->backup(player->inventory); - connection->send( std::shared_ptr( new CraftItemPacket(recipe, changeUid) ) ); + connection->send( shared_ptr( new CraftItemPacket(recipe, changeUid) ) ); return true; } -void MultiPlayerGameMode::handleDebugOptions(unsigned int uiVal, std::shared_ptr player) +void MultiPlayerGameMode::handleDebugOptions(unsigned int uiVal, shared_ptr player) { player->SetDebugOptions(uiVal); - connection->send( std::shared_ptr( new DebugOptionsPacket(uiVal) ) ); + connection->send( shared_ptr( new DebugOptionsPacket(uiVal) ) ); } diff --git a/Minecraft.Client/MultiPlayerGameMode.h b/Minecraft.Client/MultiPlayerGameMode.h index 8fc88df8..c84410fa 100644 --- a/Minecraft.Client/MultiPlayerGameMode.h +++ b/Minecraft.Client/MultiPlayerGameMode.h @@ -24,10 +24,10 @@ protected: public: MultiPlayerGameMode(Minecraft *minecraft, ClientConnection *connection); static void creativeDestroyBlock(Minecraft *minecraft, MultiPlayerGameMode *gameMode, int x, int y, int z, int face); - void adjustPlayer(std::shared_ptr player); + void adjustPlayer(shared_ptr player); bool isCutScene(); void setLocalMode(GameType *mode); - virtual void initPlayer(std::shared_ptr player); + virtual void initPlayer(shared_ptr player); virtual bool canHurtPlayer(); virtual bool destroyBlock(int x, int y, int z, int face); virtual void startDestroyBlock(int x, int y, int z, int face); @@ -41,24 +41,24 @@ private: private: void ensureHasSentCarriedItem(); public: - 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 bool useItem(std::shared_ptr player, Level *level, std::shared_ptr item, bool bTestUseOnly=false); - virtual std::shared_ptr createPlayer(Level *level); - virtual void attack(std::shared_ptr player, std::shared_ptr entity); - virtual bool interact(std::shared_ptr player, std::shared_ptr entity); - virtual std::shared_ptr handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, std::shared_ptr player); + 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 bool useItem(shared_ptr player, Level *level, shared_ptr item, bool bTestUseOnly=false); + virtual shared_ptr createPlayer(Level *level); + virtual void attack(shared_ptr player, shared_ptr entity); + virtual bool interact(shared_ptr player, shared_ptr entity); + virtual shared_ptr handleInventoryMouseClick(int containerId, int slotNum, int buttonNum, bool quickKeyHeld, shared_ptr player); virtual void handleInventoryButtonClick(int containerId, int buttonId); - virtual void handleCreativeModeItemAdd(std::shared_ptr clicked, int slot); - virtual void handleCreativeModeItemDrop(std::shared_ptr clicked); - virtual void releaseUsingItem(std::shared_ptr player); + virtual void handleCreativeModeItemAdd(shared_ptr clicked, int slot); + virtual void handleCreativeModeItemDrop(shared_ptr clicked); + virtual void releaseUsingItem(shared_ptr player); virtual bool hasExperience(); virtual bool hasMissTime(); virtual bool hasInfiniteItems(); virtual bool hasFarPickRange(); - + // 4J Stu - Added so we can send packets for this in the network game - virtual bool handleCraftItem(int recipe, std::shared_ptr player); - virtual void handleDebugOptions(unsigned int uiVal, std::shared_ptr player); + virtual bool handleCraftItem(int recipe, shared_ptr player); + virtual void handleDebugOptions(unsigned int uiVal, shared_ptr player); // 4J Stu - Added for tutorial checks virtual bool isInputAllowed(int mapping) { return true; } diff --git a/Minecraft.Client/MultiPlayerLevel.cpp b/Minecraft.Client/MultiPlayerLevel.cpp index 16594955..24b12bcd 100644 --- a/Minecraft.Client/MultiPlayerLevel.cpp +++ b/Minecraft.Client/MultiPlayerLevel.cpp @@ -24,7 +24,7 @@ MultiPlayerLevel::ResetInfo::ResetInfo(int x, int y, int z, int tile, int data) } MultiPlayerLevel::MultiPlayerLevel(ClientConnection *connection, LevelSettings *levelSettings, int dimension, int difficulty) - : Level(std::shared_ptr(new MockedLevelStorage()), L"MpServer", Dimension::getNew(dimension), levelSettings, false) + : Level(shared_ptr(new MockedLevelStorage()), L"MpServer", Dimension::getNew(dimension), levelSettings, false) { minecraft = Minecraft::GetInstance(); @@ -108,7 +108,7 @@ void MultiPlayerLevel::tick() EnterCriticalSection(&m_entitiesCS); for (int i = 0; i < 10 && !reEntries.empty(); i++) { - std::shared_ptr e = *(reEntries.begin()); + shared_ptr e = *(reEntries.begin()); if (find(entities.begin(), entities.end(), e) == entities.end() ) addEntity(e); } @@ -134,7 +134,7 @@ void MultiPlayerLevel::tick() { Level::setTileAndDataNoUpdate(r.x, r.y, r.z, r.tile, r.data); Level::sendTileUpdated(r.x, r.y, r.z); - + //updatesToReset.erase(updatesToReset.begin()+i); eraseElements = true; lastIndexToRemove = 0; @@ -156,7 +156,7 @@ void MultiPlayerLevel::tick() // 4J - added this section. Each tick we'll check a different block, and force it to share data if it has been // more than 2 minutes since we last wanted to unshare it. This shouldn't really ever happen, and is added // here as a safe guard against accumulated memory leaks should a lot of chunks become unshared over time. - + int ls = dimension->getXZSize(); if( g_NetworkManager.IsHost() ) { @@ -403,7 +403,7 @@ void MultiPlayerLevel::setChunkVisible(int x, int z, bool visible) } -bool MultiPlayerLevel::addEntity(std::shared_ptr e) +bool MultiPlayerLevel::addEntity(shared_ptr e) { bool ok = Level::addEntity(e); forced.insert(e); @@ -416,7 +416,7 @@ bool MultiPlayerLevel::addEntity(std::shared_ptr e) return ok; } -void MultiPlayerLevel::removeEntity(std::shared_ptr e) +void MultiPlayerLevel::removeEntity(shared_ptr e) { // 4J Stu - Add this remove from the reEntries collection to stop us continually removing and re-adding things, // in particular the MultiPlayerLocalPlayer when they die @@ -430,7 +430,7 @@ void MultiPlayerLevel::removeEntity(std::shared_ptr e) forced.erase(e); } -void MultiPlayerLevel::entityAdded(std::shared_ptr e) +void MultiPlayerLevel::entityAdded(shared_ptr e) { Level::entityAdded(e); AUTO_VAR(it, reEntries.find(e)); @@ -440,7 +440,7 @@ void MultiPlayerLevel::entityAdded(std::shared_ptr e) } } -void MultiPlayerLevel::entityRemoved(std::shared_ptr e) +void MultiPlayerLevel::entityRemoved(shared_ptr e) { Level::entityRemoved(e); AUTO_VAR(it, forced.find(e)); @@ -450,9 +450,9 @@ void MultiPlayerLevel::entityRemoved(std::shared_ptr e) } } -void MultiPlayerLevel::putEntity(int id, std::shared_ptr e) +void MultiPlayerLevel::putEntity(int id, shared_ptr e) { - std::shared_ptr old = getEntity(id); + shared_ptr old = getEntity(id); if (old != NULL) { removeEntity(old); @@ -467,16 +467,16 @@ void MultiPlayerLevel::putEntity(int id, std::shared_ptr e) entitiesById[id] = e; } -std::shared_ptr MultiPlayerLevel::getEntity(int id) +shared_ptr MultiPlayerLevel::getEntity(int id) { AUTO_VAR(it, entitiesById.find(id)); if( it == entitiesById.end() ) return nullptr; return it->second; } -std::shared_ptr MultiPlayerLevel::removeEntity(int id) +shared_ptr MultiPlayerLevel::removeEntity(int id) { - std::shared_ptr e; + shared_ptr e; AUTO_VAR(it, entitiesById.find(id)); if( it != entitiesById.end() ) { @@ -493,11 +493,11 @@ std::shared_ptr MultiPlayerLevel::removeEntity(int id) // 4J Added to remove the entities from the forced list // This gets called when a chunk is unloaded, but we only do half an unload to remove entities slightly differently -void MultiPlayerLevel::removeEntities(vector > *list) +void MultiPlayerLevel::removeEntities(vector > *list) { for(AUTO_VAR(it, list->begin()); it < list->end(); ++it) { - std::shared_ptr e = *it; + shared_ptr e = *it; AUTO_VAR(reIt, reEntries.find(e)); if (reIt!=reEntries.end()) @@ -582,7 +582,7 @@ bool MultiPlayerLevel::doSetTileAndData(int x, int y, int z, int tile, int data) // and so the thing being notified of any update through tileUpdated is the renderer int prevTile = getTile(x, y, z); bool visuallyImportant = (!( ( ( prevTile == Tile::water_Id ) && ( tile == Tile::calmWater_Id ) ) || - ( ( prevTile == Tile::calmWater_Id ) && ( tile == Tile::water_Id ) ) || + ( ( prevTile == Tile::calmWater_Id ) && ( tile == Tile::water_Id ) ) || ( ( prevTile == Tile::lava_Id ) && ( tile == Tile::calmLava_Id ) ) || ( ( prevTile == Tile::calmLava_Id ) && ( tile == Tile::calmLava_Id ) ) || ( ( prevTile == Tile::calmLava_Id ) && ( tile == Tile::lava_Id ) ) ) ); @@ -609,7 +609,7 @@ void MultiPlayerLevel::disconnect(bool sendDisconnect /*= true*/) { for(AUTO_VAR(it, connections.begin()); it < connections.end(); ++it ) { - (*it)->sendAndDisconnect( std::shared_ptr( new DisconnectPacket(DisconnectPacket::eDisconnect_Quitting) ) ); + (*it)->sendAndDisconnect( shared_ptr( new DisconnectPacket(DisconnectPacket::eDisconnect_Quitting) ) ); } } else @@ -687,7 +687,7 @@ void MultiPlayerLevel::animateTick(int xt, int yt, int zt) void MultiPlayerLevel::animateTickDoWork() { const int ticksPerChunk = 16; // This ought to give us roughly the same 1000/32768 chance of a tile being animated as the original - + // Horrible hack to communicate with the level renderer, which is just attached as a listener to this level. This let's the particle // rendering know to use this level (rather than try to work it out from the current player), and to not bother distance clipping particles // which would again be based on the current player. @@ -730,7 +730,7 @@ void MultiPlayerLevel::animateTickDoWork() } -void MultiPlayerLevel::playSound(std::shared_ptr entity, int iSound, float volume, float pitch) +void MultiPlayerLevel::playSound(shared_ptr entity, int iSound, float volume, float pitch) { playLocalSound(entity->x, entity->y - entity->heightOffset, entity->z, iSound, volume, pitch); } @@ -790,7 +790,7 @@ void MultiPlayerLevel::removeAllPendingEntityRemovals() AUTO_VAR(endIt, entitiesToRemove.end()); for (AUTO_VAR(it, entitiesToRemove.begin()); it != endIt; it++) { - std::shared_ptr e = *it; + shared_ptr e = *it; int xc = e->xChunk; int zc = e->zChunk; if (e->inChunk && hasChunk(xc, zc)) @@ -809,10 +809,10 @@ void MultiPlayerLevel::removeAllPendingEntityRemovals() //for (int i = 0; i < entities.size(); i++) EnterCriticalSection(&m_entitiesCS); - vector >::iterator it = entities.begin(); + vector >::iterator it = entities.begin(); while( it != entities.end() ) { - std::shared_ptr e = *it;//entities.at(i); + shared_ptr e = *it;//entities.at(i); if (e->riding != NULL) { @@ -821,7 +821,7 @@ void MultiPlayerLevel::removeAllPendingEntityRemovals() e->riding->rider = weak_ptr(); e->riding = nullptr; } - else + else { ++it; continue; @@ -853,7 +853,7 @@ void MultiPlayerLevel::removeClientConnection(ClientConnection *c, bool sendDisc { if( sendDisconnect ) { - c->sendAndDisconnect( std::shared_ptr( new DisconnectPacket(DisconnectPacket::eDisconnect_Quitting) ) ); + c->sendAndDisconnect( shared_ptr( new DisconnectPacket(DisconnectPacket::eDisconnect_Quitting) ) ); } AUTO_VAR(it, find( connections.begin(), connections.end(), c )); @@ -886,7 +886,7 @@ void MultiPlayerLevel::removeUnusedTileEntitiesInRegion(int x0, int y0, int z0, for (unsigned int i = 0; i < tileEntityList.size();) { bool removed = false; - std::shared_ptr te = tileEntityList[i]; + shared_ptr te = tileEntityList[i]; if (te->x >= x0 && te->y >= y0 && te->z >= z0 && te->x < x1 && te->y < y1 && te->z < z1) { LevelChunk *lc = getChunk(te->x >> 4, te->z >> 4); diff --git a/Minecraft.Client/MultiPlayerLevel.h b/Minecraft.Client/MultiPlayerLevel.h index e075cb8d..c07b5583 100644 --- a/Minecraft.Client/MultiPlayerLevel.h +++ b/Minecraft.Client/MultiPlayerLevel.h @@ -54,21 +54,21 @@ public: void setChunkVisible(int x, int z, bool visible); private: - unordered_map, IntKeyHash2, IntKeyEq> entitiesById; // 4J - was IntHashMap - unordered_set > forced; - unordered_set > reEntries; + unordered_map, IntKeyHash2, IntKeyEq> entitiesById; // 4J - was IntHashMap + unordered_set > forced; + unordered_set > reEntries; public: - virtual bool addEntity(std::shared_ptr e); - virtual void removeEntity(std::shared_ptr e); + virtual bool addEntity(shared_ptr e); + virtual void removeEntity(shared_ptr e); protected: - virtual void entityAdded(std::shared_ptr e); - virtual void entityRemoved(std::shared_ptr e); + virtual void entityAdded(shared_ptr e); + virtual void entityRemoved(shared_ptr e); public: - void putEntity(int id, std::shared_ptr e); - std::shared_ptr getEntity(int id); - std::shared_ptr removeEntity(int id); - virtual void removeEntities(vector > *list); // 4J Added override + void putEntity(int id, shared_ptr e); + shared_ptr getEntity(int id); + shared_ptr removeEntity(int id); + virtual void removeEntities(vector > *list); // 4J Added override virtual bool setDataNoUpdate(int x, int y, int z, int data); virtual bool setTileAndDataNoUpdate(int x, int y, int z, int tile, int data); virtual bool setTileNoUpdate(int x, int y, int z, int tile); @@ -77,7 +77,7 @@ public: void animateTick(int xt, int yt, int zt); protected: virtual void tickWeather(); - + static const int ANIMATE_TICK_MAX_PARTICLES = 500; public: @@ -87,7 +87,7 @@ public: public: void removeAllPendingEntityRemovals(); - virtual void playSound(std::shared_ptr entity, int iSound, float volume, float pitch); + virtual void playSound(shared_ptr entity, int iSound, float volume, float pitch); virtual void playLocalSound(double x, double y, double z, int iSound, float volume, float pitch, float fClipSoundDist=16.0f); diff --git a/Minecraft.Client/MultiPlayerLocalPlayer.cpp b/Minecraft.Client/MultiPlayerLocalPlayer.cpp index 29d1caa8..bb2630e5 100644 --- a/Minecraft.Client/MultiPlayerLocalPlayer.cpp +++ b/Minecraft.Client/MultiPlayerLocalPlayer.cpp @@ -49,18 +49,18 @@ void MultiplayerLocalPlayer::tick() /*if((app.GetGameSettings(m_iPad,eGameSetting_PlayerVisibleInMap)!=0) != m_bShownOnMaps) { m_bShownOnMaps = (app.GetGameSettings(m_iPad,eGameSetting_PlayerVisibleInMap)!=0); - if (m_bShownOnMaps) connection->send( std::shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::SHOW_ON_MAPS) ) ); - else connection->send( std::shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::HIDE_ON_MAPS) ) ); + if (m_bShownOnMaps) connection->send( shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::SHOW_ON_MAPS) ) ); + else connection->send( shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::HIDE_ON_MAPS) ) ); }*/ if (!level->hasChunkAt(Mth::floor(x), 0, Mth::floor(z))) return; double tempX = x, tempY = y, tempZ = z; LocalPlayer::tick(); - + //if( !minecraft->localgameModes[m_iPad]->isTutorial() || minecraft->localgameModes[m_iPad]->getTutorial()->canMoveToPosition(tempX, tempY, tempZ, x, y, z) ) if(minecraft->localgameModes[m_iPad]->getTutorial()->canMoveToPosition(tempX, tempY, tempZ, x, y, z)) - { + { sendPosition(); } else @@ -75,8 +75,8 @@ void MultiplayerLocalPlayer::sendPosition() bool sprinting = isSprinting(); if (sprinting != lastSprinting) { - if (sprinting) connection->send(std::shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::START_SPRINTING))); - else connection->send(std::shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_SPRINTING))); + if (sprinting) connection->send(shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::START_SPRINTING))); + else connection->send(shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_SPRINTING))); lastSprinting = sprinting; } @@ -84,8 +84,8 @@ void MultiplayerLocalPlayer::sendPosition() bool sneaking = isSneaking(); if (sneaking != lastSneaked) { - if (sneaking) connection->send( std::shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::START_SNEAKING) ) ); - else connection->send( std::shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_SNEAKING) ) ); + if (sneaking) connection->send( shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::START_SNEAKING) ) ); + else connection->send( shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_SNEAKING) ) ); lastSneaked = sneaking; } @@ -93,8 +93,8 @@ void MultiplayerLocalPlayer::sendPosition() bool idle = isIdle(); if (idle != lastIdle) { - if (idle) connection->send( std::shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::START_IDLEANIM) ) ); - else connection->send( std::shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_IDLEANIM) ) ); + if (idle) connection->send( shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::START_IDLEANIM) ) ); + else connection->send( shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_IDLEANIM) ) ); lastIdle = idle; } @@ -110,26 +110,26 @@ void MultiplayerLocalPlayer::sendPosition() bool rot = rydd != 0 || rxdd != 0; if (riding != NULL) { - connection->send( std::shared_ptr( new MovePlayerPacket::PosRot(xd, -999, -999, zd, yRot, xRot, onGround, abilities.flying) ) ); + connection->send( shared_ptr( new MovePlayerPacket::PosRot(xd, -999, -999, zd, yRot, xRot, onGround, abilities.flying) ) ); move = false; } else { if (move && rot) { - connection->send( std::shared_ptr( new MovePlayerPacket::PosRot(x, bb->y0, y, z, yRot, xRot, onGround, abilities.flying) ) ); + connection->send( shared_ptr( new MovePlayerPacket::PosRot(x, bb->y0, y, z, yRot, xRot, onGround, abilities.flying) ) ); } else if (move) { - connection->send( std::shared_ptr( new MovePlayerPacket::Pos(x, bb->y0, y, z, onGround, abilities.flying) ) ); + connection->send( shared_ptr( new MovePlayerPacket::Pos(x, bb->y0, y, z, onGround, abilities.flying) ) ); } else if (rot) { - connection->send( std::shared_ptr( new MovePlayerPacket::Rot(yRot, xRot, onGround, abilities.flying) ) ); + connection->send( shared_ptr( new MovePlayerPacket::Rot(yRot, xRot, onGround, abilities.flying) ) ); } else { - connection->send( std::shared_ptr( new MovePlayerPacket(onGround, abilities.flying) ) ); + connection->send( shared_ptr( new MovePlayerPacket(onGround, abilities.flying) ) ); } } @@ -152,31 +152,31 @@ void MultiplayerLocalPlayer::sendPosition() } -std::shared_ptr MultiplayerLocalPlayer::drop() +shared_ptr MultiplayerLocalPlayer::drop() { - connection->send( std::shared_ptr( new PlayerActionPacket(PlayerActionPacket::DROP_ITEM, 0, 0, 0, 0) ) ); + connection->send( shared_ptr( new PlayerActionPacket(PlayerActionPacket::DROP_ITEM, 0, 0, 0, 0) ) ); return nullptr; } -void MultiplayerLocalPlayer::reallyDrop(std::shared_ptr itemEntity) +void MultiplayerLocalPlayer::reallyDrop(shared_ptr itemEntity) { } void MultiplayerLocalPlayer::chat(const wstring& message) { - connection->send( std::shared_ptr( new ChatPacket(message) ) ); + connection->send( shared_ptr( new ChatPacket(message) ) ); } void MultiplayerLocalPlayer::swing() { LocalPlayer::swing(); - connection->send( std::shared_ptr( new AnimatePacket(shared_from_this(), AnimatePacket::SWING) ) ); + connection->send( shared_ptr( new AnimatePacket(shared_from_this(), AnimatePacket::SWING) ) ); } void MultiplayerLocalPlayer::respawn() { - connection->send( std::shared_ptr( new ClientCommandPacket(ClientCommandPacket::PERFORM_RESPAWN))); + connection->send( shared_ptr( new ClientCommandPacket(ClientCommandPacket::PERFORM_RESPAWN))); } @@ -238,7 +238,7 @@ void MultiplayerLocalPlayer::onEffectRemoved(MobEffectInstance *effect) void MultiplayerLocalPlayer::closeContainer() { - connection->send( std::shared_ptr( new ContainerClosePacket(containerMenu->containerId) ) ); + connection->send( shared_ptr( new ContainerClosePacket(containerMenu->containerId) ) ); inventory->setCarried(nullptr); LocalPlayer::closeContainer(); } @@ -286,7 +286,7 @@ void MultiplayerLocalPlayer::awardStatFromServer(Stat *stat, byteArray param) void MultiplayerLocalPlayer::onUpdateAbilities() { - connection->send(std::shared_ptr(new PlayerAbilitiesPacket(&abilities))); + connection->send(shared_ptr(new PlayerAbilitiesPacket(&abilities))); } bool MultiplayerLocalPlayer::isLocalPlayer() @@ -294,7 +294,7 @@ bool MultiplayerLocalPlayer::isLocalPlayer() return true; } -void MultiplayerLocalPlayer::ride(std::shared_ptr e) +void MultiplayerLocalPlayer::ride(shared_ptr e) { bool wasRiding = riding != NULL; LocalPlayer::ride(e); @@ -324,7 +324,7 @@ void MultiplayerLocalPlayer::ride(std::shared_ptr e) updateRichPresence(); Minecraft *pMinecraft = Minecraft::GetInstance(); - + if( pMinecraft->localgameModes[m_iPad] != NULL ) { TutorialMode *gameMode = (TutorialMode *)pMinecraft->localgameModes[m_iPad]; @@ -344,7 +344,7 @@ void MultiplayerLocalPlayer::ride(std::shared_ptr e) void MultiplayerLocalPlayer::StopSleeping() { - connection->send( std::shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_SLEEPING) ) ); + connection->send( shared_ptr( new PlayerCommandPacket(shared_from_this(), PlayerCommandPacket::STOP_SLEEPING) ) ); } // 4J Added @@ -355,7 +355,7 @@ void MultiplayerLocalPlayer::setAndBroadcastCustomSkin(DWORD skinId) #ifndef _CONTENT_PACKAGE wprintf(L"Skin for local player %ls has changed to %ls (%d)\n", name.c_str(), customTextureUrl.c_str(), getPlayerDefaultSkin() ); #endif - if(getCustomSkin() != oldSkinIndex) connection->send( std::shared_ptr( new TextureAndGeometryChangePacket( shared_from_this(), app.GetPlayerSkinName(GetXboxPad()) ) ) ); + if(getCustomSkin() != oldSkinIndex) connection->send( shared_ptr( new TextureAndGeometryChangePacket( shared_from_this(), app.GetPlayerSkinName(GetXboxPad()) ) ) ); } void MultiplayerLocalPlayer::setAndBroadcastCustomCape(DWORD capeId) @@ -365,5 +365,5 @@ void MultiplayerLocalPlayer::setAndBroadcastCustomCape(DWORD capeId) #ifndef _CONTENT_PACKAGE wprintf(L"Cape for local player %ls has changed to %ls\n", name.c_str(), customTextureUrl2.c_str()); #endif - if(getCustomCape() != oldCapeIndex) connection->send( std::shared_ptr( new TextureChangePacket( shared_from_this(), TextureChangePacket::e_TextureChange_Cape, app.GetPlayerCapeName(GetXboxPad()) ) ) ); + if(getCustomCape() != oldCapeIndex) connection->send( shared_ptr( new TextureChangePacket( shared_from_this(), TextureChangePacket::e_TextureChange_Cape, app.GetPlayerCapeName(GetXboxPad()) ) ) ); } diff --git a/Minecraft.Client/MultiPlayerLocalPlayer.h b/Minecraft.Client/MultiPlayerLocalPlayer.h index 24244564..8687b36a 100644 --- a/Minecraft.Client/MultiPlayerLocalPlayer.h +++ b/Minecraft.Client/MultiPlayerLocalPlayer.h @@ -33,9 +33,9 @@ public: void sendPosition(); using Player::drop; - virtual std::shared_ptr drop(); + virtual shared_ptr drop(); protected: - virtual void reallyDrop(std::shared_ptr itemEntity); + virtual void reallyDrop(shared_ptr itemEntity); public: virtual void chat(const wstring& message); virtual void swing(); @@ -62,7 +62,7 @@ public: //void CustomSkin(PBYTE pbData, DWORD dwBytes); // 4J Overriding this so we can flag an event for the tutorial - virtual void ride(std::shared_ptr e); + virtual void ride(shared_ptr e); // 4J - added for the Stop Sleeping virtual void StopSleeping(); diff --git a/Minecraft.Client/MushroomCowRenderer.cpp b/Minecraft.Client/MushroomCowRenderer.cpp index b34ffaf1..688fab5c 100644 --- a/Minecraft.Client/MushroomCowRenderer.cpp +++ b/Minecraft.Client/MushroomCowRenderer.cpp @@ -9,21 +9,21 @@ MushroomCowRenderer::MushroomCowRenderer(Model *model, float shadow) : MobRender { } -void MushroomCowRenderer::render(std::shared_ptr _mob, double x, double y, double z, float rot, float a) +void MushroomCowRenderer::render(shared_ptr _mob, double x, double y, double z, float rot, float a) { - // 4J - original version used generics and thus had an input parameter of type MushroomCow rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type MushroomCow rather than shared_ptr we have here - // do some casting around instead - //std::shared_ptr mob = dynamic_pointer_cast(_mob); + //shared_ptr mob = dynamic_pointer_cast(_mob); // 4J Stu - No need to do the cast, just pass through as-is MobRenderer::render(_mob, x, y, z, rot, a); } -void MushroomCowRenderer::additionalRendering(std::shared_ptr _mob, float a) +void MushroomCowRenderer::additionalRendering(shared_ptr _mob, float a) { - // 4J - original version used generics and thus had an input parameter of type MushroomCow rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type MushroomCow rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); MobRenderer::additionalRendering(mob, a); if (mob->isBaby()) return; bindTexture(TN_TERRAIN); // 4J was "/terrain.png" diff --git a/Minecraft.Client/MushroomCowRenderer.h b/Minecraft.Client/MushroomCowRenderer.h index 8d01ea81..c5f6f3c4 100644 --- a/Minecraft.Client/MushroomCowRenderer.h +++ b/Minecraft.Client/MushroomCowRenderer.h @@ -7,8 +7,8 @@ class MushroomCowRenderer : public MobRenderer public: MushroomCowRenderer(Model *model, float shadow); - virtual void render(std::shared_ptr _mob, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr _mob, double x, double y, double z, float rot, float a); protected: - virtual void additionalRendering(std::shared_ptr _mob, float a); + virtual void additionalRendering(shared_ptr _mob, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/OzelotModel.cpp b/Minecraft.Client/OzelotModel.cpp index b0557012..9c22cc4b 100644 --- a/Minecraft.Client/OzelotModel.cpp +++ b/Minecraft.Client/OzelotModel.cpp @@ -78,7 +78,7 @@ OzelotModel::OzelotModel() backLegR->compile(1.0f/16.0f); } -void OzelotModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void OzelotModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); if (young) @@ -180,9 +180,9 @@ void OzelotModel::setupAnim(float time, float r, float bob, float yRot, float xR } } -void OzelotModel::prepareMobModel(std::shared_ptr mob, float time, float r, float a) +void OzelotModel::prepareMobModel(shared_ptr mob, float time, float r, float a) { - std::shared_ptr ozelot = dynamic_pointer_cast(mob); + shared_ptr ozelot = dynamic_pointer_cast(mob); body->y = bodyWalkY; body->z = bodyWalkZ; diff --git a/Minecraft.Client/OzelotModel.h b/Minecraft.Client/OzelotModel.h index cdccc8fe..2c08f3df 100644 --- a/Minecraft.Client/OzelotModel.h +++ b/Minecraft.Client/OzelotModel.h @@ -36,8 +36,8 @@ private: public: OzelotModel(); - void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); void render(OzelotModel *model, float scale, bool usecompiled); void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); - void prepareMobModel(std::shared_ptr mob, float time, float r, float a); + void prepareMobModel(shared_ptr mob, float time, float r, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/OzelotRenderer.cpp b/Minecraft.Client/OzelotRenderer.cpp index 54c50d69..d56b35f9 100644 --- a/Minecraft.Client/OzelotRenderer.cpp +++ b/Minecraft.Client/OzelotRenderer.cpp @@ -6,16 +6,16 @@ OzelotRenderer::OzelotRenderer(Model *model, float shadow) : MobRenderer(model, { } -void OzelotRenderer::render(std::shared_ptr _mob, double x, double y, double z, float rot, float a) +void OzelotRenderer::render(shared_ptr _mob, double x, double y, double z, float rot, float a) { MobRenderer::render(_mob, x, y, z, rot, a); } -void OzelotRenderer::scale(std::shared_ptr _mob, float a) +void OzelotRenderer::scale(shared_ptr _mob, float a) { - // 4J - original version used generics and thus had an input parameter of type Blaze rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type Blaze rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); MobRenderer::scale(mob, a); if (mob->isTame()) { diff --git a/Minecraft.Client/OzelotRenderer.h b/Minecraft.Client/OzelotRenderer.h index a9fc1223..9627b4f1 100644 --- a/Minecraft.Client/OzelotRenderer.h +++ b/Minecraft.Client/OzelotRenderer.h @@ -7,8 +7,8 @@ class OzelotRenderer : public MobRenderer public: OzelotRenderer(Model *model, float shadow); - void render(std::shared_ptr _mob, double x, double y, double z, float rot, float a); + void render(shared_ptr _mob, double x, double y, double z, float rot, float a); protected: - void scale(std::shared_ptr _mob, float a); + void scale(shared_ptr _mob, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/PS3/PS3Extras/Ps3Types.h b/Minecraft.Client/PS3/PS3Extras/Ps3Types.h index 6cacd7a0..ade37607 100644 --- a/Minecraft.Client/PS3/PS3Extras/Ps3Types.h +++ b/Minecraft.Client/PS3/PS3Extras/Ps3Types.h @@ -25,7 +25,7 @@ using std::tr1::const_pointer_cast; using std::tr1::dynamic_pointer_cast; using std::tr1::enable_shared_from_this; using std::tr1::get_deleter; -using std::tr1::std::shared_ptr; +using std::tr1::shared_ptr; using std::tr1::static_pointer_cast; using std::tr1::swap; using std::tr1::weak_ptr; @@ -62,7 +62,7 @@ using boost::hash; class Cnullptr{ public: template - operator std::shared_ptr() { return std::shared_ptr(); } + operator shared_ptr() { return shared_ptr(); } }; extern Cnullptr nullptr; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_iarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_iarchive.hpp index 9d786645..638d9967 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_iarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -25,7 +25,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { // do not derive from the classes below. If you want to extend this functionality @@ -33,10 +33,10 @@ namespace archive { // preserve correct static polymorphism. // same as binary_iarchive below - without the shared_ptr_helper -class naked_binary_iarchive : +class naked_binary_iarchive : public binary_iarchive_impl< - boost::archive::naked_binary_iarchive, - std::istream::char_type, + boost::archive::naked_binary_iarchive, + std::istream::char_type, std::istream::traits_type > { @@ -56,22 +56,22 @@ public: } // namespace archive } // namespace boost -// note special treatment of std::shared_ptr. This type needs a special +// note special treatment of shared_ptr. This type needs a special // structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since std::shared_ptr holds a +// class to provide this functionality. Since shared_ptr holds a // special esteem in the boost library - we included it here by default. #include -namespace boost { +namespace boost { namespace archive { // do not derive from this class. If you want to extend this functionality // via inhertance, derived from binary_iarchive_impl instead. This will // preserve correct static polymorphism. -class binary_iarchive : +class binary_iarchive : public binary_iarchive_impl< - boost::archive::binary_iarchive, - std::istream::char_type, + boost::archive::binary_iarchive, + std::istream::char_type, std::istream::traits_type >, public detail::shared_ptr_helper diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_wiarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_wiarchive.hpp index 81f67c04..b5f6a710 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_wiarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/binary_wiarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_wiarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -25,29 +25,29 @@ #include #include -namespace boost { +namespace boost { namespace archive { // same as binary_wiarchive below - without the shared_ptr_helper -class naked_binary_wiarchive : +class naked_binary_wiarchive : public binary_iarchive_impl< - boost::archive::naked_binary_wiarchive, - std::wistream::char_type, + boost::archive::naked_binary_wiarchive, + std::wistream::char_type, std::wistream::traits_type > { public: naked_binary_wiarchive(std::wistream & is, unsigned int flags = 0) : binary_iarchive_impl< - naked_binary_wiarchive, - std::wistream::char_type, + naked_binary_wiarchive, + std::wistream::char_type, std::wistream::traits_type >(is, flags) {} naked_binary_wiarchive(std::wstreambuf & bsb, unsigned int flags = 0) : binary_iarchive_impl< - naked_binary_wiarchive, - std::wistream::char_type, + naked_binary_wiarchive, + std::wistream::char_type, std::wistream::traits_type >(bsb, flags) {} @@ -56,16 +56,16 @@ public: } // namespace archive } // namespace boost -// note special treatment of std::shared_ptr. This type needs a special +// note special treatment of shared_ptr. This type needs a special // structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since std::shared_ptr holds a +// class to provide this functionality. Since shared_ptr holds a // special esteem in the boost library - we included it here by default. #include -namespace boost { +namespace boost { namespace archive { -class binary_wiarchive : +class binary_wiarchive : public binary_iarchive_impl< binary_wiarchive, std::wistream::char_type, std::wistream::traits_type > diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_iarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_iarchive.hpp index 828f03f6..ce780c84 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_iarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_iarchive.hpp @@ -40,7 +40,7 @@ namespace std{ namespace boost { template -class std::shared_ptr; +class shared_ptr; namespace serialization { class extended_type_info; } // namespace serialization @@ -155,9 +155,9 @@ public: #include // pops abi_suffix.hpp pragmas -// note special treatment of std::shared_ptr. This type needs a special +// note special treatment of shared_ptr. This type needs a special // structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since std::shared_ptr holds a +// class to provide this functionality. Since shared_ptr holds a // special esteem in the boost library - we included it here by default. #include diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_oarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_oarchive.hpp index 458df7eb..183140ee 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_oarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/polymorphic_oarchive.hpp @@ -39,7 +39,7 @@ namespace std{ namespace boost { template -class std::shared_ptr; +class shared_ptr; namespace serialization { class extended_type_info; } // namespace serialization diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/shared_ptr_helper.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/shared_ptr_helper.hpp index f49f768c..39e6eb82 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/shared_ptr_helper.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/shared_ptr_helper.hpp @@ -22,7 +22,7 @@ #include // NULL #include -#include +#include #include #include @@ -35,16 +35,16 @@ #include // must be the last headern namespace boost_132 { - template class std::shared_ptr; + template class shared_ptr; } namespace boost { - template class std::shared_ptr; + template class shared_ptr; namespace serialization { class extended_type_info; template inline void load( Archive & ar, - boost::std::shared_ptr< T > &t, + boost::shared_ptr< T > &t, const unsigned int file_version ); } @@ -57,14 +57,14 @@ namespace detail { class shared_ptr_helper { struct collection_type_compare { bool operator()( - const std::shared_ptr &lhs, - const std::shared_ptr &rhs + const shared_ptr &lhs, + const shared_ptr &rhs )const{ return lhs.get() < rhs.get(); } }; typedef std::set< - boost::std::shared_ptr, + boost::shared_ptr, collection_type_compare > collection_type; typedef collection_type::const_iterator iterator_type; @@ -72,7 +72,7 @@ class shared_ptr_helper { // is used to "match up" shared pointers loaded at different // points in the archive. Note, we delay construction until // it is actually used since this is by default included as - // a "mix-in" even if std::shared_ptr isn't used. + // a "mix-in" even if shared_ptr isn't used. collection_type * m_pointers; struct null_deleter { @@ -95,7 +95,7 @@ public: template friend inline void boost::serialization::load( Archive & ar, - boost::std::shared_ptr< T > &t, + boost::shared_ptr< T > &t, const unsigned int file_version ); #endif @@ -109,44 +109,44 @@ public: // new system which is disjoint from this set. This is implemented // by a change in load_construct_data below. It makes this file suitable // only for loading pointers into a 1.33 or later boost system. - std::list > * m_pointers_132; + std::list > * m_pointers_132; // #endif // returns pointer to object and an indicator whether this is a // new entry (true) or a previous one (false) - BOOST_ARCHIVE_DECL(std::shared_ptr) + BOOST_ARCHIVE_DECL(shared_ptr) get_od( const void * od, - const boost::serialization::extended_type_info * true_type, + const boost::serialization::extended_type_info * true_type, const boost::serialization::extended_type_info * this_type ); BOOST_ARCHIVE_DECL(void) - append(const boost::std::shared_ptr &); + append(const boost::shared_ptr &); template struct non_polymorphic { - static const boost::serialization::extended_type_info * + static const boost::serialization::extended_type_info * get_object_identifier(T &){ return & boost::serialization::singleton< - BOOST_DEDUCED_TYPENAME + BOOST_DEDUCED_TYPENAME boost::serialization::type_info_implementation< T >::type >::get_const_instance(); } }; template struct polymorphic { - static const boost::serialization::extended_type_info * + static const boost::serialization::extended_type_info * get_object_identifier(T & t){ return boost::serialization::singleton< - BOOST_DEDUCED_TYPENAME + BOOST_DEDUCED_TYPENAME boost::serialization::type_info_implementation< T >::type >::get_const_instance().get_derived_extended_type_info(t); } }; public: template - void reset(std::shared_ptr< T > & s, T * t){ + void reset(shared_ptr< T > & s, T * t){ if(NULL == t){ s.reset(); return; @@ -175,9 +175,9 @@ public: this_type->get_debug_info() ) ); - std::shared_ptr r = + shared_ptr r = get_od( - static_cast(t), + static_cast(t), true_type, this_type ); @@ -188,11 +188,11 @@ public: *this_type, static_cast(t) ); - std::shared_ptr sp(s, od); + shared_ptr sp(s, od); append(sp); } else{ - s = std::shared_ptr< T >( + s = shared_ptr< T >( r, static_cast(r.get()) ); @@ -201,7 +201,7 @@ public: // #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP BOOST_ARCHIVE_DECL(void) - append(const boost_132::std::shared_ptr & t); + append(const boost_132::shared_ptr & t); // #endif public: BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_iarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_iarchive.hpp index 00be983e..298928b3 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_iarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // text_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -32,11 +32,11 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { template -class text_iarchive_impl : +class text_iarchive_impl : public basic_text_iprimitive, public basic_text_iarchive { @@ -62,16 +62,16 @@ protected: load(v); t = boost::serialization::item_version_type(v); } - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL(void) load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL(void) load(wchar_t * t); #endif - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL(void) load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_DECL(void) + BOOST_ARCHIVE_DECL(void) load(std::wstring &ws); #endif // note: the following should not needed - but one compiler (vc 7.1) @@ -85,10 +85,10 @@ protected: load_override(class_name_type & t, int); BOOST_ARCHIVE_DECL(void) init(); - BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) text_iarchive_impl(std::istream & is, unsigned int flags); // don't import inline definitions! leave this as a reminder. - //BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + //BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) ~text_iarchive_impl(){}; }; @@ -97,7 +97,7 @@ protected: // preserve correct static polymorphism. // same as text_iarchive below - without the shared_ptr_helper -class naked_text_iarchive : +class naked_text_iarchive : public text_iarchive_impl { public: @@ -117,9 +117,9 @@ public: #include // pops abi_suffix.hpp pragmas -// note special treatment of std::shared_ptr. This type needs a special +// note special treatment of shared_ptr. This type needs a special // structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since std::shared_ptr holds a +// class to provide this functionality. Since shared_ptr holds a // special esteem in the boost library - we included it here by default. #include @@ -128,10 +128,10 @@ public: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class text_iarchive : +class text_iarchive : public text_iarchive_impl, public detail::shared_ptr_helper { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_wiarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_wiarchive.hpp index d96b816b..7451f3a6 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_wiarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/text_wiarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // text_wiarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -36,11 +36,11 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { template -class text_wiarchive_impl : +class text_wiarchive_impl : public basic_text_iprimitive, public basic_text_iarchive { @@ -84,7 +84,7 @@ protected: void load_override(T & t, BOOST_PFTO int){ basic_text_iarchive::load_override(t, 0); } - BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) text_wiarchive_impl(std::wistream & is, unsigned int flags); ~text_wiarchive_impl(){}; }; @@ -94,7 +94,7 @@ protected: // preserve correct static polymorphism. // same as text_wiarchive below - without the shared_ptr_helper -class naked_text_wiarchive : +class naked_text_wiarchive : public text_wiarchive_impl { public: @@ -113,9 +113,9 @@ public: #include // pops abi_suffix.hpp pragmas -// note special treatment of std::shared_ptr. This type needs a special +// note special treatment of shared_ptr. This type needs a special // structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since std::shared_ptr holds a +// class to provide this functionality. Since shared_ptr holds a // special esteem in the boost library - we included it here by default. #include @@ -124,10 +124,10 @@ public: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class text_wiarchive : +class text_wiarchive : public text_wiarchive_impl, public detail::shared_ptr_helper { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_iarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_iarchive.hpp index cdf51642..be6cfe49 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_iarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -32,7 +32,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { template @@ -40,7 +40,7 @@ class basic_xml_grammar; typedef basic_xml_grammar xml_grammar; template -class xml_iarchive_impl : +class xml_iarchive_impl : public basic_text_iprimitive, public basic_xml_iarchive { @@ -64,13 +64,13 @@ protected: void load(T & t){ basic_text_iprimitive::load(t); } - void + void load(version_type & t){ unsigned int v; load(v); t = version_type(v); } - void + void load(boost::serialization::item_version_type & t){ unsigned int v; load(v); @@ -96,7 +96,7 @@ protected: load_override(class_name_type & t, int); BOOST_ARCHIVE_DECL(void) init(); - BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) xml_iarchive_impl(std::istream & is, unsigned int flags); BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) ~xml_iarchive_impl(); @@ -107,7 +107,7 @@ protected: // preserve correct static polymorphism. // same as xml_iarchive below - without the shared_ptr_helper -class naked_xml_iarchive : +class naked_xml_iarchive : public xml_iarchive_impl { public: @@ -126,9 +126,9 @@ public: #include // pops abi_suffix.hpp pragmas -// note special treatment of std::shared_ptr. This type needs a special +// note special treatment of shared_ptr. This type needs a special // structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since std::shared_ptr holds a +// class to provide this functionality. Since shared_ptr holds a // special esteem in the boost library - we included it here by default. #include @@ -137,10 +137,10 @@ public: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class xml_iarchive : +class xml_iarchive : public xml_iarchive_impl, public detail::shared_ptr_helper { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_wiarchive.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_wiarchive.hpp index 2fb0a538..59ebbb5e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_wiarchive.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/archive/xml_wiarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_wiarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -37,7 +37,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { template @@ -45,7 +45,7 @@ class basic_xml_grammar; typedef basic_xml_grammar xml_wgrammar; template -class xml_wiarchive_impl : +class xml_wiarchive_impl : public basic_text_iprimitive, public basic_xml_iarchive { @@ -65,17 +65,17 @@ protected: return is; } template - void + void load(T & t){ basic_text_iprimitive::load(t); } - void + void load(version_type & t){ unsigned int v; load(v); t = version_type(v); } - void + void load(boost::serialization::item_version_type & t){ unsigned int v; load(v); @@ -99,11 +99,11 @@ protected: } BOOST_WARCHIVE_DECL(void) load_override(class_name_type & t, int); - BOOST_WARCHIVE_DECL(void) + BOOST_WARCHIVE_DECL(void) init(); - BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) xml_wiarchive_impl(std::wistream & is, unsigned int flags) ; - BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) + BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY()) ~xml_wiarchive_impl(); }; @@ -112,7 +112,7 @@ protected: // preserve correct static polymorphism. // same as xml_wiarchive below - without the shared_ptr_helper -class naked_xml_wiarchive : +class naked_xml_wiarchive : public xml_wiarchive_impl { public: @@ -126,14 +126,14 @@ public: } // namespace boost #ifdef BOOST_MSVC -# pragma warning(pop) +# pragma warning(pop) #endif #include // pops abi_suffix.hpp pragmas -// note special treatment of std::shared_ptr. This type needs a special +// note special treatment of shared_ptr. This type needs a special // structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since std::shared_ptr holds a +// class to provide this functionality. Since shared_ptr holds a // special esteem in the boost library - we included it here by default. #include @@ -142,10 +142,10 @@ public: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class xml_wiarchive : +class xml_wiarchive : public xml_wiarchive_impl, public detail::shared_ptr_helper { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/config.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/config.hpp index 9c93a2c7..40f770ca 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/config.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/config.hpp @@ -144,7 +144,7 @@ # endif // defined(BOOST_MSVC) #endif // !defined(BOOST_ASIO_DISABLE_STD_ARRAY) -// Standard library support for std::shared_ptr and weak_ptr. +// Standard library support for shared_ptr and weak_ptr. #if !defined(BOOST_ASIO_DISABLE_STD_SHARED_PTR) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/shared_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/shared_ptr.hpp index 30ce3ffd..5f0da22e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/shared_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/shared_ptr.hpp @@ -1,5 +1,5 @@ // -// detail/std::shared_ptr.hpp +// detail/shared_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com) @@ -20,7 +20,7 @@ #if defined(BOOST_ASIO_HAS_STD_SHARED_PTR) # include #else // defined(BOOST_ASIO_HAS_STD_SHARED_PTR) -# include +# include #endif // defined(BOOST_ASIO_HAS_STD_SHARED_PTR) namespace boost { @@ -30,7 +30,7 @@ namespace detail { #if defined(BOOST_ASIO_HAS_STD_SHARED_PTR) using std::shared_ptr; #else // defined(BOOST_ASIO_HAS_STD_SHARED_PTR) -using boost::std::shared_ptr; +using boost::shared_ptr; #endif // defined(BOOST_ASIO_HAS_STD_SHARED_PTR) } // namespace detail diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/socket_ops.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/socket_ops.hpp index 78b9da3f..92af9fbe 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/socket_ops.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/detail/socket_ops.hpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include @@ -60,7 +60,7 @@ enum typedef unsigned char state_type; struct noop_deleter { void operator()(void*) {} }; -typedef std::shared_ptr shared_cancel_token_type; +typedef shared_ptr shared_cancel_token_type; typedef weak_ptr weak_cancel_token_type; BOOST_ASIO_DECL socket_type accept(socket_type s, socket_addr_type* addr, diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/io_service.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/io_service.hpp index e56aea45..43b94e46 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/io_service.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/io_service.hpp @@ -232,19 +232,19 @@ public: * delete static_cast(svc). * * @note The destruction sequence described above permits programs to - * simplify their resource management by using @c std::shared_ptr<>. Where an + * simplify their resource management by using @c shared_ptr<>. Where an * object's lifetime is tied to the lifetime of a connection (or some other - * sequence of asynchronous operations), a @c std::shared_ptr to the object would + * sequence of asynchronous operations), a @c shared_ptr to the object would * be bound into the handlers for all asynchronous operations associated with * it. This works as follows: * * @li When a single connection ends, all associated asynchronous operations * complete. The corresponding handler objects are destroyed, and all - * @c std::shared_ptr references to the objects are destroyed. + * @c shared_ptr references to the objects are destroyed. * * @li To shut down the whole program, the io_service function stop() is * called to terminate any run() calls as soon as possible. The io_service - * destructor defined above destroys all handlers, causing all @c std::shared_ptr + * destructor defined above destroys all handlers, causing all @c shared_ptr * references to all connection objects to be destroyed. */ BOOST_ASIO_DECL ~io_service(); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ip/basic_resolver_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ip/basic_resolver_iterator.hpp index fda14dcd..6e52a852 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ip/basic_resolver_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ip/basic_resolver_iterator.hpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -184,7 +184,7 @@ private: } typedef std::vector > values_type; - boost::asio::detail::std::shared_ptr values_; + boost::asio::detail::shared_ptr values_; std::size_t index_; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/impl/openssl_init.ipp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/impl/openssl_init.ipp index ec1b26d5..fe62e6ea 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/impl/openssl_init.ipp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/impl/openssl_init.ipp @@ -37,7 +37,7 @@ public: do_init() { ::SSL_library_init(); - ::SSL_load_error_strings(); + ::SSL_load_error_strings(); ::OpenSSL_add_all_algorithms(); mutexes_.resize(::CRYPTO_num_locks()); @@ -75,7 +75,7 @@ private: #endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__) } - static void openssl_locking_func(int mode, int n, + static void openssl_locking_func(int mode, int n, const char* /*file*/, int /*line*/) { if (mode & CRYPTO_LOCK) @@ -85,7 +85,7 @@ private: } // Mutexes to be used in locking callbacks. - std::vector > mutexes_; #if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) @@ -94,10 +94,10 @@ private: #endif // !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) }; -boost::asio::detail::std::shared_ptr +boost::asio::detail::shared_ptr openssl_init_base::instance() { - static boost::asio::detail::std::shared_ptr init(new do_init); + static boost::asio::detail::shared_ptr init(new do_init); return init; } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/openssl_init.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/openssl_init.hpp index 24d033fe..c68909d1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/openssl_init.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/asio/ssl/detail/openssl_init.hpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include @@ -39,7 +39,7 @@ protected: // main, and therefore before any other threads can get started. The do_init // instance must be static in this function to ensure that it gets // initialised before any other global objects try to use it. - BOOST_ASIO_DECL static boost::asio::detail::std::shared_ptr instance(); + BOOST_ASIO_DECL static boost::asio::detail::shared_ptr instance(); }; template @@ -68,7 +68,7 @@ private: // Reference to singleton do_init object to ensure that openssl does not get // cleaned up until the last user has finished with it. - boost::asio::detail::std::shared_ptr ref_; + boost::asio::detail::shared_ptr ref_; }; template diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/gcc.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/gcc.hpp index a3469766..c0ac30af 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/gcc.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/gcc.hpp @@ -1,12 +1,12 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Darin Adler 2001 - 2002. -// (C) Copyright Jens Maurer 2001 - 2002. -// (C) Copyright Beman Dawes 2001 - 2003. -// (C) Copyright Douglas Gregor 2002. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Synge Todo 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Jens Maurer 2001 - 2002. +// (C) Copyright Beman Dawes 2001 - 2003. +// (C) Copyright Douglas Gregor 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Synge Todo 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. @@ -15,7 +15,7 @@ #if __GNUC__ < 3 # if __GNUC_MINOR__ == 91 - // egcs 1.1 won't parse std::shared_ptr.hpp without this: + // egcs 1.1 won't parse shared_ptr.hpp without this: # define BOOST_NO_AUTO_PTR # endif # if __GNUC_MINOR__ < 95 @@ -97,7 +97,7 @@ // #if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__) # define BOOST_HAS_THREADS -#endif +#endif // // gcc has "long long" @@ -116,7 +116,7 @@ // #if __GNUC__ >= 4 # if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__) - // All Win32 development environments, including 64-bit Windows and MinGW, define + // All Win32 development environments, including 64-bit Windows and MinGW, define // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, // so does not define _WIN32 or its variants. # define BOOST_HAS_DECLSPEC @@ -128,7 +128,7 @@ # endif # define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) #else -// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined +// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined # define BOOST_SYMBOL_EXPORT #endif @@ -169,7 +169,7 @@ # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_STATIC_ASSERT -// Variadic templates compiler: +// Variadic templates compiler: // http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html # if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__)) # define BOOST_HAS_VARIADIC_TMPL diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/sunpro_cc.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/sunpro_cc.hpp index e796a16d..65beb501 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/sunpro_cc.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/compiler/sunpro_cc.hpp @@ -1,10 +1,10 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright Jens Maurer 2001 - 2003. -// (C) Copyright Peter Dimov 2002. -// (C) Copyright Aleksey Gurtovoy 2002 - 2003. -// (C) Copyright David Abrahams 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright Peter Dimov 2002. +// (C) Copyright Aleksey Gurtovoy 2002 - 2003. +// (C) Copyright David Abrahams 2002. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. @@ -34,7 +34,7 @@ # define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # endif -# if (__SUNPRO_CC <= 0x530) +# if (__SUNPRO_CC <= 0x530) // Requesting debug info (-g) with Boost.Python results // in an internal compiler error for "static const" // initialized in-class. @@ -44,7 +44,7 @@ # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION // SunPro 5.3 has better support for partial specialization, - // but breaks when compiling std::less > + // but breaks when compiling std::less > // (Jens Maurer 4 Nov 2001). // std::less specialization fixed as reported by George @@ -57,7 +57,7 @@ # define BOOST_NO_INTEGRAL_INT64_T # endif -# if (__SUNPRO_CC < 0x570) +# if (__SUNPRO_CC < 0x570) # define BOOST_NO_TEMPLATE_TEMPLATES // see http://lists.boost.org/MailArchives/boost/msg47184.php // and http://lists.boost.org/MailArchives/boost/msg47220.php @@ -65,7 +65,7 @@ # define BOOST_NO_SFINAE # define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS # endif -# if (__SUNPRO_CC <= 0x580) +# if (__SUNPRO_CC <= 0x580) # define BOOST_NO_IS_ABSTRACT # endif diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/platform/win32.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/platform/win32.hpp index 066b2e88..39220127 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/platform/win32.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/config/platform/win32.hpp @@ -1,9 +1,9 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Bill Kempf 2001. -// (C) Copyright Aleksey Gurtovoy 2003. +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Bill Kempf 2001. +// (C) Copyright Aleksey Gurtovoy 2003. // (C) Copyright Rene Rivera 2005. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. @@ -46,11 +46,11 @@ // // Win32 will normally be using native Win32 threads, // but there is a pthread library avaliable as an option, -// we used to disable this when BOOST_DISABLE_WIN32 was +// we used to disable this when BOOST_DISABLE_WIN32 was // defined but no longer - this should allow some // files to be compiled in strict mode - while maintaining // a consistent setting of BOOST_HAS_THREADS across -// all translation units (needed for std::shared_ptr etc). +// all translation units (needed for shared_ptr etc). // #ifdef _WIN32_WCE diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/gregorian/greg_month.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/gregorian/greg_month.hpp index f326f91a..b48a8a89 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/gregorian/greg_month.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/gregorian/greg_month.hpp @@ -2,7 +2,7 @@ #define GREG_MONTH_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. - * Use, modification and distribution is subject to the + * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst @@ -11,7 +11,7 @@ #include "boost/date_time/constrained_value.hpp" #include "boost/date_time/date_defs.hpp" -#include "boost/std::shared_ptr.hpp" +#include "boost/shared_ptr.hpp" #include "boost/date_time/compiler_config.hpp" #include #include @@ -39,7 +39,7 @@ namespace gregorian { using date_time::Dec; using date_time::NotAMonth; using date_time::NumMonths; - + //! Exception thrown if a greg_month is constructed with a value out of range struct bad_month : public std::out_of_range { @@ -50,15 +50,15 @@ namespace gregorian { //! A constrained range that implements the gregorian_month rules typedef CV::constrained_value greg_month_rep; - + //! Wrapper class to represent months in gregorian based calendar class BOOST_DATE_TIME_DECL greg_month : public greg_month_rep { public: typedef date_time::months_of_year month_enum; typedef std::map month_map_type; - typedef boost::std::shared_ptr month_map_ptr_type; + typedef boost::shared_ptr month_map_ptr_type; //! Construct a month from the months_of_year enumeration - greg_month(month_enum theMonth) : + greg_month(month_enum theMonth) : greg_month_rep(static_cast(theMonth)) {} //! Construct from a short value greg_month(unsigned short theMonth) : greg_month_rep(theMonth) {} diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/custom_time_zone.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/custom_time_zone.hpp index 1c36d575..84c59a3a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/custom_time_zone.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/custom_time_zone.hpp @@ -14,7 +14,7 @@ #include "boost/date_time/local_time/dst_transition_day_rules.hpp" #include "boost/date_time/string_convert.hpp" //#include "boost/date_time/special_defs.hpp" -#include "boost/std::shared_ptr.hpp" +#include "boost/shared_ptr.hpp" namespace boost { namespace local_time { @@ -22,7 +22,7 @@ namespace local_time { //typedef boost::date_time::time_zone_names time_zone_names; typedef boost::date_time::dst_adjustment_offsets dst_adjustment_offsets; //typedef boost::date_time::time_zone_base time_zone; - typedef boost::std::shared_ptr dst_calc_rule_ptr; + typedef boost::shared_ptr dst_calc_rule_ptr; //! A real time zone template @@ -38,7 +38,7 @@ namespace local_time { custom_time_zone_base(const time_zone_names& zone_names, const time_duration_type& utc_offset, const dst_adjustment_offsets& dst_shift, - boost::std::shared_ptr calc_rule) : + boost::shared_ptr calc_rule) : zone_names_(zone_names), base_utc_offset_(utc_offset), dst_offsets_(dst_shift), @@ -100,7 +100,7 @@ namespace local_time { // std offset dst [offset],start[/time],end[/time] - w/o spaces stringstream_type ss; ss.fill('0'); - boost::std::shared_ptr no_rules; + boost::shared_ptr no_rules; // std ss << std_zone_abbrev(); // offset @@ -157,7 +157,7 @@ namespace local_time { bool has_dst_; time_duration_type base_utc_offset_; dst_adjustment_offsets dst_offsets_; - boost::std::shared_ptr dst_calc_rules_; + boost::shared_ptr dst_calc_rules_; }; typedef custom_time_zone_base custom_time_zone; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_date_time.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_date_time.hpp index 3eed3eff..96b29158 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_date_time.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_date_time.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include //todo remove? @@ -57,7 +57,7 @@ namespace local_time { * to wall clock time are made as needed. This approach allows for * operations between wall-clock times in different time zones, and * daylight savings time considerations, to be made. Time zones are - * required to be in the form of a boost::std::shared_ptr. + * required to be in the form of a boost::shared_ptr. */ template > @@ -79,7 +79,7 @@ namespace local_time { *@param tz Timezone for to adjust the UTC time to. */ local_date_time_base(utc_time_type t, - boost::std::shared_ptr tz) : + boost::shared_ptr tz) : date_time::base_time(t), zone_(tz) { @@ -99,12 +99,12 @@ namespace local_time { */ local_date_time_base(date_type d, time_duration_type td, - boost::std::shared_ptr tz, + boost::shared_ptr tz, bool dst_flag) : //necessary for constr_adj() date_time::base_time(construction_adjustment(utc_time_type(d, td), tz, dst_flag)), zone_(tz) { - if(tz != boost::std::shared_ptr() && tz->has_dst()){ + if(tz != boost::shared_ptr() && tz->has_dst()){ // d & td are already local so we use them time_is_dst_result result = check_dst(d, td, tz); @@ -140,7 +140,7 @@ namespace local_time { */ local_date_time_base(date_type d, time_duration_type td, - boost::std::shared_ptr tz, + boost::shared_ptr tz, DST_CALC_OPTIONS calc_option) : // dummy value - time_ is set in constructor code date_time::base_time(utc_time_type(d,td)), @@ -189,9 +189,9 @@ namespace local_time { */ static time_is_dst_result check_dst(date_type d, time_duration_type td, - boost::std::shared_ptr tz) + boost::shared_ptr tz) { - if(tz != boost::std::shared_ptr() && tz->has_dst()) { + if(tz != boost::shared_ptr() && tz->has_dst()) { typedef typename date_time::dst_calculator dst_calculator; return dst_calculator::local_is_dst( d, td, @@ -218,20 +218,20 @@ namespace local_time { //! Special values constructor explicit local_date_time_base(const boost::date_time::special_values sv, - boost::std::shared_ptr tz = boost::std::shared_ptr()) : + boost::shared_ptr tz = boost::shared_ptr()) : date_time::base_time(utc_time_type(sv)), zone_(tz) {} //! returns time zone associated with calling instance - boost::std::shared_ptr zone() const + boost::shared_ptr zone() const { return zone_; } //! returns false is time_zone is NULL and if time value is a special_value bool is_dst() const { - if(zone_ != boost::std::shared_ptr() && zone_->has_dst() && !this->is_special()) { + if(zone_ != boost::shared_ptr() && zone_->has_dst() && !this->is_special()) { // check_dst takes a local time, *this is utc utc_time_type lt(this->time_); lt += zone_->base_utc_offset(); @@ -265,7 +265,7 @@ namespace local_time { //! Returns object's time value as a local representation utc_time_type local_time() const { - if(zone_ != boost::std::shared_ptr()){ + if(zone_ != boost::shared_ptr()){ utc_time_type lt = this->utc_time() + zone_->base_utc_offset(); if (is_dst()) { lt += zone_->dst_offset(); @@ -286,7 +286,7 @@ namespace local_time { ss << utc_time(); return ss.str(); } - if(zone_ == boost::std::shared_ptr()) { + if(zone_ == boost::shared_ptr()) { ss << utc_time() << " UTC"; return ss.str(); } @@ -306,7 +306,7 @@ namespace local_time { } /*! returns a local_date_time_base in the given time zone with the * optional time_duration added. */ - local_date_time_base local_time_in(boost::std::shared_ptr new_tz, + local_date_time_base local_time_in(boost::shared_ptr new_tz, time_duration_type td=time_duration_type(0,0,0)) const { return local_date_time_base(utc_time_type(this->time_) + td, new_tz); @@ -318,7 +318,7 @@ namespace local_time { * classes that do not use a time_zone */ std::string zone_name(bool as_offset=false) const { - if(zone_ == boost::std::shared_ptr()) { + if(zone_ == boost::shared_ptr()) { if(as_offset) { return std::string("Z"); } @@ -352,7 +352,7 @@ namespace local_time { * that do not use a time_zone */ std::string zone_abbrev(bool as_offset=false) const { - if(zone_ == boost::std::shared_ptr()) { + if(zone_ == boost::shared_ptr()) { if(as_offset) { return std::string("Z"); } @@ -384,7 +384,7 @@ namespace local_time { //! returns a posix_time_zone string for the associated time_zone. If no time_zone, "UTC+00" is returned. std::string zone_as_posix_string() const { - if(zone_ == std::shared_ptr()) { + if(zone_ == shared_ptr()) { return std::string("UTC+00"); } return zone_->to_posix_string(); @@ -477,16 +477,16 @@ namespace local_time { return utc_time_type(this->time_) - utc_time_type(rhs.time_); } private: - boost::std::shared_ptr zone_; + boost::shared_ptr zone_; //bool is_dst_; /*! Adjust the passed in time to UTC? */ utc_time_type construction_adjustment(utc_time_type t, - boost::std::shared_ptr z, + boost::shared_ptr z, bool dst_flag) { - if(z != boost::std::shared_ptr()) { + if(z != boost::shared_ptr()) { if(dst_flag && z->has_dst()) { t -= z->dst_offset(); } // else no adjust diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_time_types.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_time_types.hpp index 30b0540b..5e04422e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_time_types.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/local_time_types.hpp @@ -2,7 +2,7 @@ #define LOCAL_TIME_LOCAL_TIME_TYPES_HPP__ /* Copyright (c) 2003-2004 CrystalClear Software, Inc. - * Subject to the Boost Software License, Version 1.0. + * Subject to the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ @@ -20,21 +20,21 @@ namespace boost { namespace local_time { - typedef boost::date_time::period local_time_period; typedef date_time::time_itr local_time_iterator; - typedef date_time::second_clock local_sec_clock; + typedef date_time::second_clock local_sec_clock; typedef date_time::microsec_clock local_microsec_clock; - + typedef date_time::time_zone_base time_zone; typedef date_time::time_zone_base wtime_zone; //! Shared Pointer for custom_time_zone and posix_time_zone objects - typedef boost::std::shared_ptr time_zone_ptr; - typedef boost::std::shared_ptr wtime_zone_ptr; - + typedef boost::shared_ptr time_zone_ptr; + typedef boost::shared_ptr wtime_zone_ptr; + typedef date_time::time_zone_names_base time_zone_names; typedef date_time::time_zone_names_base wtime_zone_names; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/posix_time_zone.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/posix_time_zone.hpp index 1d886983..ee1b553e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/posix_time_zone.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/posix_time_zone.hpp @@ -184,7 +184,7 @@ namespace local_time{ // std offset dst [offset],start[/time],end[/time] - w/o spaces stringstream_type ss; ss.fill('0'); - boost::std::shared_ptr no_rules; + boost::shared_ptr no_rules; // std ss << std_zone_abbrev(); // offset @@ -241,7 +241,7 @@ namespace local_time{ bool has_dst_; time_duration_type base_utc_offset_; dst_adjustment_offsets dst_offsets_; - boost::std::shared_ptr dst_calc_rules_; + boost::shared_ptr dst_calc_rules_; /*! Extract time zone abbreviations for STD & DST as well * as the offsets for the time shift that occurs and how @@ -399,7 +399,7 @@ namespace local_time{ ew = lexical_cast(*it++); ed = lexical_cast(*it); - dst_calc_rules_ = std::shared_ptr( + dst_calc_rules_ = shared_ptr( new nth_kday_dst_rule( nth_last_dst_rule::start_rule( static_cast(sw),sd,sm), @@ -427,7 +427,7 @@ namespace local_time{ ed -= calendar::end_of_month_day(year,em++); } - dst_calc_rules_ = std::shared_ptr( + dst_calc_rules_ = shared_ptr( new partial_date_dst_rule( partial_date_dst_rule::start_rule( sd, static_cast(sm)), @@ -443,7 +443,7 @@ namespace local_time{ int sd=0, ed=0; sd = lexical_cast(s); ed = lexical_cast(e); - dst_calc_rules_ = std::shared_ptr( + dst_calc_rules_ = shared_ptr( new partial_date_dst_rule( partial_date_dst_rule::start_rule(++sd),// args are 0-365 partial_date_dst_rule::end_rule(++ed) // pd expects 1-366 diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/tz_database.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/tz_database.hpp index 26afe449..aceda939 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/tz_database.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/local_time/tz_database.hpp @@ -2,7 +2,7 @@ #define BOOST_DATE_TIME_TZ_DATABASE_HPP__ /* Copyright (c) 2003-2004 CrystalClear Software, Inc. - * Subject to the Boost Software License, Version 1.0. + * Subject to the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ @@ -17,11 +17,11 @@ namespace boost { namespace local_time { - using date_time::data_not_accessible; - using date_time::bad_field_count; + using date_time::data_not_accessible; + using date_time::bad_field_count; - //! Object populated with boost::std::shared_ptr objects - /*! Object populated with boost::std::shared_ptr objects + //! Object populated with boost::shared_ptr objects + /*! Object populated with boost::shared_ptr objects * Database is populated from specs stored in external csv file. See * date_time::tz_db_base for greater detail */ typedef date_time::tz_db_base tz_database; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/microsec_time_clock.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/microsec_time_clock.hpp index beb1d70d..177811ee 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/microsec_time_clock.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/microsec_time_clock.hpp @@ -15,7 +15,7 @@ */ #include -#include +#include #include #include #include @@ -50,7 +50,7 @@ namespace date_time { //! return a local time object for the given zone, based on computer clock //JKG -- looks like we could rewrite this against universal_time template - static time_type local_time(std::shared_ptr tz_ptr) + static time_type local_time(shared_ptr tz_ptr) { typedef typename time_type::utc_time_type utc_time_type; typedef second_clock second_clock; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/time_clock.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/time_clock.hpp index c73466ed..9aa2ff0e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/time_clock.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/time_clock.hpp @@ -14,7 +14,7 @@ */ #include "boost/date_time/c_time.hpp" -#include "boost/std::shared_ptr.hpp" +#include "boost/shared_ptr.hpp" namespace boost { namespace date_time { @@ -54,7 +54,7 @@ namespace date_time { } template - static time_type local_time(boost::std::shared_ptr tz_ptr) + static time_type local_time(boost::shared_ptr tz_ptr) { typedef typename time_type::utc_time_type utc_time_type; utc_time_type utc_time = second_clock::universal_time(); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/tz_db_base.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/tz_db_base.hpp index fff9f91e..a6d8ea9e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/tz_db_base.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/date_time/tz_db_base.hpp @@ -2,7 +2,7 @@ #define DATE_TIME_TZ_DB_BASE_HPP__ /* Copyright (c) 2003-2005 CrystalClear Software, Inc. - * Subject to the Boost Software License, Version 1.0. + * Subject to the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-22 09:04:10 -0700 (Sat, 22 Sep 2012) $ @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -29,20 +29,20 @@ namespace boost { class data_not_accessible : public std::logic_error { public: - data_not_accessible() : - std::logic_error(std::string("Unable to locate or access the required datafile.")) + data_not_accessible() : + std::logic_error(std::string("Unable to locate or access the required datafile.")) {} - data_not_accessible(const std::string& filespec) : - std::logic_error(std::string("Unable to locate or access the required datafile. Filespec: " + filespec)) + data_not_accessible(const std::string& filespec) : + std::logic_error(std::string("Unable to locate or access the required datafile. Filespec: " + filespec)) {} }; - + //! Exception thrown when tz database locates incorrect field structure in data file class bad_field_count : public std::out_of_range { public: - bad_field_count(const std::string& s) : - std::out_of_range(s) + bad_field_count(const std::string& s) : + std::out_of_range(s) {} }; @@ -51,48 +51,48 @@ namespace boost { * tz_db_base is intended to be customized by the * library user. When customizing this file (or creating your own) the * file must follow a specific format. - * + * * This first line is expected to contain column headings and is therefore * not processed by the tz_db_base. * * Each record (line) must have eleven fields. Some of those fields can - * be empty. Every field (even empty ones) must be enclosed in + * be empty. Every field (even empty ones) must be enclosed in * double-quotes. * Ex: * @code * "America/Phoenix" <- string enclosed in quotes * "" <- empty field * @endcode - * - * Some fields represent a length of time. The format of these fields + * + * Some fields represent a length of time. The format of these fields * must be: * @code * "{+|-}hh:mm[:ss]" <- length-of-time format * @endcode * Where the plus or minus is mandatory and the seconds are optional. - * - * Since some time zones do not use daylight savings it is not always - * necessary for every field in a zone_spec to contain a value. All - * zone_specs must have at least ID and GMT offset. Zones that use - * daylight savings must have all fields filled except: - * STD ABBR, STD NAME, DST NAME. You should take note - * that DST ABBR is mandatory for zones that use daylight savings + * + * Since some time zones do not use daylight savings it is not always + * necessary for every field in a zone_spec to contain a value. All + * zone_specs must have at least ID and GMT offset. Zones that use + * daylight savings must have all fields filled except: + * STD ABBR, STD NAME, DST NAME. You should take note + * that DST ABBR is mandatory for zones that use daylight savings * (see field descriptions for further details). * - * ******* Fields and their description/details ********* - * - * ID: + * ******* Fields and their description/details ********* + * + * ID: * Contains the identifying string for the zone_spec. Any string will - * do as long as it's unique. No two ID's can be the same. + * do as long as it's unique. No two ID's can be the same. * * STD ABBR: * STD NAME: * DST ABBR: * DST NAME: - * These four are all the names and abbreviations used by the time - * zone being described. While any string will do in these fields, - * care should be taken. These fields hold the strings that will be - * used in the output of many of the local_time classes. + * These four are all the names and abbreviations used by the time + * zone being described. While any string will do in these fields, + * care should be taken. These fields hold the strings that will be + * used in the output of many of the local_time classes. * Ex: * @code * time_zone nyc = tz_db.time_zone_from_region("America/New_York"); @@ -103,42 +103,42 @@ namespace boost { * // 2004-Aug-30 00:00:00 EDT * @endcode * - * NOTE: The exact format/function names may vary - see local_time + * NOTE: The exact format/function names may vary - see local_time * documentation for further details. * * GMT offset: - * This is the number of hours added to utc to get the local time - * before any daylight savings adjustments are made. Some examples + * This is the number of hours added to utc to get the local time + * before any daylight savings adjustments are made. Some examples * are: America/New_York offset -5 hours, & Africa/Cairo offset +2 hours. * The format must follow the length-of-time format described above. * * DST adjustment: - * The amount of time added to gmt_offset when daylight savings is in + * The amount of time added to gmt_offset when daylight savings is in * effect. The format must follow the length-of-time format described * above. * * DST Start Date rule: * This is a specially formatted string that describes the day of year * in which the transition take place. It holds three fields of it's own, - * separated by semicolons. - * The first field indicates the "nth" weekday of the month. The possible - * values are: 1 (first), 2 (second), 3 (third), 4 (fourth), 5 (fifth), + * separated by semicolons. + * The first field indicates the "nth" weekday of the month. The possible + * values are: 1 (first), 2 (second), 3 (third), 4 (fourth), 5 (fifth), * and -1 (last). * The second field indicates the day-of-week from 0-6 (Sun=0). * The third field indicates the month from 1-12 (Jan=1). - * - * Examples are: "-1;5;9"="Last Friday of September", + * + * Examples are: "-1;5;9"="Last Friday of September", * "2;1;3"="Second Monday of March" * * Start time: * Start time is the number of hours past midnight, on the day of the - * start transition, the transition takes place. More simply put, the + * start transition, the transition takes place. More simply put, the * time of day the transition is made (in 24 hours format). The format - * must follow the length-of-time format described above with the + * must follow the length-of-time format described above with the * exception that it must always be positive. * * DST End date rule: - * See DST Start date rule. The difference here is this is the day + * See DST Start date rule. The difference here is this is the day * daylight savings ends (transition to STD). * * End time: @@ -147,13 +147,13 @@ namespace boost { template class tz_db_base { public: - /* Having CharT as a template parameter created problems - * with posix_time::duration_from_string. Templatizing - * duration_from_string was not possible at this time, however, - * it should be possible in the future (when poor compilers get - * fixed or stop being used). - * Since this class was designed to use CharT as a parameter it - * is simply typedef'd here to ease converting in back to a + /* Having CharT as a template parameter created problems + * with posix_time::duration_from_string. Templatizing + * duration_from_string was not possible at this time, however, + * it should be possible in the future (when poor compilers get + * fixed or stop being used). + * Since this class was designed to use CharT as a parameter it + * is simply typedef'd here to ease converting in back to a * parameter the future */ typedef char char_type; @@ -182,7 +182,7 @@ namespace boost { { string_type in_str; std::string buff; - + std::ifstream ifs(pathspec.c_str()); if(!ifs){ boost::throw_exception(data_not_accessible(pathspec)); @@ -192,27 +192,27 @@ namespace boost { } //! returns true if record successfully added to map - /*! Takes a region name in the form of "America/Phoenix", and a - * time_zone object for that region. The id string must be a unique + /*! Takes a region name in the form of "America/Phoenix", and a + * time_zone object for that region. The id string must be a unique * name that does not already exist in the database. */ - bool add_record(const string_type& region, - boost::std::shared_ptr tz) + bool add_record(const string_type& region, + boost::shared_ptr tz) { - typename map_type::value_type p(region, tz); + typename map_type::value_type p(region, tz); return (m_zone_map.insert(p)).second; } //! Returns a time_zone object built from the specs for the given region - /*! Returns a time_zone object built from the specs for the given - * region. If region does not exist a local_time::record_not_found + /*! Returns a time_zone object built from the specs for the given + * region. If region does not exist a local_time::record_not_found * exception will be thrown */ - boost::std::shared_ptr - time_zone_from_region(const string_type& region) const + boost::shared_ptr + time_zone_from_region(const string_type& region) const { // get the record typename map_type::const_iterator record = m_zone_map.find(region); if(record == m_zone_map.end()){ - return boost::std::shared_ptr(); //null pointer + return boost::shared_ptr(); //null pointer } return record->second; } @@ -229,9 +229,9 @@ namespace boost { } return regions; } - + private: - typedef std::map > map_type; + typedef std::map > map_type; map_type m_zone_map; // start and end rule are of the same type @@ -240,27 +240,27 @@ namespace boost { /* TODO: mechanisms need to be put in place to handle different * types of rule specs. parse_rules() only handles nth_kday * rule types. */ - + //! parses rule specs for transition day rules rule_type* parse_rules(const string_type& sr, const string_type& er) const { using namespace gregorian; - // start and end rule are of the same type, + // start and end rule are of the same type, // both are included here for readability typedef typename rule_type::start_rule start_rule; typedef typename rule_type::end_rule end_rule; - + // these are: [start|end] nth, day, month int s_nth = 0, s_d = 0, s_m = 0; int e_nth = 0, e_d = 0, e_m = 0; split_rule_spec(s_nth, s_d, s_m, sr); split_rule_spec(e_nth, e_d, e_m, er); - + typename start_rule::week_num s_wn, e_wn; s_wn = get_week_num(s_nth); e_wn = get_week_num(e_nth); - - + + return new rule_type(start_rule(s_wn, s_d, s_m), end_rule(e_wn, e_d, e_m)); } @@ -286,7 +286,7 @@ namespace boost { } return start_rule::fifth; // silence warnings } - + //! splits the [start|end]_date_rule string into 3 ints void split_rule_spec(int& nth, int& d, int& m, string_type rule) const { @@ -297,22 +297,22 @@ namespace boost { typedef boost::tokenizer::const_iterator, std::basic_string >::iterator tokenizer_iterator; - + const char_type sep_char[] = { ';', '\0'}; char_separator_type sep(sep_char); tokenizer tokens(rule, sep); // 3 fields - - tokenizer_iterator tok_iter = tokens.begin(); + + tokenizer_iterator tok_iter = tokens.begin(); nth = std::atoi(tok_iter->c_str()); ++tok_iter; d = std::atoi(tok_iter->c_str()); ++tok_iter; m = std::atoi(tok_iter->c_str()); } - + //! Take a line from the csv, turn it into a time_zone_type. /*! Take a line from the csv, turn it into a time_zone_type, - * and add it to the map. Zone_specs in csv file are expected to - * have eleven fields that describe the time zone. Returns true if + * and add it to the map. Zone_specs in csv file are expected to + * have eleven fields that describe the time zone. Returns true if * zone_spec successfully added to database */ bool parse_string(string_type& s) { @@ -333,16 +333,16 @@ namespace boost { //take a shot at fixing gcc 4.x error const unsigned int expected_fields = static_cast(FIELD_COUNT); - if (result.size() != expected_fields) { + if (result.size() != expected_fields) { std::ostringstream msg; - msg << "Expecting " << FIELD_COUNT << " fields, got " + msg << "Expecting " << FIELD_COUNT << " fields, got " << result.size() << " fields in line: " << s; boost::throw_exception(bad_field_count(msg.str())); BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(return false); // should never reach } // initializations - bool has_dst = true; + bool has_dst = true; if(result[DSTABBR] == std::string()){ has_dst = false; } @@ -352,14 +352,14 @@ namespace boost { time_zone_names names(result[STDNAME], result[STDABBR], result[DSTNAME], result[DSTABBR]); - time_duration_type utc_offset = + time_duration_type utc_offset = str_from_delimited_time_duration(result[GMTOFFSET]); - + dst_adjustment_offsets adjust(time_duration_type(0,0,0), time_duration_type(0,0,0), time_duration_type(0,0,0)); - boost::std::shared_ptr rules; + boost::shared_ptr rules; if(has_dst){ adjust = dst_adjustment_offsets( @@ -368,16 +368,16 @@ namespace boost { str_from_delimited_time_duration(result[END_TIME]) ); - rules = - boost::std::shared_ptr(parse_rules(result[START_DATE_RULE], + rules = + boost::shared_ptr(parse_rules(result[START_DATE_RULE], result[END_DATE_RULE])); } string_type id(result[ID]); - boost::std::shared_ptr zone(new time_zone_type(names, utc_offset, adjust, rules)); + boost::shared_ptr zone(new time_zone_type(names, utc_offset, adjust, rules)); return (add_record(id, zone)); - - } - + + } + }; } } // namespace diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/detail/exception_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/detail/exception_ptr.hpp index 283cdad4..5e5a2679 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/detail/exception_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/detail/exception_ptr.hpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -37,7 +37,7 @@ boost class exception_ptr { - typedef boost::std::shared_ptr impl; + typedef boost::shared_ptr impl; impl ptr_; friend void rethrow_exception( exception_ptr const & ); typedef exception_detail::clone_base const * (impl::*unspecified_bool_type)() const; @@ -122,7 +122,7 @@ boost throw_function(BOOST_CURRENT_FUNCTION) << throw_file(__FILE__) << throw_line(__LINE__); - static exception_ptr ep(std::shared_ptr(new exception_detail::clone_impl(c))); + static exception_ptr ep(shared_ptr(new exception_detail::clone_impl(c))); return ep; } @@ -305,7 +305,7 @@ boost success: { BOOST_ASSERT(e!=0); - return exception_ptr(std::shared_ptr(e)); + return exception_ptr(shared_ptr(e)); } case exception_detail::clone_current_exception_result:: bad_alloc: @@ -332,7 +332,7 @@ boost catch( exception_detail::clone_base & e ) { - return exception_ptr(std::shared_ptr(e.clone())); + return exception_ptr(shared_ptr(e.clone())); } catch( std::domain_error & e ) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/exception.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/exception.hpp index 6cd51f88..42d27871 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/exception.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/exception.hpp @@ -145,7 +145,7 @@ boost #endif template - class std::shared_ptr; + class shared_ptr; namespace exception_detail @@ -157,8 +157,8 @@ boost error_info_container { virtual char const * diagnostic_information( char const * ) const = 0; - virtual std::shared_ptr get( type_info_ const & ) const = 0; - virtual void set( std::shared_ptr const &, type_info_ const & ) = 0; + virtual shared_ptr get( type_info_ const & ) const = 0; + virtual void set( shared_ptr const &, type_info_ const & ) = 0; virtual void add_ref() const = 0; virtual bool release() const = 0; virtual refcount_ptr clone() const = 0; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/get_error_info.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/get_error_info.hpp index e9b7ce8d..046f05ae 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/get_error_info.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/get_error_info.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include namespace boost @@ -32,7 +32,7 @@ boost get( exception const & x ) { if( exception_detail::error_info_container * c=x.data_.get() ) - if( std::shared_ptr eib = c->get(BOOST_EXCEPTION_STATIC_TYPEID(ErrorInfo)) ) + if( shared_ptr eib = c->get(BOOST_EXCEPTION_STATIC_TYPEID(ErrorInfo)) ) { #ifndef BOOST_NO_RTTI BOOST_ASSERT( 0!=dynamic_cast(eib.get()) ); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/info.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/info.hpp index bae6ffcf..7b56076d 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/info.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/exception/info.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include @@ -82,26 +82,26 @@ boost } void - set( std::shared_ptr const & x, type_info_ const & typeid_ ) + set( shared_ptr const & x, type_info_ const & typeid_ ) { BOOST_ASSERT(x); info_[typeid_] = x; diagnostic_info_str_.clear(); } - std::shared_ptr + shared_ptr get( type_info_ const & ti ) const { error_info_map::const_iterator i=info_.find(ti); if( info_.end()!=i ) { - std::shared_ptr const & p = i->second; + shared_ptr const & p = i->second; #ifndef BOOST_NO_RTTI BOOST_ASSERT( *BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==*ti.type_ ); #endif return p; } - return std::shared_ptr(); + return shared_ptr(); } char const * @@ -125,7 +125,7 @@ boost friend class boost::exception; - typedef std::map< type_info_, std::shared_ptr > error_info_map; + typedef std::map< type_info_, shared_ptr > error_info_map; error_info_map info_; mutable std::string diagnostic_info_str_; mutable int count_; @@ -168,7 +168,7 @@ boost set_info( E const & x, error_info const & v ) { typedef error_info error_info_tag_t; - std::shared_ptr p( new error_info_tag_t(v) ); + shared_ptr p( new error_info_tag_t(v) ); exception_detail::error_info_container * c=x.data_.get(); if( !c ) x.data_.adopt(c=new exception_detail::error_info_container_impl); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/operations.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/operations.hpp index 43749ff9..dc01b7d8 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/operations.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/operations.hpp @@ -2,9 +2,9 @@ // Copyright Beman Dawes 2002-2009 // Copyright Jan Langer 2002 -// Copyright Dietmar Kuehl 2001 +// Copyright Dietmar Kuehl 2001 // Copyright Vladimir Prus 2002 - + // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -59,7 +59,7 @@ namespace boost //--------------------------------------------------------------------------------------// enum file_type - { + { status_error, # ifndef BOOST_FILESYSTEM_NO_DEPRECATED status_unknown = status_error, @@ -92,7 +92,7 @@ namespace boost // Values are from POSIX and are given in octal per the POSIX standard. // permission bits - + owner_read = 0400, // S_IRUSR, Read permission, owner owner_write = 0200, // S_IWUSR, Write permission, owner owner_exe = 0100, // S_IXUSR, Execute/search permission, owner @@ -115,8 +115,8 @@ namespace boost set_uid_on_exe = 04000, // S_ISUID, Set-user-ID on execution set_gid_on_exe = 02000, // S_ISGID, Set-group-ID on execution sticky_bit = 01000, // S_ISVTX, - // (POSIX XSI) On directories, restricted deletion flag - // (V7) 'sticky bit': save swapped text even after use + // (POSIX XSI) On directories, restricted deletion flag + // (V7) 'sticky bit': save swapped text even after use // (SunOS) On non-directories: don't cache this file // (SVID-v4.2) On directories: restricted deletion flag // Also see http://en.wikipedia.org/wiki/Sticky_bit @@ -151,13 +151,13 @@ namespace boost // observers file_type type() const { return m_value; } - perms permissions() const { return m_perms; } + perms permissions() const { return m_perms; } // modifiers void type(file_type v) { m_value = v; } void permissions(perms prms) { m_perms = prms; } - bool operator==(const file_status& rhs) const { return type() == rhs.type() && + bool operator==(const file_status& rhs) const { return type() == rhs.type() && permissions() == rhs.permissions(); } bool operator!=(const file_status& rhs) const { return !(*this == rhs); } @@ -260,7 +260,7 @@ namespace boost BOOST_FILESYSTEM_DECL void resize_file(const path& p, uintmax_t size, system::error_code* ec=0); BOOST_FILESYSTEM_DECL - space_info space(const path& p, system::error_code* ec=0); + space_info space(const path& p, system::error_code* ec=0); BOOST_FILESYSTEM_DECL path system_complete(const path& p, system::error_code* ec=0); BOOST_FILESYSTEM_DECL @@ -277,37 +277,37 @@ namespace boost inline file_status status(const path& p) {return detail::status(p);} - inline + inline file_status status(const path& p, system::error_code& ec) {return detail::status(p, &ec);} - inline + inline file_status symlink_status(const path& p) {return detail::symlink_status(p);} inline file_status symlink_status(const path& p, system::error_code& ec) {return detail::symlink_status(p, &ec);} - inline + inline bool exists(const path& p) {return exists(detail::status(p));} - inline + inline bool exists(const path& p, system::error_code& ec) {return exists(detail::status(p, &ec));} - inline + inline bool is_directory(const path& p) {return is_directory(detail::status(p));} - inline + inline bool is_directory(const path& p, system::error_code& ec) {return is_directory(detail::status(p, &ec));} - inline + inline bool is_regular_file(const path& p) {return is_regular_file(detail::status(p));} - inline + inline bool is_regular_file(const path& p, system::error_code& ec) {return is_regular_file(detail::status(p, &ec));} - inline + inline bool is_other(const path& p) {return is_other(detail::status(p));} - inline + inline bool is_other(const path& p, system::error_code& ec) {return is_other(detail::status(p, &ec));} inline bool is_symlink(const path& p) {return is_symlink(detail::symlink_status(p));} - inline + inline bool is_symlink(const path& p, system::error_code& ec) {return is_symlink(detail::symlink_status(p, &ec));} # ifndef BOOST_FILESYSTEM_NO_DEPRECATED @@ -330,7 +330,7 @@ namespace boost // in alphabetical order, unless otherwise noted // // // //--------------------------------------------------------------------------------------// - + // forward declarations path current_path(); // fwd declaration path initial_path(); @@ -367,7 +367,7 @@ namespace boost void copy(const path& from, const path& to) {detail::copy(from, to);} inline - void copy(const path& from, const path& to, system::error_code& ec) + void copy(const path& from, const path& to, system::error_code& ec) {detail::copy(from, to, &ec);} inline void copy_directory(const path& from, const path& to) @@ -500,7 +500,7 @@ namespace boost inline boost::uintmax_t remove_all(const path& p) {return detail::remove_all(p);} - + inline boost::uintmax_t remove_all(const path& p, system::error_code& ec) {return detail::remove_all(p, &ec);} @@ -517,10 +517,10 @@ namespace boost void resize_file(const path& p, uintmax_t size, system::error_code& ec) {detail::resize_file(p, size, &ec);} inline - space_info space(const path& p) {return detail::space(p);} + space_info space(const path& p) {return detail::space(p);} inline - space_info space(const path& p, system::error_code& ec) {return detail::space(p, &ec);} + space_info space(const path& p, system::error_code& ec) {return detail::space(p, &ec);} # ifndef BOOST_FILESYSTEM_NO_DEPRECATED inline bool symbolic_link_exists(const path& p) @@ -537,7 +537,7 @@ namespace boost path temp_directory_path() {return detail::temp_directory_path();} inline - path temp_directory_path(system::error_code& ec) + path temp_directory_path(system::error_code& ec) {return detail::temp_directory_path(&ec);} inline path unique_path(const path& p="%%%%-%%%%-%%%%-%%%%") @@ -552,7 +552,7 @@ namespace boost // // //--------------------------------------------------------------------------------------// -// GCC has a problem with a member function named path within a namespace or +// GCC has a problem with a member function named path within a namespace or // sub-namespace that also has a class named path. The workaround is to always // fully qualify the name path when it refers to the class name. @@ -593,12 +593,12 @@ public: file_status symlink_status() const {return m_get_symlink_status();} file_status symlink_status(system::error_code& ec) const {return m_get_symlink_status(&ec);} - bool operator==(const directory_entry& rhs) {return m_path == rhs.m_path;} - bool operator!=(const directory_entry& rhs) {return m_path != rhs.m_path;} - bool operator< (const directory_entry& rhs) {return m_path < rhs.m_path;} - bool operator<=(const directory_entry& rhs) {return m_path <= rhs.m_path;} - bool operator> (const directory_entry& rhs) {return m_path > rhs.m_path;} - bool operator>=(const directory_entry& rhs) {return m_path >= rhs.m_path;} + bool operator==(const directory_entry& rhs) {return m_path == rhs.m_path;} + bool operator!=(const directory_entry& rhs) {return m_path != rhs.m_path;} + bool operator< (const directory_entry& rhs) {return m_path < rhs.m_path;} + bool operator<=(const directory_entry& rhs) {return m_path <= rhs.m_path;} + bool operator> (const directory_entry& rhs) {return m_path > rhs.m_path;} + bool operator>=(const directory_entry& rhs) {return m_path >= rhs.m_path;} private: boost::filesystem::path m_path; @@ -625,7 +625,7 @@ namespace detail # if defined(BOOST_POSIX_API) , void *& buffer # endif - ); + ); struct dir_itr_imp { @@ -688,7 +688,7 @@ namespace detail ~directory_iterator() {} // never throws directory_iterator& increment(system::error_code& ec) - { + { detail::directory_iterator_increment(*this, &ec); return *this; } @@ -700,16 +700,16 @@ namespace detail friend BOOST_FILESYSTEM_DECL void detail::directory_iterator_increment(directory_iterator& it, system::error_code* ec); - // std::shared_ptr provides shallow-copy semantics required for InputIterators. + // shared_ptr provides shallow-copy semantics required for InputIterators. // m_imp.get()==0 indicates the end iterator. - boost::std::shared_ptr< detail::dir_itr_imp > m_imp; + boost::shared_ptr< detail::dir_itr_imp > m_imp; friend class boost::iterator_core_access; boost::iterator_facade< directory_iterator, directory_entry, - boost::single_pass_traversal_tag >::reference dereference() const + boost::single_pass_traversal_tag >::reference dereference() const { BOOST_ASSERT_MSG(m_imp.get(), "attempt to dereference end iterator"); return m_imp->dir_entry; @@ -884,7 +884,7 @@ namespace detail } int level() const - { + { BOOST_ASSERT_MSG(m_imp.get(), "level() on end recursive_directory_iterator"); return m_imp->m_level; @@ -903,7 +903,7 @@ namespace detail # endif void pop() - { + { BOOST_ASSERT_MSG(m_imp.get(), "pop() on end recursive_directory_iterator"); m_imp->pop(); @@ -936,17 +936,17 @@ namespace detail private: - // std::shared_ptr provides shallow-copy semantics required for InputIterators. + // shared_ptr provides shallow-copy semantics required for InputIterators. // m_imp.get()==0 indicates the end iterator. - boost::std::shared_ptr< detail::recur_dir_itr_imp > m_imp; + boost::shared_ptr< detail::recur_dir_itr_imp > m_imp; friend class boost::iterator_core_access; - boost::iterator_facade< + boost::iterator_facade< recursive_directory_iterator, directory_entry, boost::single_pass_traversal_tag >::reference - dereference() const + dereference() const { BOOST_ASSERT_MSG(m_imp.get(), "dereference of end recursive_directory_iterator"); @@ -954,7 +954,7 @@ namespace detail } void increment() - { + { BOOST_ASSERT_MSG(m_imp.get(), "increment of end recursive_directory_iterator"); m_imp->increment(0); @@ -976,7 +976,7 @@ namespace detail // class filesystem_error // // // //--------------------------------------------------------------------------------------// - + class BOOST_SYMBOL_VISIBLE filesystem_error : public system::system_error { // see http://www.boost.org/more/error_handling.html for design rationale @@ -1009,7 +1009,7 @@ namespace detail } catch (...) { m_imp_ptr.reset(); } } - + filesystem_error( const std::string & what_arg, const path& path1_arg, const path& path2_arg, system::error_code ec) @@ -1075,7 +1075,7 @@ namespace detail path m_path2; // may be empty() std::string m_what; // not built until needed }; - boost::std::shared_ptr m_imp_ptr; + boost::shared_ptr m_imp_ptr; }; // test helper -----------------------------------------------------------------------// diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/path.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/path.hpp index 90aff04b..2dd1b00e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/path.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/filesystem/path.hpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -62,11 +62,11 @@ namespace filesystem # ifdef BOOST_WINDOWS_API typedef wchar_t value_type; BOOST_STATIC_CONSTEXPR value_type preferred_separator = L'\\'; -# else +# else typedef char value_type; BOOST_STATIC_CONSTEXPR value_type preferred_separator = '/'; # endif - typedef std::basic_string string_type; + typedef std::basic_string string_type; typedef std::codecvt codecvt_type; @@ -89,7 +89,7 @@ namespace filesystem // // The path locale, which is global to the thread, can be changed by the // imbue() function. It is initialized to an implementation defined locale. - // + // // For Windows, wchar_t strings do not undergo conversion. char strings // are converted using the "ANSI" or "OEM" code pages, as determined by // the AreFileApisANSI() function, or, if a conversion argument is given, @@ -98,7 +98,7 @@ namespace filesystem // See m_pathname comments for further important rationale. // TODO: rules needed for operating systems that use / or . - // differently, or format directory paths differently from file paths. + // differently, or format directory paths differently from file paths. // // ********************************************************************************** // @@ -127,7 +127,7 @@ namespace filesystem // ----- constructors ----- - path(){} + path(){} path(const path& p) : m_pathname(p.m_pathname) {} @@ -159,7 +159,7 @@ namespace filesystem template path(InputIterator begin, InputIterator end) - { + { if (begin != end) { std::basic_string::value_type> @@ -170,7 +170,7 @@ namespace filesystem template path(InputIterator begin, InputIterator end, const codecvt_type& cvt) - { + { if (begin != end) { std::basic_string::value_type> @@ -225,7 +225,7 @@ namespace filesystem template path& assign(InputIterator begin, InputIterator end, const codecvt_type& cvt) - { + { m_pathname.clear(); if (begin != end) { @@ -270,13 +270,13 @@ namespace filesystem template path& concat(InputIterator begin, InputIterator end) - { + { return concat(begin, end, codecvt()); } template path& concat(InputIterator begin, InputIterator end, const codecvt_type& cvt) - { + { if (begin == end) return *this; std::basic_string::value_type> @@ -313,7 +313,7 @@ namespace filesystem template path& append(InputIterator begin, InputIterator end) - { + { return append(begin, end, codecvt()); } @@ -334,7 +334,7 @@ namespace filesystem void swap(path& rhs) { m_pathname.swap(rhs.m_pathname); } // ----- observers ----- - + // For operating systems that format file paths differently than directory // paths, return values from observers are formatted as file names unless there // is a trailing separator, in which case returns are formatted as directory @@ -364,16 +364,16 @@ namespace filesystem String string(const codecvt_type& cvt) const; # ifdef BOOST_WINDOWS_API - const std::string string() const { return string(codecvt()); } + const std::string string() const { return string(codecvt()); } const std::string string(const codecvt_type& cvt) const - { + { std::string tmp; if (!m_pathname.empty()) path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(), tmp, cvt); return tmp; } - + // string_type is std::wstring, so there is no conversion const std::wstring& wstring() const { return m_pathname; } const std::wstring& wstring(const codecvt_type&) const { return m_pathname; } @@ -385,7 +385,7 @@ namespace filesystem const std::wstring wstring() const { return wstring(codecvt()); } const std::wstring wstring(const codecvt_type& cvt) const - { + { std::wstring tmp; if (!m_pathname.empty()) path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(), @@ -404,8 +404,8 @@ namespace filesystem String generic_string(const codecvt_type& cvt) const; # ifdef BOOST_WINDOWS_API - const std::string generic_string() const { return generic_string(codecvt()); } - const std::string generic_string(const codecvt_type& cvt) const; + const std::string generic_string() const { return generic_string(codecvt()); } + const std::string generic_string(const codecvt_type& cvt) const; const std::wstring generic_wstring() const; const std::wstring generic_wstring(const codecvt_type&) const { return generic_wstring(); }; @@ -426,7 +426,7 @@ namespace filesystem // ----- decomposition ----- - path root_path() const; + path root_path() const; path root_name() const; // returns 0 or 1 element path // even on POSIX, root_name() is non-empty() for network paths path root_directory() const; // returns 0 or 1 element path @@ -455,7 +455,7 @@ namespace filesystem return has_root_directory(); # endif } - bool is_relative() const { return !is_absolute(); } + bool is_relative() const { return !is_absolute(); } // ----- iterators ----- @@ -489,7 +489,7 @@ namespace filesystem # if defined(BOOST_FILESYSTEM_DEPRECATED) // deprecated functions with enough signature or semantic changes that they are - // not supplied by default + // not supplied by default const std::string file_string() const { return string(); } const std::string directory_string() const { return string(); } const std::string native_file_string() const { return string(); } @@ -502,7 +502,7 @@ namespace filesystem //basic_path(const string_type& str, name_check) { operator/=(str); } //basic_path(const typename string_type::value_type* s, name_check) // { operator/=(s);} - //static bool default_name_check_writable() { return false; } + //static bool default_name_check_writable() { return false; } //static void default_name_check(name_check) {} //static name_check default_name_check() { return 0; } //basic_path& canonize(); @@ -529,7 +529,7 @@ namespace filesystem // slashes NOT converted to backslashes # if defined(_MSC_VER) # pragma warning(pop) // restore warning settings. -# endif +# endif string_type::size_type m_append_separator_if_needed(); // Returns: If separator is to be appended, m_pathname.size() before append. Otherwise 0. @@ -541,7 +541,7 @@ namespace filesystem path& m_normalize(); // Was qualified; como433beta8 reports: - // warning #427-D: qualified name is not allowed in member declaration + // warning #427-D: qualified name is not allowed in member declaration friend class iterator; friend bool operator<(const path& lhs, const path& rhs); @@ -565,7 +565,7 @@ namespace filesystem //------------------------------------------------------------------------------------// // class path::iterator // //------------------------------------------------------------------------------------// - + class path::iterator : public boost::iterator_facade< path::iterator, @@ -596,7 +596,7 @@ namespace filesystem // m_path_ptr->m_pathname. // if m_element is implicit dot, m_pos is the // position of the last separator in the path. - // end() iterator is indicated by + // end() iterator is indicated by // m_pos == m_path_ptr->m_pathname.size() }; // path::iterator @@ -611,15 +611,15 @@ namespace filesystem inline bool lexicographical_compare(path::iterator first1, path::iterator last1, path::iterator first2, path::iterator last2) { return detail::lex_compare(first1, last1, first2, last2) < 0; } - + inline bool operator==(const path& lhs, const path& rhs) {return lhs.compare(rhs) == 0;} - inline bool operator==(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) == 0;} + inline bool operator==(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) == 0;} inline bool operator==(const path::string_type& lhs, const path& rhs) {return rhs.compare(lhs) == 0;} inline bool operator==(const path& lhs, const path::value_type* rhs) {return lhs.compare(rhs) == 0;} inline bool operator==(const path::value_type* lhs, const path& rhs) {return rhs.compare(lhs) == 0;} - + inline bool operator!=(const path& lhs, const path& rhs) {return lhs.compare(rhs) != 0;} - inline bool operator!=(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) != 0;} + inline bool operator!=(const path& lhs, const path::string_type& rhs) {return lhs.compare(rhs) != 0;} inline bool operator!=(const path::string_type& lhs, const path& rhs) {return rhs.compare(lhs) != 0;} inline bool operator!=(const path& lhs, const path::value_type* rhs) {return lhs.compare(rhs) != 0;} inline bool operator!=(const path::value_type* lhs, const path& rhs) {return rhs.compare(lhs) != 0;} @@ -658,7 +658,7 @@ namespace filesystem return os << boost::io::quoted(p.template string >(), static_cast('&')); } - + template inline std::basic_istream& operator>>(std::basic_istream& is, path& p) @@ -668,7 +668,7 @@ namespace filesystem p = str; return is; } - + // name_checks // These functions are holdovers from version 1. It isn't clear they have much @@ -680,14 +680,14 @@ namespace filesystem BOOST_FILESYSTEM_DECL bool portable_directory_name(const std::string & name); BOOST_FILESYSTEM_DECL bool portable_file_name(const std::string & name); BOOST_FILESYSTEM_DECL bool native(const std::string & name); - + //--------------------------------------------------------------------------------------// // class path member template implementation // //--------------------------------------------------------------------------------------// template path& path::append(InputIterator begin, InputIterator end, const codecvt_type& cvt) - { + { if (begin == end) return *this; string_type::size_type sep_pos(m_append_separator_if_needed()); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/format/alt_sstream.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/format/alt_sstream.hpp index d513d243..e236be35 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/format/alt_sstream.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/format/alt_sstream.hpp @@ -1,5 +1,5 @@ // ---------------------------------------------------------------------------- -// alt_sstream.hpp : alternative stringstream +// alt_sstream.hpp : alternative stringstream // ---------------------------------------------------------------------------- // Copyright Samuel Krempp 2003. Use, modification, and distribution are @@ -18,23 +18,23 @@ #include #include #include -#include +#include #include namespace boost { namespace io { - template, + template, class Alloc=::std::allocator > class basic_altstringbuf; - template, + template, class Alloc=::std::allocator > class basic_oaltstringstream; template - class basic_altstringbuf + class basic_altstringbuf : public ::std::basic_streambuf { typedef ::std::basic_streambuf streambuf_t; @@ -55,14 +55,14 @@ namespace boost { explicit basic_altstringbuf(std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) - : putend_(NULL), is_allocated_(false), mode_(mode) + : putend_(NULL), is_allocated_(false), mode_(mode) {} explicit basic_altstringbuf(const string_type& s, ::std::ios_base::openmode mode = ::std::ios_base::in | ::std::ios_base::out) - : putend_(NULL), is_allocated_(false), mode_(mode) + : putend_(NULL), is_allocated_(false), mode_(mode) { dealloc(); str(s); } - virtual ~basic_altstringbuf() + virtual ~basic_altstringbuf() { dealloc(); } using streambuf_t::pbase; using streambuf_t::pptr; @@ -70,36 +70,36 @@ namespace boost { using streambuf_t::eback; using streambuf_t::gptr; using streambuf_t::egptr; - + void clear_buffer(); void str(const string_type& s); // 0-copy access : - Ch * begin() const; + Ch * begin() const; size_type size() const; size_type cur_size() const; // stop at current pointer Ch * pend() const // the highest position reached by pptr() since creation { return ((putend_ < pptr()) ? pptr() : putend_); } - size_type pcount() const + size_type pcount() const { return static_cast( pptr() - pbase()) ;} // copy buffer to string : - string_type str() const + string_type str() const { return string_type(begin(), size()); } - string_type cur_str() const + string_type cur_str() const { return string_type(begin(), cur_size()); } protected: explicit basic_altstringbuf (basic_altstringbuf * s, - ::std::ios_base::openmode mode + ::std::ios_base::openmode mode = ::std::ios_base::in | ::std::ios_base::out) - : putend_(NULL), is_allocated_(false), mode_(mode) + : putend_(NULL), is_allocated_(false), mode_(mode) { dealloc(); str(s); } - virtual pos_type seekoff(off_type off, ::std::ios_base::seekdir way, - ::std::ios_base::openmode which + virtual pos_type seekoff(off_type off, ::std::ios_base::seekdir way, + ::std::ios_base::openmode which = ::std::ios_base::in | ::std::ios_base::out); - virtual pos_type seekpos (pos_type pos, - ::std::ios_base::openmode which + virtual pos_type seekpos (pos_type pos, + ::std::ios_base::openmode which = ::std::ios_base::in | ::std::ios_base::out); virtual int_type underflow(); virtual int_type pbackfail(int_type meta = compat_traits_type::eof()); @@ -117,53 +117,53 @@ namespace boost { // --- class basic_oaltstringstream ---------------------------------------- template - class basic_oaltstringstream - : private base_from_member< std::shared_ptr< basic_altstringbuf< Ch, Tr, Alloc> > >, + class basic_oaltstringstream + : private base_from_member< shared_ptr< basic_altstringbuf< Ch, Tr, Alloc> > >, public ::std::basic_ostream { - class No_Op { + class No_Op { // used as no-op deleter for (not-owner) shared_pointers - public: + public: template const T & operator()(const T & arg) { return arg; } }; typedef ::std::basic_ostream stream_t; - typedef boost::base_from_member > > + typedef boost::base_from_member > > pbase_type; typedef ::std::basic_string string_type; typedef typename string_type::size_type size_type; typedef basic_altstringbuf stringbuf_t; public: typedef Alloc allocator_type; - basic_oaltstringstream() - : pbase_type(new stringbuf_t), stream_t(rdbuf()) + basic_oaltstringstream() + : pbase_type(new stringbuf_t), stream_t(rdbuf()) { } - basic_oaltstringstream(::boost::std::shared_ptr buf) - : pbase_type(buf), stream_t(rdbuf()) + basic_oaltstringstream(::boost::shared_ptr buf) + : pbase_type(buf), stream_t(rdbuf()) { } - basic_oaltstringstream(stringbuf_t * buf) - : pbase_type(buf, No_Op() ), stream_t(rdbuf()) + basic_oaltstringstream(stringbuf_t * buf) + : pbase_type(buf, No_Op() ), stream_t(rdbuf()) { } - stringbuf_t * rdbuf() const + stringbuf_t * rdbuf() const { return pbase_type::member.get(); } - void clear_buffer() + void clear_buffer() { rdbuf()->clear_buffer(); } // 0-copy access : - Ch * begin() const + Ch * begin() const { return rdbuf()->begin(); } - size_type size() const + size_type size() const { return rdbuf()->size(); } size_type cur_size() const // stops at current position { return rdbuf()->cur_size(); } // copy buffer to string : string_type str() const // [pbase, epptr[ - { return rdbuf()->str(); } + { return rdbuf()->str(); } string_type cur_str() const // [pbase, pptr[ { return rdbuf()->cur_str(); } - void str(const string_type& s) + void str(const string_type& s) { rdbuf()->str(s); } }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/functional/hash/extensions.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/functional/hash/extensions.hpp index 2144e057..998c08e4 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/functional/hash/extensions.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/functional/hash/extensions.hpp @@ -5,7 +5,7 @@ // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf -// issue 6.18. +// issue 6.18. // This implements the extensions to the standard. // It's undocumented, so you shouldn't use it.... @@ -358,12 +358,12 @@ namespace boost } }; }; - + template struct hash_impl_msvc2 : public hash_impl_msvc::value> ::BOOST_NESTED_TEMPLATE inner {}; - + template <> struct hash_impl { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/get_pointer.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/get_pointer.hpp index 7399d199..b27b98a6 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/get_pointer.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/get_pointer.hpp @@ -9,11 +9,11 @@ // In order to avoid circular dependencies with Boost.TR1 // we make sure that our include of doesn't try to -// pull in the TR1 headers: that's why we use this header +// pull in the TR1 headers: that's why we use this header // rather than including directly: #include // std::auto_ptr -namespace boost { +namespace boost { // get_pointer(p) extracts a ->* capable pointer from p @@ -22,7 +22,7 @@ template T * get_pointer(T * p) return p; } -// get_pointer(std::shared_ptr const & p) has been moved to std::shared_ptr.hpp +// get_pointer(shared_ptr const & p) has been moved to shared_ptr.hpp template T * get_pointer(std::auto_ptr const& p) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/io_error.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/io_error.hpp index e74ca47a..5ea79c58 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/io_error.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/io_error.hpp @@ -1,6 +1,6 @@ /* Copyright 2005-2007 Adobe Systems Incorporated - + Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). @@ -20,7 +20,7 @@ #include #include "../../gil_config.hpp" -#include +#include namespace boost { namespace gil { @@ -30,7 +30,7 @@ inline void io_error_if(bool expr, const char* descr="") { if (expr) io_error(de namespace detail { class file_mgr { protected: - std::shared_ptr _fp; + shared_ptr _fp; struct null_deleter { void operator()(void const*) const {} }; file_mgr(FILE* file) : _fp(file, null_deleter()) {} @@ -38,7 +38,7 @@ namespace detail { file_mgr(const char* filename, const char* flags) { FILE* fp; io_error_if((fp=fopen(filename,flags))==NULL, "file_mgr: failed to open file"); - _fp=std::shared_ptr(fp,fclose); + _fp=shared_ptr(fp,fclose); } public: diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_dynamic_io.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_dynamic_io.hpp index 3140e728..b1108fe8 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_dynamic_io.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_dynamic_io.hpp @@ -1,6 +1,6 @@ /* Copyright 2005-2007 Adobe Systems Incorporated - + Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include "../dynamic_image/dynamic_image_all.hpp" #include "io_error.hpp" @@ -43,7 +43,7 @@ struct jpeg_write_is_supported { class jpeg_writer_dynamic : public jpeg_writer { int _quality; -public: +public: jpeg_writer_dynamic(FILE* file, int quality=100) : jpeg_writer(file) , _quality(quality) {} jpeg_writer_dynamic(const char* filename, int quality=100) : jpeg_writer(filename), _quality(quality) {} @@ -74,7 +74,7 @@ class jpeg_reader_dynamic : public jpeg_reader { public: jpeg_reader_dynamic(FILE* file) : jpeg_reader(file) {} jpeg_reader_dynamic(const char* filename) : jpeg_reader(filename){} - + template void read_image(any_image& im) { if (!construct_matched(im,detail::jpeg_type_format_checker(_cinfo.out_color_space))) { @@ -110,7 +110,7 @@ inline void jpeg_read_image(const std::string& filename,any_image& im) { /// \ingroup JPEG_IO /// \brief Saves the currently instantiated view to a jpeg file specified by the given jpeg image file name. -/// Throws std::ios_base::failure if the currently instantiated view type is not supported for writing by the I/O extension +/// Throws std::ios_base::failure if the currently instantiated view type is not supported for writing by the I/O extension /// or if it fails to create the file. template inline void jpeg_write_view(const char* filename,const any_image_view& runtime_view) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_io.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_io.hpp index bdeb56d5..b9adc023 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_io.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/jpeg_io.hpp @@ -1,6 +1,6 @@ /* Copyright 2005-2007 Adobe Systems Incorporated - + Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). @@ -24,7 +24,7 @@ #include #include #include -#include +#include extern "C" { #include } @@ -64,7 +64,7 @@ inline point2 jpeg_read_dimensions(const std::string& filename) /// \ingroup JPEG_IO /// \brief Loads the image specified by the given jpeg image file name into the given view. /// Triggers a compile assert if the view color space and channel depth are not supported by the JPEG library or by the I/O extension. -/// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its color space or channel depth are not +/// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its color space or channel depth are not /// compatible with the ones specified by View, or if its dimensions don't match the ones of the view. template inline void jpeg_read_view(const char* filename,const View& view) { @@ -84,7 +84,7 @@ inline void jpeg_read_view(const std::string& filename,const View& view) { /// \ingroup JPEG_IO /// \brief Allocates a new image whose dimensions are determined by the given jpeg image file, and loads the pixels into it. /// Triggers a compile assert if the image color space or channel depth are not supported by the JPEG library or by the I/O extension. -/// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its color space or channel depth are not +/// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its color space or channel depth are not /// compatible with the ones specified by Image template inline void jpeg_read_image(const char* filename,Image& im) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/png_dynamic_io.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/png_dynamic_io.hpp index 616e2029..a3a25a97 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/png_dynamic_io.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/gil/extension/io/png_dynamic_io.hpp @@ -1,6 +1,6 @@ /* Copyright 2005-2007 Adobe Systems Incorporated - + Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include "../dynamic_image/dynamic_image_all.hpp" #include "io_error.hpp" #include "png_io.hpp" @@ -81,7 +81,7 @@ class png_reader_dynamic : public png_reader { public: png_reader_dynamic(FILE* file) : png_reader(file) {} png_reader_dynamic(const char* filename) : png_reader(filename){} - + template void read_image(any_image& im) { png_uint_32 width, height; @@ -99,7 +99,7 @@ public: } }; -} // namespace detail +} // namespace detail /// \ingroup PNG_IO /// \brief reads a PNG image into a run-time instantiated image @@ -121,7 +121,7 @@ inline void png_read_image(const std::string& filename,any_image& im) { /// \ingroup PNG_IO /// \brief Saves the currently instantiated view to a png file specified by the given png image file name. -/// Throws std::ios_base::failure if the currently instantiated view type is not supported for writing by the I/O extension +/// Throws std::ios_base::failure if the currently instantiated view type is not supported for writing by the I/O extension /// or if it fails to create the file. template inline void png_write_view(const char* filename,const any_image_view& runtime_view) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/detail/self_avoiding_walk.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/detail/self_avoiding_walk.hpp index bd02797f..c171897f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/detail/self_avoiding_walk.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/detail/self_avoiding_walk.hpp @@ -10,19 +10,19 @@ #define BOOST_SELF_AVOIDING_WALK_HPP /* - This file defines necessary components for SAW. + This file defines necessary components for SAW. mesh language: (defined by myself to clearify what is what) A triangle in mesh is called an triangle. - An edge in mesh is called an line. + An edge in mesh is called an line. A vertex in mesh is called a point. A triangular mesh corresponds to a graph in which a vertex is a - triangle and an edge(u, v) stands for triangle u and triangle v + triangle and an edge(u, v) stands for triangle u and triangle v share an line. After this point, a vertex always refers to vertex in graph, - therefore it is a traingle in mesh. + therefore it is a traingle in mesh. */ @@ -43,7 +43,7 @@ namespace boost { triple(const T1& a, const T2& b, const T3& c) : first(a), second(b), third(c) {} triple() : first(SAW_SENTINAL), second(SAW_SENTINAL), third(SAW_SENTINAL) {} }; - + typedef triple Triple; /* Define a vertex property which has a triangle inside. Triangle is @@ -70,14 +70,14 @@ namespace boost { if ( a.second == b.second || a.second == b.third ) l.second = a.second; else if ( a.third == b.second || a.third == b.third ) - l.second = a.third; + l.second = a.third; } else if ( a.first == b.second ) { l.first = a.first; if ( a.second == b.third ) l.second = a.second; else if ( a.third == b.third ) - l.second = a.third; + l.second = a.third; } else if ( a.first == b.third ) { l.first = a.first; @@ -90,17 +90,17 @@ namespace boost { } else if ( a.second == b.second ) { l.first = a.second; - if ( a.third == b.third ) + if ( a.third == b.third ) l.second = a.third; } else if ( a.second == b.third ) { l.first = a.second; - } else if ( a.third == b.first - || a.third == b.second + } else if ( a.third == b.first + || a.third == b.second || a.third == b.third ) - l.first = a.third; + l.first = a.third; /*Make it in order*/ if ( l.first > l.second ) { @@ -132,7 +132,7 @@ namespace boost { } TriangleDecorator td; }; - + /* HList has to be a handle of data holder so that pass-by-value is * in right logic. * @@ -146,7 +146,7 @@ namespace boost { : public bfs_visitor<>, public dfs_visitor<> { typedef typename boost::property_traits::value_type iter; - /*use boost std::shared_ptr*/ + /*use boost shared_ptr*/ typedef typename HList::element_type::value_type::second_type Line; public: @@ -176,12 +176,12 @@ namespace boost { using std::make_pair; typedef typename boost::graph_traits::vertex_descriptor Vertex; Vertex tau = target(e, G); - Vertex i = source(e, G); + Vertex i = source(e, G); get_vertex_sharing get_sharing_line(td); - + Line tau_i = get_sharing_line(tau, i); - + iter w_end = hlist->end(); iter w_i = iter_d[i]; @@ -197,7 +197,7 @@ namespace boost { *b w(i) |- w(i+1) w(i) ~> w(i+1) or no w(i+1) yet *---------------------------------------------------------- */ - + bool a = false, b = false; --w_i_m_1; @@ -206,13 +206,13 @@ namespace boost { if ( w_i_m_1 != w_end ) { a = ( w_i_m_1->second.first != SAW_SENTINAL ); - } - + } + if ( a ) { - + if ( b ) { - /*Case 1: - + /*Case 1: + w(i-1) |- w(i) |- w(i+1) */ Line l1 = get_sharing_line(*w_i_m_1, tau); @@ -221,7 +221,7 @@ namespace boost { --w_i_m_2; bool c = true; - + if ( w_i_m_2 != w_end ) { c = w_i_m_2->second != l1; } @@ -230,11 +230,11 @@ namespace boost { /*extension: w(i-1) -> tau |- w(i) */ w_i_m_1->second = l1; /*insert(pos, const T&) is to insert before pos*/ - iter_d[tau] = hlist->insert(w_i, make_pair(tau, tau_i)); - + iter_d[tau] = hlist->insert(w_i, make_pair(tau, tau_i)); + } else { /* w(i-1) ^ tau == w(i-2) ^ w(i-1) */ /*must be w(i-2) ~> w(i-1) */ - + bool d = true; //need to handle the case when w_i_p_1 is null Line l3 = get_sharing_line(*w_i_p_1, tau); @@ -261,15 +261,15 @@ namespace boost { ; } } - + } - } else { + } else { /*Case 2: - + w(i-1) |- w(i) ~> w(1+1) */ - - if ( w_i->second.second == tau_i.first + + if ( w_i->second.second == tau_i.first || w_i->second.second == tau_i.second ) { /*w(i) ^ w(i+1) < w(i) ^ tau*/ /*extension: w(i) |- tau -> w(i+1) */ w_i->second = tau_i; @@ -296,23 +296,23 @@ namespace boost { iter_d[w_i_m_1->first] = hlist->insert(w_i_p_1, *w_i_m_1); hlist->erase(w_i_m_1); } - - } - + + } + } - + } else { - + if ( b ) { /*Case 3: - + w(i-1) ~> w(i) |- w(i+1) */ bool c = false; if ( w_i_m_1 != w_end ) c = ( w_i_m_1->second.second == tau_i.first) || ( w_i_m_1->second.second == tau_i.second); - + if ( c ) { /*w(i-1) ^ w(i) < w(i) ^ tau*/ /* extension: w(i-1) -> tau |- w(i) */ if ( w_i_m_1 != w_end ) @@ -336,7 +336,7 @@ namespace boost { /*extension: w(i-1) -> w(i+1) |- w(i) |- tau -> w(i+2) */ iter w_i_p_2 = w_i_p_1; ++w_i_p_2; - + w_i_p_1->second = w_i->second; iter_d[i] = hlist->insert(w_i_p_2, make_pair(i, tau_i)); hlist->erase(w_i); @@ -344,16 +344,16 @@ namespace boost { iter_d[tau] = hlist->insert(w_i_p_2, make_pair(tau, l2)); } } - + } else { /*Case 4: - + w(i-1) ~> w(i) ~> w(i+1) - + */ bool c = false; if ( w_i_m_1 != w_end ) { - c = (w_i_m_1->second.second == tau_i.first) + c = (w_i_m_1->second.second == tau_i.first) || (w_i_m_1->second.second == tau_i.second); } if ( c ) { /*w(i-1) ^ w(i) < w(i) ^ tau */ @@ -361,48 +361,48 @@ namespace boost { if ( w_i_m_1 != w_end ) w_i_m_1->second = get_sharing_line(*w_i_m_1, tau); iter_d[tau] = hlist->insert(w_i, make_pair(tau, tau_i)); - } else { + } else { /*extension: w(i) |- tau -> w(i+1) */ w_i->second = tau_i; Line l1; l1.first = SAW_SENTINAL; l1.second = SAW_SENTINAL; - if ( w_i_p_1 != w_end ) + if ( w_i_p_1 != w_end ) l1 = get_sharing_line(*w_i_p_1, tau); iter_d[tau] = hlist->insert(w_i_p_1, make_pair(tau, l1)); } } - + } return true; } - + protected: TriangleDecorator td; /*a decorator for vertex*/ HList hlist; /*This must be a handle of list to record the SAW The element type of the list is pair */ - - IteratorD iter_d; + + IteratorD iter_d; /*Problem statement: Need a fast access to w for triangle i. - *Possible solution: mantain an array to record. - iter_d[i] will return an iterator + *Possible solution: mantain an array to record. + iter_d[i] will return an iterator which points to w(i), where i is a vertex representing triangle i. */ }; template - inline + inline SAW_visitor visit_SAW(Triangle t, HList hl, Iterator i) { return SAW_visitor(t, hl, i); } template - inline + inline SAW_visitor< random_access_iterator_property_map, HList, random_access_iterator_property_map > visit_SAW_ptr(Tri* t, HList hl, Iter* i) { @@ -412,7 +412,7 @@ namespace boost { } // should also have combo's of pointers, and also const :( - + } #endif /*BOOST_SAW_H*/ diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/detail/mpi_process_group.ipp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/detail/mpi_process_group.ipp index 75a02fe2..a4d35462 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/detail/mpi_process_group.ipp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/detail/mpi_process_group.ipp @@ -40,7 +40,7 @@ namespace boost { namespace graph { namespace distributed { struct mpi_process_group::impl { - + typedef mpi_process_group::message_header message_header; typedef mpi_process_group::outgoing_messages outgoing_messages; @@ -71,7 +71,7 @@ struct mpi_process_group::impl std::size_t batch_header_number; std::size_t batch_buffer_size; std::size_t batch_message_size; - + /** * The actual MPI communicator used to transmit data. */ @@ -90,19 +90,19 @@ struct mpi_process_group::impl /// The numbers of processors that have entered a synchronization stage std::vector processors_synchronizing_stage; - + /// The synchronization stage of a processor std::vector synchronizing_stage; /// Number of processors still sending messages std::vector synchronizing_unfinished; - + /// Number of batches sent since last synchronization stage std::vector number_sent_batches; - + /// Number of batches received minus number of expected batches std::vector number_received_batches; - + /// The context of the currently-executing trigger, or @c trc_none /// if no trigger is executing. @@ -124,7 +124,7 @@ struct mpi_process_group::impl /// The MPI requests for posted sends of oob messages std::vector requests; - + /// The MPI buffers for posted irecvs of oob messages std::map buffers; @@ -144,14 +144,14 @@ struct mpi_process_group::impl std::stack free_batches; void free_sent_batches(); - + // Tag allocator detail::tag_allocator allocated_tags; impl(std::size_t num_headers, std::size_t buffers_size, communicator_type parent_comm); ~impl(); - + private: void set_batch_size(std::size_t header_num, std::size_t buffer_sz); }; @@ -175,7 +175,7 @@ mpi_process_group::send_impl(int dest, int tag, const T& value, header.source = process_id(*this); header.tag = tag; header.offset = outgoing.buffer.size(); - + boost::mpi::packed_oarchive oa(impl_->comm, outgoing.buffer); oa << value; @@ -237,7 +237,7 @@ send(const mpi_process_group& pg, mpi_process_group::process_id_type dest, int tag, const T values[], std::size_t n) { pg.send_impl(dest, pg.encode_tag(pg.my_block_number(), tag), - boost::serialization::make_array(values,n), + boost::serialization::make_array(values,n), boost::mpl::true_()); } @@ -279,7 +279,7 @@ typename disable_if, void>::type send(const mpi_process_group& pg, mpi_process_group::process_id_type dest, int tag, const T values[], std::size_t n) { - pg.array_send_impl(dest, pg.encode_tag(pg.my_block_number(), tag), + pg.array_send_impl(dest, pg.encode_tag(pg.my_block_number(), tag), values, n); } @@ -316,7 +316,7 @@ mpi_process_group::receive_impl(int source, int tag, T& value, // Unpack the data if (header->bytes > 0) { - boost::mpi::packed_iarchive ia(impl_->comm, incoming.buffer, + boost::mpi::packed_iarchive ia(impl_->comm, incoming.buffer, archive::no_header, header->offset); ia >> value; } @@ -364,7 +364,7 @@ mpi_process_group::receive_impl(int source, int tag, T& value, if (header == incoming.headers.end()) return false; // Deserialize the data - boost::mpi::packed_iarchive in(impl_->comm, incoming.buffer, + boost::mpi::packed_iarchive in(impl_->comm, incoming.buffer, archive::no_header, header->offset); in >> value; @@ -411,7 +411,7 @@ array_receive_impl(int source, int tag, T* values, std::size_t& n) const if (header == incoming.headers.end()) return false; // Deserialize the data - boost::mpi::packed_iarchive in(impl_->comm, incoming.buffer, + boost::mpi::packed_iarchive in(impl_->comm, incoming.buffer, archive::no_header, header->offset); std::size_t num_sent; in >> num_sent; @@ -455,7 +455,7 @@ template void mpi_process_group::trigger(int tag, const Handler& handler) { BOOST_ASSERT(block_num); - install_trigger(tag,my_block_number(),std::shared_ptr( + install_trigger(tag,my_block_number(),shared_ptr( new trigger_launcher(*this, tag, handler))); } @@ -463,28 +463,28 @@ template void mpi_process_group::trigger_with_reply(int tag, const Handler& handler) { BOOST_ASSERT(block_num); - install_trigger(tag,my_block_number(),std::shared_ptr( + install_trigger(tag,my_block_number(),shared_ptr( new reply_trigger_launcher(*this, tag, handler))); } template -void mpi_process_group::global_trigger(int tag, const Handler& handler, +void mpi_process_group::global_trigger(int tag, const Handler& handler, std::size_t sz) { if (sz==0) // normal trigger - install_trigger(tag,0,std::shared_ptr( + install_trigger(tag,0,shared_ptr( new global_trigger_launcher(*this, tag, handler))); else // trigger with irecv - install_trigger(tag,0,std::shared_ptr( + install_trigger(tag,0,shared_ptr( new global_irecv_trigger_launcher(*this, tag, handler,sz))); - + } namespace detail { template void do_oob_receive(mpi_process_group const& self, - int source, int tag, Type& data, mpl::true_ /*is_mpi_datatype*/) + int source, int tag, Type& data, mpl::true_ /*is_mpi_datatype*/) { using boost::mpi::get_mpi_datatype; @@ -495,7 +495,7 @@ void do_oob_receive(mpi_process_group const& self, template void do_oob_receive(mpi_process_group const& self, - int source, int tag, Type& data, mpl::false_ /*is_mpi_datatype*/) + int source, int tag, Type& data, mpl::false_ /*is_mpi_datatype*/) { // self.impl_->comm.recv(source,tag,data); // Receive the size of the data packet @@ -521,7 +521,7 @@ void do_oob_receive(mpi_process_group const& self, } template -void do_oob_receive(mpi_process_group const& self, int source, int tag, Type& data) +void do_oob_receive(mpi_process_group const& self, int source, int tag, Type& data) { do_oob_receive(self, source, tag, data, boost::mpi::is_mpi_datatype()); @@ -532,13 +532,13 @@ void do_oob_receive(mpi_process_group const& self, int source, int tag, Type& da template -void +void mpi_process_group::trigger_launcher:: -receive(mpi_process_group const&, int source, int tag, +receive(mpi_process_group const&, int source, int tag, trigger_receive_context context, int block) const { #ifdef PBGL_PROCESS_GROUP_DEBUG - std::cerr << (out_of_band? "OOB trigger" : "Trigger") + std::cerr << (out_of_band? "OOB trigger" : "Trigger") << " receive from source " << source << " and tag " << tag << " in block " << (block == -1 ? self.my_block_number() : block) << std::endl; #endif @@ -560,13 +560,13 @@ receive(mpi_process_group const&, int source, int tag, } template -void +void mpi_process_group::reply_trigger_launcher:: -receive(mpi_process_group const&, int source, int tag, +receive(mpi_process_group const&, int source, int tag, trigger_receive_context context, int block) const { #ifdef PBGL_PROCESS_GROUP_DEBUG - std::cerr << (out_of_band? "OOB reply trigger" : "Reply trigger") + std::cerr << (out_of_band? "OOB reply trigger" : "Reply trigger") << " receive from source " << source << " and tag " << tag << " in block " << (block == -1 ? self.my_block_number() : block) << std::endl; #endif @@ -581,18 +581,18 @@ receive(mpi_process_group const&, int source, int tag, // Pass the message off to the handler and send the result back to // the source. - send_oob(self, source, data.first, + send_oob(self, source, data.first, handler(source, tag, data.second, context), -2); } template -void +void mpi_process_group::global_trigger_launcher:: -receive(mpi_process_group const& self, int source, int tag, +receive(mpi_process_group const& self, int source, int tag, trigger_receive_context context, int block) const { #ifdef PBGL_PROCESS_GROUP_DEBUG - std::cerr << (out_of_band? "OOB trigger" : "Trigger") + std::cerr << (out_of_band? "OOB trigger" : "Trigger") << " receive from source " << source << " and tag " << tag << " in block " << (block == -1 ? self.my_block_number() : block) << std::endl; #endif @@ -615,13 +615,13 @@ receive(mpi_process_group const& self, int source, int tag, template -void +void mpi_process_group::global_irecv_trigger_launcher:: -receive(mpi_process_group const& self, int source, int tag, +receive(mpi_process_group const& self, int source, int tag, trigger_receive_context context, int block) const { #ifdef PBGL_PROCESS_GROUP_DEBUG - std::cerr << (out_of_band? "OOB trigger" : "Trigger") + std::cerr << (out_of_band? "OOB trigger" : "Trigger") << " receive from source " << source << " and tag " << tag << " in block " << (block == -1 ? self.my_block_number() : block) << std::endl; #endif @@ -644,12 +644,12 @@ receive(mpi_process_group const& self, int source, int tag, template -void +void mpi_process_group::global_irecv_trigger_launcher:: prepare_receive(mpi_process_group const& self, int tag, bool force) const { #ifdef PBGL_PROCESS_GROUP_DEBUG - std::cerr << ("Posting Irecv for trigger") + std::cerr << ("Posting Irecv for trigger") << " receive with tag " << tag << std::endl; #endif if (self.impl_->buffers.find(tag) == self.impl_->buffers.end()) { @@ -657,7 +657,7 @@ prepare_receive(mpi_process_group const& self, int tag, bool force) const force = true; } BOOST_ASSERT(static_cast(self.impl_->buffers[tag].size()) >= buffer_size); - + //BOOST_MPL_ASSERT(mpl::not_ >); if (force) { self.impl_->requests.push_back(MPI_Request()); @@ -681,8 +681,8 @@ receive(const mpi_process_group& pg, int tag, T& value) } template -typename - enable_if, +typename + enable_if, std::pair >::type receive(const mpi_process_group& pg, int tag, T values[], std::size_t n) { @@ -691,15 +691,15 @@ receive(const mpi_process_group& pg, int tag, T values[], std::size_t n) pg.receive_impl(source, pg.encode_tag(pg.my_block_number(), tag), boost::serialization::make_array(values,n), boost::mpl::true_()); - if (result) + if (result) return std::make_pair(source, n); } BOOST_ASSERT(false); } template -typename - disable_if, +typename + disable_if, std::pair >::type receive(const mpi_process_group& pg, int tag, T values[], std::size_t n) { @@ -730,14 +730,14 @@ receive(const mpi_process_group& pg, } template -typename - enable_if, +typename + enable_if, std::pair >::type -receive(const mpi_process_group& pg, int source, int tag, T values[], +receive(const mpi_process_group& pg, int source, int tag, T values[], std::size_t n) { if (pg.receive_impl(source, pg.encode_tag(pg.my_block_number(), tag), - boost::serialization::make_array(values,n), + boost::serialization::make_array(values,n), boost::mpl::true_())) return std::make_pair(source,n); else { @@ -751,10 +751,10 @@ receive(const mpi_process_group& pg, int source, int tag, T values[], } template -typename - disable_if, +typename + disable_if, std::pair >::type -receive(const mpi_process_group& pg, int source, int tag, T values[], +receive(const mpi_process_group& pg, int source, int tag, T values[], std::size_t n) { pg.array_receive_impl(source, pg.encode_tag(pg.my_block_number(), tag), @@ -775,7 +775,7 @@ all_reduce(const mpi_process_group& pg, T* first, T* last, T* out, if (inplace) out = new T [last-first]; boost::mpi::all_reduce(boost::mpi::communicator(communicator(pg), - boost::mpi::comm_attach), + boost::mpi::comm_attach), first, last-first, out, bin_op); if (inplace) { @@ -789,10 +789,10 @@ all_reduce(const mpi_process_group& pg, T* first, T* last, T* out, template void -broadcast(const mpi_process_group& pg, T& val, +broadcast(const mpi_process_group& pg, T& val, mpi_process_group::process_id_type root) { - // broadcast the seed + // broadcast the seed boost::mpi::communicator comm(communicator(pg),boost::mpi::comm_attach); boost::mpi::broadcast(comm,val,root); } @@ -914,7 +914,7 @@ Receiver* mpi_process_group::get_receiver() template typename enable_if >::type -receive_oob(const mpi_process_group& pg, +receive_oob(const mpi_process_group& pg, mpi_process_group::process_id_type source, int tag, T& value, int block) { using boost::mpi::get_mpi_datatype; @@ -926,8 +926,8 @@ receive_oob(const mpi_process_group& pg, // Post a non-blocking receive that waits until we complete this request. MPI_Request request; - MPI_Irecv(&value, 1, get_mpi_datatype(value), - source, actual.second, actual.first, &request); + MPI_Irecv(&value, 1, get_mpi_datatype(value), + source, actual.second, actual.first, &request); int done = 0; do { @@ -939,7 +939,7 @@ receive_oob(const mpi_process_group& pg, template typename disable_if >::type -receive_oob(const mpi_process_group& pg, +receive_oob(const mpi_process_group& pg, mpi_process_group::process_id_type source, int tag, T& value, int block) { // Determine the actual message we expect to receive, and which @@ -967,11 +967,11 @@ receive_oob(const mpi_process_group& pg, MPI_Get_count(&mpi_status, MPI_PACKED, &size); in.resize(size); #endif - + // Receive the message data MPI_Recv(in.address(), in.size(), MPI_PACKED, status->source(), status->tag(), actual.first, MPI_STATUS_IGNORE); - + // Unpack the message data in >> value; } @@ -979,7 +979,7 @@ receive_oob(const mpi_process_group& pg, template typename enable_if >::type -send_oob_with_reply(const mpi_process_group& pg, +send_oob_with_reply(const mpi_process_group& pg, mpi_process_group::process_id_type dest, int tag, const SendT& send_value, ReplyT& reply_value, int block) @@ -992,14 +992,14 @@ send_oob_with_reply(const mpi_process_group& pg, template typename disable_if >::type -send_oob_with_reply(const mpi_process_group& pg, +send_oob_with_reply(const mpi_process_group& pg, mpi_process_group::process_id_type dest, int tag, const SendT& send_value, ReplyT& reply_value, int block) { detail::tag_allocator::token reply_tag = pg.impl_->allocated_tags.get_tag(); - send_oob(pg, dest, tag, - boost::parallel::detail::make_untracked_pair((int)reply_tag, + send_oob(pg, dest, tag, + boost::parallel::detail::make_untracked_pair((int)reply_tag, send_value), block); receive_oob(pg, dest, reply_tag, reply_value); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/mpi_process_group.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/mpi_process_group.hpp index 57bbfbbc..e0ee5790 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/mpi_process_group.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/mpi_process_group.hpp @@ -20,7 +20,7 @@ #define SEND_OOB_BSEND #include -#include +#include #include #include #include @@ -48,7 +48,7 @@ class mpi_process_group * The type of a "receive" handler, that will be provided with * (source, tag) pairs when a message is received. Users can provide a * receive handler for a distributed data structure, for example, to - * automatically pick up and respond to messages as needed. + * automatically pick up and respond to messages as needed. */ typedef function receiver_type; @@ -75,7 +75,7 @@ class mpi_process_group /// Classification of the capabilities of this process group struct communication_category - : virtual parallel::bsp_process_group_tag, + : virtual parallel::bsp_process_group_tag, virtual mpi_process_group_tag { }; // TBD: We can eliminate the "source" field and possibly the @@ -92,7 +92,7 @@ class mpi_process_group /// The length of the message in the buffer, in bytes std::size_t bytes; - + template void serialize(Archive& ar, int) { @@ -113,14 +113,14 @@ class mpi_process_group std::vector headers; buffer_type buffer; - + template void serialize(Archive& ar, int) { ar & headers & buffer; } - - void swap(outgoing_messages& x) + + void swap(outgoing_messages& x) { headers.swap(x.headers); buffer.swap(x.buffer); @@ -137,21 +137,21 @@ private: public: explicit trigger_base(int tag) : tag_(tag) { } - /// Retrieve the tag associated with this trigger + /// Retrieve the tag associated with this trigger int tag() const { return tag_; } virtual ~trigger_base() { } /** - * Invoked to receive a message that matches a particular trigger. + * Invoked to receive a message that matches a particular trigger. * * @param source the source of the message * @param tag the (local) tag of the message * @param context the context under which the trigger is being * invoked */ - virtual void - receive(mpi_process_group const& pg, int source, int tag, + virtual void + receive(mpi_process_group const& pg, int source, int tag, trigger_receive_context context, int block=-1) const = 0; protected: @@ -162,19 +162,19 @@ private: /** * Launches a specific handler in response to a trigger. This * function object wraps up the handler function object and a buffer - * for incoming data. + * for incoming data. */ template class trigger_launcher : public trigger_base { public: - explicit trigger_launcher(mpi_process_group& self, int tag, - const Handler& handler) - : trigger_base(tag), self(self), handler(handler) + explicit trigger_launcher(mpi_process_group& self, int tag, + const Handler& handler) + : trigger_base(tag), self(self), handler(handler) {} - void - receive(mpi_process_group const& pg, int source, int tag, + void + receive(mpi_process_group const& pg, int source, int tag, trigger_receive_context context, int block=-1) const; private: @@ -191,13 +191,13 @@ private: class reply_trigger_launcher : public trigger_base { public: - explicit reply_trigger_launcher(mpi_process_group& self, int tag, - const Handler& handler) - : trigger_base(tag), self(self), handler(handler) + explicit reply_trigger_launcher(mpi_process_group& self, int tag, + const Handler& handler) + : trigger_base(tag), self(self), handler(handler) {} - void - receive(mpi_process_group const& pg, int source, int tag, + void + receive(mpi_process_group const& pg, int source, int tag, trigger_receive_context context, int block=-1) const; private: @@ -209,14 +209,14 @@ private: class global_trigger_launcher : public trigger_base { public: - explicit global_trigger_launcher(mpi_process_group& self, int tag, - const Handler& handler) - : trigger_base(tag), handler(handler) - { + explicit global_trigger_launcher(mpi_process_group& self, int tag, + const Handler& handler) + : trigger_base(tag), handler(handler) + { } - void - receive(mpi_process_group const& pg, int source, int tag, + void + receive(mpi_process_group const& pg, int source, int tag, trigger_receive_context context, int block=-1) const; private: @@ -229,15 +229,15 @@ private: class global_irecv_trigger_launcher : public trigger_base { public: - explicit global_irecv_trigger_launcher(mpi_process_group& self, int tag, - const Handler& handler, int sz) + explicit global_irecv_trigger_launcher(mpi_process_group& self, int tag, + const Handler& handler, int sz) : trigger_base(tag), handler(handler), buffer_size(sz) - { + { prepare_receive(self,tag); } - void - receive(mpi_process_group const& pg, int source, int tag, + void + receive(mpi_process_group const& pg, int source, int tag, trigger_receive_context context, int block=-1) const; private: @@ -249,32 +249,32 @@ private: }; public: - /** + /** * Construct a new BSP process group from an MPI communicator. The * MPI communicator will be duplicated to create a new communicator * for this process group to use. */ mpi_process_group(communicator_type parent_comm = communicator_type()); - /** + /** * Construct a new BSP process group from an MPI communicator. The * MPI communicator will be duplicated to create a new communicator * for this process group to use. This constructor allows to tune the * size of message batches. - * + * * @param num_headers The maximum number of headers in a message batch * * @param buffer_size The maximum size of the message buffer in a batch. * */ - mpi_process_group( std::size_t num_headers, std::size_t buffer_size, + mpi_process_group( std::size_t num_headers, std::size_t buffer_size, communicator_type parent_comm = communicator_type()); /** * Construct a copy of the BSP process group for a new distributed * data structure. This data structure will synchronize with all * other members of the process group's equivalence class (including - * @p other), but will have its own set of tags. + * @p other), but will have its own set of tags. * * @param other The process group that this new process group will * be based on, using a different set of tags within the same @@ -296,9 +296,9 @@ public: * Construct a copy of the BSP process group for a new distributed * data structure. This data structure will synchronize with all * other members of the process group's equivalence class (including - * @p other), but will have its own set of tags. + * @p other), but will have its own set of tags. */ - mpi_process_group(const mpi_process_group& other, + mpi_process_group(const mpi_process_group& other, attach_distributed_object, bool out_of_band_receive = false); @@ -335,7 +335,7 @@ public: void replace_on_synchronize_handler(const on_synchronize_event_type& handler = 0); - /** + /** * Return the block number of the current data structure. A value of * 0 indicates that this particular instance of the process group is * not associated with any distributed data structure. @@ -350,7 +350,7 @@ public: { return block_num * max_tags + tag; } /** - * Decode an encoded tag into a block number/tag pair. + * Decode an encoded tag into a block number/tag pair. */ std::pair decode_tag(int encoded_tag) const { return std::make_pair(encoded_tag / max_tags, encoded_tag % max_tags); } @@ -366,13 +366,13 @@ public: */ int allocate_block(bool out_of_band_receive = false); - /** Potentially emit a receive event out of band. Returns true if an event - * was actually sent, false otherwise. + /** Potentially emit a receive event out of band. Returns true if an event + * was actually sent, false otherwise. */ bool maybe_emit_receive(int process, int encoded_tag) const; /** Emit a receive event. Returns true if an event was actually - * sent, false otherwise. + * sent, false otherwise. */ bool emit_receive(int process, int encoded_tag) const; @@ -450,7 +450,7 @@ public: void trigger_with_reply(int tag, const Handler& handler); template - void global_trigger(int tag, const Handler& handler, std::size_t buffer_size=0); + void global_trigger(int tag, const Handler& handler, std::size_t buffer_size=0); @@ -468,7 +468,7 @@ public: * @param synchronizing whether we are currently synchronizing the * process group */ - optional > + optional > poll(bool wait = false, int block = -1, bool synchronizing = false) const; /** @@ -489,11 +489,11 @@ public: /// /// Determine the actual communicator and tag will be used for a /// transmission with the given tag. - std::pair + std::pair actual_communicator_and_tag(int tag, int block) const; /// set the size of the message buffer used for buffered oob sends - + static void set_message_buffer_size(std::size_t s); /// get the size of the message buffer used for buffered oob sends @@ -503,12 +503,12 @@ public: static void* old_buffer; private: - void install_trigger(int tag, int block, - std::shared_ptr const& launcher); + void install_trigger(int tag, int block, + shared_ptr const& launcher); void poll_requests(int block=-1) const; - + // send a batch if the buffer is full now or would get full void maybe_send_batch(process_id_type dest) const; @@ -527,7 +527,7 @@ private: void receive_batch(boost::mpi::status& status) const; //void free_finished_sends() const; - + /// Status messages used internally by the process group enum status_messages { /// the first of the reserved message tags @@ -557,13 +557,13 @@ private: /// Handler for receive events receiver_type on_receive; - /// Handler executed at the start of synchronization + /// Handler executed at the start of synchronization on_synchronize_event_type on_synchronize; /// Individual message triggers. Note: at present, this vector is /// indexed by the (local) tag of the trigger. Any tags that /// don't have triggers will have NULL pointers in that spot. - std::vector > triggers; + std::vector > triggers; }; /** @@ -581,7 +581,7 @@ private: * @c block_num. */ struct deallocate_block; - + static std::vector message_buffer; public: @@ -589,17 +589,17 @@ public: * Data associated with the process group and all of its attached * distributed data structures. */ - std::shared_ptr impl_; + shared_ptr impl_; /** * When non-null, indicates that this copy of the process group is * associated with a particular distributed data structure. The * integer value contains the block number (a value > 0) associated - * with that data structure. The deleter for this @c std::shared_ptr is a + * with that data structure. The deleter for this @c shared_ptr is a * @c deallocate_block object that will deallocate the associated * block in @c impl_->blocks. */ - std::shared_ptr block_num; + shared_ptr block_num; /** * Rank of this process, to avoid having to call rank() repeatedly. @@ -615,11 +615,11 @@ public: -inline mpi_process_group::process_id_type +inline mpi_process_group::process_id_type process_id(const mpi_process_group& pg) { return pg.rank; } -inline mpi_process_group::process_size_type +inline mpi_process_group::process_size_type num_processes(const mpi_process_group& pg) { return pg.size; } @@ -683,7 +683,7 @@ process_subgroup(const mpi_process_group& pg, template void -broadcast(const mpi_process_group& pg, T& val, +broadcast(const mpi_process_group& pg, T& val, mpi_process_group::process_id_type root); @@ -705,15 +705,15 @@ send_oob(const mpi_process_group& pg, mpi_process_group::process_id_type dest, #ifdef SEND_OOB_BSEND if (mpi_process_group::message_buffer_size()) { - MPI_Bsend(const_cast(&value), 1, get_mpi_datatype(value), dest, + MPI_Bsend(const_cast(&value), 1, get_mpi_datatype(value), dest, actual.second, actual.first); return; } #endif MPI_Request request; - MPI_Isend(const_cast(&value), 1, get_mpi_datatype(value), dest, + MPI_Isend(const_cast(&value), 1, get_mpi_datatype(value), dest, actual.second, actual.first, &request); - + int done=0; do { pg.poll(); @@ -759,24 +759,24 @@ send_oob(const mpi_process_group& pg, mpi_process_group::process_id_type dest, template typename enable_if >::type -receive_oob(const mpi_process_group& pg, +receive_oob(const mpi_process_group& pg, mpi_process_group::process_id_type source, int tag, T& value, int block=-1); template typename disable_if >::type -receive_oob(const mpi_process_group& pg, +receive_oob(const mpi_process_group& pg, mpi_process_group::process_id_type source, int tag, T& value, int block=-1); template typename enable_if >::type -send_oob_with_reply(const mpi_process_group& pg, +send_oob_with_reply(const mpi_process_group& pg, mpi_process_group::process_id_type dest, int tag, const SendT& send_value, ReplyT& reply_value, int block = -1); template typename disable_if >::type -send_oob_with_reply(const mpi_process_group& pg, +send_oob_with_reply(const mpi_process_group& pg, mpi_process_group::process_id_type dest, int tag, const SendT& send_value, ReplyT& reply_value, int block = -1); @@ -791,7 +791,7 @@ namespace boost { namespace mpi { namespace std { /// optimized swap for outgoing messages -inline void +inline void swap(boost::graph::distributed::mpi_process_group::outgoing_messages& x, boost::graph::distributed::mpi_process_group::outgoing_messages& y) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/queue.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/queue.hpp index e79c46ed..7e84272a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/queue.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/queue.hpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include namespace boost { namespace graph { namespace distributed { @@ -213,12 +213,12 @@ class distributed_queue void setup_triggers(); // Message handlers - void - handle_push(int source, int tag, const value_type& value, + void + handle_push(int source, int tag, const value_type& value, trigger_receive_context); - void - handle_multipush(int source, int tag, const std::vector& values, + void + handle_multipush(int source, int tag, const std::vector& values, trigger_receive_context); mutable ProcessGroup process_group; @@ -229,7 +229,7 @@ class distributed_queue typedef std::vector outgoing_buffer_t; typedef std::vector outgoing_buffers_t; - std::shared_ptr outgoing_buffers; + shared_ptr outgoing_buffers; }; /// Helper macro containing the normal names for the template diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/rmat_graph_generator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/rmat_graph_generator.hpp index 261794d8..dec8250d 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/rmat_graph_generator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/rmat_graph_generator.hpp @@ -25,7 +25,7 @@ namespace boost { // requires an MPI process group. Run-time is slightly worse than // the unique rmat generator. Edge list generated is sorted and // unique. - template class scalable_rmat_iterator { @@ -47,8 +47,8 @@ namespace boost { // Initialize for edge generation scalable_rmat_iterator(ProcessGroup pg, Distribution distrib, - RandomGenerator& gen, vertices_size_type n, - edges_size_type m, double a, double b, double c, + RandomGenerator& gen, vertices_size_type n, + edges_size_type m, double a, double b, double c, double d, bool permute_vertices = true) : gen(), done(false) { @@ -58,12 +58,12 @@ namespace boost { this->gen.reset(new uniform_01(gen)); std::vector vertexPermutation; - if (permute_vertices) + if (permute_vertices) generate_permutation_vector(gen, vertexPermutation, n); int SCALE = int(floor(log(double(n))/log(2.))); boost::uniform_01 prob(gen); - + std::map edge_map; edges_size_type generated = 0, local_edges = 0; @@ -121,13 +121,13 @@ namespace boost { reference operator*() const { return current; } pointer operator->() const { return ¤t; } - + scalable_rmat_iterator& operator++() { if (!values.empty()) { current = values.back(); values.pop_back(); - } else + } else done = true; return *this; @@ -151,7 +151,7 @@ namespace boost { private: // Parameters - std::shared_ptr > gen; + shared_ptr > gen; // Internal data structures std::vector values; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/vertex_list_adaptor.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/vertex_list_adaptor.hpp index 1d7f9502..8928479a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/vertex_list_adaptor.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/distributed/vertex_list_adaptor.hpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include @@ -25,9 +25,9 @@ namespace boost { namespace graph { // -------------------------------------------------------------------------- -// Global index map built from a distribution +// Global index map built from a distribution // -------------------------------------------------------------------------- -template class distribution_global_index_map { @@ -47,16 +47,16 @@ class distribution_global_index_map LocalPropertyMap local; }; -template -inline +inline typename distribution_global_index_map::value_type get(const distribution_global_index_map& p, typename distribution_global_index_map::key_type x) -{ +{ using boost::get; return p.distribution_.global(get(p.owner, x), get(p.local, x)); } @@ -64,15 +64,15 @@ get(const distribution_global_index_map inline distribution_global_index_map< - Distribution, + Distribution, typename property_map::const_type, typename property_map::const_type> make_distribution_global_index_map(const Graph& g, const Distribution& d) { typedef distribution_global_index_map< - Distribution, + Distribution, typename property_map::const_type, - typename property_map::const_type> + typename property_map::const_type> result_type; return result_type(d, get(vertex_owner, g), get(vertex_local, g)); } @@ -86,7 +86,7 @@ class stored_global_index_map : public IndexMap public: typedef readable_property_map_tag category; - stored_global_index_map(const IndexMap& index_map) : IndexMap(index_map) { + stored_global_index_map(const IndexMap& index_map) : IndexMap(index_map) { // When we have a global index, we need to always have the indices // of every key we've seen this->set_max_ghost_cells(0); @@ -98,13 +98,13 @@ class stored_global_index_map : public IndexMap // -------------------------------------------------------------------------- namespace detail { template - inline void - initialize_global_index_map(const PropertyMap&, - ForwardIterator, ForwardIterator) + inline void + initialize_global_index_map(const PropertyMap&, + ForwardIterator, ForwardIterator) { } template - void + void initialize_global_index_map(stored_global_index_map& p, ForwardIterator first, ForwardIterator last) { @@ -126,18 +126,18 @@ class vertex_list_adaptor : public graph_traits typedef graph_traits inherited; typedef typename inherited::traversal_category base_traversal_category; - + public: typedef typename inherited::vertex_descriptor vertex_descriptor; typedef typename std::vector::iterator vertex_iterator; typedef typename std::vector::size_type vertices_size_type; - struct traversal_category + struct traversal_category : public virtual base_traversal_category, public virtual vertex_list_graph_tag {}; - vertex_list_adaptor(const Graph& g, + vertex_list_adaptor(const Graph& g, const GlobalIndexMap& index_map = GlobalIndexMap()) : g(&g), index_map(index_map) { @@ -146,7 +146,7 @@ class vertex_list_adaptor : public graph_traits all_vertices_.reset(new std::vector()); all_gather(process_group(), vertices(g).first, vertices(g).second, *all_vertices_); - detail::initialize_global_index_map(this->index_map, + detail::initialize_global_index_map(this->index_map, all_vertices_->begin(), all_vertices_->end()); } @@ -156,13 +156,13 @@ class vertex_list_adaptor : public graph_traits // -------------------------------------------------------------------------- // Distributed Container // -------------------------------------------------------------------------- - typedef typename boost::graph::parallel::process_group_type::type + typedef typename boost::graph::parallel::process_group_type::type process_group_type; - process_group_type process_group() const - { + process_group_type process_group() const + { using boost::graph::parallel::process_group; - return process_group(*g); + return process_group(*g); } std::pair vertices() const @@ -175,7 +175,7 @@ class vertex_list_adaptor : public graph_traits private: const Graph* g; GlobalIndexMap index_map; - std::shared_ptr > all_vertices_; + shared_ptr > all_vertices_; }; template @@ -197,18 +197,18 @@ namespace detail { } template -inline -vertex_list_adaptor::type> make_vertex_list_adaptor(const Graph& g) -{ - typedef typename detail::default_global_index_map::type +{ + typedef typename detail::default_global_index_map::type GlobalIndexMap; typedef typename detail::default_global_index_map::distributed_map DistributedMap; typedef vertex_list_adaptor result_type; - return result_type(g, - GlobalIndexMap(DistributedMap(num_vertices(g), + return result_type(g, + GlobalIndexMap(DistributedMap(num_vertices(g), get(vertex_index, g)))); } @@ -375,7 +375,7 @@ namespace boost { // Property Graph: vertex_index property // -------------------------------------------------------------------------- template -class property_map > { public: @@ -384,7 +384,7 @@ public: }; template -class property_map > { public: diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/erdos_renyi_generator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/erdos_renyi_generator.hpp index d90ba36a..5be06d79 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/erdos_renyi_generator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/erdos_renyi_generator.hpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -31,7 +31,7 @@ namespace boost { std::pair::vertices_size_type, typename graph_traits::vertices_size_type>, std::input_iterator_tag, - const + const std::pair::vertices_size_type, typename graph_traits::vertices_size_type>&> { @@ -97,7 +97,7 @@ namespace boost { std::pair::vertices_size_type, typename graph_traits::vertices_size_type>, std::input_iterator_tag, - const + const std::pair::vertices_size_type, typename graph_traits::vertices_size_type>&> { @@ -181,7 +181,7 @@ namespace boost { if (src == n) src = (std::numeric_limits::max)(); } - std::shared_ptr > gen; + shared_ptr > gen; geometric_distribution rand_vertex; vertices_size_type n; bool allow_self_loops; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/gursoy_atun_layout.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/gursoy_atun_layout.hpp index 62587f9e..9269c4b0 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/gursoy_atun_layout.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/gursoy_atun_layout.hpp @@ -26,13 +26,13 @@ #include #include #include -#include +#include #include #include #include #include -namespace boost { +namespace boost { namespace detail { @@ -62,12 +62,12 @@ struct update_position_visitor { double distance_limit, double learning_constant, double falloff_ratio): - position_map(position_map), node_distance(node_distance), + position_map(position_map), node_distance(node_distance), space(space), input_vector(input_vector), distance_limit(distance_limit), learning_constant(learning_constant), falloff_ratio(falloff_ratio) {} - void operator()(vertex_descriptor v, const Graph&) const + void operator()(vertex_descriptor v, const Graph&) const { #ifndef BOOST_NO_STDC_NAMESPACE using std::pow; @@ -77,7 +77,7 @@ struct update_position_visitor { BOOST_THROW_EXCEPTION(over_distance_limit()); Point old_position = get(position_map, v); double distance = get(node_distance, v); - double fraction = + double fraction = learning_constant * pow(falloff_ratio, distance * distance); put(position_map, v, space.move_position_toward(old_position, fraction, input_vector)); @@ -88,7 +88,7 @@ template struct gursoy_shortest { template - static inline void + static inline void run(const Graph& g, typename graph_traits::vertex_descriptor s, NodeDistanceMap node_distance, UpdatePosition& update_position, EdgeWeightMap weight) @@ -104,7 +104,7 @@ template<> struct gursoy_shortest { template - static inline void + static inline void run(const Graph& g, typename graph_traits::vertex_descriptor s, NodeDistanceMap node_distance, UpdatePosition& update_position, dummy_property_map) @@ -119,11 +119,11 @@ struct gursoy_shortest } // namespace detail template -void +void gursoy_atun_step - (const VertexListAndIncidenceGraph& graph, + (const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position, Diameter diameter, @@ -143,21 +143,21 @@ gursoy_atun_step typedef typename Topology::point_type point_type; vertex_iterator i, iend; std::vector distance_from_input_vector(num_vertices(graph)); - typedef boost::iterator_property_map::iterator, + typedef boost::iterator_property_map::iterator, VertexIndexMap, double, double&> DistanceFromInputMap; DistanceFromInputMap distance_from_input(distance_from_input_vector.begin(), vertex_index_map); std::vector node_distance_map_vector(num_vertices(graph)); - typedef boost::iterator_property_map::iterator, + typedef boost::iterator_property_map::iterator, VertexIndexMap, double, double&> NodeDistanceMap; NodeDistanceMap node_distance(node_distance_map_vector.begin(), vertex_index_map); point_type input_vector = space.random_point(); - vertex_descriptor min_distance_loc + vertex_descriptor min_distance_loc = graph_traits::null_vertex(); double min_distance = 0.0; bool min_distance_unset = true; @@ -173,24 +173,24 @@ gursoy_atun_step BOOST_ASSERT (!min_distance_unset); // Graph must have at least one vertex boost::detail::update_position_visitor< PositionMap, NodeDistanceMap, Topology, - VertexListAndIncidenceGraph> + VertexListAndIncidenceGraph> update_position(position, node_distance, space, - input_vector, diameter, learning_constant, + input_vector, diameter, learning_constant, exp(-1. / (2 * diameter * diameter))); std::fill(node_distance_map_vector.begin(), node_distance_map_vector.end(), 0); try { typedef detail::gursoy_shortest shortest; shortest::run(graph, min_distance_loc, node_distance, update_position, - weight); - } catch (detail::over_distance_limit) { - /* Thrown to break out of BFS or Dijkstra early */ + weight); + } catch (detail::over_distance_limit) { + /* Thrown to break out of BFS or Dijkstra early */ } } template -void gursoy_atun_refine(const VertexListAndIncidenceGraph& graph, +void gursoy_atun_refine(const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position, int nsteps, @@ -199,7 +199,7 @@ void gursoy_atun_refine(const VertexListAndIncidenceGraph& graph, double learning_constant_initial, double learning_constant_final, VertexIndexMap vertex_index_map, - EdgeWeightMap weight) + EdgeWeightMap weight) { #ifndef BOOST_NO_STDC_NAMESPACE using std::pow; @@ -213,17 +213,17 @@ void gursoy_atun_refine(const VertexListAndIncidenceGraph& graph, typedef typename Topology::point_type point_type; vertex_iterator i, iend; double diameter_ratio = (double)diameter_final / diameter_initial; - double learning_constant_ratio = + double learning_constant_ratio = learning_constant_final / learning_constant_initial; std::vector distance_from_input_vector(num_vertices(graph)); - typedef boost::iterator_property_map::iterator, + typedef boost::iterator_property_map::iterator, VertexIndexMap, double, double&> DistanceFromInputMap; DistanceFromInputMap distance_from_input(distance_from_input_vector.begin(), vertex_index_map); std::vector node_distance_map_vector(num_vertices(graph)); - typedef boost::iterator_property_map::iterator, + typedef boost::iterator_property_map::iterator, VertexIndexMap, double, double&> NodeDistanceMap; NodeDistanceMap node_distance(node_distance_map_vector.begin(), @@ -231,17 +231,17 @@ void gursoy_atun_refine(const VertexListAndIncidenceGraph& graph, for (int round = 0; round < nsteps; ++round) { double part_done = (double)round / (nsteps - 1); int diameter = (int)(diameter_initial * pow(diameter_ratio, part_done)); - double learning_constant = + double learning_constant = learning_constant_initial * pow(learning_constant_ratio, part_done); - gursoy_atun_step(graph, space, position, diameter, learning_constant, + gursoy_atun_step(graph, space, position, diameter, learning_constant, vertex_index_map, weight); } } template -void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, +void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position, int nsteps, @@ -260,14 +260,14 @@ void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, } gursoy_atun_refine(graph, space, position, nsteps, - diameter_initial, diameter_final, + diameter_initial, diameter_final, learning_constant_initial, learning_constant_final, vertex_index_map, weight); } template -void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, +void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position, int nsteps, @@ -277,15 +277,15 @@ void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, double learning_constant_final, VertexIndexMap vertex_index_map) { - gursoy_atun_layout(graph, space, position, nsteps, - diameter_initial, diameter_final, - learning_constant_initial, learning_constant_final, + gursoy_atun_layout(graph, space, position, nsteps, + diameter_initial, diameter_final, + learning_constant_initial, learning_constant_final, vertex_index_map, dummy_property_map()); } template -void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, +void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position, int nsteps, @@ -293,15 +293,15 @@ void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, double diameter_final = 1.0, double learning_constant_initial = 0.8, double learning_constant_final = 0.2) -{ +{ gursoy_atun_layout(graph, space, position, nsteps, diameter_initial, diameter_final, learning_constant_initial, - learning_constant_final, get(vertex_index, graph)); + learning_constant_final, get(vertex_index, graph)); } template -void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, +void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position, int nsteps) @@ -310,13 +310,13 @@ void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, using std::sqrt; #endif - gursoy_atun_layout(graph, space, position, nsteps, + gursoy_atun_layout(graph, space, position, nsteps, sqrt((double)num_vertices(graph))); } template -void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, +void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position) { @@ -325,8 +325,8 @@ void gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, template -void -gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, +void +gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, const Topology& space, PositionMap position, const bgl_named_params& params) @@ -340,17 +340,17 @@ gursoy_atun_layout(const VertexListAndIncidenceGraph& graph, gursoy_atun_layout(graph, space, position, choose_param(get_param(params, iterations_t()), num_vertices(graph)), - choose_param(get_param(params, diameter_range_t()), + choose_param(get_param(params, diameter_range_t()), diam).first, - choose_param(get_param(params, diameter_range_t()), + choose_param(get_param(params, diameter_range_t()), diam).second, - choose_param(get_param(params, learning_constant_range_t()), + choose_param(get_param(params, learning_constant_range_t()), learn).first, - choose_param(get_param(params, learning_constant_range_t()), + choose_param(get_param(params, learning_constant_range_t()), learn).second, choose_const_pmap(get_param(params, vertex_index), graph, vertex_index), - choose_param(get_param(params, edge_weight), + choose_param(get_param(params, edge_weight), dummy_property_map())); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/incremental_components.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/incremental_components.hpp index 63a9b838..fff3a324 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/incremental_components.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/incremental_components.hpp @@ -46,11 +46,11 @@ namespace boost { // Algorithms", and the application to connected components is // similar to the algorithm described in Ch. 22 of "Intro to // Algorithms" by Cormen, et. all. - // + // // An implementation of disjoint sets can be found in // boost/pending/disjoint_sets.hpp - + template void incremental_components(EdgeListGraph& g, DisjointSets& ds) { @@ -58,35 +58,35 @@ namespace boost { for (boost::tie(e,end) = edges(g); e != end; ++e) ds.union_set(source(*e,g),target(*e,g)); } - + template void compress_components(ParentIterator first, ParentIterator last) { - for (ParentIterator current = first; current != last; ++current) + for (ParentIterator current = first; current != last; ++current) detail::find_representative_with_full_compression(first, current-first); } - + template typename boost::detail::iterator_traits::difference_type component_count(ParentIterator first, ParentIterator last) { std::ptrdiff_t count = 0; - for (ParentIterator current = first; current != last; ++current) - if (*current == current - first) ++count; + for (ParentIterator current = first; current != last; ++current) + if (*current == current - first) ++count; return count; } - + // This algorithm can be applied to the result container of the // connected_components algorithm to normalize // the components. template void normalize_components(ParentIterator first, ParentIterator last) { - for (ParentIterator current = first; current != last; ++current) + for (ParentIterator current = first; current != last; ++current) detail::normalize_node(first, current - first); } - - template + + template void initialize_incremental_components(VertexListGraph& G, DisjointSets& ds) { typename graph_traits @@ -129,7 +129,7 @@ namespace boost { m_index_list(make_shared(m_num_elements)) { build_index_lists(parent_start, index_map); - + } // component_index template @@ -222,10 +222,10 @@ namespace boost { protected: IndexType m_num_elements; - std::shared_ptr m_components, m_index_list; + shared_ptr m_components, m_index_list; }; // class component_index - + } // namespace boost #endif // BOOST_INCREMENTAL_COMPONENTS_HPP diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/mcgregor_common_subgraphs.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/mcgregor_common_subgraphs.hpp index ed811172..c46f7215 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/mcgregor_common_subgraphs.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/mcgregor_common_subgraphs.hpp @@ -35,13 +35,13 @@ namespace boost { struct mcgregor_common_subgraph_traits { typedef typename graph_traits::vertex_descriptor vertex_first_type; typedef typename graph_traits::vertex_descriptor vertex_second_type; - + typedef shared_array_property_map correspondence_map_first_to_second_type; - + typedef shared_array_property_map correspondence_map_second_to_first_type; - }; + }; } // namespace detail @@ -52,7 +52,7 @@ namespace boost { template struct property_map_equivalent { - + property_map_equivalent(const PropertyMapFirst property_map1, const PropertyMapSecond property_map2) : m_property_map1(property_map1), @@ -63,7 +63,7 @@ namespace boost { bool operator()(const ItemFirst item1, const ItemSecond item2) { return (get(m_property_map1, item1) == get(m_property_map2, item2)); } - + private: const PropertyMapFirst m_property_map1; const PropertyMapSecond m_property_map2; @@ -86,7 +86,7 @@ namespace boost { // Binary function object that always returns true. Used when // vertices or edges are always equivalent (i.e. have no labels). struct always_equivalent { - + template bool operator()(const ItemFirst&, const ItemSecond&) { @@ -123,7 +123,7 @@ namespace boost { { typedef typename graph_traits::vertex_descriptor VertexFirst; typedef typename graph_traits::vertex_descriptor VertexSecond; - + typedef typename graph_traits::edge_descriptor EdgeFirst; typedef typename graph_traits::edge_descriptor EdgeSecond; @@ -153,7 +153,7 @@ namespace boost { // first matching edge is always chosen. EdgeFirst edge_to_new1, edge_from_new1; bool edge_to_new_exists1 = false, edge_from_new_exists1 = false; - + EdgeSecond edge_to_new2, edge_from_new2; bool edge_to_new_exists2 = false, edge_from_new_exists2 = false; @@ -179,7 +179,7 @@ namespace boost { if ((edge_to_new_exists1 != edge_to_new_exists2) || ((edge_to_new_exists1 && edge_to_new_exists2) && !edges_equivalent(edge_to_new1, edge_to_new2))) { - + return (false); } @@ -225,7 +225,7 @@ namespace boost { if ((edge_from_new_exists1 != edge_from_new_exists2) || ((edge_from_new_exists1 && edge_from_new_exists2) && !edges_equivalent(edge_from_new1, edge_from_new2))) { - + return (false); } @@ -244,7 +244,7 @@ namespace boost { } return (true); - } + } // Recursive method that does a depth-first search in the space of // potential subgraphs. At each level, every new vertex pair from @@ -284,14 +284,14 @@ namespace boost { // Get iterators for vertices from both graphs typename graph_traits::vertex_iterator vertex1_iter, vertex1_end; - + typename graph_traits::vertex_iterator vertex2_begin, vertex2_end, vertex2_iter; - + boost::tie(vertex1_iter, vertex1_end) = vertices(graph1); boost::tie(vertex2_begin, vertex2_end) = vertices(graph2); vertex2_iter = vertex2_begin; - + // Iterate until all vertices have been visited BGL_FORALL_VERTICES_T(new_vertex1, graph1, GraphFirst) { @@ -301,7 +301,7 @@ namespace boost { if (existing_vertex2 != graph_traits::null_vertex()) { continue; } - + BGL_FORALL_VERTICES_T(new_vertex2, graph2, GraphSecond) { VertexFirst existing_vertex1 = get(correspondence_map_2_to_1, new_vertex2); @@ -330,7 +330,7 @@ namespace boost { // Only output sub-graphs larger than a single vertex if (new_graph_size > 1) { - + // Returning false from the callback will cancel iteration if (!subgraph_callback(correspondence_map_1_to_2, correspondence_map_2_to_1, @@ -338,7 +338,7 @@ namespace boost { return (false); } } - + // Depth-first search into the state space of possible sub-graphs bool continue_iteration = mcgregor_common_subgraphs_internal @@ -352,10 +352,10 @@ namespace boost { if (!continue_iteration) { return (false); } - + // Restore previous state if (vertex_stack1.size() > old_graph_size) { - + VertexFirst stack_vertex1 = vertex_stack1.top(); VertexSecond stack_vertex2 = get(correspondence_map_1_to_2, stack_vertex1); @@ -363,10 +363,10 @@ namespace boost { // Contract subgraph put(correspondence_map_1_to_2, stack_vertex1, graph_traits::null_vertex()); - + put(correspondence_map_2_to_1, stack_vertex2, graph_traits::null_vertex()); - + vertex_stack1.pop(); } @@ -401,7 +401,7 @@ namespace boost { typedef mcgregor_common_subgraph_traits SubGraphTraits; - + typename SubGraphTraits::correspondence_map_first_to_second_type correspondence_map_1_to_2(num_vertices(graph1), vindex_map1); @@ -409,7 +409,7 @@ namespace boost { put(correspondence_map_1_to_2, vertex1, graph_traits::null_vertex()); } - + typename SubGraphTraits::correspondence_map_second_to_first_type correspondence_map_2_to_1(num_vertices(graph2), vindex_map2); @@ -420,7 +420,7 @@ namespace boost { typedef typename graph_traits::vertex_descriptor VertexFirst; - + std::stack vertex_stack1; mcgregor_common_subgraphs_internal @@ -432,7 +432,7 @@ namespace boost { only_connected_subgraphs, subgraph_callback); } - + } // namespace detail // ========================================================================== @@ -457,7 +457,7 @@ namespace boost { bool only_connected_subgraphs, SubGraphCallback user_callback) { - + detail::mcgregor_common_subgraphs_internal_init (graph1, graph2, vindex_map1, vindex_map2, @@ -465,7 +465,7 @@ namespace boost { only_connected_subgraphs, user_callback); } - + // Variant of mcgregor_common_subgraphs with all default parameters template & params) { - + detail::mcgregor_common_subgraphs_internal_init (graph1, graph2, choose_const_pmap(get_param(params, vertex_index1), @@ -532,7 +532,7 @@ namespace boost { typedef mcgregor_common_subgraph_traits SubGraphTraits; - + typedef typename SubGraphTraits::correspondence_map_first_to_second_type CachedCorrespondenceMapFirstToSecond; @@ -542,19 +542,19 @@ namespace boost { typedef std::pair > SubGraph; - + typedef std::vector SubGraphList; unique_subgraph_interceptor(const GraphFirst& graph1, const GraphSecond& graph2, const VertexIndexMapFirst vindex_map1, const VertexIndexMapSecond vindex_map2, - SubGraphCallback user_callback) : + SubGraphCallback user_callback) : m_graph1(graph1), m_graph2(graph2), m_vindex_map1(vindex_map1), m_vindex_map2(vindex_map2), m_subgraphs(make_shared()), m_user_callback(user_callback) { } - + template bool operator()(CorrespondenceMapFirstToSecond correspondence_map_1_to_2, @@ -572,16 +572,16 @@ namespace boost { if (subgraph_size != subgraph_cached.first) { continue; } - + if (!are_property_maps_different(correspondence_map_1_to_2, subgraph_cached.second.first, m_graph1)) { - + // New subgraph is a duplicate return (true); } } - + // Subgraph is unique, so make a cached copy CachedCorrespondenceMapFirstToSecond new_subgraph_1_to_2 = CachedCorrespondenceMapFirstToSecond @@ -602,21 +602,21 @@ namespace boost { m_subgraphs->push_back(std::make_pair(subgraph_size, std::make_pair(new_subgraph_1_to_2, new_subgraph_2_to_1))); - + return (m_user_callback(correspondence_map_1_to_2, correspondence_map_2_to_1, subgraph_size)); } - + private: const GraphFirst& m_graph1; const GraphFirst& m_graph2; const VertexIndexMapFirst m_vindex_map1; const VertexIndexMapSecond m_vindex_map2; - std::shared_ptr m_subgraphs; + shared_ptr m_subgraphs; SubGraphCallback m_user_callback; }; - + } // namespace detail // Enumerates all unique common subgraphs between graph1 and graph2. @@ -645,7 +645,7 @@ namespace boost { (graph1, graph2, vindex_map1, vindex_map2, user_callback); - + detail::mcgregor_common_subgraphs_internal_init (graph1, graph2, vindex_map1, vindex_map2, @@ -717,7 +717,7 @@ namespace boost { typedef mcgregor_common_subgraph_traits SubGraphTraits; - + typedef typename SubGraphTraits::correspondence_map_first_to_second_type CachedCorrespondenceMapFirstToSecond; @@ -753,7 +753,7 @@ namespace boost { } if (subgraph_size == *m_largest_size_so_far) { - + // Make a cached copy CachedCorrespondenceMapFirstToSecond new_subgraph_1_to_2 = CachedCorrespondenceMapFirstToSecond @@ -797,11 +797,11 @@ namespace boost { const GraphFirst& m_graph2; const VertexIndexMapFirst m_vindex_map1; const VertexIndexMapSecond m_vindex_map2; - std::shared_ptr m_subgraphs; - std::shared_ptr m_largest_size_so_far; + shared_ptr m_subgraphs; + shared_ptr m_largest_size_so_far; SubGraphCallback m_user_callback; }; - + } // namespace detail // Enumerates the largest common subgraphs found between graph1 @@ -828,7 +828,7 @@ namespace boost { VertexIndexMapFirst, VertexIndexMapSecond, SubGraphCallback> max_interceptor (graph1, graph2, vindex_map1, vindex_map2, user_callback); - + detail::mcgregor_common_subgraphs_internal_init (graph1, graph2, vindex_map1, vindex_map2, @@ -903,7 +903,7 @@ namespace boost { typedef mcgregor_common_subgraph_traits SubGraphTraits; - + typedef typename SubGraphTraits::correspondence_map_first_to_second_type CachedCorrespondenceMapFirstToSecond; @@ -920,13 +920,13 @@ namespace boost { const GraphSecond& graph2, const VertexIndexMapFirst vindex_map1, const VertexIndexMapSecond vindex_map2, - SubGraphCallback user_callback) : + SubGraphCallback user_callback) : m_graph1(graph1), m_graph2(graph2), m_vindex_map1(vindex_map1), m_vindex_map2(vindex_map2), m_subgraphs(make_shared()), m_largest_size_so_far(make_shared(0)), - m_user_callback(user_callback) { } - + m_user_callback(user_callback) { } + template bool operator()(CorrespondenceMapFirstToSecond correspondence_map_1_to_2, @@ -945,18 +945,18 @@ namespace boost { subgraph_iter = m_subgraphs->begin(); subgraph_iter != m_subgraphs->end(); ++subgraph_iter) { - + SubGraph subgraph_cached = *subgraph_iter; - + if (!are_property_maps_different(correspondence_map_1_to_2, subgraph_cached.second.first, m_graph1)) { - + // New subgraph is a duplicate return (true); } } - + // Subgraph is unique, so make a cached copy CachedCorrespondenceMapFirstToSecond new_subgraph_1_to_2 = CachedCorrespondenceMapFirstToSecond @@ -978,7 +978,7 @@ namespace boost { std::make_pair(new_subgraph_1_to_2, new_subgraph_2_to_1))); } - + return (true); } @@ -994,17 +994,17 @@ namespace boost { subgraph_cached.first); } } - + private: const GraphFirst& m_graph1; const GraphFirst& m_graph2; const VertexIndexMapFirst m_vindex_map1; const VertexIndexMapSecond m_vindex_map2; - std::shared_ptr m_subgraphs; - std::shared_ptr m_largest_size_so_far; + shared_ptr m_subgraphs; + shared_ptr m_largest_size_so_far; SubGraphCallback m_user_callback; }; - + } // namespace detail // Enumerates the largest, unique common subgraphs found between @@ -1031,7 +1031,7 @@ namespace boost { VertexIndexMapFirst, VertexIndexMapSecond, SubGraphCallback> unique_max_interceptor (graph1, graph2, vindex_map1, vindex_map2, user_callback); - + detail::mcgregor_common_subgraphs_internal_init (graph1, graph2, vindex_map1, vindex_map2, @@ -1122,7 +1122,7 @@ namespace boost { // Returns a filtered sub-graph of graph whose edge and vertex // inclusion is dictated by membership_map. template + typename MembershipMap> typename membership_filtered_graph_traits::graph_type make_membership_filtered_graph (const Graph& graph, @@ -1134,9 +1134,9 @@ namespace boost { typename MFGTraits::vertex_filter_type v_filter(membership_map); return (MembershipFilteredGraph(graph, keep_all(), v_filter)); - + } - + } // namespace boost #endif // BOOST_GRAPH_MCGREGOR_COMMON_SUBGRAPHS_HPP diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/metric_tsp_approx.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/metric_tsp_approx.hpp index e3824666..dd0ff1d6 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/metric_tsp_approx.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/metric_tsp_approx.hpp @@ -28,7 +28,7 @@ #include -#include +#include #include #include #include diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/parallel/distribution.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/parallel/distribution.hpp index 51f820bd..8256b197 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/parallel/distribution.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/parallel/distribution.hpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include namespace boost { namespace parallel { @@ -86,13 +86,13 @@ public: size_type block_size(process_id_type id, size_type n) const { return distribution_->block_size(id, n); } - + process_id_type operator()(size_type i) const { return distribution_->in_process(i); } - + size_type local(size_type i) const { return distribution_->local(i); } - + size_type global(size_type n) const { return distribution_->global(n); } @@ -122,13 +122,13 @@ public: } private: - std::shared_ptr distribution_; + shared_ptr distribution_; }; struct block { template - explicit block(const LinearProcessGroup& pg, std::size_t n) + explicit block(const LinearProcessGroup& pg, std::size_t n) : id(process_id(pg)), p(num_processes(pg)), n(n) { } // If there are n elements in the distributed data structure, returns the number of elements stored locally. @@ -144,7 +144,7 @@ struct block // Returns the processor on which element with global index i is stored template SizeType operator()(SizeType i) const - { + { SizeType cutoff_processor = n % p; SizeType cutoff = cutoff_processor * (n / p + 1); @@ -165,7 +165,7 @@ struct block // Find the local index for the ith global element template SizeType local(SizeType i) const - { + { SizeType owner = (*this)(i); return i - start(owner); } @@ -192,9 +192,9 @@ struct uneven_block typedef std::vector size_vector; template - explicit uneven_block(const LinearProcessGroup& pg, const std::vector& local_sizes) + explicit uneven_block(const LinearProcessGroup& pg, const std::vector& local_sizes) : id(process_id(pg)), p(num_processes(pg)), local_sizes(local_sizes) - { + { BOOST_ASSERT(local_sizes.size() == p); local_starts.resize(p + 1); local_starts[0] = 0; @@ -204,7 +204,7 @@ struct uneven_block // To do maybe: enter local size in each process and gather in constructor (much handier) // template - // explicit uneven_block(const LinearProcessGroup& pg, std::size_t my_local_size) + // explicit uneven_block(const LinearProcessGroup& pg, std::size_t my_local_size) // If there are n elements in the distributed data structure, returns the number of elements stored locally. template @@ -227,7 +227,7 @@ struct uneven_block // Find the starting index for processor with the given id template - std::size_t start(ID id) const + std::size_t start(ID id) const { return local_starts[id]; } @@ -235,7 +235,7 @@ struct uneven_block // Find the local index for the ith global element template SizeType local(SizeType i) const - { + { SizeType owner = (*this)(i); return i - start(owner); } @@ -264,10 +264,10 @@ struct oned_block_cyclic template explicit oned_block_cyclic(const LinearProcessGroup& pg, std::size_t size) : id(process_id(pg)), p(num_processes(pg)), size(size) { } - + template SizeType block_size(SizeType n) const - { + { return block_size(id, n); } @@ -279,20 +279,20 @@ struct oned_block_cyclic SizeType everyone_gets = all_blocks / p; SizeType extra_blocks = all_blocks % p; SizeType my_blocks = everyone_gets + (p < extra_blocks? 1 : 0); - SizeType my_elements = my_blocks * size + SizeType my_elements = my_blocks * size + (p == extra_blocks? extra_elements : 0); return my_elements; } template SizeType operator()(SizeType i) const - { + { return (i / size) % p; } template SizeType local(SizeType i) const - { + { return ((i / size) / p) * size + i % size; } @@ -302,7 +302,7 @@ struct oned_block_cyclic template SizeType global(ProcessID id, SizeType i) const - { + { return ((i / size) * p + id) * size + i % size; } @@ -318,14 +318,14 @@ struct twod_block_cyclic explicit twod_block_cyclic(const LinearProcessGroup& pg, std::size_t block_rows, std::size_t block_columns, std::size_t data_columns_per_row) - : id(process_id(pg)), p(num_processes(pg)), - block_rows(block_rows), block_columns(block_columns), + : id(process_id(pg)), p(num_processes(pg)), + block_rows(block_rows), block_columns(block_columns), data_columns_per_row(data_columns_per_row) { } - + template SizeType block_size(SizeType n) const - { + { return block_size(id, n); } @@ -346,7 +346,7 @@ struct twod_block_cyclic template SizeType operator()(SizeType i) const - { + { SizeType result = get_block_num(i) % p; // std::cerr << "Item " << i << " goes on processor " << result << std::endl; return result; @@ -354,7 +354,7 @@ struct twod_block_cyclic template SizeType local(SizeType i) const - { + { // Compute the start of the block std::size_t block_num = get_block_num(i); // std::cerr << "Item " << i << " is in block #" << block_num << std::endl; @@ -362,11 +362,11 @@ struct twod_block_cyclic std::size_t local_block_num = block_num / p; std::size_t block_start = local_block_num * block_rows * block_columns; - // Compute the offset into the block + // Compute the offset into the block std::size_t data_row = i / data_columns_per_row; std::size_t data_col = i % data_columns_per_row; - std::size_t block_offset = (data_row % block_rows) * block_columns - + (data_col % block_columns); + std::size_t block_offset = (data_row % block_rows) * block_columns + + (data_col % block_columns); // std::cerr << "Item " << i << " maps to local index " << block_start+block_offset << std::endl; return block_start + block_offset; @@ -374,7 +374,7 @@ struct twod_block_cyclic template SizeType global(SizeType i) const - { + { // Compute the (global) block in which this element resides SizeType local_block_num = i / (block_rows * block_columns); SizeType block_offset = i % (block_rows * block_columns); @@ -401,7 +401,7 @@ struct twod_block_cyclic + row_in_block * block_rows + col_in_block; - std::cerr << "global(" << i << "@" << id << ") = " << result + std::cerr << "global(" << i << "@" << id << ") = " << result << " =? " << local(result) << std::endl; BOOST_ASSERT(i == local(result)); return result; @@ -444,7 +444,7 @@ class twod_random private: RandomNumberGen& gen; }; - + public: template explicit twod_random(const LinearProcessGroup& pg, @@ -452,11 +452,11 @@ class twod_random std::size_t data_columns_per_row, std::size_t n, RandomNumberGen& gen) - : id(process_id(pg)), p(num_processes(pg)), - block_rows(block_rows), block_columns(block_columns), + : id(process_id(pg)), p(num_processes(pg)), + block_rows(block_rows), block_columns(block_columns), data_columns_per_row(data_columns_per_row), global_to_local(n / (block_rows * block_columns)) - { + { std::copy(make_counting_iterator(std::size_t(0)), make_counting_iterator(global_to_local.size()), global_to_local.begin()); @@ -464,10 +464,10 @@ class twod_random random_int rand(gen); std::random_shuffle(global_to_local.begin(), global_to_local.end(), rand); } - + template SizeType block_size(SizeType n) const - { + { return block_size(id, n); } @@ -488,7 +488,7 @@ class twod_random template SizeType operator()(SizeType i) const - { + { SizeType result = get_block_num(i) % p; // std::cerr << "Item " << i << " goes on processor " << result << std::endl; return result; @@ -496,7 +496,7 @@ class twod_random template SizeType local(SizeType i) const - { + { // Compute the start of the block std::size_t block_num = get_block_num(i); // std::cerr << "Item " << i << " is in block #" << block_num << std::endl; @@ -504,11 +504,11 @@ class twod_random std::size_t local_block_num = block_num / p; std::size_t block_start = local_block_num * block_rows * block_columns; - // Compute the offset into the block + // Compute the offset into the block std::size_t data_row = i / data_columns_per_row; std::size_t data_col = i % data_columns_per_row; - std::size_t block_offset = (data_row % block_rows) * block_columns - + (data_col % block_columns); + std::size_t block_offset = (data_row % block_rows) * block_columns + + (data_col % block_columns); // std::cerr << "Item " << i << " maps to local index " << block_start+block_offset << std::endl; return block_start + block_offset; @@ -552,7 +552,7 @@ class random_distribution private: RandomNumberGen& gen; }; - + public: template random_distribution(const LinearProcessGroup& pg, RandomNumberGen& gen, @@ -565,7 +565,7 @@ class random_distribution random_int rand(gen); std::random_shuffle(local_to_global.begin(), local_to_global.end(), rand); - + for (std::vector::size_type i = 0; i < n; ++i) global_to_local[local_to_global[i]] = i; @@ -587,19 +587,19 @@ class random_distribution template SizeType local(SizeType i) const - { + { return base.local(global_to_local[i]); } template SizeType global(ProcessID p, SizeType i) const - { + { return local_to_global[base.global(p, i)]; } template SizeType global(SizeType i) const - { + { return local_to_global[base.global(i)]; } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/boyer_myrvold_impl.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/boyer_myrvold_impl.hpp index 0eb76e21..41ba2bc5 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/boyer_myrvold_impl.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/boyer_myrvold_impl.hpp @@ -12,7 +12,7 @@ #include #include #include //for std::min macros -#include +#include #include #include #include @@ -34,26 +34,26 @@ namespace boost typename DFSParentEdgeMap, typename SizeType> struct planar_dfs_visitor : public dfs_visitor<> { - planar_dfs_visitor(LowPointMap lpm, DFSParentMap dfs_p, + planar_dfs_visitor(LowPointMap lpm, DFSParentMap dfs_p, DFSNumberMap dfs_n, LeastAncestorMap lam, - DFSParentEdgeMap dfs_edge) + DFSParentEdgeMap dfs_edge) : low(lpm), parent(dfs_p), df_number(dfs_n), least_ancestor(lam), df_edge(dfs_edge), - count(0) + count(0) {} - - + + template void start_vertex(const Vertex& u, Graph&) { put(parent, u, u); put(least_ancestor, u, count); } - - + + template void discover_vertex(const Vertex& u, Graph&) { @@ -61,7 +61,7 @@ namespace boost put(df_number, u, count); ++count; } - + template void tree_edge(const Edge& e, Graph& g) { @@ -73,13 +73,13 @@ namespace boost put(df_edge, t, e); put(least_ancestor, t, get(df_number, s)); } - + template void back_edge(const Edge& e, Graph& g) { typedef typename graph_traits::vertex_descriptor vertex_t; typedef typename graph_traits::vertices_size_type v_size_t; - + vertex_t s(source(e,g)); vertex_t t(target(e,g)); BOOST_USING_STD_MIN(); @@ -89,20 +89,20 @@ namespace boost v_size_t t_df_number = get(df_number, t); v_size_t s_least_ancestor_df_number = get(least_ancestor, s); - put(low, s, + put(low, s, min BOOST_PREVENT_MACRO_SUBSTITUTION(s_low_df_number, t_df_number) ); - - put(least_ancestor, s, - min BOOST_PREVENT_MACRO_SUBSTITUTION(s_least_ancestor_df_number, + + put(least_ancestor, s, + min BOOST_PREVENT_MACRO_SUBSTITUTION(s_least_ancestor_df_number, t_df_number ) ); } } - + template void finish_vertex(const Vertex& u, Graph&) { @@ -115,21 +115,21 @@ namespace boost if (u_parent != u) { - put(low, u_parent, - min BOOST_PREVENT_MACRO_SUBSTITUTION(u_lowpoint, + put(low, u_parent, + min BOOST_PREVENT_MACRO_SUBSTITUTION(u_lowpoint, u_parent_lowpoint ) ); } } - + LowPointMap low; DFSParentMap parent; DFSNumberMap df_number; LeastAncestorMap least_ancestor; DFSParentEdgeMap df_edge; SizeType count; - + }; @@ -150,7 +150,7 @@ namespace boost typedef typename graph_traits::edge_descriptor edge_t; typedef typename graph_traits::vertex_iterator vertex_iterator_t; typedef typename graph_traits::edge_iterator edge_iterator_t; - typedef typename graph_traits::out_edge_iterator + typedef typename graph_traits::out_edge_iterator out_edge_iterator_t; typedef graph::detail::face_handle face_handle_t; @@ -158,8 +158,8 @@ namespace boost typedef std::vector edge_vector_t; typedef std::list vertex_list_t; typedef std::list< face_handle_t > face_handle_list_t; - typedef boost::std::shared_ptr< face_handle_list_t > face_handle_list_ptr_t; - typedef boost::std::shared_ptr< vertex_list_t > vertex_list_ptr_t; + typedef boost::shared_ptr< face_handle_list_t > face_handle_list_ptr_t; + typedef boost::shared_ptr< vertex_list_t > vertex_list_ptr_t; typedef boost::tuple merge_stack_frame_t; typedef std::vector merge_stack_t; @@ -173,16 +173,16 @@ namespace boost typedef typename map_vertex_to_::type vertex_to_v_size_map_t; typedef typename map_vertex_to_::type vertex_to_vertex_map_t; typedef typename map_vertex_to_::type vertex_to_edge_map_t; - typedef typename map_vertex_to_::type + typedef typename map_vertex_to_::type vertex_to_vertex_list_ptr_map_t; - typedef typename map_vertex_to_< edge_vector_t >::type + typedef typename map_vertex_to_< edge_vector_t >::type vertex_to_edge_vector_map_t; typedef typename map_vertex_to_::type vertex_to_bool_map_t; - typedef typename map_vertex_to_::type + typedef typename map_vertex_to_::type vertex_to_face_handle_map_t; - typedef typename map_vertex_to_::type + typedef typename map_vertex_to_::type vertex_to_face_handle_list_ptr_map_t; - typedef typename map_vertex_to_::type + typedef typename map_vertex_to_::type vertex_to_separated_node_map_t; template struct face_vertex_iterator { - typedef face_iterator type; @@ -216,7 +216,7 @@ namespace boost public: - + boyer_myrvold_impl(const Graph& arg_g, VertexIndexMap arg_vm): g(arg_g), @@ -237,7 +237,7 @@ namespace boost flipped_vector(num_vertices(g), false), backedges_vector(num_vertices(g)), dfs_parent_edge_vector(num_vertices(g)), - + vertices_by_dfs_num(num_vertices(g)), low_point(low_point_vector.begin(), vm), @@ -271,72 +271,72 @@ namespace boost // Sort vertices by their lowpoint - need this later in the constructor vertex_vector_t vertices_by_lowpoint(num_vertices(g)); - std::copy( vertices(g).first, vertices(g).second, + std::copy( vertices(g).first, vertices(g).second, vertices_by_lowpoint.begin() ); - bucket_sort(vertices_by_lowpoint.begin(), - vertices_by_lowpoint.end(), + bucket_sort(vertices_by_lowpoint.begin(), + vertices_by_lowpoint.end(), low_point, num_vertices(g) ); - // Sort vertices by their dfs number - need this to iterate by reverse + // Sort vertices by their dfs number - need this to iterate by reverse // DFS number in the main loop. - std::copy( vertices(g).first, vertices(g).second, + std::copy( vertices(g).first, vertices(g).second, vertices_by_dfs_num.begin() ); - bucket_sort(vertices_by_dfs_num.begin(), - vertices_by_dfs_num.end(), + bucket_sort(vertices_by_dfs_num.begin(), + vertices_by_dfs_num.end(), dfs_number, num_vertices(g) ); - // Initialize face handles. A face handle is an abstraction that serves - // two uses in our implementation - it allows us to efficiently move - // along the outer face of embedded bicomps in a partially embedded - // graph, and it provides storage for the planar embedding. Face - // handles are implemented by a sequence of edges and are associated - // with a particular vertex - the sequence of edges represents the - // current embedding of edges around that vertex, and the first and - // last edges in the sequence represent the pair of edges on the outer - // face that are adjacent to the associated vertex. This lets us embed - // edges in the graph by just pushing them on the front or back of the + // Initialize face handles. A face handle is an abstraction that serves + // two uses in our implementation - it allows us to efficiently move + // along the outer face of embedded bicomps in a partially embedded + // graph, and it provides storage for the planar embedding. Face + // handles are implemented by a sequence of edges and are associated + // with a particular vertex - the sequence of edges represents the + // current embedding of edges around that vertex, and the first and + // last edges in the sequence represent the pair of edges on the outer + // face that are adjacent to the associated vertex. This lets us embed + // edges in the graph by just pushing them on the front or back of the // sequence of edges held by the face handles. - // + // // Our algorithm starts with a DFS tree of edges (where every vertex is - // an articulation point and every edge is a singleton bicomp) and - // repeatedly merges bicomps by embedding additional edges. Note that - // any bicomp at any point in the algorithm can be associated with a + // an articulation point and every edge is a singleton bicomp) and + // repeatedly merges bicomps by embedding additional edges. Note that + // any bicomp at any point in the algorithm can be associated with a // unique edge connecting the vertex of that bicomp with the lowest DFS - // number (which we refer to as the "root" of the bicomp) with its DFS + // number (which we refer to as the "root" of the bicomp) with its DFS // child in the bicomp: the existence of two such edges would contradict - // the properties of a DFS tree. We refer to the DFS child of the root - // of a bicomp as the "canonical DFS child" of the bicomp. Note that a + // the properties of a DFS tree. We refer to the DFS child of the root + // of a bicomp as the "canonical DFS child" of the bicomp. Note that a // vertex can be the root of more than one bicomp. // - // We move around the external faces of a bicomp using a few property + // We move around the external faces of a bicomp using a few property // maps, which we'll initialize presently: // - // - face_handles: maps a vertex to a face handle that can be used to - // move "up" a bicomp. For a vertex that isn't an articulation point, - // this holds the face handles that can be used to move around that + // - face_handles: maps a vertex to a face handle that can be used to + // move "up" a bicomp. For a vertex that isn't an articulation point, + // this holds the face handles that can be used to move around that // vertex's unique bicomp. For a vertex that is an articulation point, - // this holds the face handles associated with the unique bicomp that - // the vertex is NOT the root of. These handles can therefore be used - // to move from any point on the outer face of the tree of bicomps + // this holds the face handles associated with the unique bicomp that + // the vertex is NOT the root of. These handles can therefore be used + // to move from any point on the outer face of the tree of bicomps // around the current outer face towards the root of the DFS tree. // - // - dfs_child_handles: these are used to hold face handles for + // - dfs_child_handles: these are used to hold face handles for // vertices that are articulation points - dfs_child_handles[v] holds // the face handles corresponding to vertex u in the bicomp with root // u and canonical DFS child v. // // - canonical_dfs_child: this property map allows one to determine the // canonical DFS child of a bicomp while traversing the outer face. - // This property map is only valid when applied to one of the two + // This property map is only valid when applied to one of the two // vertices adjacent to the root of the bicomp on the outer face. To // be more precise, if v is the canonical DFS child of a bicomp, - // canonical_dfs_child[dfs_child_handles[v].first_vertex()] == v and + // canonical_dfs_child[dfs_child_handles[v].first_vertex()] == v and // canonical_dfs_child[dfs_child_handles[v].second_vertex()] == v. // // - pertinent_roots: given a vertex v, pertinent_roots[v] contains a @@ -365,19 +365,19 @@ namespace boost } canonical_dfs_child[v] = v; - pertinent_roots[v] = face_handle_list_ptr_t(new face_handle_list_t); + pertinent_roots[v] = face_handle_list_ptr_t(new face_handle_list_t); separated_dfs_child_list[v] = vertex_list_ptr_t(new vertex_list_t); } // We need to create a list of not-yet-merged depth-first children for - // each vertex that will be updated as bicomps get merged. We sort each - // list by ascending lowpoint, which allows the externally_active - // function to run in constant time, and we keep a pointer to each - // vertex's representation in its parent's list, which allows merging + // each vertex that will be updated as bicomps get merged. We sort each + // list by ascending lowpoint, which allows the externally_active + // function to run in constant time, and we keep a pointer to each + // vertex's representation in its parent's list, which allows merging //in constant time. - for(typename vertex_vector_t::iterator itr = + for(typename vertex_vector_t::iterator itr = vertices_by_lowpoint.begin(); itr != vertices_by_lowpoint.end(); ++itr) { @@ -389,7 +389,7 @@ namespace boost separated_dfs_child_list[parent]->insert (separated_dfs_child_list[parent]->end(), v); } - } + } // The merge stack holds path information during a walkdown iteration merge_stack.reserve(num_vertices(g)); @@ -404,11 +404,11 @@ namespace boost bool is_planar() { - // This is the main algorithm: starting with a DFS tree of embedded - // edges (which, since it's a tree, is planar), iterate through all + // This is the main algorithm: starting with a DFS tree of embedded + // edges (which, since it's a tree, is planar), iterate through all // vertices by reverse DFS number, attempting to embed all backedges // connecting the current vertex to vertices with higher DFS numbers. - // + // // The walkup is a procedure that examines all such backedges and sets // up the required data structures so that they can be searched by the // walkdown in linear time. The walkdown does the actual work of @@ -434,7 +434,7 @@ namespace boost store_old_face_handles(StoreOldHandlesPolicy()); vertex_t v(*vi); - + walkup(v); if (!walkdown(v)) @@ -445,7 +445,7 @@ namespace boost clean_up_embedding(StoreEmbeddingPolicy()); return true; - + } @@ -462,14 +462,14 @@ namespace boost void walkup(vertex_t v) { - // The point of the walkup is to follow all backedges from v to + // The point of the walkup is to follow all backedges from v to // vertices with higher DFS numbers, and update pertinent_roots // for the bicomp roots on the path from backedge endpoints up // to v. This will set the stage for the walkdown to efficiently // traverse the graph of bicomps down from v. typedef typename face_vertex_iterator::type walkup_iterator_t; - + out_edge_iterator_t oi, oi_end; for(boost::tie(oi,oi_end) = out_edges(v,g); oi != oi_end; ++oi) { @@ -491,7 +491,7 @@ namespace boost backedges[w].push_back(e); - v_size_t timestamp = dfs_number[v]; + v_size_t timestamp = dfs_number[v]; backedge_flag[w] = timestamp; walkup_iterator_t walkup_itr(w, face_handles); @@ -500,11 +500,11 @@ namespace boost while (true) { - + // Move to the root of the current bicomp or the first visited // vertex on the bicomp by going up each side in parallel - - while(walkup_itr != walkup_end && + + while(walkup_itr != walkup_end && visited[*walkup_itr] != timestamp ) { @@ -515,20 +515,20 @@ namespace boost // If we've found the root of a bicomp through a path we haven't // seen before, update pertinent_roots with a handle to the - // current bicomp. Otherwise, we've just seen a path we've been + // current bicomp. Otherwise, we've just seen a path we've been // up before, so break out of the main while loop. - + if (walkup_itr == walkup_end) { vertex_t dfs_child = canonical_dfs_child[lead_vertex]; vertex_t parent = dfs_parent[dfs_child]; - visited[dfs_child_handles[dfs_child].first_vertex()] + visited[dfs_child_handles[dfs_child].first_vertex()] = timestamp; - visited[dfs_child_handles[dfs_child].second_vertex()] + visited[dfs_child_handles[dfs_child].second_vertex()] = timestamp; - if (low_point[dfs_child] < dfs_number[v] || + if (low_point[dfs_child] < dfs_number[v] || least_ancestor[dfs_child] < dfs_number[v] ) { @@ -553,10 +553,10 @@ namespace boost break; } - } - + } + } - + @@ -577,19 +577,19 @@ namespace boost while (!pertinent_roots[v]->empty()) { - + face_handle_t root_face_handle = pertinent_roots[v]->front(); face_handle_t curr_face_handle = root_face_handle; - pertinent_roots[v]->pop_front(); + pertinent_roots[v]->pop_front(); merge_stack.clear(); while(true) { - typename face_vertex_iterator<>::type + typename face_vertex_iterator<>::type first_face_itr, second_face_itr, face_end; - vertex_t first_side_vertex + vertex_t first_side_vertex = graph_traits::null_vertex(); vertex_t second_side_vertex; vertex_t first_tail, second_tail; @@ -603,7 +603,7 @@ namespace boost for(; first_face_itr != face_end; ++first_face_itr) { vertex_t face_vertex(*first_face_itr); - if (pertinent(face_vertex, v) || + if (pertinent(face_vertex, v) || externally_active(face_vertex, v) ) { @@ -614,7 +614,7 @@ namespace boost first_tail = face_vertex; } - if (first_side_vertex == graph_traits::null_vertex() || + if (first_side_vertex == graph_traits::null_vertex() || first_side_vertex == curr_face_handle.get_anchor() ) break; @@ -622,7 +622,7 @@ namespace boost for(;second_face_itr != face_end; ++second_face_itr) { vertex_t face_vertex(*second_face_itr); - if (pertinent(face_vertex, v) || + if (pertinent(face_vertex, v) || externally_active(face_vertex, v) ) { @@ -654,14 +654,14 @@ namespace boost chosen = second_side_vertex; chose_first_upper_path = false; } - else + else { - // If there's a pertinent vertex on the lower face - // between the first_face_itr and the second_face_itr, + // If there's a pertinent vertex on the lower face + // between the first_face_itr and the second_face_itr, // this graph isn't planar. - for(; - *first_face_itr != second_side_vertex; + for(; + *first_face_itr != second_side_vertex; ++first_face_itr ) { @@ -675,85 +675,85 @@ namespace boost return false; } } - - // Otherwise, the fact that we didn't find a pertinent - // vertex on this face is fine - we should set the - // short-circuit edges and break out of this loop to + + // Otherwise, the fact that we didn't find a pertinent + // vertex on this face is fine - we should set the + // short-circuit edges and break out of this loop to // start looking at a different pertinent root. - + if (first_side_vertex == second_side_vertex) { if (first_tail != v) { - vertex_t first + vertex_t first = face_handles[first_tail].first_vertex(); - vertex_t second + vertex_t second = face_handles[first_tail].second_vertex(); - boost::tie(first_side_vertex, first_tail) - = make_tuple(first_tail, - first == first_side_vertex ? + boost::tie(first_side_vertex, first_tail) + = make_tuple(first_tail, + first == first_side_vertex ? second : first ); } else if (second_tail != v) { - vertex_t first + vertex_t first = face_handles[second_tail].first_vertex(); - vertex_t second + vertex_t second = face_handles[second_tail].second_vertex(); - boost::tie(second_side_vertex, second_tail) + boost::tie(second_side_vertex, second_tail) = make_tuple(second_tail, - first == second_side_vertex ? + first == second_side_vertex ? second : first); } else break; } - - canonical_dfs_child[first_side_vertex] + + canonical_dfs_child[first_side_vertex] = canonical_dfs_child[root_face_handle.first_vertex()]; - canonical_dfs_child[second_side_vertex] + canonical_dfs_child[second_side_vertex] = canonical_dfs_child[root_face_handle.second_vertex()]; root_face_handle.set_first_vertex(first_side_vertex); root_face_handle.set_second_vertex(second_side_vertex); - if (face_handles[first_side_vertex].first_vertex() == + if (face_handles[first_side_vertex].first_vertex() == first_tail ) face_handles[first_side_vertex].set_first_vertex(v); else face_handles[first_side_vertex].set_second_vertex(v); - if (face_handles[second_side_vertex].first_vertex() == + if (face_handles[second_side_vertex].first_vertex() == second_tail ) face_handles[second_side_vertex].set_first_vertex(v); else face_handles[second_side_vertex].set_second_vertex(v); - + break; - + } - // When we unwind the stack, we need to know which direction + // When we unwind the stack, we need to know which direction // we came down from on the top face handle - - bool chose_first_lower_path = - (chose_first_upper_path && - face_handles[chosen].first_vertex() == first_tail) + + bool chose_first_lower_path = + (chose_first_upper_path && + face_handles[chosen].first_vertex() == first_tail) || - (!chose_first_upper_path && + (!chose_first_upper_path && face_handles[chosen].first_vertex() == second_tail); //If there's a backedge at the chosen vertex, embed it now if (backedge_flag[chosen] == dfs_number[v]) { w = chosen; - + backedge_flag[chosen] = num_vertices(g) + 1; add_to_merge_points(chosen, StoreOldHandlesPolicy()); - + typename edge_vector_t::iterator ei, ei_end; ei_end = backedges[chosen].end(); for(ei = backedges[chosen].begin(); ei != ei_end; ++ei) @@ -778,7 +778,7 @@ namespace boost } //Unwind the merge stack to the root, merging all bicomps - + bool bottom_path_follows_first; bool top_path_follows_first; bool next_bottom_follows_first = chose_first_upper_path; @@ -790,8 +790,8 @@ namespace boost { bottom_path_follows_first = next_bottom_follows_first; - boost::tie(merge_point, - next_bottom_follows_first, + boost::tie(merge_point, + next_bottom_follows_first, top_path_follows_first ) = merge_stack.back(); merge_stack.pop_back(); @@ -799,7 +799,7 @@ namespace boost face_handle_t top_handle(face_handles[merge_point]); face_handle_t bottom_handle (*pertinent_roots[merge_point]->begin()); - + vertex_t bottom_dfs_child = canonical_dfs_child [pertinent_roots[merge_point]->begin()->first_vertex()]; @@ -810,23 +810,23 @@ namespace boost pertinent_roots[merge_point]->pop_front(); - add_to_merge_points(top_handle.get_anchor(), + add_to_merge_points(top_handle.get_anchor(), StoreOldHandlesPolicy() ); - + if (top_path_follows_first && bottom_path_follows_first) { bottom_handle.flip(); top_handle.glue_first_to_second(bottom_handle); - } - else if (!top_path_follows_first && + } + else if (!top_path_follows_first && bottom_path_follows_first ) { flipped[bottom_dfs_child] = true; top_handle.glue_second_to_first(bottom_handle); } - else if (top_path_follows_first && + else if (top_path_follows_first && !bottom_path_follows_first ) { @@ -842,17 +842,17 @@ namespace boost } //Finally, embed all edges (v,w) at their upper end points - canonical_dfs_child[w] + canonical_dfs_child[w] = canonical_dfs_child[root_face_handle.first_vertex()]; - - add_to_merge_points(root_face_handle.get_anchor(), + + add_to_merge_points(root_face_handle.get_anchor(), StoreOldHandlesPolicy() ); - + typename edge_vector_t::iterator ei, ei_end; ei_end = backedges[chosen].end(); for(ei = backedges[chosen].begin(); ei != ei_end; ++ei) - { + { if (next_bottom_follows_first) root_face_handle.push_first(*ei, g); else @@ -863,7 +863,7 @@ namespace boost curr_face_handle = root_face_handle; }//while(true) - + }//while(!pertinent_roots[v]->empty()) return true; @@ -879,14 +879,14 @@ namespace boost void store_old_face_handles(graph::detail::store_old_handles) { - for(typename std::vector::iterator mp_itr + for(typename std::vector::iterator mp_itr = current_merge_points.begin(); mp_itr != current_merge_points.end(); ++mp_itr) { face_handles[*mp_itr].store_old_face_handles(); } current_merge_points.clear(); - } + } void add_to_merge_points(vertex_t, graph::detail::no_old_handles) {} @@ -896,7 +896,7 @@ namespace boost current_merge_points.push_back(v); } - + void add_to_embedded_edges(edge_t, graph::detail::no_old_handles) {} void add_to_embedded_edges(edge_t e, graph::detail::store_old_handles) @@ -924,7 +924,7 @@ namespace boost { typename vertex_list_t::iterator yi, yi_end; yi_end = separated_dfs_child_list[*xi]->end(); - for(yi = separated_dfs_child_list[*xi]->begin(); + for(yi = separated_dfs_child_list[*xi]->begin(); yi != yi_end; ++yi ) { @@ -933,7 +933,7 @@ namespace boost (dfs_child_handles[*yi]); } } - } + } // Up until this point, we've flipped bicomps lazily by setting // flipped[v] to true if the bicomp rooted at v was flipped (the @@ -944,7 +944,7 @@ namespace boost typedef typename vertex_vector_t::iterator vertex_vector_itr_t; vertex_vector_itr_t vi_end = vertices_by_dfs_num.end(); - for(vertex_vector_itr_t vi = vertices_by_dfs_num.begin(); + for(vertex_vector_itr_t vi = vertices_by_dfs_num.begin(); vi != vi_end; ++vi ) { @@ -968,7 +968,7 @@ namespace boost // If there are any self-loops in the graph, they were flagged // during the walkup, and we should add them to the embedding now. - // Adding a self loop anywhere in the embedding could never + // Adding a self loop anywhere in the embedding could never // invalidate the embedding, but they would complicate the traversal // if they were added during the walkup/walkdown. @@ -979,13 +979,13 @@ namespace boost edge_t e(*ei); face_handles[source(e,g)].push_second(e,g); } - + } - + bool pertinent(vertex_t w, vertex_t v) { // w is pertinent with respect to v if there is a backedge (v,w) or if @@ -993,38 +993,38 @@ namespace boost return backedge_flag[w] == dfs_number[v] || !pertinent_roots[w]->empty(); } - + bool externally_active(vertex_t w, vertex_t v) { // Let a be any proper depth-first search ancestor of v. w is externally - // active with respect to v if there exists a backedge (a,w) or a + // active with respect to v if there exists a backedge (a,w) or a // backedge (a,w_0) for some w_0 in a descendent bicomp of w. v_size_t dfs_number_of_v = dfs_number[v]; return (least_ancestor[w] < dfs_number_of_v) || (!separated_dfs_child_list[w]->empty() && - low_point[separated_dfs_child_list[w]->front()] < dfs_number_of_v); + low_point[separated_dfs_child_list[w]->front()] < dfs_number_of_v); } + - - + bool internally_active(vertex_t w, vertex_t v) { return pertinent(w,v) && !externally_active(w,v); - } - + } + void remove_vertex_from_separated_dfs_child_list(vertex_t v) { - typename vertex_list_t::iterator to_delete + typename vertex_list_t::iterator to_delete = separated_node_in_parent_list[v]; - garbage.splice(garbage.end(), - *separated_dfs_child_list[dfs_parent[v]], - to_delete, + garbage.splice(garbage.end(), + *separated_dfs_child_list[dfs_parent[v]], + to_delete, boost::next(to_delete) ); } @@ -1032,9 +1032,9 @@ namespace boost - + // End of the implementation of the basic Boyer-Myrvold Algorithm. The rest - // of the code below implements the isolation of a Kuratowski subgraph in + // of the code below implements the isolation of a Kuratowski subgraph in // the case that the input graph is not planar. This is by far the most // complicated part of the implementation. @@ -1047,7 +1047,7 @@ namespace boost template - vertex_t kuratowski_walkup(vertex_t v, + vertex_t kuratowski_walkup(vertex_t v, EdgeToBoolPropertyMap forbidden_edge, EdgeToBoolPropertyMap goal_edge, EdgeToBoolPropertyMap is_embedded, @@ -1057,19 +1057,19 @@ namespace boost vertex_t current_endpoint; bool seen_goal_edge = false; out_edge_iterator_t oi, oi_end; - + for(boost::tie(oi,oi_end) = out_edges(v,g); oi != oi_end; ++oi) forbidden_edge[*oi] = true; - + for(boost::tie(oi,oi_end) = out_edges(v,g); oi != oi_end; ++oi) { path_edges.clear(); - + edge_t e(*oi); - current_endpoint = target(*oi,g) == v ? + current_endpoint = target(*oi,g) == v ? source(*oi,g) : target(*oi,g); - - if (dfs_number[current_endpoint] < dfs_number[v] || + + if (dfs_number[current_endpoint] < dfs_number[v] || is_embedded[e] || v == current_endpoint //self-loop ) @@ -1077,7 +1077,7 @@ namespace boost //Not a backedge continue; } - + path_edges.push_back(e); if (goal_edge[e]) { @@ -1085,30 +1085,30 @@ namespace boost } typedef typename face_edge_iterator<>::type walkup_itr_t; - - walkup_itr_t + + walkup_itr_t walkup_itr(current_endpoint, face_handles, first_side()); walkup_itr_t walkup_end; - + seen_goal_edge = false; - + while (true) - { - + { + if (walkup_itr != walkup_end && forbidden_edge[*walkup_itr]) break; - - while(walkup_itr != walkup_end && - !goal_edge[*walkup_itr] && + + while(walkup_itr != walkup_end && + !goal_edge[*walkup_itr] && !forbidden_edge[*walkup_itr] ) { edge_t f(*walkup_itr); forbidden_edge[f] = true; path_edges.push_back(f); - current_endpoint = - source(f, g) == current_endpoint ? - target(f, g) : + current_endpoint = + source(f, g) == current_endpoint ? + target(f, g) : source(f,g); ++walkup_itr; } @@ -1120,14 +1120,14 @@ namespace boost break; } - walkup_itr + walkup_itr = walkup_itr_t(current_endpoint, face_handles, first_side()); - + } - + if (seen_goal_edge) break; - + } if (seen_goal_edge) @@ -1157,9 +1157,9 @@ namespace boost // | there exists some bicomp containing three vertices // ----- x,y, and z as shown such that x and y are externally // | | active with respect to v (which means that there are - // x y two vertices x_0 and y_0 such that (1) both x_0 and - // | | y_0 are proper depth-first search ancestors of v and - // --z-- (2) there are two disjoint paths, one connecting x + // x y two vertices x_0 and y_0 such that (1) both x_0 and + // | | y_0 are proper depth-first search ancestors of v and + // --z-- (2) there are two disjoint paths, one connecting x // and x_0 and one connecting y and y_0, both consisting // fig. 1 entirely of unembedded edges). Furthermore, there // exists a vertex z_0 such that z is a depth-first @@ -1175,10 +1175,10 @@ namespace boost // properties of the Boyer-Myrvold algorithm to show the existence of an // "x-y path" connecting some vertex on the "left side" of the x,y,z // bicomp with some vertex on the "right side" of the bicomp (where the - // left and right are split by a line drawn through v and z.If either of - // the endpoints of the x-y path is above x or y on the bicomp, a K_3_3 - // can be isolated - this is a case C. Otherwise, both endpoints are at - // or below x and y on the bicomp. If there is a vertex alpha on the x-y + // left and right are split by a line drawn through v and z.If either of + // the endpoints of the x-y path is above x or y on the bicomp, a K_3_3 + // can be isolated - this is a case C. Otherwise, both endpoints are at + // or below x and y on the bicomp. If there is a vertex alpha on the x-y // path such that alpha is not x or y and there's a path from alpha to v // that's disjoint from any of the edges on the bicomp and the x-y path, // a K_3_3 can be isolated - this is a case D. Otherwise, properties of @@ -1192,8 +1192,8 @@ namespace boost out_edge_iterator_t oei, oei_end; typename std::vector::iterator xi, xi_end; - // Clear the short-circuit edges - these are needed for the planar - // testing/embedding algorithm to run in linear time, but they'll + // Clear the short-circuit edges - these are needed for the planar + // testing/embedding algorithm to run in linear time, but they'll // complicate the kuratowski subgraph isolation for(boost::tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi) { @@ -1217,12 +1217,12 @@ namespace boost typename std::vector::iterator embedded_itr, embedded_end; embedded_end = embedded_edges.end(); - for(embedded_itr = embedded_edges.begin(); + for(embedded_itr = embedded_edges.begin(); embedded_itr != embedded_end; ++embedded_itr ) is_embedded[*embedded_itr] = true; - // upper_face_vertex is true for x,y, and all vertices above x and y in + // upper_face_vertex is true for x,y, and all vertices above x and y in // the bicomp std::vector upper_face_vertex_vector(num_vertices(g), false); vertex_to_bool_map_t upper_face_vertex @@ -1234,7 +1234,7 @@ namespace boost // These next few variable declarations are all things that we need // to find. - vertex_t z; + vertex_t z; vertex_t bicomp_root; vertex_t w = graph_traits::null_vertex(); face_handle_t w_handle; @@ -1256,13 +1256,13 @@ namespace boost //backedge from V, then goes up until it hits either X or Y //(but doesn't find X or Y as the root of a bicomp) - typename face_vertex_iterator<>::type + typename face_vertex_iterator<>::type x_upper_itr(x, face_handles, first_side()); - typename face_vertex_iterator<>::type + typename face_vertex_iterator<>::type x_lower_itr(x, face_handles, second_side()); typename face_vertex_iterator<>::type face_itr, face_end; - // Don't know which path from x is the upper or lower path - + // Don't know which path from x is the upper or lower path - // we'll find out here for(face_itr = x_upper_itr; face_itr != face_end; ++face_itr) { @@ -1284,9 +1284,9 @@ namespace boost upper_face_vertex[current_vertex] = true; } - v_dfchild_handle + v_dfchild_handle = dfs_child_handles[canonical_dfs_child[previous_vertex]]; - + for(face_itr = x_lower_itr; *face_itr != y; ++face_itr) { vertex_t current_vertex(*face_itr); @@ -1297,7 +1297,7 @@ namespace boost if (w == graph_traits::null_vertex()) //haven't found a w yet { roots_end = pertinent_roots[current_vertex]->end(); - for(roots_itr = pertinent_roots[current_vertex]->begin(); + for(roots_itr = pertinent_roots[current_vertex]->begin(); roots_itr != roots_end; ++roots_itr ) { @@ -1327,7 +1327,7 @@ namespace boost edge_to_bool_map_t outer_face_edge(outer_face_edge_vector.begin(), em); walkup_itr_t walkup_end; - for(walkup_itr_t walkup_itr(x, face_handles, first_side()); + for(walkup_itr_t walkup_itr(x, face_handles, first_side()); walkup_itr != walkup_end; ++walkup_itr ) { @@ -1335,7 +1335,7 @@ namespace boost is_in_subgraph[*walkup_itr] = true; } - for(walkup_itr_t walkup_itr(x, face_handles, second_side()); + for(walkup_itr_t walkup_itr(x, face_handles, second_side()); walkup_itr != walkup_end; ++walkup_itr ) { @@ -1355,53 +1355,53 @@ namespace boost for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) { edge_t e(*ei); - goal_edge[e] + goal_edge[e] = !outer_face_edge[e] && (source(e,g) == x || target(e,g) == x); forbidden_edge[*ei] = outer_face_edge[*ei]; } vertex_t x_ancestor = v; vertex_t x_endpoint = graph_traits::null_vertex(); - + while(x_endpoint == graph_traits::null_vertex()) - { + { x_ancestor = dfs_parent[x_ancestor]; - x_endpoint = kuratowski_walkup(x_ancestor, - forbidden_edge, + x_endpoint = kuratowski_walkup(x_ancestor, + forbidden_edge, goal_edge, is_embedded, x_external_path ); - - } + + } for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) { edge_t e(*ei); - goal_edge[e] + goal_edge[e] = !outer_face_edge[e] && (source(e,g) == y || target(e,g) == y); forbidden_edge[*ei] = outer_face_edge[*ei]; } vertex_t y_ancestor = v; vertex_t y_endpoint = graph_traits::null_vertex(); - + while(y_endpoint == graph_traits::null_vertex()) - { + { y_ancestor = dfs_parent[y_ancestor]; - y_endpoint = kuratowski_walkup(y_ancestor, - forbidden_edge, + y_endpoint = kuratowski_walkup(y_ancestor, + forbidden_edge, goal_edge, is_embedded, y_external_path ); - - } - + + } + vertex_t parent, child; - + //If v isn't on the same bicomp as x and y, it's a case A if (bicomp_root != v) { @@ -1412,13 +1412,13 @@ namespace boost for(boost::tie(oei,oei_end) = out_edges(*vi,g); oei != oei_end; ++oei) if(!outer_face_edge[*oei]) goal_edge[*oei] = true; - + for(boost::tie(ei,ei_end) = edges(g); ei != ei_end; ++ei) forbidden_edge[*ei] = outer_face_edge[*ei]; - + z = kuratowski_walkup (v, forbidden_edge, goal_edge, is_embedded, z_v_path); - + } else if (w != graph_traits::null_vertex()) { @@ -1430,17 +1430,17 @@ namespace boost goal_edge[e] = false; forbidden_edge[e] = outer_face_edge[e]; } - + goal_edge[w_handle.first_edge()] = true; goal_edge[w_handle.second_edge()] = true; z = kuratowski_walkup(v, - forbidden_edge, + forbidden_edge, goal_edge, is_embedded, z_v_path ); - + for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) { @@ -1453,41 +1453,41 @@ namespace boost { goal_edge[*pi] = true; } - + w_ancestor = v; vertex_t w_endpoint = graph_traits::null_vertex(); - + while(w_endpoint == graph_traits::null_vertex()) - { + { w_ancestor = dfs_parent[w_ancestor]; - w_endpoint = kuratowski_walkup(w_ancestor, - forbidden_edge, + w_endpoint = kuratowski_walkup(w_ancestor, + forbidden_edge, goal_edge, is_embedded, w_path ); - - } - - // We really want both the w walkup and the z walkup to finish on - // exactly the same edge, but for convenience (since we don't have - // control over which side of a bicomp a walkup moves up) we've - // defined the walkup to either end at w_handle.first_edge() or - // w_handle.second_edge(). If both walkups ended at different edges, - // we'll do a little surgery on the w walkup path to make it follow + + } + + // We really want both the w walkup and the z walkup to finish on + // exactly the same edge, but for convenience (since we don't have + // control over which side of a bicomp a walkup moves up) we've + // defined the walkup to either end at w_handle.first_edge() or + // w_handle.second_edge(). If both walkups ended at different edges, + // we'll do a little surgery on the w walkup path to make it follow // the other side of the final bicomp. - if ((w_path.back() == w_handle.first_edge() && - z_v_path.back() == w_handle.second_edge()) + if ((w_path.back() == w_handle.first_edge() && + z_v_path.back() == w_handle.second_edge()) || - (w_path.back() == w_handle.second_edge() && + (w_path.back() == w_handle.second_edge() && z_v_path.back() == w_handle.first_edge()) ) { walkup_itr_t wi, wi_end; edge_t final_edge = w_path.back(); - vertex_t anchor - = source(final_edge, g) == w_handle.get_anchor() ? + vertex_t anchor + = source(final_edge, g) == w_handle.get_anchor() ? target(final_edge, g) : source(final_edge, g); if (face_handles[anchor].first_edge() == final_edge) wi = walkup_itr_t(anchor, face_handles, second_side()); @@ -1506,9 +1506,9 @@ namespace boost } } - + } - else + else { //We need to find a valid z, since the x-y path re-defines the lower @@ -1519,7 +1519,7 @@ namespace boost // The z we've used so far is just an externally active vertex on the // lower face path, but may not be the z we need for a case C, D, or - // E subgraph. the z we need now is any externally active vertex on + // E subgraph. the z we need now is any externally active vertex on // the lower face path with both old_face_handles edges on the outer // face. Since we know an x-y path exists, such a z must also exist. @@ -1530,7 +1530,7 @@ namespace boost for(face_itr = x_lower_itr; *face_itr != y; ++face_itr) { vertex_t possible_z(*face_itr); - if (pertinent(possible_z,v) && + if (pertinent(possible_z,v) && outer_face_edge[face_handles[possible_z].old_first_edge()] && outer_face_edge[face_handles[possible_z].old_second_edge()] ) @@ -1544,14 +1544,14 @@ namespace boost if (externally_active(z,v)) w = z; - + typedef typename face_edge_iterator - ::type old_face_iterator_t; + ::type old_face_iterator_t; - old_face_iterator_t + old_face_iterator_t first_old_face_itr(z, face_handles, first_side()); - old_face_iterator_t + old_face_iterator_t second_old_face_itr(z, face_handles, second_side()); old_face_iterator_t old_face_itr, old_face_end; @@ -1563,10 +1563,10 @@ namespace boost vertex_to_bool_map_t x_y_path_vertex (x_y_path_vertex_vector.begin(), vm); - typename std::vector::iterator + typename std::vector::iterator of_itr, of_itr_end; - of_itr_end = old_face_iterators.end(); - for(of_itr = old_face_iterators.begin(); + of_itr_end = old_face_iterators.end(); + for(of_itr = old_face_iterators.begin(); of_itr != of_itr_end; ++of_itr ) { @@ -1580,13 +1580,13 @@ namespace boost { edge_t e(*old_face_itr); previous_vertex = current_vertex; - current_vertex = source(e,g) == current_vertex ? + current_vertex = source(e,g) == current_vertex ? target(e,g) : source(e,g); - + if (current_vertex == x || current_vertex == y) seen_x_or_y = true; - if (w == graph_traits::null_vertex() && + if (w == graph_traits::null_vertex() && externally_active(current_vertex,v) && outer_face_edge[e] && outer_face_edge[*boost::next(old_face_itr)] && @@ -1595,10 +1595,10 @@ namespace boost { w = current_vertex; } - + if (!outer_face_edge[e]) { - if (!upper_face_vertex[current_vertex] && + if (!upper_face_vertex[current_vertex] && !lower_face_vertex[current_vertex] ) { @@ -1606,22 +1606,22 @@ namespace boost } is_in_subgraph[e] = true; - if (upper_face_vertex[source(e,g)] || + if (upper_face_vertex[source(e,g)] || lower_face_vertex[source(e,g)] ) { - if (first_x_y_path_endpoint == + if (first_x_y_path_endpoint == graph_traits::null_vertex() ) first_x_y_path_endpoint = source(e,g); else second_x_y_path_endpoint = source(e,g); } - if (upper_face_vertex[target(e,g)] || + if (upper_face_vertex[target(e,g)] || lower_face_vertex[target(e,g)] ) { - if (first_x_y_path_endpoint == + if (first_x_y_path_endpoint == graph_traits::null_vertex() ) first_x_y_path_endpoint = target(e,g); @@ -1635,35 +1635,35 @@ namespace boost { chosen_case = detail::BM_CASE_C; } - + } } - // Look for a case D - one of v's embedded edges will connect to the + // Look for a case D - one of v's embedded edges will connect to the // x-y path along an inner face path. //First, get a list of all of v's embedded child edges out_edge_iterator_t v_edge_itr, v_edge_end; - for(boost::tie(v_edge_itr,v_edge_end) = out_edges(v,g); + for(boost::tie(v_edge_itr,v_edge_end) = out_edges(v,g); v_edge_itr != v_edge_end; ++v_edge_itr ) { edge_t embedded_edge(*v_edge_itr); - - if (!is_embedded[embedded_edge] || + + if (!is_embedded[embedded_edge] || embedded_edge == dfs_parent_edge[v] ) continue; case_d_edges.push_back(embedded_edge); - vertex_t current_vertex - = source(embedded_edge,g) == v ? + vertex_t current_vertex + = source(embedded_edge,g) == v ? target(embedded_edge,g) : source(embedded_edge,g); - typename face_edge_iterator<>::type + typename face_edge_iterator<>::type internal_face_itr, internal_face_end; if (face_handles[current_vertex].first_vertex() == v) { @@ -1677,13 +1677,13 @@ namespace boost } while(internal_face_itr != internal_face_end && - !outer_face_edge[*internal_face_itr] && + !outer_face_edge[*internal_face_itr] && !x_y_path_vertex[current_vertex] ) { edge_t e(*internal_face_itr); case_d_edges.push_back(e); - current_vertex = + current_vertex = source(e,g) == current_vertex ? target(e,g) : source(e,g); ++internal_face_itr; } @@ -1699,7 +1699,7 @@ namespace boost } } - + } @@ -1714,25 +1714,25 @@ namespace boost for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) { edge_t e(*ei); - goal_edge[e] = !outer_face_edge[e] && + goal_edge[e] = !outer_face_edge[e] && (source(e,g) == z || target(e,g) == z); forbidden_edge[e] = outer_face_edge[e]; } kuratowski_walkup(v, - forbidden_edge, + forbidden_edge, goal_edge, is_embedded, z_v_path ); - + if (chosen_case == detail::BM_CASE_E) { for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) { forbidden_edge[*ei] = outer_face_edge[*ei]; - goal_edge[*ei] = !outer_face_edge[*ei] && + goal_edge[*ei] = !outer_face_edge[*ei] && (source(*ei,g) == w || target(*ei,g) == w); } @@ -1748,22 +1748,22 @@ namespace boost { goal_edge[*pi] = true; } - + w_ancestor = v; vertex_t w_endpoint = graph_traits::null_vertex(); - + while(w_endpoint == graph_traits::null_vertex()) - { + { w_ancestor = dfs_parent[w_ancestor]; - w_endpoint = kuratowski_walkup(w_ancestor, - forbidden_edge, + w_endpoint = kuratowski_walkup(w_ancestor, + forbidden_edge, goal_edge, is_embedded, w_path ); - - } - + + } + } @@ -1794,7 +1794,7 @@ namespace boost xi_end = w_path.end(); for(xi = w_path.begin(); xi != xi_end; ++xi) is_in_subgraph[*xi] = true; - + child = bicomp_root; parent = dfs_parent[child]; while(child != parent) @@ -1806,10 +1806,10 @@ namespace boost - // At this point, we've already isolated the Kuratowski subgraph and - // collected all of the edges that compose it in the is_in_subgraph - // property map. But we want the verification of such a subgraph to be - // a deterministic process, and we can simplify the function + // At this point, we've already isolated the Kuratowski subgraph and + // collected all of the edges that compose it in the is_in_subgraph + // property map. But we want the verification of such a subgraph to be + // a deterministic process, and we can simplify the function // is_kuratowski_subgraph by cleaning up some edges here. if (chosen_case == detail::BM_CASE_B) @@ -1821,13 +1821,13 @@ namespace boost // In a case C subgraph, at least one of the x-y path endpoints // (call it alpha) is above either x or y on the outer face. The // other endpoint may be attached at x or y OR above OR below. In - // any of these three cases, we can form a K_3_3 by removing the - // edge attached to v on the outer face that is NOT on the path to + // any of these three cases, we can form a K_3_3 by removing the + // edge attached to v on the outer face that is NOT on the path to // alpha. - typename face_vertex_iterator::type + typename face_vertex_iterator::type face_itr, face_end; - if (face_handles[v_dfchild_handle.first_vertex()].first_edge() == + if (face_handles[v_dfchild_handle.first_vertex()].first_edge() == v_dfchild_handle.first_edge() ) { @@ -1857,13 +1857,13 @@ namespace boost break; } } - + } else if (chosen_case == detail::BM_CASE_D) { // Need to remove both of the edges adjacent to v on the outer face. // remove the connecting edges from v to bicomp, then - // is_kuratowski_subgraph will shrink vertices of degree 1 + // is_kuratowski_subgraph will shrink vertices of degree 1 // automatically... is_in_subgraph[v_dfchild_handle.first_edge()] = false; @@ -1872,8 +1872,8 @@ namespace boost } else if (chosen_case == detail::BM_CASE_E) { - // Similarly to case C, if the endpoints of the x-y path are both - // below x and y, we should remove an edge to allow the subgraph to + // Similarly to case C, if the endpoints of the x-y path are both + // below x and y, we should remove an edge to allow the subgraph to // contract to a K_3_3. @@ -1881,7 +1881,7 @@ namespace boost (second_x_y_path_endpoint != x && second_x_y_path_endpoint != y) ) { - is_in_subgraph[dfs_parent_edge[v]] = false; + is_in_subgraph[dfs_parent_edge[v]] = false; vertex_t deletion_endpoint, other_endpoint; if (lower_face_vertex[first_x_y_path_endpoint]) @@ -1890,13 +1890,13 @@ namespace boost other_endpoint = first_x_y_path_endpoint; } else - { + { deletion_endpoint = first_x_y_path_endpoint; other_endpoint = second_x_y_path_endpoint; } typename face_edge_iterator<>::type face_itr, face_end; - + bool found_other_endpoint = false; for(face_itr = typename face_edge_iterator<>::type (deletion_endpoint, face_handles, first_side()); @@ -1904,7 +1904,7 @@ namespace boost ) { edge_t e(*face_itr); - if (source(e,g) == other_endpoint || + if (source(e,g) == other_endpoint || target(e,g) == other_endpoint ) { @@ -1915,7 +1915,7 @@ namespace boost if (found_other_endpoint) { - is_in_subgraph[face_handles[deletion_endpoint].first_edge()] + is_in_subgraph[face_handles[deletion_endpoint].first_edge()] = false; } else @@ -1924,14 +1924,14 @@ namespace boost = false; } } - + } for(boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) if (is_in_subgraph[*ei]) *o_itr = *ei; - + } @@ -1957,14 +1957,14 @@ namespace boost vertex_t kuratowski_v; vertex_t kuratowski_x; vertex_t kuratowski_y; - - vertex_list_t garbage; // we delete items from linked lists by + + vertex_list_t garbage; // we delete items from linked lists by // splicing them into garbage //only need these two for kuratowski subgraph isolation std::vector current_merge_points; std::vector embedded_edges; - + //property map storage std::vector low_point_vector; std::vector dfs_parent_vector; @@ -1976,7 +1976,7 @@ namespace boost std::vector< face_handle_t > face_handles_vector; std::vector< face_handle_t > dfs_child_handles_vector; std::vector< vertex_list_ptr_t > separated_dfs_child_list_vector; - std::vector< typename vertex_list_t::iterator > + std::vector< typename vertex_list_t::iterator > separated_node_in_parent_list_vector; std::vector canonical_dfs_child_vector; std::vector flipped_vector; @@ -1993,20 +1993,20 @@ namespace boost vertex_to_face_handle_list_ptr_map_t pertinent_roots; vertex_to_v_size_map_t backedge_flag; vertex_to_v_size_map_t visited; - vertex_to_face_handle_map_t face_handles; + vertex_to_face_handle_map_t face_handles; vertex_to_face_handle_map_t dfs_child_handles; vertex_to_vertex_list_ptr_map_t separated_dfs_child_list; vertex_to_separated_node_map_t separated_node_in_parent_list; - vertex_to_vertex_map_t canonical_dfs_child; + vertex_to_vertex_map_t canonical_dfs_child; vertex_to_bool_map_t flipped; vertex_to_edge_vector_map_t backedges; vertex_to_edge_map_t dfs_parent_edge; //only need for kuratowski merge_stack_t merge_stack; - + }; - - + + } //namespace boost #endif //__BOYER_MYRVOLD_IMPL_HPP__ diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/face_handles.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/face_handles.hpp index 99b4eec3..4e28d4af 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/face_handles.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/planar_detail/face_handles.hpp @@ -12,7 +12,7 @@ #include #include -#include +#include // A "face handle" is an optimization meant to serve two purposes in @@ -26,7 +26,7 @@ // sequence of edges. The functions first_vertex/second_vertex and // first_edge/second_edge allow fast access to the beginning and end of the // stored sequence, which allows one to traverse the outer face of the partial -// planar embedding as it's being created. +// planar embedding as it's being created. // // There are some policies below that define the contents of the face handles: // in the case no embedding is needed (for example, if one just wants to use @@ -48,7 +48,7 @@ namespace boost { namespace graph { namespace detail { //face handle policies - + //EmbeddingStorage policy struct store_embedding {}; struct recursive_lazy_list : public store_embedding {}; @@ -65,14 +65,14 @@ namespace boost { namespace graph { namespace detail { template struct lazy_list_node { - typedef std::shared_ptr< lazy_list_node > ptr_t; + typedef shared_ptr< lazy_list_node > ptr_t; lazy_list_node(const DataType& data) : m_reversed(false), m_data(data), m_has_data(true) {} - + lazy_list_node(ptr_t left_child, ptr_t right_child) : m_reversed(false), m_has_data(false), @@ -83,10 +83,10 @@ namespace boost { namespace graph { namespace detail { bool m_reversed; DataType m_data; bool m_has_data; - std::shared_ptr m_left_child; - std::shared_ptr m_right_child; + shared_ptr m_left_child; + shared_ptr m_right_child; }; - + template @@ -139,7 +139,7 @@ namespace boost { namespace graph { namespace detail { struct edge_list_storage { typedef lazy_list_node node_type; - typedef std::shared_ptr< node_type > type; + typedef shared_ptr< node_type > type; type value; void push_back(Edge e) @@ -178,17 +178,17 @@ namespace boost { namespace graph { namespace detail { private: template - void get_list_helper(OutputIterator o_itr, + void get_list_helper(OutputIterator o_itr, type root, bool flipped = false ) { if (!root) return; - + if (root->m_has_data) *o_itr = root->m_data; - + if ((flipped && !root->m_reversed) || (!flipped && root->m_reversed) ) @@ -201,9 +201,9 @@ namespace boost { namespace graph { namespace detail { get_list_helper(o_itr, root->m_left_child, false); get_list_helper(o_itr, root->m_right_child, false); } - + } - + }; @@ -254,20 +254,20 @@ namespace boost { namespace graph { namespace detail { - - template struct face_handle_impl { typedef typename graph_traits::vertex_descriptor vertex_t; typedef typename graph_traits::edge_descriptor edge_t; - typedef typename edge_list_storage::type + typedef typename edge_list_storage::type edge_list_storage_t; - face_handle_impl() : + face_handle_impl() : cached_first_vertex(graph_traits::null_vertex()), cached_second_vertex(graph_traits::null_vertex()), true_first_vertex(graph_traits::null_vertex()), @@ -308,11 +308,11 @@ namespace boost { namespace graph { namespace detail { - template - class face_handle + class face_handle { public: typedef typename graph_traits::vertex_descriptor vertex_t; @@ -347,19 +347,19 @@ namespace boost { namespace graph { namespace detail { } //default copy construction, assignment okay. - - void push_first(edge_t e, const Graph& g) - { + + void push_first(edge_t e, const Graph& g) + { pimpl->edge_list.push_front(e); - pimpl->cached_first_vertex = pimpl->true_first_vertex = + pimpl->cached_first_vertex = pimpl->true_first_vertex = source(e, g) == pimpl->anchor ? target(e,g) : source(e,g); pimpl->cached_first_edge = e; } - - void push_second(edge_t e, const Graph& g) - { + + void push_second(edge_t e, const Graph& g) + { pimpl->edge_list.push_back(e); - pimpl->cached_second_vertex = pimpl->true_second_vertex = + pimpl->cached_second_vertex = pimpl->true_second_vertex = source(e, g) == pimpl->anchor ? target(e,g) : source(e,g); pimpl->cached_second_edge = e; } @@ -370,22 +370,22 @@ namespace boost { namespace graph { namespace detail { } inline vertex_t first_vertex() const - { + { return pimpl->cached_first_vertex; } - - inline vertex_t second_vertex() const - { + + inline vertex_t second_vertex() const + { return pimpl->cached_second_vertex; } - inline vertex_t true_first_vertex() const - { + inline vertex_t true_first_vertex() const + { return pimpl->true_first_vertex; } - inline vertex_t true_second_vertex() const - { + inline vertex_t true_second_vertex() const + { return pimpl->true_second_vertex; } @@ -413,17 +413,17 @@ namespace boost { namespace graph { namespace detail { { return pimpl->cached_first_edge; } - + inline edge_t second_edge() const { return pimpl->cached_second_edge; } - + inline vertex_t get_anchor() const { return pimpl->anchor; } - + void glue_first_to_second (face_handle& bottom) { @@ -432,7 +432,7 @@ namespace boost { namespace graph { namespace detail { pimpl->cached_first_vertex = bottom.pimpl->cached_first_vertex; pimpl->cached_first_edge = bottom.pimpl->cached_first_edge; } - + void glue_second_to_first (face_handle& bottom) { @@ -441,7 +441,7 @@ namespace boost { namespace graph { namespace detail { pimpl->cached_second_vertex = bottom.pimpl->cached_second_vertex; pimpl->cached_second_edge = bottom.pimpl->cached_second_edge; } - + void flip() { pimpl->edge_list.reverse(); @@ -449,7 +449,7 @@ namespace boost { namespace graph { namespace detail { std::swap(pimpl->cached_first_vertex, pimpl->cached_second_vertex); std::swap(pimpl->cached_first_edge, pimpl->cached_second_edge); } - + template void get_list(OutputIterator o_itr) { @@ -481,12 +481,12 @@ namespace boost { namespace graph { namespace detail { pimpl->old_handles.first_edge = pimpl->cached_first_edge; pimpl->old_handles.second_edge = pimpl->cached_second_edge; } - + void store_old_face_handles_dispatch(no_old_handles) {} - boost::std::shared_ptr pimpl; + boost::shared_ptr pimpl; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/plod_generator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/plod_generator.hpp index d0684d88..4e557cf0 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/plod_generator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/plod_generator.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -21,7 +21,7 @@ namespace boost { template - class out_directed_plod_iterator + class out_directed_plod_iterator { public: typedef std::forward_iterator_tag iterator_category; @@ -32,10 +32,10 @@ namespace boost { out_directed_plod_iterator() : gen(0), at_end(true) { } - out_directed_plod_iterator(RandomGenerator& gen, std::size_t n, - double alpha, double beta, + out_directed_plod_iterator(RandomGenerator& gen, std::size_t n, + double alpha, double beta, bool allow_self_loops) - : gen(&gen), n(n), alpha(alpha), beta(beta), + : gen(&gen), n(n), alpha(alpha), beta(beta), allow_self_loops(allow_self_loops), at_end(false), degree(0), current(0, 0) { @@ -50,7 +50,7 @@ namespace boost { pointer operator->() const { return ¤t; } out_directed_plod_iterator& operator++() - { + { using std::pow; uniform_int x(0, n-1); @@ -66,7 +66,7 @@ namespace boost { } std::size_t xv = x(*gen); - degree = (xv == 0? 0 : std::size_t(beta * pow(xv, -alpha))); + degree = (xv == 0? 0 : std::size_t(beta * pow(xv, -alpha))); } do { @@ -85,16 +85,16 @@ namespace boost { } bool operator==(const out_directed_plod_iterator& other) const - { - return at_end == other.at_end; + { + return at_end == other.at_end; } bool operator!=(const out_directed_plod_iterator& other) const - { - return !(*this == other); + { + return !(*this == other); } - private: + private: RandomGenerator* gen; std::size_t n; double alpha; @@ -106,7 +106,7 @@ namespace boost { }; template - class undirected_plod_iterator + class undirected_plod_iterator { typedef std::vector > out_degrees_t; @@ -117,11 +117,11 @@ namespace boost { typedef const value_type* pointer; typedef std::ptrdiff_t difference_type; - undirected_plod_iterator() + undirected_plod_iterator() : gen(0), out_degrees(), degrees_left(0), allow_self_loops(false) { } - undirected_plod_iterator(RandomGenerator& gen, std::size_t n, - double alpha, double beta, + undirected_plod_iterator(RandomGenerator& gen, std::size_t n, + double alpha, double beta, bool allow_self_loops = false) : gen(&gen), n(n), out_degrees(new out_degrees_t), degrees_left(0), allow_self_loops(allow_self_loops) @@ -145,7 +145,7 @@ namespace boost { pointer operator->() const { return ¤t; } undirected_plod_iterator& operator++() - { + { next(); return *this; } @@ -158,8 +158,8 @@ namespace boost { } bool operator==(const undirected_plod_iterator& other) const - { - return degrees_left == other.degrees_left; + { + return degrees_left == other.degrees_left; } bool operator!=(const undirected_plod_iterator& other) const @@ -192,7 +192,7 @@ namespace boost { (*out_degrees)[source] = out_degrees->back(); out_degrees->pop_back(); continue; - } + } // Select target vertex target = x(*gen); @@ -200,7 +200,7 @@ namespace boost { (*out_degrees)[target] = out_degrees->back(); out_degrees->pop_back(); continue; - } else if (source != target + } else if (source != target || (allow_self_loops && (*out_degrees)[source].second > 2)) { break; } @@ -217,7 +217,7 @@ namespace boost { RandomGenerator* gen; std::size_t n; - std::shared_ptr out_degrees; + shared_ptr out_degrees; std::size_t degrees_left; bool allow_self_loops; value_type current; @@ -243,7 +243,7 @@ namespace boost { public: plod_iterator() : inherited() { } - plod_iterator(RandomGenerator& gen, std::size_t n, + plod_iterator(RandomGenerator& gen, std::size_t n, double alpha, double beta, bool allow_self_loops = false) : inherited(gen, n, alpha, beta, allow_self_loops) { } }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/rmat_graph_generator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/rmat_graph_generator.hpp index f51e9e27..4256d7a8 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/rmat_graph_generator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/rmat_graph_generator.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -24,7 +24,7 @@ #include #include -using boost::std::shared_ptr; +using boost::shared_ptr; using boost::uniform_01; // Returns floor(log_2(n)), and -1 when n is 0 @@ -76,7 +76,7 @@ generate_permutation_vector(RandomGenerator& gen, std::vector& vertexPermutat template std::pair -generate_edge(std::shared_ptr > prob, T n, +generate_edge(shared_ptr > prob, T n, unsigned int SCALE, double a, double b, double c, double d) { T u = 0, v = 0; @@ -213,7 +213,7 @@ namespace boost { private: // Parameters - std::shared_ptr > gen; + shared_ptr > gen; vertices_size_type n; double a, b, c, d; int edge; @@ -328,7 +328,7 @@ namespace boost { private: // Parameters - std::shared_ptr > gen; + shared_ptr > gen; bool permute_vertices; // Internal data structures @@ -442,7 +442,7 @@ namespace boost { private: // Parameters - std::shared_ptr > gen; + shared_ptr > gen; // Internal data structures std::vector values; @@ -576,7 +576,7 @@ namespace boost { private: // Parameters - std::shared_ptr > gen; + shared_ptr > gen; bool bidirectional; // Internal data structures diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/topology.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/topology.hpp index 8e64d090..ada36d19 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/topology.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/graph/topology.hpp @@ -29,10 +29,10 @@ namespace boost { * Topologies * ***********************************************************/ template -class convex_topology +class convex_topology { public: // For VisualAge C++ - struct point + struct point { BOOST_STATIC_CONSTANT(std::size_t, dimensions = Dims); point() { } @@ -129,7 +129,7 @@ class convex_topology typedef point point_type; typedef point_difference point_difference_type; - double distance(point a, point b) const + double distance(point a, point b) const { double dist = 0.; for (std::size_t i = 0; i < Dims; ++i) { @@ -142,7 +142,7 @@ class convex_topology return dist; } - point move_position_toward(point a, double fraction, point b) const + point move_position_toward(point a, double fraction, point b) const { point result; for (std::size_t i = 0; i < Dims; ++i) @@ -206,15 +206,15 @@ class hypercube_topology : public convex_topology typedef typename convex_topology::point_type point_type; typedef typename convex_topology::point_difference_type point_difference_type; - explicit hypercube_topology(double scaling = 1.0) - : gen_ptr(new RandomNumberGenerator), rand(new rand_t(*gen_ptr)), - scaling(scaling) + explicit hypercube_topology(double scaling = 1.0) + : gen_ptr(new RandomNumberGenerator), rand(new rand_t(*gen_ptr)), + scaling(scaling) { } - hypercube_topology(RandomNumberGenerator& gen, double scaling = 1.0) + hypercube_topology(RandomNumberGenerator& gen, double scaling = 1.0) : gen_ptr(), rand(new rand_t(gen)), scaling(scaling) { } - - point_type random_point() const + + point_type random_point() const { point_type p; for (std::size_t i = 0; i < Dims; ++i) @@ -268,8 +268,8 @@ class hypercube_topology : public convex_topology } private: - std::shared_ptr gen_ptr; - std::shared_ptr rand; + shared_ptr gen_ptr; + shared_ptr rand; double scaling; }; @@ -280,8 +280,8 @@ class square_topology : public hypercube_topology<2, RandomNumberGenerator> public: explicit square_topology(double scaling = 1.0) : inherited(scaling) { } - - square_topology(RandomNumberGenerator& gen, double scaling = 1.0) + + square_topology(RandomNumberGenerator& gen, double scaling = 1.0) : inherited(gen, scaling) { } }; @@ -308,7 +308,7 @@ class rectangle_topology : public convex_topology<2> typedef typename convex_topology<2>::point_type point_type; typedef typename convex_topology<2>::point_difference_type point_difference_type; - point_type random_point() const + point_type random_point() const { point_type p; p[0] = (*rand)() * (right - left) + left; @@ -362,8 +362,8 @@ class rectangle_topology : public convex_topology<2> } private: - std::shared_ptr gen_ptr; - std::shared_ptr rand; + shared_ptr gen_ptr; + shared_ptr rand; double left, top, right, bottom; }; @@ -374,8 +374,8 @@ class cube_topology : public hypercube_topology<3, RandomNumberGenerator> public: explicit cube_topology(double scaling = 1.0) : inherited(scaling) { } - - cube_topology(RandomNumberGenerator& gen, double scaling = 1.0) + + cube_topology(RandomNumberGenerator& gen, double scaling = 1.0) : inherited(gen, scaling) { } }; @@ -389,15 +389,15 @@ class ball_topology : public convex_topology typedef typename convex_topology::point_type point_type; typedef typename convex_topology::point_difference_type point_difference_type; - explicit ball_topology(double radius = 1.0) - : gen_ptr(new RandomNumberGenerator), rand(new rand_t(*gen_ptr)), - radius(radius) + explicit ball_topology(double radius = 1.0) + : gen_ptr(new RandomNumberGenerator), rand(new rand_t(*gen_ptr)), + radius(radius) { } - ball_topology(RandomNumberGenerator& gen, double radius = 1.0) + ball_topology(RandomNumberGenerator& gen, double radius = 1.0) : gen_ptr(), rand(new rand_t(gen)), radius(radius) { } - - point_type random_point() const + + point_type random_point() const { point_type p; double dist_sum; @@ -457,8 +457,8 @@ class ball_topology : public convex_topology } private: - std::shared_ptr gen_ptr; - std::shared_ptr rand; + shared_ptr gen_ptr; + shared_ptr rand; double radius; }; @@ -469,8 +469,8 @@ class circle_topology : public ball_topology<2, RandomNumberGenerator> public: explicit circle_topology(double radius = 1.0) : inherited(radius) { } - - circle_topology(RandomNumberGenerator& gen, double radius = 1.0) + + circle_topology(RandomNumberGenerator& gen, double radius = 1.0) : inherited(gen, radius) { } }; @@ -481,13 +481,13 @@ class sphere_topology : public ball_topology<3, RandomNumberGenerator> public: explicit sphere_topology(double radius = 1.0) : inherited(radius) { } - - sphere_topology(RandomNumberGenerator& gen, double radius = 1.0) + + sphere_topology(RandomNumberGenerator& gen, double radius = 1.0) : inherited(gen, radius) { } }; template -class heart_topology +class heart_topology { // Heart is defined as the union of three shapes: // Square w/ corners (+-1000, -1000), (0, 0), (0, -2000) @@ -495,7 +495,7 @@ class heart_topology // Circle centered at (500, -500) radius 500*sqrt(2) // Bounding box (-1000, -2000) - (1000, 500*(sqrt(2) - 1)) - struct point + struct point { point() { values[0] = 0.0; values[1] = 0.0; } point(double x, double y) { values[0] = x; values[1] = y; } @@ -507,7 +507,7 @@ class heart_topology double values[2]; }; - bool in_heart(point p) const + bool in_heart(point p) const { #ifndef BOOST_NO_STDC_NAMESPACE using std::abs; @@ -522,7 +522,7 @@ class heart_topology return false; } - bool segment_within_heart(point p1, point p2) const + bool segment_within_heart(point p1, point p2) const { // Assumes that p1 and p2 are within the heart if ((p1[0] < 0) == (p2[0] < 0)) return true; // Same side of symmetry line @@ -538,13 +538,13 @@ class heart_topology public: typedef point point_type; - heart_topology() + heart_topology() : gen_ptr(new RandomNumberGenerator), rand(new rand_t(*gen_ptr)) { } - heart_topology(RandomNumberGenerator& gen) + heart_topology(RandomNumberGenerator& gen) : gen_ptr(), rand(new rand_t(gen)) { } - point random_point() const + point random_point() const { point result; do { @@ -556,7 +556,7 @@ class heart_topology // Not going to provide clipping to bounding region or distance from boundary - double distance(point a, point b) const + double distance(point a, point b) const { if (segment_within_heart(a, b)) { // Straight line @@ -567,7 +567,7 @@ class heart_topology } } - point move_position_toward(point a, double fraction, point b) const + point move_position_toward(point a, double fraction, point b) const { if (segment_within_heart(a, b)) { // Straight line @@ -576,10 +576,10 @@ class heart_topology } else { double distance_to_point_a = boost::math::hypot(a[0], a[1]); double distance_to_point_b = boost::math::hypot(b[0], b[1]); - double location_of_point = distance_to_point_a / + double location_of_point = distance_to_point_a / (distance_to_point_a + distance_to_point_b); if (fraction < location_of_point) - return point(a[0] * (1 - fraction / location_of_point), + return point(a[0] * (1 - fraction / location_of_point), a[1] * (1 - fraction / location_of_point)); else return point( @@ -589,8 +589,8 @@ class heart_topology } private: - std::shared_ptr gen_ptr; - std::shared_ptr rand; + shared_ptr gen_ptr; + shared_ptr rand; }; } // namespace boost diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/interprocess_fwd.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/interprocess_fwd.hpp index 0309d6b6..42f170a6 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/interprocess_fwd.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/interprocess_fwd.hpp @@ -393,7 +393,7 @@ template class intrusive_ptr; template -class std::shared_ptr; +class shared_ptr; template class weak_ptr; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/enable_shared_from_this.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/enable_shared_from_this.hpp index 98c48c5d..d9f16aec 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/enable_shared_from_this.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/enable_shared_from_this.hpp @@ -19,7 +19,7 @@ #include #include -#include +#include //!\file //!Describes an utility to form a shared pointer from this @@ -27,10 +27,10 @@ namespace boost{ namespace interprocess{ -//!This class is used as a base class that allows a std::shared_ptr to the current +//!This class is used as a base class that allows a shared_ptr to the current //!object to be obtained from within a member function. //!enable_shared_from_this defines two member functions called shared_from_this -//!that return a std::shared_ptr and std::shared_ptr, depending on constness, to this. +//!that return a shared_ptr and shared_ptr, depending on constness, to this. template class enable_shared_from_this { @@ -50,16 +50,16 @@ class enable_shared_from_this /// @endcond public: - std::shared_ptr shared_from_this() + shared_ptr shared_from_this() { - std::shared_ptr p(_internal_weak_this); + shared_ptr p(_internal_weak_this); BOOST_ASSERT(ipcdetail::to_raw_pointer(p.get()) == this); return p; } - std::shared_ptr shared_from_this() const + shared_ptr shared_from_this() const { - std::shared_ptr p(_internal_weak_this); + shared_ptr p(_internal_weak_this); BOOST_ASSERT(ipcdetail::to_raw_pointer(p.get()) == this); return p; } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/shared_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/shared_ptr.hpp index 29844a97..302eb149 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/shared_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/shared_ptr.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// This file is the adaptation for Interprocess of boost/std::shared_ptr.hpp +// This file is the adaptation for Interprocess of boost/shared_ptr.hpp // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // (C) Copyright Peter Dimov 2001, 2002, 2003 @@ -37,7 +37,7 @@ #include // for std::basic_ostream //!\file -//!Describes the smart pointer std::shared_ptr +//!Describes the smart pointer shared_ptr namespace boost{ namespace interprocess{ @@ -66,11 +66,11 @@ inline void sp_enable_shared_from_this(shared_count c } // namespace ipcdetail -//!std::shared_ptr stores a pointer to a dynamically allocated object. -//!The object pointed to is guaranteed to be deleted when the last std::shared_ptr pointing to +//!shared_ptr stores a pointer to a dynamically allocated object. +//!The object pointed to is guaranteed to be deleted when the last shared_ptr pointing to //!it is destroyed or reset. //! -//!std::shared_ptr is parameterized on +//!shared_ptr is parameterized on //!T (the type of the object pointed to), VoidAllocator (the void allocator to be used //!to allocate the auxiliary data) and Deleter (the deleter whose //!operator() will be used to delete the object. @@ -79,18 +79,18 @@ inline void sp_enable_shared_from_this(shared_count c //!VoidAllocator::pointer type (that is, if typename VoidAllocator::pointer is //!offset_ptr, the internal pointer will be offset_ptr). //! -//!Because the implementation uses reference counting, cycles of std::shared_ptr +//!Because the implementation uses reference counting, cycles of shared_ptr //!instances will not be reclaimed. For example, if main() holds a -//!std::shared_ptr to A, which directly or indirectly holds a std::shared_ptr back -//!to A, A's use count will be 2. Destruction of the original std::shared_ptr +//!shared_ptr to A, which directly or indirectly holds a shared_ptr back +//!to A, A's use count will be 2. Destruction of the original shared_ptr //!will leave A dangling with a use count of 1. //!Use weak_ptr to "break cycles." template -class std::shared_ptr +class shared_ptr { /// @cond private: - typedef std::shared_ptr this_type; + typedef shared_ptr this_type; /// @endcond public: @@ -111,19 +111,19 @@ class std::shared_ptr pointer_traits::template rebind_pointer::type const_allocator_pointer; - BOOST_COPYABLE_AND_MOVABLE(std::shared_ptr) + BOOST_COPYABLE_AND_MOVABLE(shared_ptr) public: - //!Constructs an empty std::shared_ptr. + //!Constructs an empty shared_ptr. //!Use_count() == 0 && get()== 0. - std::shared_ptr() + shared_ptr() : m_pn() // never throws {} - //!Constructs a std::shared_ptr that owns the pointer p. Auxiliary data will be allocated + //!Constructs a shared_ptr that owns the pointer p. Auxiliary data will be allocated //!with a copy of a and the object will be deleted with a copy of d. //!Requirements: Deleter and A's copy constructor must not throw. - explicit std::shared_ptr(const pointer&p, const VoidAllocator &a = VoidAllocator(), const Deleter &d = Deleter()) + explicit shared_ptr(const pointer&p, const VoidAllocator &a = VoidAllocator(), const Deleter &d = Deleter()) : m_pn(p, a, d) { //Check that the pointer passed is of the same type that @@ -137,55 +137,55 @@ class std::shared_ptr ipcdetail::sp_enable_shared_from_this( m_pn, ipcdetail::to_raw_pointer(p), ipcdetail::to_raw_pointer(p) ); } - //!Copy constructs a std::shared_ptr. If r is empty, constructs an empty std::shared_ptr. Otherwise, constructs - //!a std::shared_ptr that shares ownership with r. Never throws. - std::shared_ptr(const std::shared_ptr &r) + //!Copy constructs a shared_ptr. If r is empty, constructs an empty shared_ptr. Otherwise, constructs + //!a shared_ptr that shares ownership with r. Never throws. + shared_ptr(const shared_ptr &r) : m_pn(r.m_pn) // never throws {} - //!Constructs a std::shared_ptr that shares ownership with other and stores p. + //!Constructs a shared_ptr that shares ownership with other and stores p. //!Postconditions: get() == p && use_count() == r.use_count(). //!Throws: nothing. - std::shared_ptr(const std::shared_ptr &other, const pointer &p) + shared_ptr(const shared_ptr &other, const pointer &p) : m_pn(other.m_pn, p) {} - //!If r is empty, constructs an empty std::shared_ptr. Otherwise, constructs - //!a std::shared_ptr that shares ownership with r. Never throws. + //!If r is empty, constructs an empty shared_ptr. Otherwise, constructs + //!a shared_ptr that shares ownership with r. Never throws. template - std::shared_ptr(std::shared_ptr const & r) + shared_ptr(shared_ptr const & r) : m_pn(r.m_pn) // never throws {} - //!Constructs a std::shared_ptr that shares ownership with r and stores + //!Constructs a shared_ptr that shares ownership with r and stores //!a copy of the pointer stored in r. template - explicit std::shared_ptr(weak_ptr const & r) + explicit shared_ptr(weak_ptr const & r) : m_pn(r.m_pn) // may throw {} - //!Move-Constructs a std::shared_ptr that takes ownership of other resource and + //!Move-Constructs a shared_ptr that takes ownership of other resource and //!other is put in default-constructed state. //!Throws: nothing. - explicit std::shared_ptr(BOOST_RV_REF(std::shared_ptr) other) + explicit shared_ptr(BOOST_RV_REF(shared_ptr) other) : m_pn() { this->swap(other); } /// @cond template - std::shared_ptr(std::shared_ptr const & r, ipcdetail::static_cast_tag) + shared_ptr(shared_ptr const & r, ipcdetail::static_cast_tag) : m_pn( pointer(static_cast(ipcdetail::to_raw_pointer(r.m_pn.to_raw_pointer()))) , r.m_pn) {} template - std::shared_ptr(std::shared_ptr const & r, ipcdetail::const_cast_tag) + shared_ptr(shared_ptr const & r, ipcdetail::const_cast_tag) : m_pn( pointer(const_cast(ipcdetail::to_raw_pointer(r.m_pn.to_raw_pointer()))) , r.m_pn) {} template - std::shared_ptr(std::shared_ptr const & r, ipcdetail::dynamic_cast_tag) + shared_ptr(shared_ptr const & r, ipcdetail::dynamic_cast_tag) : m_pn( pointer(dynamic_cast(ipcdetail::to_raw_pointer(r.m_pn.to_raw_pointer()))) , r.m_pn) { @@ -195,26 +195,26 @@ class std::shared_ptr } /// @endcond - //!Equivalent to std::shared_ptr(r).swap(*this). + //!Equivalent to shared_ptr(r).swap(*this). //!Never throws template - std::shared_ptr & operator=(std::shared_ptr const & r) + shared_ptr & operator=(shared_ptr const & r) { m_pn = r.m_pn; // shared_count::op= doesn't throw return *this; } - //!Equivalent to std::shared_ptr(r).swap(*this). + //!Equivalent to shared_ptr(r).swap(*this). //!Never throws - std::shared_ptr & operator=(BOOST_COPY_ASSIGN_REF(std::shared_ptr) r) + shared_ptr & operator=(BOOST_COPY_ASSIGN_REF(shared_ptr) r) { m_pn = r.m_pn; // shared_count::op= doesn't throw return *this; } - //!Move-assignment. Equivalent to std::shared_ptr(other).swap(*this). + //!Move-assignment. Equivalent to shared_ptr(other).swap(*this). //!Never throws - std::shared_ptr & operator=(BOOST_RV_REF(std::shared_ptr) other) // never throws + shared_ptr & operator=(BOOST_RV_REF(shared_ptr) other) // never throws { this_type(other).swap(*this); return *this; @@ -243,7 +243,7 @@ class std::shared_ptr } template - void reset(std::shared_ptr const & r, const pointer &p) + void reset(shared_ptr const & r, const pointer &p) { this_type(r, p).swap(*this); } @@ -282,7 +282,7 @@ class std::shared_ptr bool unique() const // never throws { return m_pn.unique(); } - //!Returns the number of std::shared_ptr objects, *this included, + //!Returns the number of shared_ptr objects, *this included, //!that share ownership with *this, or an unspecified nonnegative //!value when *this is empty. //!use_count() is not necessarily efficient. Use only for @@ -292,13 +292,13 @@ class std::shared_ptr //!Exchanges the contents of the two //!smart pointers. - void swap(std::shared_ptr & other) // never throws + void swap(shared_ptr & other) // never throws { m_pn.swap(other.m_pn); } /// @cond template - bool _internal_less(std::shared_ptr const & rhs) const + bool _internal_less(shared_ptr const & rhs) const { return m_pn < rhs.m_pn; } const_deleter_pointer get_deleter() const @@ -309,50 +309,50 @@ class std::shared_ptr private: - template friend class std::shared_ptr; + template friend class shared_ptr; template friend class weak_ptr; ipcdetail::shared_count m_pn; // reference counter /// @endcond -}; // std::shared_ptr +}; // shared_ptr template inline -bool operator==(std::shared_ptr const & a, std::shared_ptr const & b) +bool operator==(shared_ptr const & a, shared_ptr const & b) { return a.get() == b.get(); } template inline -bool operator!=(std::shared_ptr const & a, std::shared_ptr const & b) +bool operator!=(shared_ptr const & a, shared_ptr const & b) { return a.get() != b.get(); } template inline -bool operator<(std::shared_ptr const & a, std::shared_ptr const & b) +bool operator<(shared_ptr const & a, shared_ptr const & b) { return a._internal_less(b); } template inline -void swap(std::shared_ptr & a, std::shared_ptr & b) +void swap(shared_ptr & a, shared_ptr & b) { a.swap(b); } template inline -std::shared_ptr static_pointer_cast(std::shared_ptr const & r) -{ return std::shared_ptr(r, ipcdetail::static_cast_tag()); } +shared_ptr static_pointer_cast(shared_ptr const & r) +{ return shared_ptr(r, ipcdetail::static_cast_tag()); } template inline -std::shared_ptr const_pointer_cast(std::shared_ptr const & r) -{ return std::shared_ptr(r, ipcdetail::const_cast_tag()); } +shared_ptr const_pointer_cast(shared_ptr const & r) +{ return shared_ptr(r, ipcdetail::const_cast_tag()); } template inline -std::shared_ptr dynamic_pointer_cast(std::shared_ptr const & r) -{ return std::shared_ptr(r, ipcdetail::dynamic_cast_tag()); } +shared_ptr dynamic_pointer_cast(shared_ptr const & r) +{ return shared_ptr(r, ipcdetail::dynamic_cast_tag()); } -// to_raw_pointer() enables boost::mem_fn to recognize std::shared_ptr +// to_raw_pointer() enables boost::mem_fn to recognize shared_ptr template inline -T * to_raw_pointer(std::shared_ptr const & p) +T * to_raw_pointer(shared_ptr const & p) { return p.get(); } // operator<< template inline std::basic_ostream & operator<< - (std::basic_ostream & os, std::shared_ptr const & p) + (std::basic_ostream & os, shared_ptr const & p) { os << p.get(); return os; } //!Returns the type of a shared pointer @@ -364,7 +364,7 @@ struct managed_shared_ptr { typedef typename ManagedMemory::template allocator::type void_allocator; typedef typename ManagedMemory::template deleter::type deleter; - typedef std::shared_ptr< T, void_allocator, deleter> type; + typedef shared_ptr< T, void_allocator, deleter> type; }; //!Returns an instance of a shared pointer constructed @@ -407,9 +407,9 @@ inline typename managed_shared_ptr::type /// @cond #if defined(_MSC_VER) && (_MSC_VER < 1400) -// to_raw_pointer() enables boost::mem_fn to recognize std::shared_ptr +// to_raw_pointer() enables boost::mem_fn to recognize shared_ptr template inline -T * to_raw_pointer(boost::interprocess::std::shared_ptr const & p) +T * to_raw_pointer(boost::interprocess::shared_ptr const & p) { return p.get(); } #endif diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/weak_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/weak_ptr.hpp index 6b91cf87..99c8a631 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/weak_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/interprocess/smart_ptr/weak_ptr.hpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include @@ -31,13 +31,13 @@ namespace boost{ namespace interprocess{ //!The weak_ptr class template stores a "weak reference" to an object -//!that's already managed by a std::shared_ptr. To access the object, a weak_ptr -//!can be converted to a std::shared_ptr using the std::shared_ptr constructor or the -//!member function lock. When the last std::shared_ptr to the object goes away -//!and the object is deleted, the attempt to obtain a std::shared_ptr from the +//!that's already managed by a shared_ptr. To access the object, a weak_ptr +//!can be converted to a shared_ptr using the shared_ptr constructor or the +//!member function lock. When the last shared_ptr to the object goes away +//!and the object is deleted, the attempt to obtain a shared_ptr from the //!weak_ptr instances that refer to the deleted object will fail: the constructor //!will throw an exception of type bad_weak_ptr, and weak_ptr::lock will -//!return an empty std::shared_ptr. +//!return an empty shared_ptr. //! //!Every weak_ptr meets the CopyConstructible and Assignable requirements //!of the C++ Standard Library, and so can be used in standard library containers. @@ -100,9 +100,9 @@ class weak_ptr weak_ptr(weak_ptr const & r) : m_pn(r.m_pn) // never throws { - //Construct a temporary std::shared_ptr so that nobody + //Construct a temporary shared_ptr so that nobody //can destroy the value while constructing this - const std::shared_ptr &ref = r.lock(); + const shared_ptr &ref = r.lock(); m_pn.set_pointer(ref.get()); } @@ -114,7 +114,7 @@ class weak_ptr //! //!Throws: nothing. template - weak_ptr(std::shared_ptr const & r) + weak_ptr(shared_ptr const & r) : m_pn(r.m_pn) // never throws {} @@ -127,9 +127,9 @@ class weak_ptr template weak_ptr & operator=(weak_ptr const & r) // never throws { - //Construct a temporary std::shared_ptr so that nobody + //Construct a temporary shared_ptr so that nobody //can destroy the value while constructing this - const std::shared_ptr &ref = r.lock(); + const shared_ptr &ref = r.lock(); m_pn = r.m_pn; m_pn.set_pointer(ref.get()); return *this; @@ -142,30 +142,30 @@ class weak_ptr //!Notes: The implementation is free to meet the effects (and the //!implied guarantees) via different means, without creating a temporary. template - weak_ptr & operator=(std::shared_ptr const & r) // never throws + weak_ptr & operator=(shared_ptr const & r) // never throws { m_pn = r.m_pn; return *this; } - //!Returns: expired()? std::shared_ptr(): std::shared_ptr(*this). + //!Returns: expired()? shared_ptr(): shared_ptr(*this). //! //!Throws: nothing. - std::shared_ptr lock() const // never throws + shared_ptr lock() const // never throws { // optimization: avoid throw overhead if(expired()){ - return std::shared_ptr(); + return shared_ptr(); } BOOST_TRY{ - return std::shared_ptr(*this); + return shared_ptr(*this); } BOOST_CATCH(bad_weak_ptr const &){ // Q: how can we get here? // A: another thread may have invalidated r after the use_count test above. - return std::shared_ptr(); + return shared_ptr(); } BOOST_CATCH_END } - //!Returns: 0 if *this is empty; otherwise, the number of std::shared_ptr objects + //!Returns: 0 if *this is empty; otherwise, the number of shared_ptr objects //!that share ownership with *this. //! //!Throws: nothing. @@ -209,7 +209,7 @@ class weak_ptr private: - template friend class std::shared_ptr; + template friend class shared_ptr; template friend class weak_ptr; ipcdetail::weak_count m_pn; // reference counter diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/chain.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/chain.hpp index 4b046508..4af8cc98 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/chain.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/chain.hpp @@ -22,7 +22,7 @@ #include // logic_error, out_of_range. #include #include // BOOST_MSVC, template friends, -#include // BOOST_NESTED_TEMPLATE +#include // BOOST_NESTED_TEMPLATE #include #include #include @@ -34,7 +34,7 @@ #include // is_filter. #include #include -#include +#include #include #include #include @@ -141,7 +141,7 @@ protected: chain_base(const chain_base& rhs): pimpl_(rhs.pimpl_) { } public: - // dual_use is a pseudo-mode to facilitate filter writing, + // dual_use is a pseudo-mode to facilitate filter writing, // not a genuine mode. BOOST_STATIC_ASSERT((!is_convertible::value)); @@ -150,19 +150,19 @@ public: // Sets the size of the buffer created for the devices to be added to this // chain. Does not affect the size of the buffer for devices already // added. - void set_device_buffer_size(std::streamsize n) + void set_device_buffer_size(std::streamsize n) { pimpl_->device_buffer_size_ = n; } // Sets the size of the buffer created for the filters to be added // to this chain. Does not affect the size of the buffer for filters already // added. - void set_filter_buffer_size(std::streamsize n) + void set_filter_buffer_size(std::streamsize n) { pimpl_->filter_buffer_size_ = n; } // Sets the size of the putback buffer for filters and devices to be added // to this chain. Does not affect the size of the buffer for filters or // devices already added. - void set_pback_size(std::streamsize n) + void set_pback_size(std::streamsize n) { pimpl_->pback_size_ = n; } //----------Device interface----------------------------------------------// @@ -189,7 +189,7 @@ public: T* component(int n) const { return component(n, boost::type()); } // Deprecated. - template + template T* component() const { return component(N); } #endif @@ -230,7 +230,7 @@ public: bool strict_sync(); private: template - void push_impl(const T& t, std::streamsize buffer_size = -1, + void push_impl(const T& t, std::streamsize buffer_size = -1, std::streamsize pback_size = -1) { typedef typename iostreams::category_of::type category; @@ -331,20 +331,20 @@ private: links_.front()->BOOST_IOSTREAMS_PUBSYNC(); try { boost::iostreams::detail::execute_foreach( - links_.rbegin(), links_.rend(), + links_.rbegin(), links_.rend(), closer(BOOST_IOS::in) ); } catch (...) { try { boost::iostreams::detail::execute_foreach( - links_.begin(), links_.end(), + links_.begin(), links_.end(), closer(BOOST_IOS::out) ); } catch (...) { } throw; } boost::iostreams::detail::execute_foreach( - links_.begin(), links_.end(), + links_.begin(), links_.end(), closer(BOOST_IOS::out) ); } @@ -382,7 +382,7 @@ private: //----------Member data---------------------------------------------------// private: - std::shared_ptr pimpl_; + shared_ptr pimpl_; }; } // End namespace detail. diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/code_converter.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/code_converter.hpp index 8ff85a18..280a5d09 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/code_converter.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/code_converter.hpp @@ -24,7 +24,7 @@ #include // max. #include // memcpy. #include -#include // DEDUCED_TYPENAME, +#include // DEDUCED_TYPENAME, #include #include // default_filter_buffer_size. #include @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include @@ -54,7 +54,7 @@ namespace boost { namespace iostreams { struct code_conversion_error : BOOST_IOSTREAMS_FAILURE { - code_conversion_error() + code_conversion_error() : BOOST_IOSTREAMS_FAILURE("code conversion error") { } }; @@ -91,28 +91,28 @@ Tgt* strncpy_if_same(Tgt* tgt, const Src* src, std::streamsize n) // Buffer and conversion state for reading. template -class conversion_buffer +class conversion_buffer : public buffer< BOOST_DEDUCED_TYPENAME detail::codecvt_extern::type, Alloc - > + > { public: typedef typename Codecvt::state_type state_type; - conversion_buffer() + conversion_buffer() : buffer< BOOST_DEDUCED_TYPENAME detail::codecvt_extern::type, Alloc - >(0) - { - reset(); + >(0) + { + reset(); } state_type& state() { return state_; } - void reset() - { - if (this->size()) + void reset() + { + if (this->size()) this->set(0, 0); - state_ = state_type(); + state_ = state_type(); } private: state_type state_; @@ -128,12 +128,12 @@ struct code_converter_impl { typedef is_convertible can_read; typedef is_convertible can_write; typedef is_convertible is_bidir; - typedef typename + typedef typename iostreams::select< // Disambiguation for Tru64. is_bidir, bidirectional, can_read, input, can_write, output - >::type mode; + >::type mode; typedef typename mpl::if_< is_direct, @@ -147,10 +147,10 @@ struct code_converter_impl { code_converter_impl() : cvt_(), flags_(0) { } ~code_converter_impl() - { - try { - if (flags_ & f_open) close(); - } catch (...) { /* */ } + { + try { + if (flags_ & f_open) close(); + } catch (...) { /* */ } } template @@ -213,7 +213,7 @@ struct code_converter_impl { codecvt_holder cvt_; storage_type dev_; double_object< - buffer_type, + buffer_type, is_double > buf_; int flags_; @@ -232,13 +232,13 @@ struct code_converter_base { Device, Codecvt, Alloc > impl_type; code_converter_base() : pimpl_(new impl_type) { } - std::shared_ptr pimpl_; + shared_ptr pimpl_; }; -template< typename Device, - typename Codecvt = detail::default_codecvt, +template< typename Device, + typename Codecvt = detail::default_codecvt, typename Alloc = std::allocator > -class code_converter +class code_converter : protected code_converter_base { private: @@ -252,28 +252,28 @@ private: typedef typename detail::codecvt_extern::type extern_type; typedef typename detail::codecvt_state::type state_type; public: - typedef intern_type char_type; - struct category + typedef intern_type char_type; + struct category : impl_type::mode, device_tag, closable_tag, localizable_tag { }; BOOST_STATIC_ASSERT(( is_same< - extern_type, + extern_type, BOOST_DEDUCED_TYPENAME char_type_of::type >::value )); public: code_converter() { } #if BOOST_WORKAROUND(__GNUC__, < 3) - code_converter(code_converter& rhs) + code_converter(code_converter& rhs) : code_converter_base(rhs) { } - code_converter(const code_converter& rhs) + code_converter(const code_converter& rhs) : code_converter_base(rhs) { } #endif BOOST_IOSTREAMS_FORWARD( code_converter, open_impl, Device, - BOOST_IOSTREAMS_CONVERTER_PARAMS, + BOOST_IOSTREAMS_CONVERTER_PARAMS, BOOST_IOSTREAMS_CONVERTER_ARGS ) // fstream-like interface. @@ -294,9 +294,9 @@ public: Device* operator->() { return &detail::unwrap_direct(dev()); } private: template // Used for forwarding. - void open_impl(const T& t BOOST_IOSTREAMS_CONVERTER_PARAMS()) - { - impl().open(t BOOST_IOSTREAMS_CONVERTER_ARGS()); + void open_impl(const T& t BOOST_IOSTREAMS_CONVERTER_PARAMS()) + { + impl().open(t BOOST_IOSTREAMS_CONVERTER_ARGS()); } const codecvt_type& cvt() { return impl().cvt_.get(); } @@ -347,7 +347,7 @@ std::streamsize code_converter::read break; case std::codecvt_base::noconv: { - std::streamsize amt = + std::streamsize amt = std::min(next - buf.ptr(), n - total); detail::strncpy_if_same(s + total, buf.ptr(), amt); total += amt; @@ -382,7 +382,7 @@ std::streamsize code_converter::write break; partial = false; } - + // Convert. std::codecvt_base::result result = cvt().out( buf.state(), @@ -399,8 +399,8 @@ std::streamsize code_converter::write break; case std::codecvt_base::noconv: { - std::streamsize amt = - std::min( nint - total - s, + std::streamsize amt = + std::min( nint - total - s, buf.end() - buf.eptr() ); detail::strncpy_if_same(buf.eptr(), s + total, amt); total += amt; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file.hpp index c04b2536..f701c9d6 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file.hpp @@ -21,7 +21,7 @@ #include // openmode, seekdir, int types. #include #include // seek. -#include +#include // Must come last. #include // MSVC. @@ -46,8 +46,8 @@ public: std::streamsize read(char_type* s, std::streamsize n); bool putback(char_type c); std::streamsize write(const char_type* s, std::streamsize n); - std::streampos seek( stream_offset off, BOOST_IOS::seekdir way, - BOOST_IOS::openmode which = + std::streampos seek( stream_offset off, BOOST_IOS::seekdir way, + BOOST_IOS::openmode which = BOOST_IOS::in | BOOST_IOS::out ); void open( const std::string& path, BOOST_IOS::openmode mode = @@ -67,7 +67,7 @@ private: ~impl() { if (file_.is_open()) file_.close(); } BOOST_IOSTREAMS_BASIC_FILEBUF(Ch) file_; }; - std::shared_ptr pimpl_; + shared_ptr pimpl_; }; typedef basic_file file; @@ -87,7 +87,7 @@ struct basic_file_source : private basic_file { using basic_file::is_open; using basic_file::close; basic_file_source( const std::string& path, - BOOST_IOS::openmode mode = + BOOST_IOS::openmode mode = BOOST_IOS::in ) : basic_file(path, mode & ~BOOST_IOS::out, BOOST_IOS::in) { } @@ -128,29 +128,29 @@ struct basic_file_sink : private basic_file { typedef basic_file_sink file_sink; typedef basic_file_sink wfile_sink; - + //------------------Implementation of basic_file------------------------------// template basic_file::basic_file - ( const std::string& path, BOOST_IOS::openmode mode, + ( const std::string& path, BOOST_IOS::openmode mode, BOOST_IOS::openmode base_mode ) -{ +{ open(path, mode, base_mode); } template inline std::streamsize basic_file::read (char_type* s, std::streamsize n) -{ - std::streamsize result = pimpl_->file_.sgetn(s, n); +{ + std::streamsize result = pimpl_->file_.sgetn(s, n); return result != 0 ? result : -1; } template inline bool basic_file::putback(char_type c) -{ - return !!pimpl_->file_.sputbackc(c); +{ + return !!pimpl_->file_.sputbackc(c); } template @@ -160,15 +160,15 @@ inline std::streamsize basic_file::write template std::streampos basic_file::seek - ( stream_offset off, BOOST_IOS::seekdir way, + ( stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode ) { return iostreams::seek(pimpl_->file_, off, way); } template void basic_file::open - ( const std::string& path, BOOST_IOS::openmode mode, + ( const std::string& path, BOOST_IOS::openmode mode, BOOST_IOS::openmode base_mode ) -{ +{ pimpl_.reset(new impl(path, mode | base_mode)); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file_descriptor.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file_descriptor.hpp index 1237ea8a..bb470589 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file_descriptor.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/file_descriptor.hpp @@ -25,7 +25,7 @@ #include // openmode, seekdir, int types. #include #include -#include +#include // Must come last. #include @@ -86,9 +86,9 @@ public: explicit file_descriptor( const Path& path, BOOST_IOS::openmode mode = BOOST_IOS::in | BOOST_IOS::out ) - { + { init(); - open(detail::path(path), mode); + open(detail::path(path), mode); } // Copy constructor @@ -135,12 +135,12 @@ private: void init(); // open overload taking a detail::path - void open( const detail::path& path, - BOOST_IOS::openmode, + void open( const detail::path& path, + BOOST_IOS::openmode, BOOST_IOS::openmode = BOOST_IOS::openmode(0) ); typedef detail::file_descriptor_impl impl_type; - std::shared_ptr pimpl_; + shared_ptr pimpl_; }; class BOOST_IOSTREAMS_DECL file_descriptor_source : private file_descriptor { @@ -293,16 +293,16 @@ public: #endif // open overload taking a std::string - void open( const std::string& path, + void open( const std::string& path, BOOST_IOS::openmode mode = BOOST_IOS::out ); // open overload taking C-style string - void open( const char* path, + void open( const char* path, BOOST_IOS::openmode mode = BOOST_IOS::out ); // open overload taking a Boost.Filesystem path template - void open( const Path& path, + void open( const Path& path, BOOST_IOS::openmode mode = BOOST_IOS::out ) { open(detail::path(path), mode); } private: diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/mapped_file.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/mapped_file.hpp index 11c0e2c1..8493b177 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/mapped_file.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/device/mapped_file.hpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -54,25 +54,25 @@ public: }; // Bitmask operations for mapped_file_base::mapmode -mapped_file_base::mapmode +mapped_file_base::mapmode operator|(mapped_file_base::mapmode a, mapped_file_base::mapmode b); -mapped_file_base::mapmode +mapped_file_base::mapmode operator&(mapped_file_base::mapmode a, mapped_file_base::mapmode b); -mapped_file_base::mapmode +mapped_file_base::mapmode operator^(mapped_file_base::mapmode a, mapped_file_base::mapmode b); -mapped_file_base::mapmode +mapped_file_base::mapmode operator~(mapped_file_base::mapmode a); -mapped_file_base::mapmode +mapped_file_base::mapmode operator|=(mapped_file_base::mapmode& a, mapped_file_base::mapmode b); -mapped_file_base::mapmode +mapped_file_base::mapmode operator&=(mapped_file_base::mapmode& a, mapped_file_base::mapmode b); -mapped_file_base::mapmode +mapped_file_base::mapmode operator^=(mapped_file_base::mapmode& a, mapped_file_base::mapmode b); //------------------Definition of mapped_file_params--------------------------// @@ -81,8 +81,8 @@ namespace detail { struct mapped_file_params_base { mapped_file_params_base() - : flags(static_cast(0)), - mode(), offset(0), length(static_cast(-1)), + : flags(static_cast(0)), + mode(), offset(0), length(static_cast(-1)), new_file_size(0), hint(0) { } private: @@ -102,16 +102,16 @@ public: // This template allows Boost.Filesystem paths to be specified when creating or // reopening a memory mapped file, without creating a dependence on // Boost.Filesystem. Possible values of Path include std::string, -// boost::filesystem::path, boost::filesystem::wpath, +// boost::filesystem::path, boost::filesystem::wpath, // and boost::iostreams::detail::path (used to store either a std::string or a // std::wstring). template -struct basic_mapped_file_params - : detail::mapped_file_params_base +struct basic_mapped_file_params + : detail::mapped_file_params_base { typedef detail::mapped_file_params_base base_type; - // For wide paths, instantiate basic_mapped_file_params + // For wide paths, instantiate basic_mapped_file_params // with boost::filesystem::wpath #ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS BOOST_STATIC_ASSERT((!is_same::value)); @@ -215,7 +215,7 @@ private: void init(); void open_impl(const param_type& p); - boost::std::shared_ptr pimpl_; + boost::shared_ptr pimpl_; }; //------------------Definition of mapped_file---------------------------------// @@ -253,7 +253,7 @@ public: size_type length = max_length, stream_offset offset = 0 ); - // Constructor taking a list of parameters, including a + // Constructor taking a list of parameters, including a // std::ios_base::openmode (deprecated) template explicit mapped_file( const Path& path, @@ -283,7 +283,7 @@ public: size_type length = max_length, stream_offset offset = 0 ); - // open overload taking a list of parameters, including a + // open overload taking a list of parameters, including a // std::ios_base::openmode (deprecated) template void open( const Path& path, @@ -387,7 +387,7 @@ mapped_file_source::mapped_file_source(const basic_mapped_file_params& p) { init(); open(p); } template -mapped_file_source::mapped_file_source( +mapped_file_source::mapped_file_source( const Path& path, size_type length, boost::intmax_t offset) { init(); open(path, length, offset); } @@ -423,14 +423,14 @@ mapped_file::mapped_file(const basic_mapped_file_params& p) { open(p); } template -mapped_file::mapped_file( - const Path& path, mapmode flags, +mapped_file::mapped_file( + const Path& path, mapmode flags, size_type length, stream_offset offset ) { open(path, flags, length, offset); } template -mapped_file::mapped_file( - const Path& path, BOOST_IOS::openmode mode, +mapped_file::mapped_file( + const Path& path, BOOST_IOS::openmode mode, size_type length, stream_offset offset ) { open(path, mode, length, offset); } @@ -439,8 +439,8 @@ void mapped_file::open(const basic_mapped_file_params& p) { delegate_.open_impl(p); } template -void mapped_file::open( - const Path& path, mapmode flags, +void mapped_file::open( + const Path& path, mapmode flags, size_type length, stream_offset offset ) { param_type p(path); @@ -451,8 +451,8 @@ void mapped_file::open( } template -void mapped_file::open( - const Path& path, BOOST_IOS::openmode mode, +void mapped_file::open( + const Path& path, BOOST_IOS::openmode mode, size_type length, stream_offset offset ) { param_type p(path); @@ -462,7 +462,7 @@ void mapped_file::open( open(p); } -inline char* mapped_file::data() const +inline char* mapped_file::data() const { return (flags() != readonly) ? const_cast(delegate_.data()) : 0; } //------------------Implementation of mapped_file_sink------------------------// @@ -524,13 +524,13 @@ struct operations { static std::pair input_sequence(mapped_file& file) - { - return std::make_pair(file.begin(), file.end()); + { + return std::make_pair(file.begin(), file.end()); } static std::pair output_sequence(mapped_file& file) - { - return std::make_pair(file.begin(), file.end()); + { + return std::make_pair(file.begin(), file.end()); } }; @@ -540,28 +540,28 @@ struct operations { static std::pair output_sequence(mapped_file_sink& sink) - { - return std::make_pair(sink.begin(), sink.end()); + { + return std::make_pair(sink.begin(), sink.end()); } }; - + //------------------Definition of mapmode operators---------------------------// -inline mapped_file::mapmode +inline mapped_file::mapmode operator|(mapped_file::mapmode a, mapped_file::mapmode b) { return static_cast (static_cast(a) | static_cast(b)); } -inline mapped_file::mapmode +inline mapped_file::mapmode operator&(mapped_file::mapmode a, mapped_file::mapmode b) { return static_cast (static_cast(a) & static_cast(b)); } -inline mapped_file::mapmode +inline mapped_file::mapmode operator^(mapped_file::mapmode a, mapped_file::mapmode b) { return static_cast @@ -574,19 +574,19 @@ operator~(mapped_file::mapmode a) return static_cast(~static_cast(a)); } -inline mapped_file::mapmode +inline mapped_file::mapmode operator|=(mapped_file::mapmode& a, mapped_file::mapmode b) { return a = a | b; } -inline mapped_file::mapmode +inline mapped_file::mapmode operator&=(mapped_file::mapmode& a, mapped_file::mapmode b) { return a = a & b; } -inline mapped_file::mapmode +inline mapped_file::mapmode operator^=(mapped_file::mapmode& a, mapped_file::mapmode b) { return a = a ^ b; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/filter/symmetric.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/filter/symmetric.hpp index 1feff246..cc92b0cf 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/filter/symmetric.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/filter/symmetric.hpp @@ -20,12 +20,12 @@ // // Consume as many characters as possible from the interval // // [begin_in, end_in), without exhausting the output range // // [begin_out, end_out). If flush is true, write as mush output -// // as possible. -// // A return value of true indicates that filter should be called -// // again. More precisely, if flush is false, a return value of +// // as possible. +// // A return value of true indicates that filter should be called +// // again. More precisely, if flush is false, a return value of // // false indicates that the natural end of stream has been reached // // and that all filtered data has been forwarded; if flush is -// // true, a return value of false indicates that all filtered data +// // true, a return value of false indicates that all filtered data // // has been forwarded. // } // void close() { /* Reset filter's state. */ } @@ -57,7 +57,7 @@ #include #include #include -#include +#include // Must come last. #include // MSVC. @@ -188,7 +188,7 @@ public: string_type unconsumed_input() const; // Give impl access to buffer_type on Tru64 -#if !BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) +#if !BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) private: #endif typedef detail::buffer buffer_type; @@ -266,7 +266,7 @@ private: int state_; }; - std::shared_ptr pimpl_; + shared_ptr pimpl_; }; BOOST_IOSTREAMS_PIPABLE(symmetric_filter, 2) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/invert.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/invert.hpp index 2348a2fe..82e6a4b4 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/invert.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iostreams/invert.hpp @@ -10,11 +10,11 @@ #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once -#endif +#endif -#include // copy, min. +#include // copy, min. #include -#include // BOOST_DEDUCED_TYPENAME. +#include // BOOST_DEDUCED_TYPENAME. #include // default_filter_buffer_size. #include #include @@ -26,7 +26,7 @@ #include // clear_flags, call_reset #include #include -#include +#include #include // Must come last. @@ -51,7 +51,7 @@ public: typedef typename char_type_of::type char_type; typedef typename int_type_of::type int_type; typedef char_traits traits_type; - typedef typename + typedef typename mpl::if_< is_convertible< base_category, @@ -60,15 +60,15 @@ public: output, input >::type mode; - struct category - : mode, - filter_tag, - multichar_tag, - closable_tag + struct category + : mode, + filter_tag, + multichar_tag, + closable_tag { }; - explicit inverse( const Filter& filter, - std::streamsize buffer_size = - default_filter_buffer_size) + explicit inverse( const Filter& filter, + std::streamsize buffer_size = + default_filter_buffer_size) : pimpl_(new impl(filter, buffer_size)) { } @@ -93,10 +93,10 @@ public: buf().flush(snk); } return snk.second().count() == 0 && - status == traits_type::eof() - ? + status == traits_type::eof() + ? -1 - : + : snk.second().count(); } @@ -111,7 +111,7 @@ public: flags() = f_write; buf().set(0, 0); } - + filtered_array_source src(filter(), array_source(s, n)); for (bool good = true; src.second().count() < n && good; ) { buf().fill(src); @@ -133,20 +133,20 @@ private: filter_ref filter() { return boost::ref(pimpl_->filter_); } detail::buffer& buf() { return pimpl_->buf_; } int& flags() { return pimpl_->flags_; } - + enum flags_ { f_read = 1, f_write = 2 }; struct impl { - impl(const Filter& filter, std::streamsize n) + impl(const Filter& filter, std::streamsize n) : filter_(filter), buf_(n), flags_(0) { buf_.set(0, 0); } Filter filter_; detail::buffer buf_; int flags_; }; - std::shared_ptr pimpl_; + shared_ptr pimpl_; }; // @@ -157,7 +157,7 @@ private: // template inverse invert(const Filter& f) { return inverse(f); } - + //----------------------------------------------------------------------------// } } // End namespaces iostreams, boost. diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iterator/indirect_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iterator/indirect_iterator.hpp index 00fdedff..abff7e76 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iterator/indirect_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/iterator/indirect_iterator.hpp @@ -26,11 +26,11 @@ #include #ifdef BOOST_MPL_CFG_NO_HAS_XXX -# include +# include # include # include # include -#endif +#endif #include // must be last #include @@ -45,7 +45,7 @@ namespace boost struct indirect_base { typedef typename iterator_traits::value_type dereferenceable; - + typedef iterator_adaptor< indirect_iterator , Iter @@ -69,7 +69,7 @@ namespace boost struct indirect_base {}; } // namespace detail - + template < class Iterator , class Value = use_default @@ -107,14 +107,14 @@ namespace boost : super_t(y.base()) {} - private: + private: typename super_t::reference dereference() const { # if BOOST_WORKAROUND(__BORLANDC__, < 0x5A0 ) return const_cast(**this->base()); # else return **this->base(); -# endif +# endif } }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/boundary/index.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/boundary/index.hpp index 81adff7e..5948dcca 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/boundary/index.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/boundary/index.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #ifdef BOOST_MSVC @@ -34,7 +34,7 @@ namespace boost { namespace locale { - + namespace boundary { /// /// \defgroup boundary Boundary Analysis @@ -88,7 +88,7 @@ namespace boost { // // C++0x requires that string is continious in memory and all known // string implementations - // do this because of c_str() support. + // do this because of c_str() support. // if(linear_iterator_traits::is_linear && b!=e) @@ -117,8 +117,8 @@ namespace boost { mapping(boundary_type type, base_iterator begin, base_iterator end, - std::locale const &loc) - : + std::locale const &loc) + : index_(new index_type()), begin_(begin), end_(end) @@ -147,12 +147,12 @@ namespace boost { } private: - boost::std::shared_ptr index_; + boost::shared_ptr index_; base_iterator begin_,end_; }; template - class segment_index_iterator : + class segment_index_iterator : public boost::iterator_facade< segment_index_iterator, segment, @@ -164,7 +164,7 @@ namespace boost { typedef BaseIterator base_iterator; typedef mapping mapping_type; typedef segment segment_type; - + segment_index_iterator() : current_(0,0),map_(0) { } @@ -267,13 +267,13 @@ namespace boost { { size_t dist=std::distance(map_->begin(),p); index_type::const_iterator b=map_->index().begin(),e=map_->index().end(); - index_type::const_iterator + index_type::const_iterator boundary_point=std::upper_bound(b,e,break_info(dist)); while(boundary_point != e && (boundary_point->rule & mask_)==0) boundary_point++; current_.first = current_.second = boundary_point - b; - + if(full_select_) { while(current_.first > 0) { current_.first --; @@ -318,31 +318,31 @@ namespace boost { bool valid_offset(size_t offset) const { - return offset == 0 + return offset == 0 || offset == size() // make sure we not acess index[size] || (index()[offset].rule & mask_)!=0; } - + size_t size() const { return index().size(); } - + index_type const &index() const { return map_->index(); } - - + + segment_type value_; std::pair current_; mapping_type const *map_; rule_type mask_; bool full_select_; }; - + template - class boundary_point_index_iterator : + class boundary_point_index_iterator : public boost::iterator_facade< boundary_point_index_iterator, boundary_point, @@ -354,7 +354,7 @@ namespace boost { typedef BaseIterator base_iterator; typedef mapping mapping_type; typedef boundary_point boundary_point_type; - + boundary_point_index_iterator() : current_(0),map_(0) { } @@ -466,22 +466,22 @@ namespace boost { bool valid_offset(size_t offset) const { - return offset == 0 + return offset == 0 || offset + 1 >= size() // last and first are always valid regardless of mark || (index()[offset].rule & mask_)!=0; } - + size_t size() const { return index().size(); } - + index_type const &index() const { return map_->index(); } - - + + boundary_point_type value_; size_t current_; mapping_type const *map_; @@ -498,10 +498,10 @@ namespace boost { template class boundary_point_index; - + /// - /// \brief This class holds an index of segments in the text range and allows to iterate over them + /// \brief This class holds an index of segments in the text range and allows to iterate over them /// /// This class is provides \ref begin() and \ref end() member functions that return bidirectional iterators /// to the \ref segment objects. @@ -512,7 +512,7 @@ namespace boost { /// various masks %as \ref word_any. /// \n /// The default is to select any types of boundaries. - /// \n + /// \n /// For example: using word %boundary analysis, when the provided mask is \ref word_kana then the iterators /// would iterate only over the words containing Kana letters and \ref word_any would select all types of /// words excluding ranges that consist of white space and punctuation marks. So iterating over the text @@ -533,7 +533,7 @@ namespace boost { /// terminator "!" or "?". But changing \ref full_select() to true, the selected segment would include /// all the text up to previous valid %boundary point and would return two expected sentences: /// "Hello!" and "How\nare you?". - /// + /// /// This class allows to find a segment according to the given iterator in range using \ref find() member /// function. /// @@ -555,7 +555,7 @@ namespace boost { template class segment_index { public: - + /// /// The type of the iterator used to iterate over the original text /// @@ -591,7 +591,7 @@ namespace boost { typedef segment value_type; /// - /// Default constructor. + /// Default constructor. /// /// \note /// @@ -610,7 +610,7 @@ namespace boost { base_iterator begin, base_iterator end, rule_type mask, - std::locale const &loc=std::locale()) + std::locale const &loc=std::locale()) : map_(type,begin,end,loc), mask_(mask), @@ -624,7 +624,7 @@ namespace boost { segment_index(boundary_type type, base_iterator begin, base_iterator end, - std::locale const &loc=std::locale()) + std::locale const &loc=std::locale()) : map_(type,begin,end,loc), mask_(0xFFFFFFFFu), @@ -655,7 +655,7 @@ namespace boost { /// segment_index const &operator = (boundary_point_index const &); - + /// /// Create a new index for %boundary analysis \ref boundary_type "type" of the text /// in range [begin,end) for locale \a loc. @@ -694,7 +694,7 @@ namespace boost { } /// - /// Find a first valid segment following a position \a p. + /// Find a first valid segment following a position \a p. /// /// If \a p is inside a valid segment this segment is selected: /// @@ -704,7 +704,7 @@ namespace boost { /// - "t|o be or ", would point to "to", /// - "to be or| ", would point to end. /// - /// + /// /// Preconditions: the segment_index should have a mapping and \a p should be valid iterator /// to the text in the mapped range. /// @@ -714,17 +714,17 @@ namespace boost { { return iterator(p,&map_,mask_,full_select_); } - + /// /// Get the mask of rules that are used - /// + /// rule_type rule() const { return mask_; } /// /// Set the mask of rules that are used - /// + /// void rule(rule_type v) { mask_ = v; @@ -743,7 +743,7 @@ namespace boost { /// following part "are you?" /// - bool full_select() const + bool full_select() const { return full_select_; } @@ -761,11 +761,11 @@ namespace boost { /// following part "are you?" /// - void full_select(bool v) + void full_select(bool v) { full_select_ = v; } - + private: friend class boundary_point_index; typedef details::mapping mapping_type; @@ -793,14 +793,14 @@ namespace boost { /// - "Hello! How\n|are you?" /// - "Hello! How\nare you?|" /// - /// However if \ref rule() is set to \ref sentence_term then the selected %boundary points would be: + /// However if \ref rule() is set to \ref sentence_term then the selected %boundary points would be: /// /// - "|Hello! How\nare you?" /// - "Hello! |How\nare you?" /// - "Hello! How\nare you?|" - /// + /// /// Such that a %boundary point defined by a line feed character would be ignored. - /// + /// /// This class allows to find a boundary_point according to the given iterator in range using \ref find() member /// function. /// @@ -858,9 +858,9 @@ namespace boost { /// an object that represents the selected \ref boundary_point "boundary point". /// typedef boundary_point value_type; - + /// - /// Default constructor. + /// Default constructor. /// /// \note /// @@ -871,7 +871,7 @@ namespace boost { boundary_point_index() : mask_(0xFFFFFFFFu) { } - + /// /// Create a segment_index for %boundary analysis \ref boundary_type "type" of the text /// in range [begin,end) using a rule \a mask for locale \a loc. @@ -880,7 +880,7 @@ namespace boost { base_iterator begin, base_iterator end, rule_type mask, - std::locale const &loc=std::locale()) + std::locale const &loc=std::locale()) : map_(type,begin,end,loc), mask_(mask) @@ -893,7 +893,7 @@ namespace boost { boundary_point_index(boundary_type type, base_iterator begin, base_iterator end, - std::locale const &loc=std::locale()) + std::locale const &loc=std::locale()) : map_(type,begin,end,loc), mask_(0xFFFFFFFFu) @@ -969,7 +969,7 @@ namespace boost { /// /// - "|to be", would return %boundary point at "|to be", /// - "t|o be", would point to "to| be" - /// + /// /// Preconditions: the boundary_point_index should have a mapping and \a p should be valid iterator /// to the text in the mapped range. /// @@ -979,17 +979,17 @@ namespace boost { { return iterator(p,&map_,mask_); } - + /// /// Get the mask of rules that are used - /// + /// rule_type rule() const { return mask_; } /// /// Set the mask of rules that are used - /// + /// void rule(rule_type v) { mask_ = v; @@ -1002,8 +1002,8 @@ namespace boost { mapping_type map_; rule_type mask_; }; - - /// \cond INTERNAL + + /// \cond INTERNAL template segment_index::segment_index(boundary_point_index const &other) : map_(other.map_), @@ -1011,7 +1011,7 @@ namespace boost { full_select_(false) { } - + template boundary_point_index::boundary_point_index(segment_index const &other) : map_(other.map_), @@ -1025,7 +1025,7 @@ namespace boost { map_ = other.map_; return *this; } - + template boundary_point_index const &boundary_point_index::operator=(segment_index const &other) { @@ -1033,7 +1033,7 @@ namespace boost { return *this; } /// \endcond - + typedef segment_index ssegment_index; ///< convenience typedef typedef segment_index wssegment_index; ///< convenience typedef #ifdef BOOST_HAS_CHAR16_T @@ -1042,7 +1042,7 @@ namespace boost { #ifdef BOOST_HAS_CHAR32_T typedef segment_index u32ssegment_index;///< convenience typedef #endif - + typedef segment_index csegment_index; ///< convenience typedef typedef segment_index wcsegment_index; ///< convenience typedef #ifdef BOOST_HAS_CHAR16_T @@ -1060,7 +1060,7 @@ namespace boost { #ifdef BOOST_HAS_CHAR32_T typedef boundary_point_index u32sboundary_point_index;///< convenience typedef #endif - + typedef boundary_point_index cboundary_point_index; ///< convenience typedef typedef boundary_point_index wcboundary_point_index; ///< convenience typedef #ifdef BOOST_HAS_CHAR16_T diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/generator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/generator.hpp index e586b32c..cd34a6fc 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/generator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/locale/generator.hpp @@ -20,10 +20,10 @@ namespace boost { template - class std::shared_ptr; + class shared_ptr; /// - /// \brief This is the main namespace that encloses all localization classes + /// \brief This is the main namespace that encloses all localization classes /// namespace locale { @@ -39,7 +39,7 @@ namespace boost { static const uint32_t character_first_facet = char_facet; ///< First facet specific for character type static const uint32_t character_last_facet = char32_t_facet; ///< Last facet specific for character type static const uint32_t all_characters = 0xFFFF; ///< Special mask -- generate all - + typedef uint32_t character_facet_type; /// backend,std::string const &id) const; + void set_all_options(shared_ptr backend,std::string const &id) const; generator(generator const &); void operator=(generator const &); @@ -231,5 +231,5 @@ namespace boost { #endif -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 +// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/communicator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/communicator.hpp index 68b7afea..e450e2a5 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/communicator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/communicator.hpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -89,7 +89,7 @@ enum comm_create_kind { comm_duplicate, comm_take_ownership, comm_attach }; /** * INTERNAL ONLY - * + * * Forward declaration of @c group needed for the @c group * constructor and accessor. */ @@ -436,7 +436,7 @@ class BOOST_MPI_DECL communicator * @brief Receive an array of values from a remote process. * * This routine blocks until it receives an array of values from the - * process @p source with the given @p tag. If the type @c T is + * process @p source with the given @p tag. If the type @c T is * * @param source The process that will be sending data. This will * either be a process rank within the communicator or the @@ -518,7 +518,7 @@ class BOOST_MPI_DECL communicator * @c skeleton_proxy objects except that @c isend will not block * while waiting for the data to be transmitted. Instead, a request * object will be immediately returned, allowing one to query the - * status of the communication or wait until it has completed. + * status of the communication or wait until it has completed. * * The semantics of this routine are equivalent to a non-blocking * send of a @c packed_skeleton_oarchive storing the skeleton of @@ -628,7 +628,7 @@ class BOOST_MPI_DECL communicator * @brief Initiate receipt of an array of values from a remote process. * * This routine initiates a receive operation for an array of values - * transmitted by process @p source with the given @p tag. + * transmitted by process @p source with the given @p tag. * * @param source The process that will be sending data. This will * either be a process rank within the communicator or the @@ -824,9 +824,9 @@ class BOOST_MPI_DECL communicator #if 0 template - communicator - with_cartesian_topology(const Extents& extents, - bool periodic = false, + communicator + with_cartesian_topology(const Extents& extents, + bool periodic = false, bool reorder = false) const; template @@ -863,7 +863,7 @@ class BOOST_MPI_DECL communicator * * Function object that frees an MPI communicator and deletes the * memory associated with it. Intended to be used as a deleter with - * std::shared_ptr. + * shared_ptr. */ struct comm_free { @@ -877,7 +877,7 @@ class BOOST_MPI_DECL communicator } }; - + /** * INTERNAL ONLY * @@ -904,7 +904,7 @@ class BOOST_MPI_DECL communicator * datatype, so we map directly to that datatype. */ template - void + void array_send_impl(int dest, int tag, const T* values, int n, mpl::true_) const; /** @@ -915,8 +915,8 @@ class BOOST_MPI_DECL communicator * data, to be deserialized on the receiver side. */ template - void - array_send_impl(int dest, int tag, const T* values, int n, + void + array_send_impl(int dest, int tag, const T* values, int n, mpl::false_) const; /** @@ -945,8 +945,8 @@ class BOOST_MPI_DECL communicator * datatype, so we map directly to that datatype. */ template - request - array_isend_impl(int dest, int tag, const T* values, int n, + request + array_isend_impl(int dest, int tag, const T* values, int n, mpl::true_) const; /** @@ -957,8 +957,8 @@ class BOOST_MPI_DECL communicator * data, to be deserialized on the receiver side. */ template - request - array_isend_impl(int dest, int tag, const T* values, int n, + request + array_isend_impl(int dest, int tag, const T* values, int n, mpl::false_) const; /** @@ -987,7 +987,7 @@ class BOOST_MPI_DECL communicator * datatype, so we map directly to that datatype. */ template - status + status array_recv_impl(int source, int tag, T* values, int n, mpl::true_) const; /** @@ -998,7 +998,7 @@ class BOOST_MPI_DECL communicator * MPI_PACKED. We'll receive it and then deserialize. */ template - status + status array_recv_impl(int source, int tag, T* values, int n, mpl::false_) const; /** @@ -1027,7 +1027,7 @@ class BOOST_MPI_DECL communicator * map directly to that datatype. */ template - request + request array_irecv_impl(int source, int tag, T* values, int n, mpl::true_) const; /** @@ -1038,10 +1038,10 @@ class BOOST_MPI_DECL communicator * MPI_PACKED. We'll receive it and then deserialize. */ template - request + request array_irecv_impl(int source, int tag, T* values, int n, mpl::false_) const; - std::shared_ptr comm_ptr; + shared_ptr comm_ptr; }; /** @@ -1070,13 +1070,13 @@ inline bool operator!=(const communicator& comm1, const communicator& comm2) * Implementation details * ************************************************************************/ // Count elements in a message -template +template inline optional status::count() const { return count_impl(is_mpi_datatype()); } -template +template optional status::count_impl(mpl::true_) const { if (m_count != -1) @@ -1092,7 +1092,7 @@ optional status::count_impl(mpl::true_) const return m_count = return_value; } -template +template inline optional status::count_impl(mpl::false_) const { if (m_count == -1) @@ -1140,7 +1140,7 @@ communicator::array_send_impl(int dest, int tag, const T* values, int n, mpl::true_) const { BOOST_MPI_CHECK_RESULT(MPI_Send, - (const_cast(values), n, + (const_cast(values), n, get_mpi_datatype(*values), dest, tag, MPI_Comm(*this))); } @@ -1173,7 +1173,7 @@ status communicator::recv_impl(int source, int tag, T& value, mpl::true_) const status stat; BOOST_MPI_CHECK_RESULT(MPI_Recv, - (const_cast(&value), 1, + (const_cast(&value), 1, get_mpi_datatype(value), source, tag, MPI_Comm(*this), &stat.m_status)); return stat; @@ -1202,13 +1202,13 @@ status communicator::recv(int source, int tag, T& value) const } template -status -communicator::array_recv_impl(int source, int tag, T* values, int n, +status +communicator::array_recv_impl(int source, int tag, T* values, int n, mpl::true_) const { status stat; BOOST_MPI_CHECK_RESULT(MPI_Recv, - (const_cast(values), n, + (const_cast(values), n, get_mpi_datatype(*values), source, tag, MPI_Comm(*this), &stat.m_status)); return stat; @@ -1216,7 +1216,7 @@ communicator::array_recv_impl(int source, int tag, T* values, int n, template status -communicator::array_recv_impl(int source, int tag, T* values, int n, +communicator::array_recv_impl(int source, int tag, T* values, int n, mpl::false_) const { // Receive the message @@ -1255,7 +1255,7 @@ communicator::isend_impl(int dest, int tag, const T& value, mpl::true_) const { request req; BOOST_MPI_CHECK_RESULT(MPI_Isend, - (const_cast(&value), 1, + (const_cast(&value), 1, get_mpi_datatype(value), dest, tag, MPI_Comm(*this), &req.m_requests[0])); return req; @@ -1268,7 +1268,7 @@ template request communicator::isend_impl(int dest, int tag, const T& value, mpl::false_) const { - std::shared_ptr archive(new packed_oarchive(*this)); + shared_ptr archive(new packed_oarchive(*this)); *archive << value; request result = isend(dest, tag, *archive); result.m_data = archive; @@ -1290,7 +1290,7 @@ communicator::array_isend_impl(int dest, int tag, const T* values, int n, { request req; BOOST_MPI_CHECK_RESULT(MPI_Isend, - (const_cast(values), n, + (const_cast(values), n, get_mpi_datatype(*values), dest, tag, MPI_Comm(*this), &req.m_requests[0])); return req; @@ -1298,10 +1298,10 @@ communicator::array_isend_impl(int dest, int tag, const T* values, int n, template request -communicator::array_isend_impl(int dest, int tag, const T* values, int n, +communicator::array_isend_impl(int dest, int tag, const T* values, int n, mpl::false_) const { - std::shared_ptr archive(new packed_oarchive(*this)); + shared_ptr archive(new packed_oarchive(*this)); *archive << n << boost::serialization::make_array(values, n); request result = isend(dest, tag, *archive); result.m_data = archive; @@ -1324,15 +1324,15 @@ namespace detail { template struct serialized_irecv_data { - serialized_irecv_data(const communicator& comm, int source, int tag, + serialized_irecv_data(const communicator& comm, int source, int tag, T& value) - : comm(comm), source(source), tag(tag), ia(comm), value(value) - { + : comm(comm), source(source), tag(tag), ia(comm), value(value) + { } - void deserialize(status& stat) - { - ia >> value; + void deserialize(status& stat) + { + ia >> value; stat.m_count = 1; } @@ -1347,7 +1347,7 @@ namespace detail { template<> struct serialized_irecv_data { - serialized_irecv_data(const communicator& comm, int source, int tag, + serialized_irecv_data(const communicator& comm, int source, int tag, packed_iarchive& ia) : comm(comm), source(source), tag(tag), ia(ia) { } @@ -1367,10 +1367,10 @@ namespace detail { template struct serialized_array_irecv_data { - serialized_array_irecv_data(const communicator& comm, int source, int tag, + serialized_array_irecv_data(const communicator& comm, int source, int tag, T* values, int n) : comm(comm), source(source), tag(tag), ia(comm), values(values), n(n) - { + { } void deserialize(status& stat); @@ -1390,26 +1390,26 @@ namespace detail { // Determine how much data we are going to receive int count; ia >> count; - + // Deserialize the data in the message boost::serialization::array arr(values, count > n? n : count); ia >> arr; - + if (count > n) { boost::throw_exception( std::range_error("communicator::recv: message receive overflow")); } - + stat.m_count = count; } } template -optional +optional request::handle_serialized_irecv(request* self, request_action action) { typedef detail::serialized_irecv_data data_t; - std::shared_ptr data = static_pointer_cast(self->m_data); + shared_ptr data = static_pointer_cast(self->m_data); if (action == ra_wait) { status stat; @@ -1421,7 +1421,7 @@ request::handle_serialized_irecv(request* self, request_action action) data->ia.resize(data->count); BOOST_MPI_CHECK_RESULT(MPI_Irecv, (data->ia.address(), data->ia.size(), MPI_PACKED, - stat.source(), stat.tag(), + stat.source(), stat.tag(), MPI_Comm(data->comm), self->m_requests + 1)); } @@ -1444,11 +1444,11 @@ request::handle_serialized_irecv(request* self, request_action action) data->ia.resize(data->count); BOOST_MPI_CHECK_RESULT(MPI_Irecv, (data->ia.address(), data->ia.size(),MPI_PACKED, - stat.source(), stat.tag(), + stat.source(), stat.tag(), MPI_Comm(data->comm), self->m_requests + 1)); } else return optional(); // We have not finished yet - } + } // Check if we have received the message data BOOST_MPI_CHECK_RESULT(MPI_Test, @@ -1456,7 +1456,7 @@ request::handle_serialized_irecv(request* self, request_action action) if (flag) { data->deserialize(stat); return stat; - } else + } else return optional(); } else { return optional(); @@ -1464,11 +1464,11 @@ request::handle_serialized_irecv(request* self, request_action action) } template -optional +optional request::handle_serialized_array_irecv(request* self, request_action action) { typedef detail::serialized_array_irecv_data data_t; - std::shared_ptr data = static_pointer_cast(self->m_data); + shared_ptr data = static_pointer_cast(self->m_data); if (action == ra_wait) { status stat; @@ -1480,7 +1480,7 @@ request::handle_serialized_array_irecv(request* self, request_action action) data->ia.resize(data->count); BOOST_MPI_CHECK_RESULT(MPI_Irecv, (data->ia.address(), data->ia.size(), MPI_PACKED, - stat.source(), stat.tag(), + stat.source(), stat.tag(), MPI_Comm(data->comm), self->m_requests + 1)); } @@ -1503,11 +1503,11 @@ request::handle_serialized_array_irecv(request* self, request_action action) data->ia.resize(data->count); BOOST_MPI_CHECK_RESULT(MPI_Irecv, (data->ia.address(), data->ia.size(),MPI_PACKED, - stat.source(), stat.tag(), + stat.source(), stat.tag(), MPI_Comm(data->comm), self->m_requests + 1)); } else return optional(); // We have not finished yet - } + } // Check if we have received the message data BOOST_MPI_CHECK_RESULT(MPI_Test, @@ -1515,7 +1515,7 @@ request::handle_serialized_array_irecv(request* self, request_action action) if (flag) { data->deserialize(stat); return stat; - } else + } else return optional(); } else { return optional(); @@ -1525,12 +1525,12 @@ request::handle_serialized_array_irecv(request* self, request_action action) // We're receiving a type that has an associated MPI datatype, so we // map directly to that datatype. template -request +request communicator::irecv_impl(int source, int tag, T& value, mpl::true_) const { request req; BOOST_MPI_CHECK_RESULT(MPI_Irecv, - (const_cast(&value), 1, + (const_cast(&value), 1, get_mpi_datatype(value), source, tag, MPI_Comm(*this), &req.m_requests[0])); return req; @@ -1541,34 +1541,34 @@ request communicator::irecv_impl(int source, int tag, T& value, mpl::false_) const { typedef detail::serialized_irecv_data data_t; - std::shared_ptr data(new data_t(*this, source, tag, value)); + shared_ptr data(new data_t(*this, source, tag, value)); request req; req.m_data = data; req.m_handler = request::handle_serialized_irecv; BOOST_MPI_CHECK_RESULT(MPI_Irecv, - (&data->count, 1, + (&data->count, 1, get_mpi_datatype(data->count), source, tag, MPI_Comm(*this), &req.m_requests[0])); - + return req; } template -request +request communicator::irecv(int source, int tag, T& value) const { return this->irecv_impl(source, tag, value, is_mpi_datatype()); } template -request -communicator::array_irecv_impl(int source, int tag, T* values, int n, +request +communicator::array_irecv_impl(int source, int tag, T* values, int n, mpl::true_) const { request req; BOOST_MPI_CHECK_RESULT(MPI_Irecv, - (const_cast(values), n, + (const_cast(values), n, get_mpi_datatype(*values), source, tag, MPI_Comm(*this), &req.m_requests[0])); return req; @@ -1576,17 +1576,17 @@ communicator::array_irecv_impl(int source, int tag, T* values, int n, template request -communicator::array_irecv_impl(int source, int tag, T* values, int n, +communicator::array_irecv_impl(int source, int tag, T* values, int n, mpl::false_) const { typedef detail::serialized_array_irecv_data data_t; - std::shared_ptr data(new data_t(*this, source, tag, values, n)); + shared_ptr data(new data_t(*this, source, tag, values, n)); request req; req.m_data = data; req.m_handler = request::handle_serialized_array_irecv; BOOST_MPI_CHECK_RESULT(MPI_Irecv, - (&data->count, 1, + (&data->count, 1, get_mpi_datatype(data->count), source, tag, MPI_Comm(*this), &req.m_requests[0])); @@ -1657,7 +1657,7 @@ communicator::recv(int source, int tag, content& c) const { return recv(source,tag,c); -} +} /** * INTERNAL ONLY diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/detail/communicator_sc.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/detail/communicator_sc.hpp index 1102675f..1dfcc3c5 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/detail/communicator_sc.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/detail/communicator_sc.hpp @@ -45,7 +45,7 @@ template request communicator::isend(int dest, int tag, const skeleton_proxy& proxy) const { - std::shared_ptr + shared_ptr archive(new packed_skeleton_oarchive(*this)); *archive << proxy.object; @@ -58,13 +58,13 @@ namespace detail { template struct serialized_irecv_data > { - serialized_irecv_data(const communicator& comm, int source, int tag, + serialized_irecv_data(const communicator& comm, int source, int tag, skeleton_proxy proxy) - : comm(comm), source(source), tag(tag), isa(comm), + : comm(comm), source(source), tag(tag), isa(comm), ia(isa.get_skeleton()), proxy(proxy) { } - void deserialize(status& stat) - { + void deserialize(status& stat) + { isa >> proxy.object; stat.m_count = 1; } @@ -84,7 +84,7 @@ namespace detail { { typedef serialized_irecv_data > inherited; - serialized_irecv_data(const communicator& comm, int source, int tag, + serialized_irecv_data(const communicator& comm, int source, int tag, const skeleton_proxy& proxy) : inherited(comm, source, tag, proxy) { } }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/graph_communicator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/graph_communicator.hpp index f9747c77..6cafb1fe 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/graph_communicator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/graph_communicator.hpp @@ -59,7 +59,7 @@ class BOOST_MPI_DECL graph_communicator : public communicator * underlying MPI_Comm. This operation is used for "casting" from a * communicator to a graph communicator. */ - explicit graph_communicator(const std::shared_ptr& comm_ptr) + explicit graph_communicator(const shared_ptr& comm_ptr) { #ifndef BOOST_DISABLE_ASSERTS int status; @@ -99,7 +99,7 @@ public: */ graph_communicator(const MPI_Comm& comm, comm_create_kind kind) : communicator(comm, kind) - { + { #ifndef BOOST_DISABLE_ASSERTS int status; BOOST_MPI_CHECK_RESULT(MPI_Topo_test, ((MPI_Comm)*this, &status)); @@ -116,8 +116,8 @@ public: * resulting communicator will be a NULL communicator. * * @param comm The communicator that the new, graph communicator - * will be based on. - * + * will be based on. + * * @param graph Any type that meets the requirements of the * Incidence Graph and Vertex List Graph concepts from the Boost Graph * Library. This structure of this graph will become the topology @@ -130,8 +130,8 @@ public: * within the original communicator. */ template - explicit - graph_communicator(const communicator& comm, const Graph& graph, + explicit + graph_communicator(const communicator& comm, const Graph& graph, bool reorder = false); /** @@ -145,7 +145,7 @@ public: * @param comm The communicator that the new, graph communicator * will be based on. The ranks in @c rank refer to the processes in * this communicator. - * + * * @param graph Any type that meets the requirements of the * Incidence Graph and Vertex List Graph concepts from the Boost Graph * Library. This structure of this graph will become the topology @@ -164,8 +164,8 @@ public: * within the original communicator. */ template - explicit - graph_communicator(const communicator& comm, const Graph& graph, + explicit + graph_communicator(const communicator& comm, const Graph& graph, RankMap rank, bool reorder = false); protected: @@ -177,7 +177,7 @@ protected: */ template void - setup_graph(const communicator& comm, const Graph& graph, RankMap rank, + setup_graph(const communicator& comm, const Graph& graph, RankMap rank, bool reorder); }; @@ -186,16 +186,16 @@ protected: ****************************************************************************/ template -graph_communicator::graph_communicator(const communicator& comm, - const Graph& graph, +graph_communicator::graph_communicator(const communicator& comm, + const Graph& graph, bool reorder) { this->setup_graph(comm, graph, get(vertex_index, graph), reorder); } template -graph_communicator::graph_communicator(const communicator& comm, - const Graph& graph, +graph_communicator::graph_communicator(const communicator& comm, + const Graph& graph, RankMap rank, bool reorder) { this->setup_graph(comm, graph, rank, reorder); @@ -204,7 +204,7 @@ graph_communicator::graph_communicator(const communicator& comm, template void -graph_communicator::setup_graph(const communicator& comm, const Graph& graph, +graph_communicator::setup_graph(const communicator& comm, const Graph& graph, RankMap rank, bool reorder) { typedef typename graph_traits::vertex_descriptor vertex_descriptor; @@ -234,7 +234,7 @@ graph_communicator::setup_graph(const communicator& comm, const Graph& graph, // Create the new communicator MPI_Comm newcomm; BOOST_MPI_CHECK_RESULT(MPI_Graph_create, - ((MPI_Comm)comm, + ((MPI_Comm)comm, nvertices, &indices[0], edges.empty()? (int*)0 : &edges[0], @@ -254,10 +254,10 @@ namespace detail { * communicator's graph topology. */ class comm_out_edge_iterator - : public iterator_facade, random_access_traversal_tag, - const std::pair&, + const std::pair&, int> { public: @@ -304,10 +304,10 @@ namespace detail { * communicator's graph topology. */ class comm_adj_iterator - : public iterator_facade { public: @@ -349,10 +349,10 @@ namespace detail { * topology. */ class comm_edge_iterator - : public iterator_facade, forward_traversal_tag, - const std::pair&, + const std::pair&, int> { public: @@ -381,9 +381,9 @@ namespace detail { return edge_index == other.edge_index; } - void increment() - { - ++edge_index; + void increment() + { + ++edge_index; } shared_array indices; @@ -478,7 +478,7 @@ int num_edges(const graph_communicator& comm); /** * @brief Returns a property map that maps from vertices in a - * communicator's graph topology to their index values. + * communicator's graph topology to their index values. * * Since the vertices are ranks in the communicator, the returned * property map is the identity property map. @@ -522,16 +522,16 @@ struct graph_traits { typedef std::pair edge_descriptor; typedef directed_tag directed_category; typedef disallow_parallel_edge_tag edge_parallel_category; - + /** * INTERNAL ONLY */ struct traversal_category - : incidence_graph_tag, - adjacency_graph_tag, - vertex_list_graph_tag, - edge_list_graph_tag - { + : incidence_graph_tag, + adjacency_graph_tag, + vertex_list_graph_tag, + edge_list_graph_tag + { }; /** diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/group.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/group.hpp index 5fa5e4b5..103b35a1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/group.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/group.hpp @@ -16,7 +16,7 @@ #define BOOST_MPI_GROUP_HPP #include -#include +#include #include #include @@ -62,7 +62,7 @@ public: /** * @brief Determine the rank of the calling process in the group. - * + * * This routine is equivalent to @c MPI_Group_rank. * * @returns The rank of the calling process in the group, which will @@ -167,11 +167,11 @@ public: * * @returns A new group containing all of the processes in the * current group except those processes with ranks @c [first, last) - * in the current group. + * in the current group. */ template group exclude(InputIterator first, InputIterator last); - + protected: /** @@ -179,7 +179,7 @@ protected: * * Function object that frees an MPI group and deletes the * memory associated with it. Intended to be used as a deleter with - * std::shared_ptr. + * shared_ptr. */ struct group_free { @@ -199,7 +199,7 @@ protected: * @c group class. When there are no more such instances, the group * will be automatically freed. */ - std::shared_ptr group_ptr; + shared_ptr group_ptr; }; /** @@ -223,7 +223,7 @@ BOOST_MPI_DECL bool operator==(const group& g1, const group& g2); * processes in the same order. */ inline bool operator!=(const group& g1, const group& g2) -{ +{ return !(g1 == g2); } @@ -260,7 +260,7 @@ BOOST_MPI_DECL group operator-(const group& g1, const group& g2); * Implementation details * ************************************************************************/ template -OutputIterator +OutputIterator group::translate_ranks(InputIterator first, InputIterator last, const group& to_group, OutputIterator out) { @@ -283,11 +283,11 @@ group::translate_ranks(InputIterator first, InputIterator last, /** * INTERNAL ONLY - * + * * Specialization of translate_ranks that handles the one case where * we can avoid any memory allocation or copying. */ -template<> +template<> BOOST_MPI_DECL int* group::translate_ranks(int* first, int* last, const group& to_group, int* out); @@ -306,7 +306,7 @@ group group::include(InputIterator first, InputIterator last) /** * INTERNAL ONLY - * + * * Specialization of group::include that handles the one case where we * can avoid any memory allocation or copying before creating the * group. @@ -328,7 +328,7 @@ group group::exclude(InputIterator first, InputIterator last) /** * INTERNAL ONLY - * + * * Specialization of group::exclude that handles the one case where we * can avoid any memory allocation or copying before creating the * group. diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/intercommunicator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/intercommunicator.hpp index d57c79e2..ad246b59 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/intercommunicator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/intercommunicator.hpp @@ -24,7 +24,7 @@ namespace boost { namespace mpi { * * Forward declaration of the MPI "group" representation, for use in * the description of the @c intercommunicator class. - */ + */ class group; /** @@ -45,8 +45,8 @@ class group; * intercommunicators occurs between the processes in the local group * and the processes in the remote group; communication within a group * must use a different (intra-)communicator. - * - */ + * + */ class BOOST_MPI_DECL intercommunicator : public communicator { private: @@ -59,7 +59,7 @@ private: * underlying MPI_Comm. This operation is used for "casting" from a * communicator to an intercommunicator. */ - explicit intercommunicator(const std::shared_ptr& cp) + explicit intercommunicator(const shared_ptr& cp) { this->comm_ptr = cp; } @@ -149,7 +149,7 @@ public: * Merge the local and remote groups in this intercommunicator into * a new intracommunicator containing the union of the processes in * both groups. This method is equivalent to @c MPI_Intercomm_merge. - * + * * @param high Whether the processes in this group should have the * higher rank numbers than the processes in the other group. Each * of the processes within a particular group shall have the same diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/request.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/request.hpp index e43f00a8..cb36cc5a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/request.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/request.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include namespace boost { namespace mpi { @@ -29,7 +29,7 @@ class communicator; * receive and will be returned from @c isend or @c irecv, * respectively. */ -class BOOST_MPI_DECL request +class BOOST_MPI_DECL request { public: /** @@ -62,7 +62,7 @@ class BOOST_MPI_DECL request private: enum request_action { ra_wait, ra_test, ra_cancel }; - typedef optional (*handler_type)(request* self, + typedef optional (*handler_type)(request* self, request_action action); /** @@ -71,7 +71,7 @@ class BOOST_MPI_DECL request * Handles the non-blocking receive of a serialized value. */ template - static optional + static optional handle_serialized_irecv(request* self, request_action action); /** @@ -80,7 +80,7 @@ class BOOST_MPI_DECL request * Handles the non-blocking receive of an array of serialized values. */ template - static optional + static optional handle_serialized_array_irecv(request* self, request_action action); public: // template friends are not portable @@ -92,7 +92,7 @@ class BOOST_MPI_DECL request handler_type m_handler; /// INTERNAL ONLY - std::shared_ptr m_data; + shared_ptr m_data; friend class communicator; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/skeleton_and_content.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/skeleton_and_content.hpp index 78c5fb27..dcd13bfe 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/skeleton_and_content.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/mpi/skeleton_and_content.hpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include namespace boost { namespace mpi { @@ -197,7 +197,7 @@ public: } private: - boost::std::shared_ptr holder; + boost::shared_ptr holder; }; /** @brief Returns the content of an object, suitable for transmission diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/pointee.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/pointee.hpp index d4d24f49..9794b8e7 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/pointee.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/pointee.hpp @@ -8,7 +8,7 @@ // // typename pointee

::type provides the pointee type of P. // -// For example, it is T for T* and X for std::shared_ptr. +// For example, it is T for T* and X for shared_ptr. // // http://www.boost.org/libs/iterator/doc/pointee.html // @@ -20,7 +20,7 @@ # include # include -namespace boost { +namespace boost { namespace detail { @@ -34,25 +34,25 @@ namespace detail struct iterator_pointee { typedef typename iterator_traits::value_type value_type; - + struct impl { template static char test(T const&); - + static char (& test(value_type&) )[2]; - + static Iterator& x; }; - + BOOST_STATIC_CONSTANT(bool, is_constant = sizeof(impl::test(*impl::x)) == 1); - + typedef typename mpl::if_c< # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) ::boost::detail::iterator_pointee::is_constant # else is_constant -# endif +# endif , typename add_const::type , value_type >::type type; @@ -68,7 +68,7 @@ struct pointee > { }; - + } // namespace boost #endif // POINTEE_DWA200415_HPP diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/detail/config_file.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/detail/config_file.hpp index 0aa83ba1..4c2c15b9 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/detail/config_file.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/detail/config_file.hpp @@ -25,7 +25,7 @@ #include #include -#include +#include @@ -38,7 +38,7 @@ namespace boost { namespace program_options { namespace detail { for(; i !=e; ++i) { *i; } - + Syntax conventions: - config file can not contain positional options @@ -47,10 +47,10 @@ namespace boost { namespace program_options { namespace detail { - variable assignments are in the form name '=' value. spaces around '=' are trimmed. - - Section names are given in brackets. + - Section names are given in brackets. The actual option name is constructed by combining current section - name and specified option name, with dot between. If section_name + name and specified option name, with dot between. If section_name already contains dot at the end, new dot is not inserted. For example: @verbatim [gui.accessibility] @@ -61,8 +61,8 @@ namespace boost { namespace program_options { namespace detail { TODO: maybe, we should just accept a pointer to options_description class. - */ - class common_config_file_iterator + */ + class common_config_file_iterator : public eof_iterator { public: @@ -74,9 +74,9 @@ namespace boost { namespace program_options { namespace detail { virtual ~common_config_file_iterator() {} public: // Method required by eof_iterator - + void get(); - + protected: // Stubs for derived classes // Obtains next line from the config file @@ -85,7 +85,7 @@ namespace boost { namespace program_options { namespace detail { // constructor of this class, but to avoid templating this class // we'd need polymorphic iterator, which does not exist yet. virtual bool getline(std::string&) { return false; } - + private: /** Adds another allowed option. If the 'name' ends with '*', then all options with the same prefix are @@ -94,7 +94,7 @@ namespace boost { namespace program_options { namespace detail { void add_option(const char* name); // Returns true if 's' is a registered option name. - bool allowed_option(const std::string& s) const; + bool allowed_option(const std::string& s) const; // That's probably too much data for iterator, since // it will be copied, but let's not bother for now. @@ -113,20 +113,20 @@ namespace boost { namespace program_options { namespace detail { found_eof(); } - /** Creates a config file parser for the specified stream. + /** Creates a config file parser for the specified stream. */ - basic_config_file_iterator(std::basic_istream& is, + basic_config_file_iterator(std::basic_istream& is, const std::set& allowed_options, - bool allow_unregistered = false); + bool allow_unregistered = false); private: // base overrides bool getline(std::string&); private: // internal data - std::shared_ptr > is; + shared_ptr > is; }; - + typedef basic_config_file_iterator config_file_iterator; typedef basic_config_file_iterator wconfig_file_iterator; @@ -139,12 +139,12 @@ namespace boost { namespace program_options { namespace detail { template basic_config_file_iterator:: - basic_config_file_iterator(std::basic_istream& is, + basic_config_file_iterator(std::basic_istream& is, const std::set& allowed_options, bool allow_unregistered) : common_config_file_iterator(allowed_options, allow_unregistered) { - this->is.reset(&is, null_deleter()); + this->is.reset(&is, null_deleter()); get(); } @@ -173,7 +173,7 @@ namespace boost { namespace program_options { namespace detail { basic_config_file_iterator::getline(std::string& s); #endif - + }}} diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/options_description.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/options_description.hpp index 2b5dee37..62530b2d 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/options_description.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/options_description.hpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include @@ -27,12 +27,12 @@ #if defined(BOOST_MSVC) # pragma warning (push) -# pragma warning (disable:4251) // class 'boost::std::shared_ptr' needs to have dll-interface to be used by clients of class 'boost::program_options::option_description' +# pragma warning (disable:4251) // class 'boost::shared_ptr' needs to have dll-interface to be used by clients of class 'boost::program_options::option_description' #endif /** Boost namespace */ -namespace boost { +namespace boost { /** Namespace for the library. */ namespace program_options { @@ -67,7 +67,7 @@ namespace program_options { So, we have to use plain old pointers. Besides, users are not expected to use the constructor directly. - + The 'name' parameter is interpreted by the following rules: - if there's no "," character in 'name', it specifies long name - otherwise, the part before "," specifies long name and the part @@ -76,7 +76,7 @@ namespace program_options { option_description(const char* name, const value_semantic* s); - /** Initializes the class with the passed data. + /** Initializes the class with the passed data. */ option_description(const char* name, const value_semantic* s, @@ -118,9 +118,9 @@ namespace program_options { const std::string& description() const; /// Semantic of option's value - std::shared_ptr semantic() const; - - /// Returns the option name, formatted suitably for usage message. + shared_ptr semantic() const; + + /// Returns the option name, formatted suitably for usage message. std::string format_name() const; /** Returns the parameter name and properties, formatted suitably for @@ -128,19 +128,19 @@ namespace program_options { std::string format_parameter() const; private: - + option_description& set_name(const char* name); std::string m_short_name, m_long_name, m_description; - // std::shared_ptr is needed to simplify memory management in + // shared_ptr is needed to simplify memory management in // copy ctor and destructor. - std::shared_ptr m_value_semantic; + shared_ptr m_value_semantic; }; class options_description; - /** Class which provides convenient creation syntax to option_description. - */ + /** Class which provides convenient creation syntax to option_description. + */ class BOOST_PROGRAM_OPTIONS_DECL options_description_easy_init { public: options_description_easy_init(options_description* owner); @@ -152,12 +152,12 @@ namespace program_options { options_description_easy_init& operator()(const char* name, const value_semantic* s); - + options_description_easy_init& operator()(const char* name, const value_semantic* s, const char* description); - + private: options_description* owner; }; @@ -166,14 +166,14 @@ namespace program_options { /** A set of option descriptions. This provides convenient interface for adding new option (the add_options) method, and facilities to search for options by name. - + See @ref a_adding_options "here" for option adding interface discussion. @sa option_description */ class BOOST_PROGRAM_OPTIONS_DECL options_description { public: static const unsigned m_default_line_length; - + /** Creates the instance. */ options_description(unsigned line_length = m_default_line_length, unsigned min_description_length = m_default_line_length / 2); @@ -188,11 +188,11 @@ namespace program_options { unsigned line_length = m_default_line_length, unsigned min_description_length = m_default_line_length / 2); /** Adds new variable description. Throws duplicate_variable_error if - either short or long name matches that of already present one. + either short or long name matches that of already present one. */ - void add(std::shared_ptr desc); + void add(shared_ptr desc); /** Adds a group of option description. This has the same - effect as adding all option_descriptions in 'desc' + effect as adding all option_descriptions in 'desc' individually, except that output operator will show a separate group. Returns *this. @@ -202,29 +202,29 @@ namespace program_options { public: /** Returns an object of implementation-defined type suitable for adding options to options_description. The returned object will - have overloaded operator() with parameter type matching + have overloaded operator() with parameter type matching 'option_description' constructors. Calling the operator will create new option_description instance and add it. */ options_description_easy_init add_options(); - const option_description& find(const std::string& name, - bool approx, + const option_description& find(const std::string& name, + bool approx, bool long_ignore_case = false, bool short_ignore_case = false) const; - const option_description* find_nothrow(const std::string& name, + const option_description* find_nothrow(const std::string& name, bool approx, bool long_ignore_case = false, bool short_ignore_case = false) const; - const std::vector< std::shared_ptr >& options() const; + const std::vector< shared_ptr >& options() const; /** Produces a human readable output of 'desc', listing options, their descriptions and allowed parameters. Other options_description instances previously passed to add will be output separately. */ - friend BOOST_PROGRAM_OPTIONS_DECL std::ostream& operator<<(std::ostream& os, + friend BOOST_PROGRAM_OPTIONS_DECL std::ostream& operator<<(std::ostream& os, const options_description& desc); /** Outputs 'desc' to the specified stream, calling 'f' to output each @@ -233,7 +233,7 @@ namespace program_options { private: typedef std::map::const_iterator name2index_iterator; - typedef std::pair + typedef std::pair approximation_range; //approximation_range find_approximation(const std::string& prefix) const; @@ -241,11 +241,11 @@ namespace program_options { std::string m_caption; const unsigned m_line_length; const unsigned m_min_description_length; - + // Data organization is chosen because: // - there could be two names for one option // - option_add_proxy needs to know the last added option - std::vector< std::shared_ptr > m_options; + std::vector< shared_ptr > m_options; // Whether the option comes from one of declared groups. #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, BOOST_TESTED_AT(313)) @@ -256,7 +256,7 @@ namespace program_options { std::vector belong_to_group; #endif - std::vector< std::shared_ptr > groups; + std::vector< shared_ptr > groups; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/variables_map.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/variables_map.hpp index 47811f78..be0a4b64 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/variables_map.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/program_options/variables_map.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include @@ -31,35 +31,35 @@ namespace boost { namespace program_options { // forward declaration - /** Stores in 'm' all options that are defined in 'options'. + /** Stores in 'm' all options that are defined in 'options'. If 'm' already has a non-defaulted value of an option, that value - is not changed, even if 'options' specify some value. + is not changed, even if 'options' specify some value. */ - BOOST_PROGRAM_OPTIONS_DECL + BOOST_PROGRAM_OPTIONS_DECL void store(const basic_parsed_options& options, variables_map& m, bool utf8 = false); - /** Stores in 'm' all options that are defined in 'options'. + /** Stores in 'm' all options that are defined in 'options'. If 'm' already has a non-defaulted value of an option, that value - is not changed, even if 'options' specify some value. + is not changed, even if 'options' specify some value. This is wide character variant. */ - BOOST_PROGRAM_OPTIONS_DECL - void store(const basic_parsed_options& options, + BOOST_PROGRAM_OPTIONS_DECL + void store(const basic_parsed_options& options, variables_map& m); /** Runs all 'notify' function for options in 'm'. */ BOOST_PROGRAM_OPTIONS_DECL void notify(variables_map& m); - /** Class holding value of option. Contains details about how the + /** Class holding value of option. Contains details about how the value is set and allows to conveniently obtain the value. */ class BOOST_PROGRAM_OPTIONS_DECL variable_value { public: variable_value() : m_defaulted(false) {} - variable_value(const boost::any& xv, bool xdefaulted) - : v(xv), m_defaulted(xdefaulted) + variable_value(const boost::any& xv, bool xdefaulted) + : v(xv), m_defaulted(xdefaulted) {} /** If stored value if of type T, returns that value. Otherwise, @@ -92,10 +92,10 @@ namespace boost { namespace program_options { // they are known only after all sources are stored. By that // time options_description for the first source might not // be easily accessible, so we need to store semantic here. - std::shared_ptr m_value_semantic; + shared_ptr m_value_semantic; friend BOOST_PROGRAM_OPTIONS_DECL - void store(const basic_parsed_options& options, + void store(const basic_parsed_options& options, variables_map& m, bool); friend BOOST_PROGRAM_OPTIONS_DECL class variables_map; @@ -138,8 +138,8 @@ namespace boost { namespace program_options { const abstract_variables_map* m_next; }; - /** Concrete variables map which store variables in real map. - + /** Concrete variables map which store variables in real map. + This class is derived from std::map, so you can use all map operators to examine its content. */ @@ -155,8 +155,8 @@ namespace boost { namespace program_options { { return abstract_variables_map::operator[](name); } // Override to clear some extra fields. - void clear(); - + void clear(); + void notify(); private: @@ -169,10 +169,10 @@ namespace boost { namespace program_options { std::set m_final; friend BOOST_PROGRAM_OPTIONS_DECL - void store(const basic_parsed_options& options, + void store(const basic_parsed_options& options, variables_map& xm, bool utf8); - + /** Names of required options, filled by parser which has access to options_description. The map values are the "canonical" names for each corresponding option. diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/dynamic_property_map.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/dynamic_property_map.hpp index e470ad0e..f5f4230e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/dynamic_property_map.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/dynamic_property_map.hpp @@ -206,9 +206,9 @@ private: // struct dynamic_properties { - typedef std::multimap > + typedef std::multimap > property_maps_type; - typedef boost::function3, + typedef boost::function3, const std::string&, const boost::any&, const boost::any&> generate_fn_type; @@ -226,7 +226,7 @@ public: dynamic_properties& property(const std::string& name, PropertyMap property_map_) { - boost::std::shared_ptr pm( + boost::shared_ptr pm( boost::static_pointer_cast( boost::make_shared >(property_map_))); property_maps.insert(property_maps_type::value_type(name, pm)); @@ -246,13 +246,13 @@ public: { return property_maps.lower_bound(name); } void - insert(const std::string& name, boost::std::shared_ptr pm) + insert(const std::string& name, boost::shared_ptr pm) { property_maps.insert(property_maps_type::value_type(name, pm)); } template - boost::std::shared_ptr + boost::shared_ptr generate(const std::string& name, const Key& key, const Value& value) { if(!generate_fn) { @@ -280,7 +280,7 @@ put(const std::string& name, dynamic_properties& dp, const Key& key, } } - boost::std::shared_ptr new_map = dp.generate(name, key, value); + boost::shared_ptr new_map = dp.generate(name, key, value); if (new_map.get()) { new_map->put(key, value); dp.insert(name, new_map); @@ -290,7 +290,7 @@ put(const std::string& name, dynamic_properties& dp, const Key& key, } } -#ifndef BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +#ifndef BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS template Value get(const std::string& name, const dynamic_properties& dp, const Key& key) @@ -333,11 +333,11 @@ get(const std::string& name, const dynamic_properties& dp, const Key& key) // The easy way to ignore properties. inline -boost::std::shared_ptr +boost::shared_ptr ignore_other_properties(const std::string&, const boost::any&, const boost::any&) { - return boost::std::shared_ptr(); + return boost::shared_ptr(); } } // namespace boost diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/distributed_property_map.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/distributed_property_map.hpp index b39202ed..c34e073e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/distributed_property_map.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/distributed_property_map.hpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include #include @@ -93,10 +93,10 @@ namespace detail { template static inline void do_put(PropertyMap pm, const Key& key, const Value& value) - { + { using boost::put; - put(pm, key, value); + put(pm, key, value); } }; @@ -240,7 +240,7 @@ class distributed_property_map property_map_put, /** A request to retrieve a particular value in a property - * map. The message contains a key. The owner of that key will + * map. The message contains a key. The owner of that key will * reply with a value. */ property_map_get, @@ -377,7 +377,7 @@ class distributed_property_map reference operator[](const key_type& key) const { owner_local_pair p = get(data->global, key); - + if (p.first == process_id(data->process_group)) { return data->storage[p.second]; } else { @@ -397,11 +397,11 @@ class distributed_property_map * \internal * */ - void + void request_put(process_id_type p, const key_type& k, const value_type& v) const - { - send(data->process_group, p, property_map_put, - boost::parallel::detail::make_untracked_pair(k, v)); + { + send(data->process_group, p, property_map_put, + boost::parallel::detail::make_untracked_pair(k, v)); } /** Access the ghost cell for the given key. @@ -419,11 +419,11 @@ class distributed_property_map struct data_t { - data_t(const ProcessGroup& pg, const GlobalMap& global, + data_t(const ProcessGroup& pg, const GlobalMap& global, const StorageMap& pm, const function1& dv, bool has_default_resolver) - : process_group(pg), global(global), storage(pm), - ghost_cells(), max_ghost_cells(1000000), get_default_value(dv), + : process_group(pg), global(global), storage(pm), + ghost_cells(), max_ghost_cells(1000000), get_default_value(dv), has_default_resolver(has_default_resolver), model(cm_forward) { } /// The process group @@ -437,7 +437,7 @@ class distributed_property_map StorageMap storage; /// The ghost cells - std::shared_ptr ghost_cells; + shared_ptr ghost_cells; /// The maximum number of ghost cells we are permitted to hold. If /// zero, we are permitted to have an infinite number of ghost @@ -478,7 +478,7 @@ class distributed_property_map }; friend struct data_t; - std::shared_ptr data; + shared_ptr data; private: // Prunes the least recently used ghost cells until we have @c @@ -493,36 +493,36 @@ class distributed_property_map template struct handle_message { - explicit handle_message(const std::shared_ptr& data, + explicit handle_message(const shared_ptr& data, const Reduce& reduce = Reduce()) : data_ptr(data), reduce(reduce) { } void operator()(process_id_type source, int tag); /// Individual message handlers - void - handle_put(int source, int tag, - const boost::parallel::detail::untracked_pair& data, + void + handle_put(int source, int tag, + const boost::parallel::detail::untracked_pair& data, trigger_receive_context); value_type - handle_get(int source, int tag, const key_type& data, + handle_get(int source, int tag, const key_type& data, trigger_receive_context); void - handle_multiget(int source, int tag, + handle_multiget(int source, int tag, const std::vector& data, trigger_receive_context); void handle_multiget_reply - (int source, int tag, + (int source, int tag, const std::vector >& msg, trigger_receive_context); void handle_multiput - (int source, int tag, + (int source, int tag, const std::vector >& data, trigger_receive_context); @@ -537,7 +537,7 @@ class distributed_property_map bidirectional consistency. */ struct on_synchronize { - explicit on_synchronize(const std::shared_ptr& data) : data_ptr(data) { } + explicit on_synchronize(const shared_ptr& data) : data_ptr(data) { } void operator()(); @@ -581,7 +581,7 @@ get(const PBGL_DISTRIB_PMAP& pm, { using boost::get; - typename property_traits::value_type p = + typename property_traits::value_type p = get(pm.data->global, key); if (p.first == process_id(pm.data->process_group)) { @@ -609,13 +609,13 @@ put(const PBGL_DISTRIB_PMAP& pm, { using boost::put; - typename property_traits::value_type p = + typename property_traits::value_type p = get(pm.data->global, key); if (p.first == process_id(pm.data->process_group)) { put(pm.data->storage, p.second, value); } else { - if (pm.data->model & cm_forward) + if (pm.data->model & cm_forward) pm.request_put(p.first, key, value); pm.cell(key, false) = value; @@ -637,7 +637,7 @@ local_put(const PBGL_DISTRIB_PMAP& pm, { using boost::put; - typename property_traits::value_type p = + typename property_traits::value_type p = get(pm.data->global, key); if (p.first == process_id(pm.data->process_group)) @@ -669,7 +669,7 @@ synchronize(PBGL_DISTRIB_PMAP& pm) /// Create a distributed property map. template inline distributed_property_map -make_distributed_property_map(const ProcessGroup& pg, GlobalMap global, +make_distributed_property_map(const ProcessGroup& pg, GlobalMap global, StorageMap storage) { typedef distributed_property_map @@ -680,10 +680,10 @@ make_distributed_property_map(const ProcessGroup& pg, GlobalMap global, /** * \overload */ -template inline distributed_property_map -make_distributed_property_map(const ProcessGroup& pg, GlobalMap global, +make_distributed_property_map(const ProcessGroup& pg, GlobalMap global, StorageMap storage, Reduce reduce) { typedef distributed_property_map diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/global_index_map.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/global_index_map.hpp index eae5d112..e40d27a0 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/global_index_map.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/global_index_map.hpp @@ -15,7 +15,7 @@ #include #include -#include +#include namespace boost { namespace parallel { @@ -29,7 +29,7 @@ public: typedef readable_property_map_tag category; template - global_index_map(ProcessGroup pg, value_type num_local_indices, + global_index_map(ProcessGroup pg, value_type num_local_indices, IndexMap index_map, GlobalMap global) : index_map(index_map), global(global) { @@ -37,7 +37,7 @@ public: starting_index.reset(new std::vector(num_processes(pg) + 1)); send(pg, 0, 0, num_local_indices); synchronize(pg); - + // Populate starting_index in all processes if (process_id(pg) == 0) { (*starting_index)[0] = 0; @@ -55,7 +55,7 @@ public: } } - friend inline value_type + friend inline value_type get(const global_index_map& gim, const key_type& x) { using boost::get; @@ -64,7 +64,7 @@ public: } private: - std::shared_ptr > starting_index; + shared_ptr > starting_index; IndexMap index_map; GlobalMap global; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/impl/distributed_property_map.ipp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/impl/distributed_property_map.ipp index d47d6856..ef20817f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/impl/distributed_property_map.ipp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/parallel/impl/distributed_property_map.ipp @@ -41,7 +41,7 @@ PBGL_DISTRIB_PMAP::~distributed_property_map() { } template template -void +void PBGL_DISTRIB_PMAP::set_reduce(const Reduce& reduce) { typedef handle_message Handler; @@ -69,7 +69,7 @@ void PBGL_DISTRIB_PMAP::prune_ghost_cells() const // We need to flush values when we evict them. boost::parallel::detail::untracked_pair const& victim = data->ghost_cells->back(); - send(data->process_group, get(data->global, victim.first).first, + send(data->process_group, get(data->global, victim.first).first, property_map_put, victim); } @@ -83,11 +83,11 @@ typename PBGL_DISTRIB_PMAP::value_type& PBGL_DISTRIB_PMAP::cell(const key_type& key, bool request_if_missing) const { // Index by key - ghost_cells_key_index_type const& key_index + ghost_cells_key_index_type const& key_index = data->ghost_cells->template get<1>(); // Search for the ghost cell by key, and project back to the sequence - iterator ghost_cell + iterator ghost_cell = data->ghost_cells->template project<0>(key_index.find(key)); if (ghost_cell == data->ghost_cells->end()) { value_type value; @@ -97,13 +97,13 @@ PBGL_DISTRIB_PMAP::cell(const key_type& key, bool request_if_missing) const value = data->get_default_value(key); else if (request_if_missing) // Request the actual value of this key from its owner - send_oob_with_reply(data->process_group, get(data->global, key).first, + send_oob_with_reply(data->process_group, get(data->global, key).first, property_map_get, key, value); else value = value_type(); // Create a ghost cell containing the new value - ghost_cell + ghost_cell = data->ghost_cells->push_front(std::make_pair(key, value)).first; // If we need to, prune the ghost cells @@ -129,12 +129,12 @@ template template void PBGL_DISTRIB_PMAP::handle_message:: -handle_put(int /*source*/, int /*tag*/, +handle_put(int /*source*/, int /*tag*/, const boost::parallel::detail::untracked_pair& req, trigger_receive_context) { using boost::get; - std::shared_ptr data(data_ptr); + shared_ptr data(data_ptr); owner_local_pair p = get(data->global, req.first); BOOST_ASSERT(p.first == process_id(data->process_group)); @@ -149,12 +149,12 @@ template template typename PBGL_DISTRIB_PMAP::value_type PBGL_DISTRIB_PMAP::handle_message:: -handle_get(int source, int /*tag*/, const key_type& key, +handle_get(int source, int /*tag*/, const key_type& key, trigger_receive_context) { using boost::get; - std::shared_ptr data(data_ptr); + shared_ptr data(data_ptr); BOOST_ASSERT(data); owner_local_pair p = get(data->global, key); @@ -168,7 +168,7 @@ PBGL_DISTRIB_PMAP::handle_message:: handle_multiget(int source, int tag, const std::vector& keys, trigger_receive_context) { - std::shared_ptr data(data_ptr); + shared_ptr data(data_ptr); BOOST_ASSERT(data); typedef boost::parallel::detail::untracked_pair key_value; @@ -190,15 +190,15 @@ template void PBGL_DISTRIB_PMAP::handle_message:: handle_multiget_reply - (int source, int tag, + (int source, int tag, const std::vector >& msg, trigger_receive_context) { - std::shared_ptr data(data_ptr); + shared_ptr data(data_ptr); BOOST_ASSERT(data); // Index by key - ghost_cells_key_index_type const& key_index + ghost_cells_key_index_type const& key_index = data->ghost_cells->template get<1>(); std::size_t n = msg.size(); @@ -217,13 +217,13 @@ template void PBGL_DISTRIB_PMAP::handle_message:: handle_multiput - (int source, int tag, + (int source, int tag, const std::vector >& values, trigger_receive_context) { using boost::get; - std::shared_ptr data(data_ptr); + shared_ptr data(data_ptr); BOOST_ASSERT(data); std::size_t n = values.size(); @@ -247,11 +247,11 @@ setup_triggers(process_group_type& pg) simple_trigger(pg, property_map_put, this, &handle_message::handle_put); simple_trigger(pg, property_map_get, this, &handle_message::handle_get); - simple_trigger(pg, property_map_multiget, this, + simple_trigger(pg, property_map_multiget, this, &handle_message::handle_multiget); - simple_trigger(pg, property_map_multiget_reply, this, + simple_trigger(pg, property_map_multiget_reply, this, &handle_message::handle_multiget_reply); - simple_trigger(pg, property_map_multiput, this, + simple_trigger(pg, property_map_multiput, this, &handle_message::handle_multiput); } @@ -261,7 +261,7 @@ PBGL_DISTRIB_PMAP ::on_synchronize::operator()() { int stage=0; // we only get called at the start now - std::shared_ptr data(data_ptr); + shared_ptr data(data_ptr); BOOST_ASSERT(data); // Determine in which stage backward consistency messages should be sent. @@ -371,7 +371,7 @@ void PBGL_DISTRIB_PMAP::data_t::refresh_ghost_cells() for (process_size_type p = (id + 1) % n ; p != id ; p = (p + 1) % n) { if (!keys[p].empty()) send(process_group, p, property_map_multiget, keys[p]); - } + } } template diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/vector_property_map.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/vector_property_map.hpp index 46d7924a..a97fb810 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/vector_property_map.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/property_map/vector_property_map.hpp @@ -11,29 +11,29 @@ #define VECTOR_PROPERTY_MAP_HPP_VP_2003_03_04 #include -#include +#include #include namespace boost { template class vector_property_map - : public boost::put_get_helper< - typename std::iterator_traits< + : public boost::put_get_helper< + typename std::iterator_traits< typename std::vector::iterator >::reference, vector_property_map > { public: typedef typename property_traits::key_type key_type; typedef T value_type; - typedef typename std::iterator_traits< + typedef typename std::iterator_traits< typename std::vector::iterator >::reference reference; typedef boost::lvalue_property_map_tag category; - + vector_property_map(const IndexMap& index = IndexMap()) : store(new std::vector()), index(index) {} - vector_property_map(unsigned initial_size, + vector_property_map(unsigned initial_size, const IndexMap& index = IndexMap()) : store(new std::vector(initial_size)), index(index) {} @@ -57,15 +57,15 @@ namespace boost { { return store->end(); } - + IndexMap& get_index_map() { return index; } const IndexMap& get_index_map() const { return index; } - + public: // Copy ctor absent, default semantics is OK. // Assignment operator absent, default semantics is OK. // CONSIDER: not sure that assignment to 'index' is correct. - + reference operator[](const key_type& v) const { typename property_traits::value_type i = get(index, v); if (static_cast(i) >= store->size()) { @@ -74,16 +74,16 @@ namespace boost { return (*store)[i]; } private: - // Conceptually, we have a vector of infinite size. For practical + // Conceptually, we have a vector of infinite size. For practical // purposes, we start with an empty vector and grow it as needed. // Note that we cannot store pointer to vector here -- we cannot // store pointer to data, because if copy of property map resizes - // the vector, the pointer to data will be invalidated. + // the vector, the pointer to data will be invalidated. // I wonder if class 'pmap_ref' is simply needed. - std::shared_ptr< std::vector > store; + shared_ptr< std::vector > store; IndexMap index; }; - + template vector_property_map make_vector_property_map(IndexMap index) @@ -103,15 +103,15 @@ namespace boost { * This specialization of @ref vector_property_map builds a * distributed vector property map given the local index maps * generated by distributed graph types that automatically have index - * properties. + * properties. * * This specialization is useful when creating external distributed * property maps via the same syntax used to create external * sequential property maps. */ -template -class vector_property_map > : public parallel::distributed_property_map< @@ -119,7 +119,7 @@ class vector_property_map local_iterator_map; - typedef parallel::distributed_property_map inherited; typedef local_property_map index_map_type; @@ -129,7 +129,7 @@ public: : inherited(index.process_group(), index.global(), local_iterator_map(index.base())) { } - vector_property_map(unsigned inital_size, + vector_property_map(unsigned inital_size, const index_map_type& index = index_map_type()) : inherited(index.process_group(), index.global(), local_iterator_map(inital_size, index.base())) { } @@ -140,31 +140,31 @@ public: * This specialization of @ref vector_property_map builds a * distributed vector property map given the local index maps * generated by distributed graph types that automatically have index - * properties. + * properties. * * This specialization is useful when creating external distributed * property maps via the same syntax used to create external * sequential property maps. */ -template class vector_property_map< - T, + T, parallel::distributed_property_map< ProcessGroup, GlobalMap, StorageMap > - > + > : public parallel::distributed_property_map< ProcessGroup, GlobalMap, vector_property_map > { typedef vector_property_map local_iterator_map; - typedef parallel::distributed_property_map inherited; - typedef parallel::distributed_property_map index_map_type; @@ -173,7 +173,7 @@ public: : inherited(index.process_group(), index.global(), local_iterator_map(index.base())) { } - vector_property_map(unsigned inital_size, + vector_property_map(unsigned inital_size, const index_map_type& index = index_map_type()) : inherited(index.process_group(), index.global(), local_iterator_map(inital_size, index.base())) { } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/ptr_container/clone_allocator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/ptr_container/clone_allocator.hpp index f0842884..6d396e80 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/ptr_container/clone_allocator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/ptr_container/clone_allocator.hpp @@ -19,9 +19,9 @@ namespace boost { ///////////////////////////////////////////////////////////////////////// - // Clonable concept + // Clonable concept ///////////////////////////////////////////////////////////////////////// - + template< class T > inline T* new_clone( const T& r ) { @@ -43,13 +43,13 @@ namespace boost return r ? new_clone( *r ) : 0; } - // + // // @remark: to make new_clone() work - // with scope_ptr/std::shared_ptr ect. + // with scope_ptr/shared_ptr ect. // simply overload for those types // in the appropriate namespace. - // - + // + template< class T > inline void delete_clone( const T* r ) { @@ -59,7 +59,7 @@ namespace boost ///////////////////////////////////////////////////////////////////////// // CloneAllocator concept ///////////////////////////////////////////////////////////////////////// - + struct heap_clone_allocator { template< class U > @@ -77,7 +77,7 @@ namespace boost }; - + struct view_clone_allocator { template< class U > diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registered.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registered.hpp index 36816b1f..2404cb0f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registered.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registered.hpp @@ -16,12 +16,12 @@ namespace boost { -// You'll see std::shared_ptr mentioned in this header because we need to +// You'll see shared_ptr mentioned in this header because we need to // note which types are shared_ptrs in their registrations, to -// implement special std::shared_ptr handling for rvalue conversions. -template class std::shared_ptr; +// implement special shared_ptr handling for rvalue conversions. +template class shared_ptr; -namespace python { namespace converter { +namespace python { namespace converter { struct registration; @@ -64,23 +64,23 @@ namespace detail register_shared_ptr0(...) { } - + template inline void - register_shared_ptr0(std::shared_ptr*) + register_shared_ptr0(shared_ptr*) { - registry::lookup_shared_ptr(type_id >()); + registry::lookup_shared_ptr(type_id >()); } - + template inline void register_shared_ptr1(T const volatile*) { detail::register_shared_ptr0((T*)0); } - + template - inline registration const& + inline registration const& registry_lookup2(T&(*)()) { detail::register_shared_ptr1((T*)0); @@ -88,13 +88,13 @@ namespace detail } template - inline registration const& + inline registration const& registry_lookup1(type) { return registry_lookup2((T(*)())0); } - inline registration const& + inline registration const& registry_lookup1(type) { detail::register_shared_ptr1((void*)0); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registrations.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registrations.hpp index 2c88b7ad..7ef74e8f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registrations.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registrations.hpp @@ -15,7 +15,7 @@ # include -namespace boost { namespace python { namespace converter { +namespace boost { namespace python { namespace converter { struct lvalue_from_python_chain { @@ -36,7 +36,7 @@ struct BOOST_PYTHON_DECL registration public: // member functions explicit registration(type_info target, bool is_shared_ptr = false); ~registration(); - + // Convert the appropriately-typed data to Python PyObject* to_python(void const volatile*) const; @@ -44,7 +44,7 @@ struct BOOST_PYTHON_DECL registration // exception if no class has been registered. PyTypeObject* get_class_object() const; - // Return common denominator of the python class objects, + // Return common denominator of the python class objects, // convertable to target. Inspects the m_class_object and the value_chains. PyTypeObject const* expected_from_python_type() const; PyTypeObject const* to_python_target_type() const; @@ -57,7 +57,7 @@ struct BOOST_PYTHON_DECL registration // The chain of eligible from_python converters when an rvalue is acceptable rvalue_from_python_chain* rvalue_chain; - + // The class object associated with this type PyTypeObject* m_class_object; @@ -66,14 +66,14 @@ struct BOOST_PYTHON_DECL registration PyTypeObject const* (*m_to_python_target_type)(); - // True iff this type is a std::shared_ptr. Needed for special rvalue + // True iff this type is a shared_ptr. Needed for special rvalue // from_python handling. const bool is_shared_ptr; # if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) private: void operator=(registration); // This is not defined, and just keeps MWCW happy. -# endif +# endif }; // diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registry.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registry.hpp index f09356d6..368adcc6 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registry.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/registry.hpp @@ -21,12 +21,12 @@ namespace registry BOOST_PYTHON_DECL registration const& lookup(type_info); // Get the registration corresponding to the type, creating it if - // necessary. Use this first when the type is a std::shared_ptr. + // necessary. Use this first when the type is a shared_ptr. BOOST_PYTHON_DECL registration const& lookup_shared_ptr(type_info); // Return a pointer to the corresponding registration, if one exists BOOST_PYTHON_DECL registration const* query(type_info); - + BOOST_PYTHON_DECL void insert(to_python_function_t, type_info, PyTypeObject const* (*to_python_target_type)() = 0); // Insert an lvalue from_python converter @@ -39,7 +39,7 @@ namespace registry , type_info , PyTypeObject const* (*expected_pytype)() = 0 ); - + // Insert an rvalue from_python converter at the tail of the // chain. Used for implicit conversions BOOST_PYTHON_DECL void push_back( diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_from_python.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_from_python.hpp index d7905d2c..c0910776 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_from_python.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_from_python.hpp @@ -13,16 +13,16 @@ #ifndef BOOST_PYTHON_NO_PY_SIGNATURES # include #endif -# include +# include -namespace boost { namespace python { namespace converter { +namespace boost { namespace python { namespace converter { template struct shared_ptr_from_python { shared_ptr_from_python() { - converter::registry::insert(&convertible, &construct, type_id >() + converter::registry::insert(&convertible, &construct, type_id >() #ifndef BOOST_PYTHON_NO_PY_SIGNATURES , &converter::expected_from_python_type_direct::get_pytype #endif @@ -34,26 +34,26 @@ struct shared_ptr_from_python { if (p == Py_None) return p; - + return converter::get_lvalue_from_python(p, registered::converters); } - + static void construct(PyObject* source, rvalue_from_python_stage1_data* data) { - void* const storage = ((converter::rvalue_from_python_storage >*)data)->storage.bytes; + void* const storage = ((converter::rvalue_from_python_storage >*)data)->storage.bytes; // Deal with the "None" case. if (data->convertible == source) - new (storage) std::shared_ptr(); + new (storage) shared_ptr(); else { - boost::std::shared_ptr hold_convertible_ref_count( + boost::shared_ptr hold_convertible_ref_count( (void*)0, shared_ptr_deleter(handle<>(borrowed(source))) ); // use aliasing constructor - new (storage) std::shared_ptr( + new (storage) shared_ptr( hold_convertible_ref_count, static_cast(data->convertible)); } - + data->convertible = storage; } }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_to_python.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_to_python.hpp index cba75647..fe867ace 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_to_python.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/converter/shared_ptr_to_python.hpp @@ -7,20 +7,20 @@ # include # include -# include +# include # include -namespace boost { namespace python { namespace converter { +namespace boost { namespace python { namespace converter { template -PyObject* shared_ptr_to_python(std::shared_ptr const& x) +PyObject* shared_ptr_to_python(shared_ptr const& x) { if (!x) return python::detail::none(); else if (shared_ptr_deleter* d = boost::get_deleter(x)) return incref( get_pointer( d->owner ) ); else - return converter::registered const&>::converters.to_python(&x); + return converter::registered const&>::converters.to_python(&x); } }}} // namespace boost::python::converter diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/is_shared_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/is_shared_ptr.hpp index ae94c900..547af3f1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/is_shared_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/is_shared_ptr.hpp @@ -6,12 +6,12 @@ # define IS_SHARED_PTR_DWA2003224_HPP # include -# include +# include -namespace boost { namespace python { namespace detail { - -BOOST_PYTHON_IS_XXX_DEF(std::shared_ptr, std::shared_ptr, 1) +namespace boost { namespace python { namespace detail { +BOOST_PYTHON_IS_XXX_DEF(shared_ptr, shared_ptr, 1) + }}} // namespace boost::python::detail #endif // IS_SHARED_PTR_DWA2003224_HPP diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/value_is_shared_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/value_is_shared_ptr.hpp index f2952cbb..361c369b 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/value_is_shared_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/detail/value_is_shared_ptr.hpp @@ -6,12 +6,12 @@ # define VALUE_IS_SHARED_PTR_DWA2003224_HPP # include -# include +# include -namespace boost { namespace python { namespace detail { - -BOOST_PYTHON_VALUE_IS_XXX_DEF(std::shared_ptr, std::shared_ptr, 1) +namespace boost { namespace python { namespace detail { +BOOST_PYTHON_VALUE_IS_XXX_DEF(shared_ptr, shared_ptr, 1) + }}} // namespace boost::python::detail #endif // VALUE_IS_SHARED_PTR_DWA2003224_HPP diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/instance_holder.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/instance_holder.hpp index 86d82964..933f50d1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/instance_holder.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/instance_holder.hpp @@ -11,7 +11,7 @@ # include # include -namespace boost { namespace python { +namespace boost { namespace python { // Base class for all holders struct BOOST_PYTHON_DECL instance_holder : private noncopyable @@ -19,13 +19,13 @@ struct BOOST_PYTHON_DECL instance_holder : private noncopyable public: instance_holder(); virtual ~instance_holder(); - + // return the next holder in a chain instance_holder* next() const; // When the derived holder actually holds by [smart] pointer and // null_ptr_only is set, only report that the type is held when - // the pointer is null. This is needed for proper std::shared_ptr + // the pointer is null. This is needed for proper shared_ptr // support, to prevent holding shared_ptrs from being found when // converting from python so that we can use the conversion method // that always holds the Python object. @@ -34,7 +34,7 @@ struct BOOST_PYTHON_DECL instance_holder : private noncopyable void install(PyObject* inst) throw(); // These functions should probably be located elsewhere. - + // Allocate storage for an object of the given size at the given // offset in the Python instance<> object if bytes are available // there. Otherwise allocate size bytes of heap memory. diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/find_instance.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/find_instance.hpp index 76b57a0f..3202c1cd 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/find_instance.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/find_instance.hpp @@ -7,12 +7,12 @@ # include -namespace boost { namespace python { namespace objects { +namespace boost { namespace python { namespace objects { // Given a type_id, find the instance data which corresponds to it, or // return 0 in case no such type is held. If null_shared_ptr_only is -// true and the type being sought is a std::shared_ptr, only find an -// instance if it turns out to be NULL. Needed for std::shared_ptr rvalue +// true and the type being sought is a shared_ptr, only find an +// instance if it turns out to be NULL. Needed for shared_ptr rvalue // from_python support. BOOST_PYTHON_DECL void* find_instance_impl(PyObject*, type_info, bool null_shared_ptr_only = false); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/inheritance.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/inheritance.hpp index 948baa42..b49a0442 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/inheritance.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/object/inheritance.hpp @@ -6,7 +6,7 @@ # define INHERITANCE_DWA200216_HPP # include -# include +# include # include # include # include @@ -88,7 +88,7 @@ struct dynamic_cast_generator return dynamic_cast( static_cast(source)); } - + }; template diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_indirect.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_indirect.hpp index df660a3a..23ad0263 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_indirect.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_indirect.hpp @@ -23,9 +23,9 @@ # include -# if defined(__ICL) && __ICL < 600 -# include -# else +# if defined(__ICL) && __ICL < 600 +# include +# else # include # endif @@ -57,7 +57,7 @@ struct to_python_indirect else return this->execute(*ptr, mpl::false_()); } - + template inline PyObject* execute(U const& x, mpl::false_) const { @@ -84,9 +84,9 @@ namespace detail // can't use auto_ptr with Intel 5 and VC6 Dinkum library // for some reason. We get link errors against the auto_ptr // copy constructor. -# if defined(__ICL) && __ICL < 600 - typedef boost::std::shared_ptr smart_pointer; -# else +# if defined(__ICL) && __ICL < 600 + typedef boost::shared_ptr smart_pointer; +# else typedef std::auto_ptr smart_pointer; # endif typedef objects::pointer_holder holder_t; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_value.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_value.hpp index 1628a93b..a48948d2 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_value.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/python/to_python_value.hpp @@ -26,7 +26,7 @@ # include # include -namespace boost { namespace python { +namespace boost { namespace python { namespace detail { @@ -58,7 +58,7 @@ struct object_manager_get_pytype struct object_manager_to_python_value { typedef typename value_arg::type argument_type; - + PyObject* operator()(argument_type) const; #ifndef BOOST_PYTHON_NO_PY_SIGNATURES typedef boost::mpl::bool_::value> is_t_handle; @@ -68,13 +68,13 @@ struct object_manager_get_pytype } inline static PyTypeObject const* get_pytype_aux(mpl::true_*) {return converter::object_manager_traits::get_pytype();} - - inline static PyTypeObject const* get_pytype_aux(mpl::false_* ) + + inline static PyTypeObject const* get_pytype_aux(mpl::false_* ) { return object_manager_get_pytype::get((T(*)())0); } - -#endif + +#endif // This information helps make_getter() decide whether to try to // return an internal reference or not. I don't like it much, @@ -82,12 +82,12 @@ struct object_manager_get_pytype BOOST_STATIC_CONSTANT(bool, uses_registry = false); }; - + template struct registry_to_python_value { typedef typename value_arg::type argument_type; - + PyObject* operator()(argument_type) const; #ifndef BOOST_PYTHON_NO_PY_SIGNATURES PyTypeObject const* get_pytype() const {return converter::registered::converters.to_python_target_type();} @@ -103,11 +103,11 @@ struct object_manager_get_pytype struct shared_ptr_to_python_value { typedef typename value_arg::type argument_type; - + PyObject* operator()(argument_type) const; #ifndef BOOST_PYTHON_NO_PY_SIGNATURES PyTypeObject const* get_pytype() const {return get_pytype((boost::type*)0);} -#endif +#endif // This information helps make_getter() decide whether to try to // return an internal reference or not. I don't like it much, // but it will have to serve for now. @@ -115,9 +115,9 @@ struct object_manager_get_pytype private: #ifndef BOOST_PYTHON_NO_PY_SIGNATURES template - PyTypeObject const* get_pytype(boost::type &> *) const {return converter::registered::converters.to_python_target_type();} + PyTypeObject const* get_pytype(boost::type &> *) const {return converter::registered::converters.to_python_target_type();} template - PyTypeObject const* get_pytype(boost::type &> *) const {return converter::registered::converters.to_python_target_type();} + PyTypeObject const* get_pytype(boost::type &> *) const {return converter::registered::converters.to_python_target_type();} #endif }; } @@ -140,7 +140,7 @@ struct to_python_value }; // -// implementation +// implementation // namespace detail { @@ -151,7 +151,7 @@ namespace detail # if BOOST_WORKAROUND(__GNUC__, < 3) // suppresses an ICE, somehow (void)r::converters; -# endif +# endif return converter::registered::converters.to_python(&x); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/icu.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/icu.hpp index a3d84b74..772806e9 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/icu.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/icu.hpp @@ -3,8 +3,8 @@ * Copyright (c) 2004 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -36,7 +36,7 @@ namespace boost{ namespace re_detail{ -// +// // Implementation details: // class BOOST_REGEX_DECL icu_regex_traits_implementation @@ -85,9 +85,9 @@ private: boost::scoped_ptr< U_NAMESPACE_QUALIFIER Collator> m_primary_collator; // The primary collation object }; -inline boost::std::shared_ptr get_icu_regex_traits_implementation(const U_NAMESPACE_QUALIFIER Locale& loc) +inline boost::shared_ptr get_icu_regex_traits_implementation(const U_NAMESPACE_QUALIFIER Locale& loc) { - return boost::std::shared_ptr(new icu_regex_traits_implementation(loc)); + return boost::shared_ptr(new icu_regex_traits_implementation(loc)); } } @@ -208,7 +208,7 @@ private: static char_class_type lookup_icu_mask(const ::UChar32* p1, const ::UChar32* p2); - boost::std::shared_ptr< ::boost::re_detail::icu_regex_traits_implementation> m_pimpl; + boost::shared_ptr< ::boost::re_detail::icu_regex_traits_implementation> m_pimpl; }; } // namespace boost @@ -245,9 +245,9 @@ namespace re_detail{ #if !defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(__IBMCPP__) template -inline u32regex do_make_u32regex(InputIterator i, - InputIterator j, - boost::regex_constants::syntax_option_type opt, +inline u32regex do_make_u32regex(InputIterator i, + InputIterator j, + boost::regex_constants::syntax_option_type opt, const boost::mpl::int_<1>*) { typedef boost::u8_to_u32_iterator conv_type; @@ -255,9 +255,9 @@ inline u32regex do_make_u32regex(InputIterator i, } template -inline u32regex do_make_u32regex(InputIterator i, - InputIterator j, - boost::regex_constants::syntax_option_type opt, +inline u32regex do_make_u32regex(InputIterator i, + InputIterator j, + boost::regex_constants::syntax_option_type opt, const boost::mpl::int_<2>*) { typedef boost::u16_to_u32_iterator conv_type; @@ -265,18 +265,18 @@ inline u32regex do_make_u32regex(InputIterator i, } template -inline u32regex do_make_u32regex(InputIterator i, - InputIterator j, - boost::regex_constants::syntax_option_type opt, +inline u32regex do_make_u32regex(InputIterator i, + InputIterator j, + boost::regex_constants::syntax_option_type opt, const boost::mpl::int_<4>*) { return u32regex(i, j, opt); } #else template -inline u32regex do_make_u32regex(InputIterator i, - InputIterator j, - boost::regex_constants::syntax_option_type opt, +inline u32regex do_make_u32regex(InputIterator i, + InputIterator j, + boost::regex_constants::syntax_option_type opt, const boost::mpl::int_<1>*) { typedef boost::u8_to_u32_iterator conv_type; @@ -294,9 +294,9 @@ inline u32regex do_make_u32regex(InputIterator i, } template -inline u32regex do_make_u32regex(InputIterator i, - InputIterator j, - boost::regex_constants::syntax_option_type opt, +inline u32regex do_make_u32regex(InputIterator i, + InputIterator j, + boost::regex_constants::syntax_option_type opt, const boost::mpl::int_<2>*) { typedef boost::u16_to_u32_iterator conv_type; @@ -314,9 +314,9 @@ inline u32regex do_make_u32regex(InputIterator i, } template -inline u32regex do_make_u32regex(InputIterator i, - InputIterator j, - boost::regex_constants::syntax_option_type opt, +inline u32regex do_make_u32regex(InputIterator i, + InputIterator j, + boost::regex_constants::syntax_option_type opt, const boost::mpl::int_<4>*) { typedef std::vector vector_type; @@ -337,8 +337,8 @@ inline u32regex do_make_u32regex(InputIterator i, // Construction from an iterator pair: // template -inline u32regex make_u32regex(InputIterator i, - InputIterator j, +inline u32regex make_u32regex(InputIterator i, + InputIterator j, boost::regex_constants::syntax_option_type opt) { return re_detail::do_make_u32regex(i, j, opt, static_cast const*>(0)); @@ -406,18 +406,18 @@ void copy_results(MR1& out, MR2 const& in) } template -inline bool do_regex_match(BidiIterator first, BidiIterator last, - match_results& m, - const u32regex& e, +inline bool do_regex_match(BidiIterator first, BidiIterator last, + match_results& m, + const u32regex& e, match_flag_type flags, boost::mpl::int_<4> const*) { return ::boost::regex_match(first, last, m, e, flags); } template -bool do_regex_match(BidiIterator first, BidiIterator last, - match_results& m, - const u32regex& e, +bool do_regex_match(BidiIterator first, BidiIterator last, + match_results& m, + const u32regex& e, match_flag_type flags, boost::mpl::int_<2> const*) { @@ -431,9 +431,9 @@ bool do_regex_match(BidiIterator first, BidiIterator last, return result; } template -bool do_regex_match(BidiIterator first, BidiIterator last, - match_results& m, - const u32regex& e, +bool do_regex_match(BidiIterator first, BidiIterator last, + match_results& m, + const u32regex& e, match_flag_type flags, boost::mpl::int_<1> const*) { @@ -449,62 +449,62 @@ bool do_regex_match(BidiIterator first, BidiIterator last, } // namespace re_detail template -inline bool u32regex_match(BidiIterator first, BidiIterator last, - match_results& m, - const u32regex& e, +inline bool u32regex_match(BidiIterator first, BidiIterator last, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(first, last, m, e, flags, static_cast const*>(0)); } -inline bool u32regex_match(const UChar* p, - match_results& m, - const u32regex& e, +inline bool u32regex_match(const UChar* p, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast const*>(0)); } #if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX) -inline bool u32regex_match(const wchar_t* p, - match_results& m, - const u32regex& e, +inline bool u32regex_match(const wchar_t* p, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(p, p+std::wcslen(p), m, e, flags, static_cast const*>(0)); } #endif -inline bool u32regex_match(const char* p, - match_results& m, - const u32regex& e, +inline bool u32regex_match(const char* p, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(p, p+std::strlen(p), m, e, flags, static_cast const*>(0)); } -inline bool u32regex_match(const unsigned char* p, - match_results& m, - const u32regex& e, +inline bool u32regex_match(const unsigned char* p, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(p, p+std::strlen((const char*)p), m, e, flags, static_cast const*>(0)); } -inline bool u32regex_match(const std::string& s, - match_results& m, - const u32regex& e, +inline bool u32regex_match(const std::string& s, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast const*>(0)); } #ifndef BOOST_NO_STD_WSTRING -inline bool u32regex_match(const std::wstring& s, - match_results& m, - const u32regex& e, +inline bool u32regex_match(const std::wstring& s, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast const*>(0)); } #endif -inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s, - match_results& m, - const u32regex& e, +inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_match(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, static_cast const*>(0)); @@ -513,61 +513,61 @@ inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s, // regex_match overloads that do not return what matched: // template -inline bool u32regex_match(BidiIterator first, BidiIterator last, - const u32regex& e, +inline bool u32regex_match(BidiIterator first, BidiIterator last, + const u32regex& e, match_flag_type flags = match_default) { match_results m; return re_detail::do_regex_match(first, last, m, e, flags, static_cast const*>(0)); } -inline bool u32regex_match(const UChar* p, - const u32regex& e, +inline bool u32regex_match(const UChar* p, + const u32regex& e, match_flag_type flags = match_default) { match_results m; return re_detail::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast const*>(0)); } #if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX) -inline bool u32regex_match(const wchar_t* p, - const u32regex& e, +inline bool u32regex_match(const wchar_t* p, + const u32regex& e, match_flag_type flags = match_default) { match_results m; return re_detail::do_regex_match(p, p+std::wcslen(p), m, e, flags, static_cast const*>(0)); } #endif -inline bool u32regex_match(const char* p, - const u32regex& e, +inline bool u32regex_match(const char* p, + const u32regex& e, match_flag_type flags = match_default) { match_results m; return re_detail::do_regex_match(p, p+std::strlen(p), m, e, flags, static_cast const*>(0)); } -inline bool u32regex_match(const unsigned char* p, - const u32regex& e, +inline bool u32regex_match(const unsigned char* p, + const u32regex& e, match_flag_type flags = match_default) { match_results m; return re_detail::do_regex_match(p, p+std::strlen((const char*)p), m, e, flags, static_cast const*>(0)); } -inline bool u32regex_match(const std::string& s, - const u32regex& e, +inline bool u32regex_match(const std::string& s, + const u32regex& e, match_flag_type flags = match_default) { match_results m; return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast const*>(0)); } #ifndef BOOST_NO_STD_WSTRING -inline bool u32regex_match(const std::wstring& s, - const u32regex& e, +inline bool u32regex_match(const std::wstring& s, + const u32regex& e, match_flag_type flags = match_default) { match_results m; return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast const*>(0)); } #endif -inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s, - const u32regex& e, +inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s, + const u32regex& e, match_flag_type flags = match_default) { match_results m; @@ -579,9 +579,9 @@ inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s, // namespace re_detail{ template -inline bool do_regex_search(BidiIterator first, BidiIterator last, - match_results& m, - const u32regex& e, +inline bool do_regex_search(BidiIterator first, BidiIterator last, + match_results& m, + const u32regex& e, match_flag_type flags, BidiIterator base, boost::mpl::int_<4> const*) @@ -589,9 +589,9 @@ inline bool do_regex_search(BidiIterator first, BidiIterator last, return ::boost::regex_search(first, last, m, e, flags, base); } template -bool do_regex_search(BidiIterator first, BidiIterator last, - match_results& m, - const u32regex& e, +bool do_regex_search(BidiIterator first, BidiIterator last, + match_results& m, + const u32regex& e, match_flag_type flags, BidiIterator base, boost::mpl::int_<2> const*) @@ -606,9 +606,9 @@ bool do_regex_search(BidiIterator first, BidiIterator last, return result; } template -bool do_regex_search(BidiIterator first, BidiIterator last, - match_results& m, - const u32regex& e, +bool do_regex_search(BidiIterator first, BidiIterator last, + match_results& m, + const u32regex& e, match_flag_type flags, BidiIterator base, boost::mpl::int_<1> const*) @@ -625,131 +625,131 @@ bool do_regex_search(BidiIterator first, BidiIterator last, } template -inline bool u32regex_search(BidiIterator first, BidiIterator last, - match_results& m, - const u32regex& e, +inline bool u32regex_search(BidiIterator first, BidiIterator last, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(first, last, m, e, flags, first, static_cast const*>(0)); } template -inline bool u32regex_search(BidiIterator first, BidiIterator last, - match_results& m, - const u32regex& e, +inline bool u32regex_search(BidiIterator first, BidiIterator last, + match_results& m, + const u32regex& e, match_flag_type flags, BidiIterator base) { return re_detail::do_regex_search(first, last, m, e, flags, base, static_cast const*>(0)); } -inline bool u32regex_search(const UChar* p, - match_results& m, - const u32regex& e, +inline bool u32regex_search(const UChar* p, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(p, p+u_strlen(p), m, e, flags, p, static_cast const*>(0)); } #if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX) -inline bool u32regex_search(const wchar_t* p, - match_results& m, - const u32regex& e, +inline bool u32regex_search(const wchar_t* p, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(p, p+std::wcslen(p), m, e, flags, p, static_cast const*>(0)); } #endif -inline bool u32regex_search(const char* p, - match_results& m, - const u32regex& e, +inline bool u32regex_search(const char* p, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(p, p+std::strlen(p), m, e, flags, p, static_cast const*>(0)); } -inline bool u32regex_search(const unsigned char* p, - match_results& m, - const u32regex& e, +inline bool u32regex_search(const unsigned char* p, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(p, p+std::strlen((const char*)p), m, e, flags, p, static_cast const*>(0)); } -inline bool u32regex_search(const std::string& s, - match_results& m, - const u32regex& e, +inline bool u32regex_search(const std::string& s, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast const*>(0)); } #ifndef BOOST_NO_STD_WSTRING -inline bool u32regex_search(const std::wstring& s, - match_results& m, - const u32regex& e, +inline bool u32regex_search(const std::wstring& s, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast const*>(0)); } #endif -inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s, - match_results& m, - const u32regex& e, +inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s, + match_results& m, + const u32regex& e, match_flag_type flags = match_default) { return re_detail::do_regex_search(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, s.getBuffer(), static_cast const*>(0)); } template -inline bool u32regex_search(BidiIterator first, BidiIterator last, - const u32regex& e, +inline bool u32regex_search(BidiIterator first, BidiIterator last, + const u32regex& e, match_flag_type flags = match_default) { match_results m; return re_detail::do_regex_search(first, last, m, e, flags, first, static_cast const*>(0)); } -inline bool u32regex_search(const UChar* p, - const u32regex& e, +inline bool u32regex_search(const UChar* p, + const u32regex& e, match_flag_type flags = match_default) { match_results m; return re_detail::do_regex_search(p, p+u_strlen(p), m, e, flags, p, static_cast const*>(0)); } #if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX) -inline bool u32regex_search(const wchar_t* p, - const u32regex& e, +inline bool u32regex_search(const wchar_t* p, + const u32regex& e, match_flag_type flags = match_default) { match_results m; return re_detail::do_regex_search(p, p+std::wcslen(p), m, e, flags, p, static_cast const*>(0)); } #endif -inline bool u32regex_search(const char* p, - const u32regex& e, +inline bool u32regex_search(const char* p, + const u32regex& e, match_flag_type flags = match_default) { match_results m; return re_detail::do_regex_search(p, p+std::strlen(p), m, e, flags, p, static_cast const*>(0)); } -inline bool u32regex_search(const unsigned char* p, - const u32regex& e, +inline bool u32regex_search(const unsigned char* p, + const u32regex& e, match_flag_type flags = match_default) { match_results m; return re_detail::do_regex_search(p, p+std::strlen((const char*)p), m, e, flags, p, static_cast const*>(0)); } -inline bool u32regex_search(const std::string& s, - const u32regex& e, +inline bool u32regex_search(const std::string& s, + const u32regex& e, match_flag_type flags = match_default) { match_results m; return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast const*>(0)); } #ifndef BOOST_NO_STD_WSTRING -inline bool u32regex_search(const std::wstring& s, - const u32regex& e, +inline bool u32regex_search(const std::wstring& s, + const u32regex& e, match_flag_type flags = match_default) { match_results m; return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast const*>(0)); } #endif -inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s, - const u32regex& e, +inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s, + const u32regex& e, match_flag_type flags = match_default) { match_results m; @@ -817,8 +817,8 @@ inline utf8_output_iterator make_utf32_out(OutputIterator o, mpl template OutputIterator do_regex_replace(OutputIterator out, std::pair const& in, - const u32regex& e, - const std::pair& fmt, + const u32regex& e, + const std::pair& fmt, match_flag_type flags ) { @@ -832,7 +832,7 @@ OutputIterator do_regex_replace(OutputIterator out, while(pos != fmt.second) f.push_back(*pos++); #endif - + regex_iterator i(in.first, in.second, e, flags); regex_iterator j; if(i == j) @@ -846,7 +846,7 @@ OutputIterator do_regex_replace(OutputIterator out, while(i != j) { if(!(flags & regex_constants::format_no_copy)) - out = re_detail::copy(i->prefix().first, i->prefix().second, out); + out = re_detail::copy(i->prefix().first, i->prefix().second, out); if(f.size()) out = ::boost::re_detail::regex_format_imp(out, *i, &*f.begin(), &*f.begin() + f.size(), flags, e.get_traits()); else @@ -882,8 +882,8 @@ template inline OutputIterator u32regex_replace(OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, - const u32regex& e, - const charT* fmt, + const u32regex& e, + const charT* fmt, match_flag_type flags = match_default) { return re_detail::extract_output_base @@ -904,7 +904,7 @@ template inline OutputIterator u32regex_replace(OutputIterator out, Iterator first, Iterator last, - const u32regex& e, + const u32regex& e, const std::basic_string& fmt, match_flag_type flags = match_default) { @@ -926,7 +926,7 @@ template inline OutputIterator u32regex_replace(OutputIterator out, Iterator first, Iterator last, - const u32regex& e, + const u32regex& e, const U_NAMESPACE_QUALIFIER UnicodeString& fmt, match_flag_type flags = match_default) { @@ -946,7 +946,7 @@ inline OutputIterator u32regex_replace(OutputIterator out, template std::basic_string u32regex_replace(const std::basic_string& s, - const u32regex& e, + const u32regex& e, const charT* fmt, match_flag_type flags = match_default) { @@ -958,7 +958,7 @@ std::basic_string u32regex_replace(const std::basic_string& s, template std::basic_string u32regex_replace(const std::basic_string& s, - const u32regex& e, + const u32regex& e, const std::basic_string& fmt, match_flag_type flags = match_default) { @@ -978,10 +978,10 @@ public: unicode_string_out_iterator& operator++() { return *this; } unicode_string_out_iterator& operator++(int) { return *this; } unicode_string_out_iterator& operator*() { return *this; } - unicode_string_out_iterator& operator=(UChar v) - { - *out += v; - return *this; + unicode_string_out_iterator& operator=(UChar v) + { + *out += v; + return *this; } typedef std::ptrdiff_t difference_type; typedef UChar value_type; @@ -993,7 +993,7 @@ public: } inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QUALIFIER UnicodeString& s, - const u32regex& e, + const u32regex& e, const UChar* fmt, match_flag_type flags = match_default) { @@ -1004,7 +1004,7 @@ inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QU } inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QUALIFIER UnicodeString& s, - const u32regex& e, + const u32regex& e, const U_NAMESPACE_QUALIFIER UnicodeString& fmt, match_flag_type flags = match_default) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/pending/object_cache.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/pending/object_cache.hpp index 8346166d..d47fbba9 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/pending/object_cache.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/pending/object_cache.hpp @@ -3,8 +3,8 @@ * Copyright (c) 2004 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -24,7 +24,7 @@ #include #include #include -#include +#include #ifdef BOOST_HAS_THREADS #include #endif @@ -35,16 +35,16 @@ template class object_cache { public: - typedef std::pair< ::boost::std::shared_ptr, Key const*> value_type; + typedef std::pair< ::boost::shared_ptr, Key const*> value_type; typedef std::list list_type; typedef typename list_type::iterator list_iterator; typedef std::map map_type; typedef typename map_type::iterator map_iterator; typedef typename list_type::size_type size_type; - static boost::std::shared_ptr get(const Key& k, size_type l_max_cache_size); + static boost::shared_ptr get(const Key& k, size_type l_max_cache_size); private: - static boost::std::shared_ptr do_get(const Key& k, size_type l_max_cache_size); + static boost::shared_ptr do_get(const Key& k, size_type l_max_cache_size); struct data { @@ -58,7 +58,7 @@ private: }; template -boost::std::shared_ptr object_cache::get(const Key& k, size_type l_max_cache_size) +boost::shared_ptr object_cache::get(const Key& k, size_type l_max_cache_size) { #ifdef BOOST_HAS_THREADS static boost::static_mutex mut = BOOST_STATIC_MUTEX_INIT; @@ -74,7 +74,7 @@ boost::std::shared_ptr object_cache::get(const Key& k // ::boost::throw_exception(std::runtime_error("Error in thread safety code: could not acquire a lock")); #if defined(BOOST_NO_UNREACHABLE_RETURN_DETECTION) || defined(BOOST_NO_EXCEPTIONS) - return boost::std::shared_ptr(); + return boost::shared_ptr(); #endif #else return do_get(k, l_max_cache_size); @@ -82,7 +82,7 @@ boost::std::shared_ptr object_cache::get(const Key& k } template -boost::std::shared_ptr object_cache::do_get(const Key& k, size_type l_max_cache_size) +boost::shared_ptr object_cache::do_get(const Key& k, size_type l_max_cache_size) { typedef typename object_cache::data object_data; typedef typename map_type::size_type map_size_type; @@ -95,7 +95,7 @@ boost::std::shared_ptr object_cache::do_get(const Key if(mpos != s_data.index.end()) { // - // Eureka! + // Eureka! // We have a cached item, bump it up the list and return it: // if(--(s_data.cont.end()) != mpos->second) @@ -117,7 +117,7 @@ boost::std::shared_ptr object_cache::do_get(const Key // if we get here then the item is not in the cache, // so create it: // - boost::std::shared_ptr result(new Object(k)); + boost::shared_ptr result(new Object(k)); // // Add it to the list, and index it: // @@ -143,11 +143,11 @@ boost::std::shared_ptr object_cache::do_get(const Key { list_iterator condemmed(pos); ++pos; - // now remove the items from our containers, + // now remove the items from our containers, // then order has to be as follows: BOOST_ASSERT(s_data.index.find(*(condemmed->second)) != s_data.index.end()); s_data.index.erase(*(condemmed->second)); - s_data.cont.erase(condemmed); + s_data.cont.erase(condemmed); --s; } else diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/basic_regex.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/basic_regex.hpp index 7d70105d..0b63e3aa 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/basic_regex.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/basic_regex.hpp @@ -80,13 +80,13 @@ public: { template name(const charT* i, const charT* j, int idx) - : index(idx) - { - hash = hash_value_from_capture_name(i, j); + : index(idx) + { + hash = hash_value_from_capture_name(i, j); } name(int h, int idx) : index(idx), hash(h) - { + { } int index; int hash; @@ -96,7 +96,7 @@ public: } bool operator == (const name& other)const { - return hash == other.hash; + return hash == other.hash; } void swap(name& other) { @@ -160,15 +160,15 @@ template struct regex_data : public named_subexpressions { typedef regex_constants::syntax_option_type flag_type; - typedef std::size_t size_type; + typedef std::size_t size_type; - regex_data(const ::boost::std::shared_ptr< - ::boost::regex_traits_wrapper >& t) + regex_data(const ::boost::shared_ptr< + ::boost::regex_traits_wrapper >& t) : m_ptraits(t), m_expression(0), m_expression_len(0) {} - regex_data() + regex_data() : m_ptraits(new ::boost::regex_traits_wrapper()), m_expression(0), m_expression_len(0) {} - ::boost::std::shared_ptr< + ::boost::shared_ptr< ::boost::regex_traits_wrapper > m_ptraits; // traits class instance flag_type m_flags; // flags with which we were compiled @@ -198,12 +198,12 @@ class basic_regex_implementation public: typedef regex_constants::syntax_option_type flag_type; typedef std::ptrdiff_t difference_type; - typedef std::size_t size_type; + typedef std::size_t size_type; typedef typename traits::locale_type locale_type; typedef const charT* const_iterator; basic_regex_implementation(){} - basic_regex_implementation(const ::boost::std::shared_ptr< + basic_regex_implementation(const ::boost::shared_ptr< ::boost::regex_traits_wrapper >& t) : regex_data(t) {} void assign(const charT* arg_first, @@ -216,12 +216,12 @@ public: } locale_type BOOST_REGEX_CALL imbue(locale_type l) - { - return this->m_ptraits->imbue(l); + { + return this->m_ptraits->imbue(l); } locale_type BOOST_REGEX_CALL getloc()const - { - return this->m_ptraits->getloc(); + { + return this->m_ptraits->getloc(); } std::basic_string BOOST_REGEX_CALL str()const { @@ -245,12 +245,12 @@ public: // // begin, end: const_iterator BOOST_REGEX_CALL begin()const - { - return (this->m_status ? 0 : this->m_expression); + { + return (this->m_status ? 0 : this->m_expression); } const_iterator BOOST_REGEX_CALL end()const - { - return (this->m_status ? 0 : this->m_expression + this->m_expression_len); + { + return (this->m_status ? 0 : this->m_expression + this->m_expression_len); } flag_type BOOST_REGEX_CALL flags()const { @@ -322,13 +322,13 @@ public: typedef const charT* const_iterator; typedef const_iterator iterator; typedef std::ptrdiff_t difference_type; - typedef std::size_t size_type; + typedef std::size_t size_type; typedef regex_constants::syntax_option_type flag_type; // locale_type // placeholder for actual locale type used by the // traits class to localise *this. typedef typename traits::locale_type locale_type; - + public: explicit basic_regex(){} explicit basic_regex(const charT* p, flag_type f = regex_constants::normal) @@ -358,9 +358,9 @@ public: // // assign: basic_regex& assign(const basic_regex& that) - { + { m_pimpl = that.m_pimpl; - return *this; + return *this; } basic_regex& assign(const charT* p, flag_type f = regex_constants::normal) { @@ -385,14 +385,14 @@ public: template unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string& p, flag_type f = regex_constants::normal) - { - return set_expression(p.data(), p.data() + p.size(), f); + { + return set_expression(p.data(), p.data() + p.size(), f); } template explicit basic_regex(const std::basic_string& p, flag_type f = regex_constants::normal) - { - assign(p, f); + { + assign(p, f); } template @@ -437,13 +437,13 @@ public: } #else unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string& p, flag_type f = regex_constants::normal) - { - return set_expression(p.data(), p.data() + p.size(), f); + { + return set_expression(p.data(), p.data() + p.size(), f); } basic_regex(const std::basic_string& p, flag_type f = regex_constants::normal) - { - assign(p, f); + { + assign(p, f); } basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string& p) @@ -464,19 +464,19 @@ public: // locale: locale_type BOOST_REGEX_CALL imbue(locale_type l); locale_type BOOST_REGEX_CALL getloc()const - { - return m_pimpl.get() ? m_pimpl->getloc() : locale_type(); + { + return m_pimpl.get() ? m_pimpl->getloc() : locale_type(); } // // getflags: // retained for backwards compatibility only, "flags" // is now the preferred name: flag_type BOOST_REGEX_CALL getflags()const - { + { return flags(); } flag_type BOOST_REGEX_CALL flags()const - { + { return m_pimpl.get() ? m_pimpl->flags() : 0; } // @@ -494,12 +494,12 @@ public: return m_pimpl->subexpression(n); } const_iterator BOOST_REGEX_CALL begin()const - { - return (m_pimpl.get() ? m_pimpl->begin() : 0); + { + return (m_pimpl.get() ? m_pimpl->begin() : 0); } const_iterator BOOST_REGEX_CALL end()const - { - return (m_pimpl.get() ? m_pimpl->end() : 0); + { + return (m_pimpl.get() ? m_pimpl->end() : 0); } // // swap: @@ -510,25 +510,25 @@ public: // // size: size_type BOOST_REGEX_CALL size()const - { - return (m_pimpl.get() ? m_pimpl->size() : 0); + { + return (m_pimpl.get() ? m_pimpl->size() : 0); } // // max_size: size_type BOOST_REGEX_CALL max_size()const - { - return UINT_MAX; + { + return UINT_MAX; } // // empty: bool BOOST_REGEX_CALL empty()const - { - return (m_pimpl.get() ? 0 != m_pimpl->status() : true); + { + return (m_pimpl.get() ? 0 != m_pimpl->status() : true); } - size_type BOOST_REGEX_CALL mark_count()const - { - return (m_pimpl.get() ? m_pimpl->mark_count() : 0); + size_type BOOST_REGEX_CALL mark_count()const + { + return (m_pimpl.get() ? m_pimpl->mark_count() : 0); } int status()const @@ -551,45 +551,45 @@ public: return str().compare(that.str()); } bool BOOST_REGEX_CALL operator==(const basic_regex& e)const - { - return compare(e) == 0; + { + return compare(e) == 0; } bool BOOST_REGEX_CALL operator != (const basic_regex& e)const - { - return compare(e) != 0; + { + return compare(e) != 0; } bool BOOST_REGEX_CALL operator<(const basic_regex& e)const - { - return compare(e) < 0; + { + return compare(e) < 0; } bool BOOST_REGEX_CALL operator>(const basic_regex& e)const - { - return compare(e) > 0; + { + return compare(e) > 0; } bool BOOST_REGEX_CALL operator<=(const basic_regex& e)const - { - return compare(e) <= 0; + { + return compare(e) <= 0; } bool BOOST_REGEX_CALL operator>=(const basic_regex& e)const - { - return compare(e) >= 0; + { + return compare(e) >= 0; } // // The following are deprecated as public interfaces // but are available for compatibility with earlier versions. - const charT* BOOST_REGEX_CALL expression()const - { - return (m_pimpl.get() && !m_pimpl->status() ? m_pimpl->expression() : 0); + const charT* BOOST_REGEX_CALL expression()const + { + return (m_pimpl.get() && !m_pimpl->status() ? m_pimpl->expression() : 0); } unsigned int BOOST_REGEX_CALL set_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal) { assign(p1, p2, f | regex_constants::no_except); return status(); } - unsigned int BOOST_REGEX_CALL set_expression(const charT* p, flag_type f = regex_constants::normal) - { - assign(p, f | regex_constants::no_except); + unsigned int BOOST_REGEX_CALL set_expression(const charT* p, flag_type f = regex_constants::normal) + { + assign(p, f | regex_constants::no_except); return status(); } unsigned int BOOST_REGEX_CALL error_code()const @@ -629,13 +629,13 @@ public: BOOST_ASSERT(0 != m_pimpl.get()); return m_pimpl->get_data(); } - boost::std::shared_ptr get_named_subs()const + boost::shared_ptr get_named_subs()const { return m_pimpl; } private: - std::shared_ptr > m_pimpl; + shared_ptr > m_pimpl; }; // @@ -649,14 +649,14 @@ basic_regex& basic_regex::do_assign(const charT* p const charT* p2, flag_type f) { - std::shared_ptr > temp; + shared_ptr > temp; if(!m_pimpl.get()) { - temp = std::shared_ptr >(new re_detail::basic_regex_implementation()); + temp = shared_ptr >(new re_detail::basic_regex_implementation()); } else { - temp = std::shared_ptr >(new re_detail::basic_regex_implementation(m_pimpl->m_ptraits)); + temp = shared_ptr >(new re_detail::basic_regex_implementation(m_pimpl->m_ptraits)); } temp->assign(p1, p2, f); temp.swap(m_pimpl); @@ -665,8 +665,8 @@ basic_regex& basic_regex::do_assign(const charT* p template typename basic_regex::locale_type BOOST_REGEX_CALL basic_regex::imbue(locale_type l) -{ - std::shared_ptr > temp(new re_detail::basic_regex_implementation()); +{ + shared_ptr > temp(new re_detail::basic_regex_implementation()); locale_type result = temp->imbue(l); temp.swap(m_pimpl); return result; @@ -683,8 +683,8 @@ void swap(basic_regex& e1, basic_regex& e2) #ifndef BOOST_NO_STD_LOCALE template -std::basic_ostream& - operator << (std::basic_ostream& os, +std::basic_ostream& + operator << (std::basic_ostream& os, const basic_regex& e) { return (os << e.str()); @@ -731,7 +731,7 @@ public: template explicit reg_expression(const std::basic_string& p, flag_type f = regex_constants::normal) : basic_regex(p, f) - { + { } template @@ -749,7 +749,7 @@ public: #else explicit reg_expression(const std::basic_string& p, flag_type f = regex_constants::normal) : basic_regex(p, f) - { + { } reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string& p) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/cpp_regex_traits.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/cpp_regex_traits.hpp index 17fe2b63..d60942f0 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/cpp_regex_traits.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/cpp_regex_traits.hpp @@ -3,12 +3,12 @@ * Copyright (c) 2004 John Maddock * Copyright 2011 Garmin Ltd. or its subsidiaries * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ - + /* * LOCATION: see http://www.boost.org for most recent version. * FILE cpp_regex_traits.hpp @@ -60,14 +60,14 @@ #pragma warning(disable:4786 4251) #endif -namespace boost{ +namespace boost{ // // forward declaration is needed by some compilers: // template class cpp_regex_traits; - + namespace re_detail{ // @@ -201,9 +201,9 @@ struct cpp_regex_traits_base } bool operator==(const cpp_regex_traits_base& b)const { - return (m_pctype == b.m_pctype) + return (m_pctype == b.m_pctype) #ifndef BOOST_NO_STD_MESSAGES - && (m_pmessages == b.m_pmessages) + && (m_pmessages == b.m_pmessages) #endif && (m_pcollate == b.m_pcollate); } @@ -283,7 +283,7 @@ void cpp_regex_traits_char_layer::init() if(cat_name.size() && (this->m_pmessages != 0)) { cat = this->m_pmessages->open( - cat_name, + cat_name, this->m_locale); if((int)cat < 0) { @@ -337,7 +337,7 @@ void cpp_regex_traits_char_layer::init() } template -typename cpp_regex_traits_char_layer::string_type +typename cpp_regex_traits_char_layer::string_type cpp_regex_traits_char_layer::get_default_message(regex_constants::syntax_type i) { const char* ptr = get_default_syntax(i); @@ -386,16 +386,16 @@ private: #ifdef BOOST_REGEX_BUGGY_CTYPE_FACET enum { - char_class_space=1<<0, - char_class_print=1<<1, - char_class_cntrl=1<<2, - char_class_upper=1<<3, + char_class_space=1<<0, + char_class_print=1<<1, + char_class_cntrl=1<<2, + char_class_upper=1<<3, char_class_lower=1<<4, - char_class_alpha=1<<5, - char_class_digit=1<<6, - char_class_punct=1<<7, + char_class_alpha=1<<5, + char_class_digit=1<<6, + char_class_punct=1<<7, char_class_xdigit=1<<8, - char_class_alnum=char_class_alpha|char_class_digit, + char_class_alnum=char_class_alpha|char_class_digit, char_class_graph=char_class_alnum|char_class_punct, char_class_blank=1<<9, char_class_word=1<<10, @@ -495,14 +495,14 @@ typename cpp_regex_traits_implementation::char_class_type const cpp_regex #endif template -typename cpp_regex_traits_implementation::string_type +typename cpp_regex_traits_implementation::string_type cpp_regex_traits_implementation::transform_primary(const charT* p1, const charT* p2) const { // // PRECONDITIONS: // // A bug in gcc 3.2 (and maybe other versions as well) treats - // p1 as a null terminated string, for efficiency reasons + // p1 as a null terminated string, for efficiency reasons // we work around this elsewhere, but just assert here that // we adhere to gcc's (buggy) preconditions... // @@ -565,14 +565,14 @@ typename cpp_regex_traits_implementation::string_type } template -typename cpp_regex_traits_implementation::string_type +typename cpp_regex_traits_implementation::string_type cpp_regex_traits_implementation::transform(const charT* p1, const charT* p2) const { // // PRECONDITIONS: // // A bug in gcc 3.2 (and maybe other versions as well) treats - // p1 as a null terminated string, for efficiency reasons + // p1 as a null terminated string, for efficiency reasons // we work around this elsewhere, but just assert here that // we adhere to gcc's (buggy) preconditions... // @@ -613,7 +613,7 @@ typename cpp_regex_traits_implementation::string_type template -typename cpp_regex_traits_implementation::string_type +typename cpp_regex_traits_implementation::string_type cpp_regex_traits_implementation::lookup_collatename(const charT* p1, const charT* p2) const { typedef typename std::map::const_iterator iter_type; @@ -669,7 +669,7 @@ void cpp_regex_traits_implementation::init() if(cat_name.size() && (this->m_pmessages != 0)) { cat = this->m_pmessages->open( - cat_name, + cat_name, this->m_locale); if((int)cat < 0) { @@ -686,8 +686,8 @@ void cpp_regex_traits_implementation::init() // // Error messages: // - for(boost::regex_constants::error_type i = static_cast(0); - i <= boost::regex_constants::error_unknown; + for(boost::regex_constants::error_type i = static_cast(0); + i <= boost::regex_constants::error_unknown; i = static_cast(i + 1)) { const char* p = get_default_error_string(i); @@ -709,7 +709,7 @@ void cpp_regex_traits_implementation::init() // Custom class names: // #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET - static const char_class_type masks[16] = + static const char_class_type masks[16] = { std::ctype::alnum, std::ctype::alpha, @@ -729,7 +729,7 @@ void cpp_regex_traits_implementation::init() cpp_regex_traits_implementation::mask_unicode, }; #else - static const char_class_type masks[16] = + static const char_class_type masks[16] = { ::boost::re_detail::char_class_alnum, ::boost::re_detail::char_class_alpha, @@ -765,14 +765,14 @@ void cpp_regex_traits_implementation::init() } template -typename cpp_regex_traits_implementation::char_class_type +typename cpp_regex_traits_implementation::char_class_type cpp_regex_traits_implementation::lookup_classname_imp(const charT* p1, const charT* p2) const { #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET - static const char_class_type masks[22] = + static const char_class_type masks[22] = { 0, - std::ctype::alnum, + std::ctype::alnum, std::ctype::alpha, cpp_regex_traits_implementation::mask_blank, std::ctype::cntrl, @@ -790,15 +790,15 @@ typename cpp_regex_traits_implementation::char_class_type cpp_regex_traits_implementation::mask_unicode, std::ctype::upper, cpp_regex_traits_implementation::mask_vertical, - std::ctype::alnum | cpp_regex_traits_implementation::mask_word, - std::ctype::alnum | cpp_regex_traits_implementation::mask_word, + std::ctype::alnum | cpp_regex_traits_implementation::mask_word, + std::ctype::alnum | cpp_regex_traits_implementation::mask_word, std::ctype::xdigit, }; #else - static const char_class_type masks[22] = + static const char_class_type masks[22] = { 0, - ::boost::re_detail::char_class_alnum, + ::boost::re_detail::char_class_alnum, ::boost::re_detail::char_class_alpha, ::boost::re_detail::char_class_blank, ::boost::re_detail::char_class_cntrl, @@ -816,8 +816,8 @@ typename cpp_regex_traits_implementation::char_class_type ::boost::re_detail::char_class_unicode, ::boost::re_detail::char_class_upper, ::boost::re_detail::char_class_vertical_space, - ::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word, - ::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word, + ::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word, + ::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word, ::boost::re_detail::char_class_xdigit, }; #endif @@ -857,7 +857,7 @@ bool cpp_regex_traits_implementation::isctype(const charT c, char_class_t template -inline boost::std::shared_ptr > create_cpp_regex_traits(const std::locale& l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) +inline boost::shared_ptr > create_cpp_regex_traits(const std::locale& l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) { cpp_regex_traits_base key(l); return ::boost::object_cache, cpp_regex_traits_implementation >::get(key, 5); @@ -935,9 +935,9 @@ public: #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET typedef typename std::ctype::mask ctype_mask; - static const ctype_mask mask_base = + static const ctype_mask mask_base = static_cast( - std::ctype::alnum + std::ctype::alnum | std::ctype::alpha | std::ctype::cntrl | std::ctype::digit @@ -949,7 +949,7 @@ public: | std::ctype::upper | std::ctype::xdigit); - if((f & mask_base) + if((f & mask_base) && (m_pimpl->m_pctype->is( static_cast(f & mask_base), c))) return true; @@ -957,14 +957,14 @@ public: return true; else if((f & re_detail::cpp_regex_traits_implementation::mask_word) && (c == '_')) return true; - else if((f & re_detail::cpp_regex_traits_implementation::mask_blank) + else if((f & re_detail::cpp_regex_traits_implementation::mask_blank) && m_pimpl->m_pctype->is(std::ctype::space, c) && !re_detail::is_separator(c)) return true; - else if((f & re_detail::cpp_regex_traits_implementation::mask_vertical) + else if((f & re_detail::cpp_regex_traits_implementation::mask_vertical) && (::boost::re_detail::is_separator(c) || (c == '\v'))) return true; - else if((f & re_detail::cpp_regex_traits_implementation::mask_horizontal) + else if((f & re_detail::cpp_regex_traits_implementation::mask_horizontal) && this->isctype(c, std::ctype::space) && !this->isctype(c, re_detail::cpp_regex_traits_implementation::mask_vertical)) return true; return false; @@ -1001,7 +1001,7 @@ public: static std::string get_catalog_name(); private: - boost::std::shared_ptr > m_pimpl; + boost::shared_ptr > m_pimpl; // // catalog name handler: // diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/match_results.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/match_results.hpp index c5641a43..63e51175 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/match_results.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/match_results.hpp @@ -3,8 +3,8 @@ * Copyright (c) 1998-2009 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -47,14 +47,14 @@ class named_subexpressions; template class match_results -{ +{ private: #ifndef BOOST_NO_STD_ALLOCATOR typedef std::vector, Allocator> vector_type; #else typedef std::vector > vector_type; #endif -public: +public: typedef sub_match value_type; #if !defined(BOOST_NO_STD_ALLOCATOR) && !(defined(BOOST_MSVC) && defined(_STLPORT_VERSION)) typedef typename Allocator::const_reference const_reference; @@ -81,7 +81,7 @@ public: : m_subs(), m_base(), m_last_closed_paren(0), m_is_singular(true) { (void)a; } #endif match_results(const match_results& m) - : m_subs(m.m_subs), m_named_subs(m.m_named_subs), m_last_closed_paren(m.m_last_closed_paren), m_is_singular(m.m_is_singular) + : m_subs(m.m_subs), m_named_subs(m.m_named_subs), m_last_closed_paren(m.m_last_closed_paren), m_is_singular(m.m_is_singular) { if(!m_is_singular) { @@ -547,7 +547,7 @@ public: } void BOOST_REGEX_CALL maybe_assign(const match_results& m); - void BOOST_REGEX_CALL set_named_subs(boost::std::shared_ptr subs) + void BOOST_REGEX_CALL set_named_subs(boost::shared_ptr subs) { m_named_subs = subs; } @@ -566,7 +566,7 @@ private: vector_type m_subs; // subexpressions BidiIterator m_base; // where the search started from sub_match m_null; // a null match - boost::std::shared_ptr m_named_subs; // Shared copy of named subs in the regex object + boost::shared_ptr m_named_subs; // Shared copy of named subs in the regex object int m_last_closed_paren; // Last ) to be seen - used for formatting bool m_is_singular; // True if our stored iterators are singular }; @@ -586,7 +586,7 @@ void BOOST_REGEX_CALL match_results::maybe_assign(const // Distances are measured from the start of *this* match, unless this isn't // a valid match in which case we use the start of the whole sequence. Note that // no subsequent match-candidate can ever be to the left of the first match found. - // This ensures that when we are using bidirectional iterators, that distances + // This ensures that when we are using bidirectional iterators, that distances // measured are as short as possible, and therefore as efficient as possible // to compute. Finally note that we don't use the "matched" data member to test // whether a sub-expression is a valid match, because partial matches set this diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_iterator.hpp index c7a946d8..09e75c69 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_iterator.hpp @@ -3,8 +3,8 @@ * Copyright (c) 2003 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -19,7 +19,7 @@ #ifndef BOOST_REGEX_V4_REGEX_ITERATOR_HPP #define BOOST_REGEX_V4_REGEX_ITERATOR_HPP -#include +#include namespace boost{ @@ -34,10 +34,10 @@ namespace boost{ #pragma warning(pop) #endif -template -class regex_iterator_implementation +class regex_iterator_implementation { typedef basic_regex regex_type; @@ -81,34 +81,34 @@ private: regex_iterator_implementation& operator=(const regex_iterator_implementation&); }; -template ::value_type, class traits = regex_traits > -class regex_iterator +class regex_iterator #ifndef BOOST_NO_STD_ITERATOR : public std::iterator< - std::forward_iterator_tag, + std::forward_iterator_tag, match_results, typename re_detail::regex_iterator_traits::difference_type, const match_results*, - const match_results& > + const match_results& > #endif { private: typedef regex_iterator_implementation impl; - typedef std::shared_ptr pimpl; + typedef shared_ptr pimpl; public: typedef basic_regex regex_type; typedef match_results value_type; - typedef typename re_detail::regex_iterator_traits::difference_type + typedef typename re_detail::regex_iterator_traits::difference_type difference_type; typedef const value_type* pointer; - typedef const value_type& reference; + typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; - + regex_iterator(){} - regex_iterator(BidirectionalIterator a, BidirectionalIterator b, - const regex_type& re, + regex_iterator(BidirectionalIterator a, BidirectionalIterator b, + const regex_type& re, match_flag_type m = match_default) : pdata(new impl(&re, b, m)) { @@ -125,10 +125,10 @@ public: return *this; } bool operator==(const regex_iterator& that)const - { + { if((pdata.get() == 0) || (that.pdata.get() == 0)) return pdata.get() == that.pdata.get(); - return pdata->compare(*(that.pdata.get())); + return pdata->compare(*(that.pdata.get())); } bool operator!=(const regex_iterator& that)const { return !(*this == that); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_token_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_token_iterator.hpp index d7b8da65..4e8bc36f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_token_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_token_iterator.hpp @@ -3,8 +3,8 @@ * Copyright (c) 2003 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -19,7 +19,7 @@ #ifndef BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP #define BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP -#include +#include #include #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ @@ -27,7 +27,7 @@ // // Borland C++ Builder 6, and Visual C++ 6, // can't cope with the array template constructor -// so we have a template member that will accept any type as +// so we have a template member that will accept any type as // argument, and then assert that is really is an array: // #include @@ -54,7 +54,7 @@ namespace boost{ template -class regex_token_iterator_implementation +class regex_token_iterator_implementation { typedef basic_regex regex_type; typedef sub_match value_type; @@ -125,11 +125,11 @@ public: bool compare(const regex_token_iterator_implementation& that) { if(this == &that) return true; - return (&re.get_data() == &that.re.get_data()) - && (end == that.end) - && (flags == that.flags) - && (N == that.N) - && (what[0].first == that.what[0].first) + return (&re.get_data() == &that.re.get_data()) + && (end == that.end) + && (flags == that.flags) + && (N == that.N) + && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second); } const value_type& get() @@ -167,40 +167,40 @@ private: regex_token_iterator_implementation& operator=(const regex_token_iterator_implementation&); }; -template ::value_type, class traits = regex_traits > -class regex_token_iterator +class regex_token_iterator #ifndef BOOST_NO_STD_ITERATOR : public std::iterator< - std::forward_iterator_tag, + std::forward_iterator_tag, sub_match, typename re_detail::regex_iterator_traits::difference_type, const sub_match*, - const sub_match& > + const sub_match& > #endif { private: typedef regex_token_iterator_implementation impl; - typedef std::shared_ptr pimpl; + typedef shared_ptr pimpl; public: typedef basic_regex regex_type; typedef sub_match value_type; - typedef typename re_detail::regex_iterator_traits::difference_type + typedef typename re_detail::regex_iterator_traits::difference_type difference_type; typedef const value_type* pointer; - typedef const value_type& reference; + typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; - + regex_token_iterator(){} - regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, + regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, int submatch = 0, match_flag_type m = match_default) : pdata(new impl(&re, b, submatch, m)) { if(!pdata->init(a)) pdata.reset(); } - regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, + regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, const std::vector& submatches, match_flag_type m = match_default) : pdata(new impl(&re, b, submatches, m)) { @@ -239,10 +239,10 @@ public: return *this; } bool operator==(const regex_token_iterator& that)const - { + { if((pdata.get() == 0) || (that.pdata.get() == 0)) return pdata.get() == that.pdata.get(); - return pdata->compare(*(that.pdata.get())); + return pdata->compare(*(that.pdata.get())); } bool operator!=(const regex_token_iterator& that)const { return !(*this == that); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_workaround.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_workaround.hpp index 916a4787..46a8a8d3 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_workaround.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/regex_workaround.hpp @@ -3,8 +3,8 @@ * Copyright (c) 1998-2005 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #ifndef BOOST_NO_STD_LOCALE # include @@ -128,13 +128,13 @@ namespace boost{ namespace re_detail{ // // MSVC 8 will either emit warnings or else refuse to compile // code that makes perfectly legitimate use of std::copy, when - // the OutputIterator type is a user-defined class (apparently all user + // the OutputIterator type is a user-defined class (apparently all user // defined iterators are "unsafe"). This code works around that: // template inline OutputIterator copy( - InputIterator first, - InputIterator last, + InputIterator first, + InputIterator last, OutputIterator dest ) { @@ -142,8 +142,8 @@ namespace boost{ namespace re_detail{ } template inline bool equal( - InputIterator1 first, - InputIterator1 last, + InputIterator1 first, + InputIterator1 last, InputIterator2 with ) { @@ -153,15 +153,15 @@ namespace boost{ namespace re_detail{ // // MSVC 10 will either emit warnings or else refuse to compile // code that makes perfectly legitimate use of std::copy, when - // the OutputIterator type is a user-defined class (apparently all user + // the OutputIterator type is a user-defined class (apparently all user // defined iterators are "unsafe"). What's more Microsoft have removed their // non-standard "unchecked" versions, even though their still in the MS - // documentation!! Work around this as best we can: + // documentation!! Work around this as best we can: // template inline OutputIterator copy( - InputIterator first, - InputIterator last, + InputIterator first, + InputIterator last, OutputIterator dest ) { @@ -171,8 +171,8 @@ namespace boost{ namespace re_detail{ } template inline bool equal( - InputIterator1 first, - InputIterator1 last, + InputIterator1 first, + InputIterator1 last, InputIterator2 with ) { @@ -180,11 +180,11 @@ namespace boost{ namespace re_detail{ if(*first++ != *with++) return false; return true; } -#else - using std::copy; - using std::equal; -#endif -#if BOOST_WORKAROUND(BOOST_MSVC,>=1400) && defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ +#else + using std::copy; + using std::equal; +#endif +#if BOOST_WORKAROUND(BOOST_MSVC,>=1400) && defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ // use safe versions of strcpy etc: using ::strcpy_s; @@ -193,7 +193,7 @@ namespace boost{ namespace re_detail{ inline std::size_t strcpy_s( char *strDestination, std::size_t sizeInBytes, - const char *strSource + const char *strSource ) { if(std::strlen(strSource)+1 > sizeInBytes) @@ -204,7 +204,7 @@ namespace boost{ namespace re_detail{ inline std::size_t strcat_s( char *strDestination, std::size_t sizeInBytes, - const char *strSource + const char *strSource ) { if(std::strlen(strSource) + std::strlen(strDestination) + 1 > sizeInBytes) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_iterator.hpp index 450069ce..65ebd7f8 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_iterator.hpp @@ -3,8 +3,8 @@ * Copyright (c) 2003 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -26,7 +26,7 @@ namespace boost{ #endif template -class u32regex_iterator_implementation +class u32regex_iterator_implementation { typedef u32regex regex_type; @@ -71,31 +71,31 @@ private: }; template -class u32regex_iterator +class u32regex_iterator #ifndef BOOST_NO_STD_ITERATOR : public std::iterator< - std::forward_iterator_tag, + std::forward_iterator_tag, match_results, typename re_detail::regex_iterator_traits::difference_type, const match_results*, - const match_results& > + const match_results& > #endif { private: typedef u32regex_iterator_implementation impl; - typedef std::shared_ptr pimpl; + typedef shared_ptr pimpl; public: typedef u32regex regex_type; typedef match_results value_type; - typedef typename re_detail::regex_iterator_traits::difference_type + typedef typename re_detail::regex_iterator_traits::difference_type difference_type; typedef const value_type* pointer; - typedef const value_type& reference; + typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; - + u32regex_iterator(){} - u32regex_iterator(BidirectionalIterator a, BidirectionalIterator b, - const regex_type& re, + u32regex_iterator(BidirectionalIterator a, BidirectionalIterator b, + const regex_type& re, match_flag_type m = match_default) : pdata(new impl(&re, b, m)) { @@ -112,10 +112,10 @@ public: return *this; } bool operator==(const u32regex_iterator& that)const - { + { if((pdata.get() == 0) || (that.pdata.get() == 0)) return pdata.get() == that.pdata.get(); - return pdata->compare(*(that.pdata.get())); + return pdata->compare(*(that.pdata.get())); } bool operator!=(const u32regex_iterator& that)const { return !(*this == that); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_token_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_token_iterator.hpp index 3b12fec9..de167716 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_token_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/u32regex_token_iterator.hpp @@ -3,8 +3,8 @@ * Copyright (c) 2003 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ @@ -25,7 +25,7 @@ // // Borland C++ Builder 6, and Visual C++ 6, // can't cope with the array template constructor -// so we have a template member that will accept any type as +// so we have a template member that will accept any type as // argument, and then assert that is really is an array: // #include @@ -43,7 +43,7 @@ namespace boost{ #endif template -class u32regex_token_iterator_implementation +class u32regex_token_iterator_implementation { typedef u32regex regex_type; typedef sub_match value_type; @@ -115,11 +115,11 @@ public: bool compare(const u32regex_token_iterator_implementation& that) { if(this == &that) return true; - return (&re.get_data() == &that.re.get_data()) - && (end == that.end) - && (flags == that.flags) - && (N == that.N) - && (what[0].first == that.what[0].first) + return (&re.get_data() == &that.re.get_data()) + && (end == that.end) + && (flags == that.flags) + && (N == that.N) + && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second); } const value_type& get() @@ -158,37 +158,37 @@ private: }; template -class u32regex_token_iterator +class u32regex_token_iterator #ifndef BOOST_NO_STD_ITERATOR : public std::iterator< - std::forward_iterator_tag, + std::forward_iterator_tag, sub_match, typename re_detail::regex_iterator_traits::difference_type, const sub_match*, - const sub_match& > + const sub_match& > #endif { private: typedef u32regex_token_iterator_implementation impl; - typedef std::shared_ptr pimpl; + typedef shared_ptr pimpl; public: typedef u32regex regex_type; typedef sub_match value_type; - typedef typename re_detail::regex_iterator_traits::difference_type + typedef typename re_detail::regex_iterator_traits::difference_type difference_type; typedef const value_type* pointer; - typedef const value_type& reference; + typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; - + u32regex_token_iterator(){} - u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, + u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, int submatch = 0, match_flag_type m = match_default) : pdata(new impl(&re, b, submatch, m)) { if(!pdata->init(a)) pdata.reset(); } - u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, + u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, const std::vector& submatches, match_flag_type m = match_default) : pdata(new impl(&re, b, submatches, m)) { @@ -227,10 +227,10 @@ public: return *this; } bool operator==(const u32regex_token_iterator& that)const - { + { if((pdata.get() == 0) || (that.pdata.get() == 0)) return pdata.get() == that.pdata.get(); - return pdata->compare(*(that.pdata.get())); + return pdata->compare(*(that.pdata.get())); } bool operator!=(const u32regex_token_iterator& that)const { return !(*this == that); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/w32_regex_traits.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/w32_regex_traits.hpp index 2d727bc6..d5562072 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/w32_regex_traits.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/regex/v4/w32_regex_traits.hpp @@ -3,12 +3,12 @@ * Copyright (c) 2004 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ - + /* * LOCATION: see http://www.boost.org for most recent version. * FILE w32_regex_traits.hpp @@ -52,21 +52,21 @@ #pragma warning(disable:4800) #endif -namespace boost{ +namespace boost{ // // forward declaration is needed by some compilers: // template class w32_regex_traits; - + namespace re_detail{ // // start by typedeffing the types we'll need: // typedef ::boost::uint32_t lcid_type; // placeholder for LCID. -typedef ::boost::std::shared_ptr cat_type; // placeholder for dll HANDLE. +typedef ::boost::shared_ptr cat_type; // placeholder for dll HANDLE. // // then add wrappers around the actual Win32 API's (ie implementation hiding): @@ -186,7 +186,7 @@ private: }; template -w32_regex_traits_char_layer::w32_regex_traits_char_layer(::boost::re_detail::lcid_type l) +w32_regex_traits_char_layer::w32_regex_traits_char_layer(::boost::re_detail::lcid_type l) : w32_regex_traits_base(l) { // we need to start by initialising our syntax map so we know which @@ -232,7 +232,7 @@ w32_regex_traits_char_layer::w32_regex_traits_char_layer(::boost::re_deta } template -typename w32_regex_traits_char_layer::string_type +typename w32_regex_traits_char_layer::string_type w32_regex_traits_char_layer::get_default_message(regex_constants::syntax_type i) { const char* ptr = get_default_syntax(i); @@ -342,7 +342,7 @@ private: }; template -typename w32_regex_traits_implementation::string_type +typename w32_regex_traits_implementation::string_type w32_regex_traits_implementation::transform_primary(const charT* p1, const charT* p2) const { string_type result; @@ -388,7 +388,7 @@ typename w32_regex_traits_implementation::string_type } template -typename w32_regex_traits_implementation::string_type +typename w32_regex_traits_implementation::string_type w32_regex_traits_implementation::lookup_collatename(const charT* p1, const charT* p2) const { typedef typename std::map::const_iterator iter_type; @@ -455,8 +455,8 @@ w32_regex_traits_implementation::w32_regex_traits_implementation(::boost: // // Error messages: // - for(boost::regex_constants::error_type i = static_cast(0); - i <= boost::regex_constants::error_unknown; + for(boost::regex_constants::error_type i = static_cast(0); + i <= boost::regex_constants::error_unknown; i = static_cast(i + 1)) { const char* p = get_default_error_string(i); @@ -477,7 +477,7 @@ w32_regex_traits_implementation::w32_regex_traits_implementation(::boost: // // Custom class names: // - static const char_class_type masks[14] = + static const char_class_type masks[14] = { 0x0104u, // C1_ALPHA | C1_DIGIT 0x0100u, // C1_ALPHA @@ -509,10 +509,10 @@ w32_regex_traits_implementation::w32_regex_traits_implementation(::boost: } template -typename w32_regex_traits_implementation::char_class_type +typename w32_regex_traits_implementation::char_class_type w32_regex_traits_implementation::lookup_classname_imp(const charT* p1, const charT* p2) const { - static const char_class_type masks[22] = + static const char_class_type masks[22] = { 0, 0x0104u, // C1_ALPHA | C1_DIGIT @@ -522,7 +522,7 @@ typename w32_regex_traits_implementation::char_class_type 0x0004u, // C1_DIGIT 0x0004u, // C1_DIGIT (~(0x0020u|0x0008u|0x0040) & 0x01ffu) | 0x0400u, // not C1_CNTRL or C1_SPACE or C1_BLANK - w32_regex_traits_implementation::mask_horizontal, + w32_regex_traits_implementation::mask_horizontal, 0x0002u, // C1_LOWER 0x0002u, // C1_LOWER (~0x0020u & 0x01ffu) | 0x0400, // not C1_CNTRL @@ -532,9 +532,9 @@ typename w32_regex_traits_implementation::char_class_type 0x0001u, // C1_UPPER w32_regex_traits_implementation::mask_unicode, 0x0001u, // C1_UPPER - w32_regex_traits_implementation::mask_vertical, - 0x0104u | w32_regex_traits_implementation::mask_word, - 0x0104u | w32_regex_traits_implementation::mask_word, + w32_regex_traits_implementation::mask_vertical, + 0x0104u | w32_regex_traits_implementation::mask_word, + 0x0104u | w32_regex_traits_implementation::mask_word, 0x0080u, // C1_XDIGIT }; if(m_custom_class_names.size()) @@ -552,7 +552,7 @@ typename w32_regex_traits_implementation::char_class_type template -boost::std::shared_ptr > create_w32_regex_traits(::boost::re_detail::lcid_type l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) +boost::shared_ptr > create_w32_regex_traits(::boost::re_detail::lcid_type l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) { // TODO: create a cache for previously constructed objects. return boost::object_cache< ::boost::re_detail::lcid_type, w32_regex_traits_implementation >::get(l, 5); @@ -625,7 +625,7 @@ public: } bool isctype(charT c, char_class_type f) const { - if((f & re_detail::w32_regex_traits_implementation::mask_base) + if((f & re_detail::w32_regex_traits_implementation::mask_base) && (this->m_pimpl->isctype(f & re_detail::w32_regex_traits_implementation::mask_base, c))) return true; else if((f & re_detail::w32_regex_traits_implementation::mask_unicode) && re_detail::is_extended(c)) @@ -635,7 +635,7 @@ public: else if((f & re_detail::w32_regex_traits_implementation::mask_vertical) && (::boost::re_detail::is_separator(c) || (c == '\v'))) return true; - else if((f & re_detail::w32_regex_traits_implementation::mask_horizontal) + else if((f & re_detail::w32_regex_traits_implementation::mask_horizontal) && this->isctype(c, 0x0008u) && !this->isctype(c, re_detail::w32_regex_traits_implementation::mask_vertical)) return true; return false; @@ -672,7 +672,7 @@ public: static std::string get_catalog_name(); private: - boost::std::shared_ptr > m_pimpl; + boost::shared_ptr > m_pimpl; // // catalog name handler: // diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_132.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_132.hpp index 897062f2..b5f2b215 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_132.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_132.hpp @@ -2,7 +2,7 @@ #define BOOST_SHARED_PTR_132_HPP_INCLUDED // -// std::shared_ptr.hpp +// shared_ptr.hpp // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001, 2002, 2003 Peter Dimov @@ -11,7 +11,7 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -// See http://www.boost.org/libs/smart_ptr/std::shared_ptr.htm for documentation. +// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. // #include // for broken compiler workarounds @@ -96,18 +96,18 @@ inline void sp_enable_shared_from_this( shared_count const & /*pn*/, ... ) // -// std::shared_ptr +// shared_ptr // // An enhanced relative of scoped_ptr with reference counted copy semantics. -// The object pointed to is deleted when the last std::shared_ptr pointing to it +// The object pointed to is deleted when the last shared_ptr pointing to it // is destroyed or reset. // -template class std::shared_ptr +template class shared_ptr { private: // Borland 5.5.1 specific workaround - typedef std::shared_ptr< T > this_type; + typedef shared_ptr< T > this_type; public: @@ -116,16 +116,16 @@ public: typedef T * pointer; typedef BOOST_DEDUCED_TYPENAME detail::shared_ptr_traits< T >::reference reference; - std::shared_ptr(): px(0), pn() // never throws in 1.30+ + shared_ptr(): px(0), pn() // never throws in 1.30+ { } #if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x564) ) template - explicit std::shared_ptr(Y * p): px(p), pn(p, boost::checked_deleter()) // Y must be complete + explicit shared_ptr(Y * p): px(p), pn(p, boost::checked_deleter()) // Y must be complete #else template - explicit std::shared_ptr(Y * p): px(p), pn(p, boost::checked_deleter()) // Y must be complete + explicit shared_ptr(Y * p): px(p), pn(p, boost::checked_deleter()) // Y must be complete #endif { detail::sp_enable_shared_from_this( pn, p, p ); @@ -134,10 +134,10 @@ public: // // Requirements: D's copy constructor must not throw // - // std::shared_ptr will release p by calling d(p) + // shared_ptr will release p by calling d(p) // - template std::shared_ptr(Y * p, D d): px(p), pn(p, d) + template shared_ptr(Y * p, D d): px(p), pn(p, d) { detail::sp_enable_shared_from_this( pn, p, p ); } @@ -147,7 +147,7 @@ public: // except that Borland C++ has a bug, and g++ with -Wsynth warns #if defined(__BORLANDC__) || defined(__GNUC__) - std::shared_ptr & operator=(std::shared_ptr const & r) // never throws + shared_ptr & operator=(shared_ptr const & r) // never throws { px = r.px; pn = r.pn; // shared_count::op= doesn't throw @@ -157,29 +157,29 @@ public: #endif template - explicit std::shared_ptr(weak_ptr const & r): pn(r.pn) // may throw + explicit shared_ptr(weak_ptr const & r): pn(r.pn) // may throw { // it is now safe to copy r.px, as pn(r.pn) did not throw px = r.px; } template - std::shared_ptr(std::shared_ptr const & r): px(r.px), pn(r.pn) // never throws + shared_ptr(shared_ptr const & r): px(r.px), pn(r.pn) // never throws { } template - std::shared_ptr(std::shared_ptr const & r, detail::static_cast_tag): px(static_cast(r.px)), pn(r.pn) + shared_ptr(shared_ptr const & r, detail::static_cast_tag): px(static_cast(r.px)), pn(r.pn) { } template - std::shared_ptr(std::shared_ptr const & r, detail::const_cast_tag): px(const_cast(r.px)), pn(r.pn) + shared_ptr(shared_ptr const & r, detail::const_cast_tag): px(const_cast(r.px)), pn(r.pn) { } template - std::shared_ptr(std::shared_ptr const & r, detail::dynamic_cast_tag): px(dynamic_cast(r.px)), pn(r.pn) + shared_ptr(shared_ptr const & r, detail::dynamic_cast_tag): px(dynamic_cast(r.px)), pn(r.pn) { if(px == 0) // need to allocate new counter -- the cast failed { @@ -188,7 +188,7 @@ public: } template - std::shared_ptr(std::shared_ptr const & r, detail::polymorphic_cast_tag): px(dynamic_cast(r.px)), pn(r.pn) + shared_ptr(shared_ptr const & r, detail::polymorphic_cast_tag): px(dynamic_cast(r.px)), pn(r.pn) { if(px == 0) { @@ -199,7 +199,7 @@ public: #ifndef BOOST_NO_AUTO_PTR template - explicit std::shared_ptr(std::auto_ptr & r): px(r.get()), pn() + explicit shared_ptr(std::auto_ptr & r): px(r.get()), pn() { Y * tmp = r.get(); pn = detail::shared_count(r); @@ -211,7 +211,7 @@ public: #if !defined(BOOST_MSVC) || (BOOST_MSVC > 1200) template - std::shared_ptr & operator=(std::shared_ptr const & r) // never throws + shared_ptr & operator=(shared_ptr const & r) // never throws { px = r.px; pn = r.pn; // shared_count::op= doesn't throw @@ -223,7 +223,7 @@ public: #ifndef BOOST_NO_AUTO_PTR template - std::shared_ptr & operator=(std::auto_ptr & r) + shared_ptr & operator=(std::auto_ptr & r) { this_type(r).swap(*this); return *this; @@ -258,7 +258,7 @@ public: BOOST_ASSERT(px != 0); return px; } - + T * get() const // never throws { return px; @@ -275,13 +275,13 @@ public: #elif defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) typedef T * (this_type::*unspecified_bool_type)() const; - + operator unspecified_bool_type() const // never throws { return px == 0? 0: &this_type::get; } -#else +#else typedef T * this_type::*unspecified_bool_type; @@ -309,13 +309,13 @@ public: return pn.use_count(); } - void swap(std::shared_ptr< T > & other) // never throws + void swap(shared_ptr< T > & other) // never throws { std::swap(px, other.px); pn.swap(other.pn); } - template bool _internal_less(std::shared_ptr const & rhs) const + template bool _internal_less(shared_ptr const & rhs) const { return pn < rhs.pn; } @@ -332,7 +332,7 @@ public: private: - template friend class std::shared_ptr; + template friend class shared_ptr; template friend class weak_ptr; @@ -341,14 +341,14 @@ public: // for serialization T * px; // contained pointer detail::shared_count pn; // reference counter -}; // std::shared_ptr +}; // shared_ptr -template inline bool operator==(std::shared_ptr< T > const & a, std::shared_ptr const & b) +template inline bool operator==(shared_ptr< T > const & a, shared_ptr const & b) { return a.get() == b.get(); } -template inline bool operator!=(std::shared_ptr< T > const & a, std::shared_ptr const & b) +template inline bool operator!=(shared_ptr< T > const & a, shared_ptr const & b) { return a.get() != b.get(); } @@ -357,64 +357,64 @@ template inline bool operator!=(std::shared_ptr< T > const & a // Resolve the ambiguity between our op!= and the one in rel_ops -template inline bool operator!=(std::shared_ptr< T > const & a, std::shared_ptr< T > const & b) +template inline bool operator!=(shared_ptr< T > const & a, shared_ptr< T > const & b) { return a.get() != b.get(); } #endif -template inline bool operator<(std::shared_ptr< T > const & a, std::shared_ptr const & b) +template inline bool operator<(shared_ptr< T > const & a, shared_ptr const & b) { return a._internal_less(b); } -template inline void swap(std::shared_ptr< T > & a, std::shared_ptr< T > & b) +template inline void swap(shared_ptr< T > & a, shared_ptr< T > & b) { a.swap(b); } -template std::shared_ptr< T > static_pointer_cast(std::shared_ptr const & r) +template shared_ptr< T > static_pointer_cast(shared_ptr const & r) { - return std::shared_ptr< T >(r, detail::static_cast_tag()); + return shared_ptr< T >(r, detail::static_cast_tag()); } -template std::shared_ptr< T > const_pointer_cast(std::shared_ptr const & r) +template shared_ptr< T > const_pointer_cast(shared_ptr const & r) { - return std::shared_ptr< T >(r, detail::const_cast_tag()); + return shared_ptr< T >(r, detail::const_cast_tag()); } -template std::shared_ptr< T > dynamic_pointer_cast(std::shared_ptr const & r) +template shared_ptr< T > dynamic_pointer_cast(shared_ptr const & r) { - return std::shared_ptr< T >(r, detail::dynamic_cast_tag()); + return shared_ptr< T >(r, detail::dynamic_cast_tag()); } // shared_*_cast names are deprecated. Use *_pointer_cast instead. -template std::shared_ptr< T > shared_static_cast(std::shared_ptr const & r) +template shared_ptr< T > shared_static_cast(shared_ptr const & r) { - return std::shared_ptr< T >(r, detail::static_cast_tag()); + return shared_ptr< T >(r, detail::static_cast_tag()); } -template std::shared_ptr< T > shared_dynamic_cast(std::shared_ptr const & r) +template shared_ptr< T > shared_dynamic_cast(shared_ptr const & r) { - return std::shared_ptr< T >(r, detail::dynamic_cast_tag()); + return shared_ptr< T >(r, detail::dynamic_cast_tag()); } -template std::shared_ptr< T > shared_polymorphic_cast(std::shared_ptr const & r) +template shared_ptr< T > shared_polymorphic_cast(shared_ptr const & r) { - return std::shared_ptr< T >(r, detail::polymorphic_cast_tag()); + return shared_ptr< T >(r, detail::polymorphic_cast_tag()); } -template std::shared_ptr< T > shared_polymorphic_downcast(std::shared_ptr const & r) +template shared_ptr< T > shared_polymorphic_downcast(shared_ptr const & r) { BOOST_ASSERT(dynamic_cast(r.get()) == r.get()); return shared_static_cast< T >(r); } -// get_pointer() enables boost::mem_fn to recognize std::shared_ptr +// get_pointer() enables boost::mem_fn to recognize shared_ptr -template inline T * get_pointer(std::shared_ptr< T > const & p) +template inline T * get_pointer(shared_ptr< T > const & p) { return p.get(); } @@ -423,7 +423,7 @@ template inline T * get_pointer(std::shared_ptr< T > const & p) #if defined(__GNUC__) && (__GNUC__ < 3) -template std::ostream & operator<< (std::ostream & os, std::shared_ptr const & p) +template std::ostream & operator<< (std::ostream & os, shared_ptr const & p) { os << p.get(); return os; @@ -434,10 +434,10 @@ template std::ostream & operator<< (std::ostream & os, std::shared_ptr< # if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, <= 1200 && __SGI_STL_PORT) // MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL using std::basic_ostream; -template basic_ostream & operator<< (basic_ostream & os, std::shared_ptr const & p) +template basic_ostream & operator<< (basic_ostream & os, shared_ptr const & p) # else -template std::basic_ostream & operator<< (std::basic_ostream & os, std::shared_ptr const & p) -# endif +template std::basic_ostream & operator<< (std::basic_ostream & os, shared_ptr const & p) +# endif { os << p.get(); return os; @@ -452,7 +452,7 @@ template std::basic_ostream & operator<< (std:: // g++ 2.9x doesn't allow static_cast(void *) // apparently EDG 2.38 also doesn't accept it -template D * get_deleter(std::shared_ptr< T > const & p) +template D * get_deleter(shared_ptr< T > const & p) { void const * q = p._internal_get_deleter(typeid(D)); return const_cast(static_cast(q)); @@ -460,7 +460,7 @@ template D * get_deleter(std::shared_ptr< T > const & p) #else -template D * get_deleter(std::shared_ptr< T > const & p) +template D * get_deleter(shared_ptr< T > const & p) { return static_cast(p._internal_get_deleter(typeid(D))); } @@ -471,7 +471,7 @@ template D * get_deleter(std::shared_ptr< T > const & p) #ifdef BOOST_MSVC # pragma warning(pop) -#endif +#endif #endif // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_nmt_132.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_nmt_132.hpp index 0f9c8282..490e7ddd 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_nmt_132.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/detail/shared_ptr_nmt_132.hpp @@ -2,7 +2,7 @@ #define BOOST_DETAIL_SHARED_PTR_NMT_132_HPP_INCLUDED // -// detail/shared_ptr_nmt.hpp - std::shared_ptr.hpp without member templates +// detail/shared_ptr_nmt.hpp - shared_ptr.hpp without member templates // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001, 2002 Peter Dimov @@ -11,7 +11,7 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -// See http://www.boost.org/libs/smart_ptr/std::shared_ptr.htm for documentation. +// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. // #include @@ -30,7 +30,7 @@ namespace boost { -template class std::shared_ptr +template class shared_ptr { private: @@ -41,7 +41,7 @@ public: typedef T element_type; typedef T value_type; - explicit std::shared_ptr(T * p = 0): px(p) + explicit shared_ptr(T * p = 0): px(p) { #ifndef BOOST_NO_EXCEPTIONS @@ -68,7 +68,7 @@ public: #endif } - ~std::shared_ptr() + ~shared_ptr() { if(--*pn == 0) { @@ -77,29 +77,29 @@ public: } } - std::shared_ptr(std::shared_ptr const & r): px(r.px) // never throws + shared_ptr(shared_ptr const & r): px(r.px) // never throws { pn = r.pn; ++*pn; } - std::shared_ptr & operator=(std::shared_ptr const & r) + shared_ptr & operator=(shared_ptr const & r) { - std::shared_ptr(r).swap(*this); + shared_ptr(r).swap(*this); return *this; } #ifndef BOOST_NO_AUTO_PTR - explicit std::shared_ptr(std::auto_ptr< T > & r) - { + explicit shared_ptr(std::auto_ptr< T > & r) + { pn = new count_type(1); // may throw px = r.release(); // fix: moved here to stop leak if new throws - } + } - std::shared_ptr & operator=(std::auto_ptr< T > & r) + shared_ptr & operator=(std::auto_ptr< T > & r) { - std::shared_ptr(r).swap(*this); + shared_ptr(r).swap(*this); return *this; } @@ -108,7 +108,7 @@ public: void reset(T * p = 0) { BOOST_ASSERT(p == 0 || p != px); - std::shared_ptr(p).swap(*this); + shared_ptr(p).swap(*this); } T & operator*() const // never throws @@ -137,8 +137,8 @@ public: { return *pn == 1; } - - void swap(std::shared_ptr< T > & other) // never throws + + void swap(shared_ptr< T > & other) // never throws { std::swap(px, other.px); std::swap(pn, other.pn); @@ -150,29 +150,29 @@ private: count_type * pn; // ptr to reference counter }; -template inline bool operator==(std::shared_ptr< T > const & a, std::shared_ptr const & b) +template inline bool operator==(shared_ptr< T > const & a, shared_ptr const & b) { return a.get() == b.get(); } -template inline bool operator!=(std::shared_ptr< T > const & a, std::shared_ptr const & b) +template inline bool operator!=(shared_ptr< T > const & a, shared_ptr const & b) { return a.get() != b.get(); } -template inline bool operator<(std::shared_ptr< T > const & a, std::shared_ptr< T > const & b) +template inline bool operator<(shared_ptr< T > const & a, shared_ptr< T > const & b) { return std::less()(a.get(), b.get()); } -template void swap(std::shared_ptr< T > & a, std::shared_ptr< T > & b) +template void swap(shared_ptr< T > & a, shared_ptr< T > & b) { a.swap(b); } -// get_pointer() enables boost::mem_fn to recognize std::shared_ptr +// get_pointer() enables boost::mem_fn to recognize shared_ptr -template inline T * get_pointer(std::shared_ptr< T > const & p) +template inline T * get_pointer(shared_ptr< T > const & p) { return p.get(); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr.hpp index 63eab8c5..37f95e35 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr.hpp @@ -7,7 +7,7 @@ #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// std::shared_ptr.hpp: serialization for boost shared pointer +// shared_ptr.hpp: serialization for boost shared pointer // (C) Copyright 2004 Robert Ramey and Martin Ecker // Use, modification and distribution is subject to the Boost Software @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include @@ -31,7 +31,7 @@ #include /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// std::shared_ptr serialization traits +// shared_ptr serialization traits // version 1 to distinguish from boost 1.32 version. Note: we can only do this // for a template when the compiler supports partial template specialization @@ -39,7 +39,7 @@ namespace boost { namespace serialization{ template - struct version< ::boost::std::shared_ptr< T > > { + struct version< ::boost::shared_ptr< T > > { typedef mpl::integral_c_tag tag; #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) typedef BOOST_DEDUCED_TYPENAME mpl::int_<1> type; @@ -54,7 +54,7 @@ }; // don't track shared pointers template - struct tracking_level< ::boost::std::shared_ptr< T > > { + struct tracking_level< ::boost::shared_ptr< T > > { typedef mpl::integral_c_tag tag; #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) typedef BOOST_DEDUCED_TYPENAME mpl::int_< ::boost::serialization::track_never> type; @@ -73,11 +73,11 @@ // define macro to let users of these compilers do this #define BOOST_SERIALIZATION_SHARED_PTR(T) \ BOOST_CLASS_VERSION( \ - ::boost::std::shared_ptr< T >, \ + ::boost::shared_ptr< T >, \ 1 \ ) \ BOOST_CLASS_TRACKING( \ - ::boost::std::shared_ptr< T >, \ + ::boost::shared_ptr< T >, \ ::boost::serialization::track_never \ ) \ /**/ @@ -91,16 +91,16 @@ struct null_deleter { }; /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// serialization for std::shared_ptr +// serialization for shared_ptr template inline void save( Archive & ar, - const boost::std::shared_ptr< T > &t, + const boost::shared_ptr< T > &t, const unsigned int /* file_version */ ){ // The most common cause of trapping here would be serializing - // something like std::shared_ptr. This occurs because int + // something like shared_ptr. This occurs because int // is never tracked by default. Wrap int in a trackable type BOOST_STATIC_ASSERT((tracking_level< T >::value != track_never)); const T * t_ptr = t.get(); @@ -111,11 +111,11 @@ inline void save( template inline void load( Archive & ar, - boost::std::shared_ptr< T > &t, + boost::shared_ptr< T > &t, const unsigned int file_version ){ // The most common cause of trapping here would be serializing - // something like std::shared_ptr. This occurs because int + // something like shared_ptr. This occurs because int // is never tracked by default. Wrap int in a trackable type BOOST_STATIC_ASSERT((tracking_level< T >::value != track_never)); T* r; @@ -126,7 +126,7 @@ inline void load( ar.register_type(static_cast< boost_132::detail::sp_counted_base_impl * >(NULL)); - boost_132::std::shared_ptr< T > sp; + boost_132::shared_ptr< T > sp; ar >> boost::serialization::make_nvp("px", sp.px); ar >> boost::serialization::make_nvp("pn", sp.pn); // got to keep the sps around so the sp.pns don't disappear @@ -143,11 +143,11 @@ inline void load( template inline void load( Archive & ar, - boost::std::shared_ptr< T > &t, + boost::shared_ptr< T > &t, const unsigned int /*file_version*/ ){ // The most common cause of trapping here would be serializing - // something like std::shared_ptr. This occurs because int + // something like shared_ptr. This occurs because int // is never tracked by default. Wrap int in a trackable type BOOST_STATIC_ASSERT((tracking_level< T >::value != track_never)); T* r; @@ -159,10 +159,10 @@ inline void load( template inline void serialize( Archive & ar, - boost::std::shared_ptr< T > &t, + boost::shared_ptr< T > &t, const unsigned int file_version ){ - // correct std::shared_ptr serialization depends upon object tracking + // correct shared_ptr serialization depends upon object tracking // being used. BOOST_STATIC_ASSERT( boost::serialization::tracking_level< T >::value diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr_132.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr_132.hpp index cdc888b8..9bcefe09 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr_132.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/shared_ptr_132.hpp @@ -7,9 +7,9 @@ #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// std::shared_ptr.hpp: serialization for boost shared pointer +// shared_ptr.hpp: serialization for boost shared pointer -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) @@ -17,8 +17,8 @@ // See http://www.boost.org for updates, documentation, and revision history. // note: totally unadvised hack to gain access to private variables -// in std::shared_ptr and shared_count. Unfortunately its the only way to -// do this without changing std::shared_ptr and shared_count +// in shared_ptr and shared_count. Unfortunately its the only way to +// do this without changing shared_ptr and shared_count // the best we can do is to detect a conflict here #include @@ -38,7 +38,7 @@ // Maintain a couple of lists of loaded shared pointers of the old previous // version (1.32) -namespace boost_132 { +namespace boost_132 { namespace serialization { namespace detail { @@ -53,7 +53,7 @@ struct null_deleter { ///////////////////////////////////////////////////////////// // sp_counted_base_impl serialization -namespace boost { +namespace boost { namespace serialization { template @@ -66,7 +66,7 @@ inline void serialize( // its polymorphic base boost::serialization::void_cast_register< boost_132::detail::sp_counted_base_impl, - boost_132::detail::sp_counted_base + boost_132::detail::sp_counted_base >( static_cast *>(NULL), static_cast(NULL) @@ -76,8 +76,8 @@ inline void serialize( template inline void save_construct_data( Archive & ar, - const - boost_132::detail::sp_counted_base_impl *t, + const + boost_132::detail::sp_counted_base_impl *t, const BOOST_PFTO unsigned int /* file_version */ ){ // variables used for construction @@ -87,25 +87,25 @@ inline void save_construct_data( template inline void load_construct_data( Archive & ar, - boost_132::detail::sp_counted_base_impl * t, + boost_132::detail::sp_counted_base_impl * t, const unsigned int /* file_version */ ){ P ptr_; ar >> boost::serialization::make_nvp("ptr", ptr_); - // ::new(t)boost_132::detail::sp_counted_base_impl(ptr_, D()); + // ::new(t)boost_132::detail::sp_counted_base_impl(ptr_, D()); // placement // note: the original ::new... above is replaced by the one here. This one // creates all new objects with a null_deleter so that after the archive // is finished loading and the shared_ptrs are destroyed - the underlying - // raw pointers are NOT deleted. This is necessary as they are used by the + // raw pointers are NOT deleted. This is necessary as they are used by the // new system as well. ::new(t)boost_132::detail::sp_counted_base_impl< - P, + P, boost_132::serialization::detail::null_deleter >( ptr_, boost_132::serialization::detail::null_deleter() ); // placement new - // compensate for that fact that a new shared count always is + // compensate for that fact that a new shared count always is // initialized with one. the add_ref_copy below will increment it // every time its serialized so without this adjustment // the use and weak counts will be off by one. @@ -118,7 +118,7 @@ inline void load_construct_data( ///////////////////////////////////////////////////////////// // shared_count serialization -namespace boost { +namespace boost { namespace serialization { template @@ -147,15 +147,15 @@ inline void load( BOOST_SERIALIZATION_SPLIT_FREE(boost_132::detail::shared_count) ///////////////////////////////////////////////////////////// -// implement serialization for std::shared_ptr< T > +// implement serialization for shared_ptr< T > -namespace boost { +namespace boost { namespace serialization { template inline void save( Archive & ar, - const boost_132::std::shared_ptr< T > &t, + const boost_132::shared_ptr< T > &t, const unsigned int /* file_version */ ){ // only the raw pointer has to be saved @@ -170,7 +170,7 @@ inline void save( template inline void load( Archive & ar, - boost_132::std::shared_ptr< T > &t, + boost_132::shared_ptr< T > &t, const unsigned int /* file_version */ ){ // only the raw pointer has to be saved @@ -185,10 +185,10 @@ inline void load( template inline void serialize( Archive & ar, - boost_132::std::shared_ptr< T > &t, + boost_132::shared_ptr< T > &t, const unsigned int file_version ){ - // correct std::shared_ptr serialization depends upon object tracking + // correct shared_ptr serialization depends upon object tracking // being used. BOOST_STATIC_ASSERT( boost::serialization::tracking_level< T >::value @@ -200,7 +200,7 @@ inline void serialize( } // serialization } // namespace boost -// note: change below uses null_deleter +// note: change below uses null_deleter // This macro is used to export GUIDS for shared pointers to allow // the serialization system to export them properly. David Tonge #define BOOST_SHARED_POINTER_EXPORT_GUID(T, K) \ diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/weak_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/weak_ptr.hpp index a6add742..3fe8698d 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/weak_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/serialization/weak_ptr.hpp @@ -7,7 +7,7 @@ #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// std::shared_ptr.hpp: serialization for boost shared pointer +// shared_ptr.hpp: serialization for boost shared pointer // (C) Copyright 2004 Robert Ramey and Martin Ecker // Use, modification and distribution is subject to the Boost Software @@ -17,7 +17,7 @@ // See http://www.boost.org for updates, documentation, and revision history. #include -#include +#include namespace boost { namespace serialization{ @@ -28,7 +28,7 @@ inline void save( const boost::weak_ptr< T > &t, const unsigned int /* file_version */ ){ - const boost::std::shared_ptr< T > sp = t.lock(); + const boost::shared_ptr< T > sp = t.lock(); ar << boost::serialization::make_nvp("weak_ptr", sp); } @@ -38,7 +38,7 @@ inline void load( boost::weak_ptr< T > &t, const unsigned int /* file_version */ ){ - boost::std::shared_ptr< T > sp; + boost::shared_ptr< T > sp; ar >> boost::serialization::make_nvp("weak_ptr", sp); t = sp; } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_container_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_container_iterator.hpp index 5a8f0af5..7d8ecd3e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_container_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_container_iterator.hpp @@ -9,7 +9,7 @@ #define SHARED_CONTAINER_ITERATOR_RG08102002_HPP #include "boost/iterator_adaptors.hpp" -#include "boost/std::shared_ptr.hpp" +#include "boost/shared_ptr.hpp" #include namespace boost { @@ -24,7 +24,7 @@ class shared_container_iterator : public iterator_adaptor< typename Container::iterator> super_t; typedef typename Container::iterator iterator_t; - typedef boost::std::shared_ptr container_ref_t; + typedef boost::shared_ptr container_ref_t; container_ref_t container_ref; public: @@ -39,7 +39,7 @@ public: template shared_container_iterator make_shared_container_iterator(typename Container::iterator iter, - boost::std::shared_ptr const& container) { + boost::shared_ptr const& container) { typedef shared_container_iterator iterator; return iterator(iter,container); } @@ -50,7 +50,7 @@ template std::pair< shared_container_iterator, shared_container_iterator > -make_shared_container_range(boost::std::shared_ptr const& container) { +make_shared_container_range(boost::shared_ptr const& container) { return std::make_pair( make_shared_container_iterator(container->begin(),container), diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_ptr.hpp index bcc40bff..d31978c9 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/shared_ptr.hpp @@ -2,7 +2,7 @@ #define BOOST_SHARED_PTR_HPP_INCLUDED // -// std::shared_ptr.hpp +// shared_ptr.hpp // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001-2008 Peter Dimov @@ -11,9 +11,9 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -// See http://www.boost.org/libs/smart_ptr/std::shared_ptr.htm for documentation. +// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. // -#include +#include #endif // #ifndef BOOST_SHARED_PTR_HPP_INCLUDED diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/connection.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/connection.hpp index 8ef685b1..1ede6be7 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/connection.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/connection.hpp @@ -97,7 +97,7 @@ namespace boost { void set_controlling(bool control = true) { controlling_connection = control; } - std::shared_ptr + shared_ptr get_connection() const { return con; } @@ -115,7 +115,7 @@ namespace boost { friend class BOOST_SIGNALS_NAMESPACE::detail::bound_objects_visitor; // Pointer to the actual contents of the connection - std::shared_ptr con; + shared_ptr con; // True if the destruction of this connection object should disconnect bool controlling_connection; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/named_slot_map.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/named_slot_map.hpp index 84a1e04c..88625fae 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/named_slot_map.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/named_slot_map.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -45,7 +45,7 @@ class stored_group private: storage_kind kind; - std::shared_ptr group; + shared_ptr group; }; typedef function2 compare_type; @@ -60,7 +60,7 @@ public: typedef const stored_group& first_argument_type; typedef const stored_group& second_argument_type; - group_bridge_compare(const Compare& c) : comp(c) + group_bridge_compare(const Compare& c) : comp(c) { } bool operator()(const stored_group& k1, const stored_group& k2) const @@ -93,15 +93,15 @@ class BOOST_SIGNALS_DECL named_slot_map_iterator : connection_slot_pair, forward_traversal_tag> inherited; public: - named_slot_map_iterator() : slot_assigned(false) + named_slot_map_iterator() : slot_assigned(false) { } - named_slot_map_iterator(const named_slot_map_iterator& other) + named_slot_map_iterator(const named_slot_map_iterator& other) : group(other.group), last_group(other.last_group), slot_assigned(other.slot_assigned) { if (slot_assigned) slot_ = other.slot_; } - named_slot_map_iterator& operator=(const named_slot_map_iterator& other) + named_slot_map_iterator& operator=(const named_slot_map_iterator& other) { slot_assigned = other.slot_assigned; group = other.group; @@ -109,11 +109,11 @@ public: if (slot_assigned) slot_ = other.slot_; return *this; } - connection_slot_pair& dereference() const + connection_slot_pair& dereference() const { return *slot_; } - void increment() + void increment() { ++slot_; if (slot_ == group->second.end()) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/signal_base.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/signal_base.hpp index d82100ce..0438cf7b 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/signal_base.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/detail/signal_base.hpp @@ -33,10 +33,10 @@ namespace boost { // manages call depth class BOOST_SIGNALS_DECL call_notification { public: - call_notification(const std::shared_ptr&); + call_notification(const shared_ptr&); ~call_notification(); - std::shared_ptr impl; + shared_ptr impl; }; // Implementation of base class for all signals. It handles the @@ -87,7 +87,7 @@ namespace boost { connection connect_slot(const any& slot, const stored_group& name, - std::shared_ptr data, + shared_ptr data, connect_position at); private: @@ -138,7 +138,7 @@ namespace boost { protected: connection connect_slot(const any& slot, const stored_group& name, - std::shared_ptr data, + shared_ptr data, connect_position at) { return impl->connect_slot(slot, name, data, at); @@ -146,7 +146,7 @@ namespace boost { typedef named_slot_map::iterator iterator; - std::shared_ptr impl; + shared_ptr impl; }; } // end namespace detail } // end namespace BOOST_SIGNALS_NAMESPACE diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/slot.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/slot.hpp index 6d1533d2..bbf18480 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/slot.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals/slot.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #ifdef BOOST_HAS_ABI_HEADERS @@ -33,7 +33,7 @@ namespace boost { std::vector bound_objects; connection watch_bound_objects; }; - std::shared_ptr get_data() const { return data; } + shared_ptr get_data() const { return data; } // Get the set of bound objects std::vector& get_bound_objects() const @@ -41,14 +41,14 @@ namespace boost { // Determine if this slot is still "active", i.e., all of the bound // objects still exist - bool is_active() const + bool is_active() const { return data->watch_bound_objects.connected(); } protected: // Create a connection for this slot void create_connection(); - std::shared_ptr data; + shared_ptr data; private: static void bound_object_destructed(void*, void*) {} @@ -116,9 +116,9 @@ namespace boost { // An exception thrown here will allow the basic_connection to be // destroyed when this goes out of scope, and no other connections // have been made. - BOOST_SIGNALS_NAMESPACE::detail::bound_objects_visitor + BOOST_SIGNALS_NAMESPACE::detail::bound_objects_visitor do_bind(this->data->bound_objects); - visit_each(do_bind, + visit_each(do_bind, BOOST_SIGNALS_NAMESPACE::get_inspectable_slot (f, BOOST_SIGNALS_NAMESPACE::tag_type(f))); create_connection(); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/connection.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/connection.hpp index 13136cc6..0271a3c1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/connection.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/connection.hpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -48,11 +48,11 @@ namespace boost _connected = false; } virtual bool connected() const = 0; - std::shared_ptr get_blocker() + shared_ptr get_blocker() { unique_lock local_lock(*this); - std::shared_ptr blocker = _weak_blocker.lock(); - if(blocker == std::shared_ptr()) + shared_ptr blocker = _weak_blocker.lock(); + if(blocker == shared_ptr()) { blocker.reset(this, &null_deleter); _weak_blocker = blocker; @@ -161,26 +161,26 @@ namespace boost ~connection() {} void disconnect() const { - boost::std::shared_ptr connectionBody(_weak_connection_body.lock()); + boost::shared_ptr connectionBody(_weak_connection_body.lock()); if(connectionBody == 0) return; connectionBody->disconnect(); } bool connected() const { - boost::std::shared_ptr connectionBody(_weak_connection_body.lock()); + boost::shared_ptr connectionBody(_weak_connection_body.lock()); if(connectionBody == 0) return false; return connectionBody->connected(); } bool blocked() const { - boost::std::shared_ptr connectionBody(_weak_connection_body.lock()); + boost::shared_ptr connectionBody(_weak_connection_body.lock()); if(connectionBody == 0) return true; return connectionBody->blocked(); } bool operator==(const connection& other) const { - boost::std::shared_ptr connectionBody(_weak_connection_body.lock()); - boost::std::shared_ptr otherConnectionBody(other._weak_connection_body.lock()); + boost::shared_ptr connectionBody(_weak_connection_body.lock()); + boost::shared_ptr otherConnectionBody(other._weak_connection_body.lock()); return connectionBody == otherConnectionBody; } bool operator!=(const connection& other) const @@ -189,8 +189,8 @@ namespace boost } bool operator<(const connection& other) const { - boost::std::shared_ptr connectionBody(_weak_connection_body.lock()); - boost::std::shared_ptr otherConnectionBody(other._weak_connection_body.lock()); + boost::shared_ptr connectionBody(_weak_connection_body.lock()); + boost::shared_ptr otherConnectionBody(other._weak_connection_body.lock()); return connectionBody < otherConnectionBody; } void swap(connection &other) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct.hpp index d651fa31..d3eca33c 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct.hpp @@ -3,8 +3,8 @@ // deconstruct.hpp // -// A factory function for creating a std::shared_ptr which creates -// an object and its owning std::shared_ptr with one allocation, similar +// A factory function for creating a shared_ptr which creates +// an object and its owning shared_ptr with one allocation, similar // to make_shared(). It also supports postconstructors // and predestructors through unqualified calls of adl_postconstruct() and // adl_predestruct, relying on argument-dependent @@ -25,7 +25,7 @@ // for more information #include -#include +#include #include #include #include @@ -50,11 +50,11 @@ template class postconstructor_invoker { public: - operator const std::shared_ptr & () const + operator const shared_ptr & () const { return postconstruct(); } - const std::shared_ptr& postconstruct() const + const shared_ptr& postconstruct() const { if(!_postconstructed) { @@ -65,7 +65,7 @@ public: } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template - const std::shared_ptr& postconstruct(Args && ... args) + const shared_ptr& postconstruct(Args && ... args) { if(!_postconstructed) { @@ -77,7 +77,7 @@ public: } #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template - const std::shared_ptr& postconstruct(const A1 &a1) const + const shared_ptr& postconstruct(const A1 &a1) const { if(!_postconstructed) { @@ -88,7 +88,7 @@ public: return _sp; } template - const std::shared_ptr& postconstruct(const A1 &a1, const A2 &a2) const + const shared_ptr& postconstruct(const A1 &a1, const A2 &a2) const { if(!_postconstructed) { @@ -99,7 +99,7 @@ public: return _sp; } template - const std::shared_ptr& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3) const + const shared_ptr& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3) const { if(!_postconstructed) { @@ -110,7 +110,7 @@ public: return _sp; } template - const std::shared_ptr& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const + const shared_ptr& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const { if(!_postconstructed) { @@ -121,7 +121,7 @@ public: return _sp; } template - const std::shared_ptr& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5) const + const shared_ptr& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5) const { if(!_postconstructed) { @@ -133,7 +133,7 @@ public: } template - const std::shared_ptr& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, + const shared_ptr& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6) const { if(!_postconstructed) @@ -146,7 +146,7 @@ public: } template - const std::shared_ptr& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, + const shared_ptr& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7) const { if(!_postconstructed) @@ -159,7 +159,7 @@ public: } template - const std::shared_ptr& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, + const shared_ptr& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8) const { if(!_postconstructed) @@ -172,7 +172,7 @@ public: } template - const std::shared_ptr& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, + const shared_ptr& postconstruct(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8, const A9 &a9) const { if(!_postconstructed) @@ -186,10 +186,10 @@ public: #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) private: friend class boost::signals2::deconstruct_access; - postconstructor_invoker(const std::shared_ptr & sp): + postconstructor_invoker(const shared_ptr & sp): _sp(sp), _postconstructed(false) {} - std::shared_ptr _sp; + shared_ptr _sp; mutable bool _postconstructed; }; @@ -269,7 +269,7 @@ public: template< class T > static postconstructor_invoker deconstruct() { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -278,7 +278,7 @@ public: new( pv ) T(); pd->set_initialized(); - boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; @@ -291,7 +291,7 @@ public: template< class T, class... Args > static postconstructor_invoker deconstruct( Args && ... args ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -300,7 +300,7 @@ public: new( pv ) T( std::forward( args )... ); pd->set_initialized(); - boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -310,7 +310,7 @@ public: template< class T, class A1 > static postconstructor_invoker deconstruct( A1 const & a1 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -319,7 +319,7 @@ public: new( pv ) T( a1 ); pd->set_initialized(); - boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -327,7 +327,7 @@ public: template< class T, class A1, class A2 > static postconstructor_invoker deconstruct( A1 const & a1, A2 const & a2 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -336,7 +336,7 @@ public: new( pv ) T( a1, a2 ); pd->set_initialized(); - boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -344,7 +344,7 @@ public: template< class T, class A1, class A2, class A3 > static postconstructor_invoker deconstruct( A1 const & a1, A2 const & a2, A3 const & a3 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -353,7 +353,7 @@ public: new( pv ) T( a1, a2, a3 ); pd->set_initialized(); - boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -361,7 +361,7 @@ public: template< class T, class A1, class A2, class A3, class A4 > static postconstructor_invoker deconstruct( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -370,7 +370,7 @@ public: new( pv ) T( a1, a2, a3, a4 ); pd->set_initialized(); - boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -378,7 +378,7 @@ public: template< class T, class A1, class A2, class A3, class A4, class A5 > static postconstructor_invoker deconstruct( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -387,7 +387,7 @@ public: new( pv ) T( a1, a2, a3, a4, a5 ); pd->set_initialized(); - boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -395,7 +395,7 @@ public: template< class T, class A1, class A2, class A3, class A4, class A5, class A6 > static postconstructor_invoker deconstruct( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -404,7 +404,7 @@ public: new( pv ) T( a1, a2, a3, a4, a5, a6 ); pd->set_initialized(); - boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -412,7 +412,7 @@ public: template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > static postconstructor_invoker deconstruct( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -421,7 +421,7 @@ public: new( pv ) T( a1, a2, a3, a4, a5, a6, a7 ); pd->set_initialized(); - boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -429,7 +429,7 @@ public: template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > static postconstructor_invoker deconstruct( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -438,7 +438,7 @@ public: new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8 ); pd->set_initialized(); - boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } @@ -446,7 +446,7 @@ public: template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > static postconstructor_invoker deconstruct( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::deconstruct_deleter< T >() ); detail::deconstruct_deleter< T > * pd = boost::get_deleter< detail::deconstruct_deleter< T > >( pt ); @@ -455,7 +455,7 @@ public: new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); pd->set_initialized(); - boost::std::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); + boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); boost::detail::sp_enable_shared_from_this(&retval, retval.get(), retval.get()); return retval; } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct_ptr.hpp index a376c197..841b19b2 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/deconstruct_ptr.hpp @@ -1,7 +1,7 @@ // DEPRECATED in favor of adl_postconstruct and adl_predestruct with // deconstruct(). -// A factory function for creating a std::shared_ptr that enhances the plain -// std::shared_ptr constructors by adding support for postconstructors +// A factory function for creating a shared_ptr that enhances the plain +// shared_ptr constructors by adding support for postconstructors // and predestructors through the boost::signals2::postconstructible and // boost::signals2::predestructible base classes. // @@ -19,7 +19,7 @@ #include #include #include -#include +#include namespace boost { @@ -63,17 +63,17 @@ namespace boost }; template - std::shared_ptr deconstruct_ptr(T *ptr) + shared_ptr deconstruct_ptr(T *ptr) { - if(ptr == 0) return std::shared_ptr(ptr); - std::shared_ptr shared(ptr, boost::signals2::predestructing_deleter()); + if(ptr == 0) return shared_ptr(ptr); + shared_ptr shared(ptr, boost::signals2::predestructing_deleter()); detail::do_postconstruct(ptr); return shared; } template - std::shared_ptr deconstruct_ptr(T *ptr, D deleter) + shared_ptr deconstruct_ptr(T *ptr, D deleter) { - std::shared_ptr shared(ptr, deleter); + shared_ptr shared(ptr, deleter); if(ptr == 0) return shared; detail::do_postconstruct(ptr); return shared; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/foreign_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/foreign_ptr.hpp index a53bb6d4..47c59962 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/foreign_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/foreign_ptr.hpp @@ -1,5 +1,5 @@ -// helper code for dealing with tracking non-boost std::shared_ptr/weak_ptr +// helper code for dealing with tracking non-boost shared_ptr/weak_ptr // Copyright Frank Mori Hess 2009. // Distributed under the Boost Software License, Version @@ -31,7 +31,7 @@ namespace boost { - template class std::shared_ptr; + template class shared_ptr; template class weak_ptr; namespace signals2 @@ -40,7 +40,7 @@ namespace boost {}; template struct weak_ptr_traits > { - typedef boost::std::shared_ptr shared_type; + typedef boost::shared_ptr shared_type; }; #ifndef BOOST_SIGNALS2_NO_CXX11_SMART_PTR template struct weak_ptr_traits > @@ -52,7 +52,7 @@ namespace boost template struct shared_ptr_traits {}; - template struct shared_ptr_traits > + template struct shared_ptr_traits > { typedef boost::weak_ptr weak_type; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/signal_template.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/signal_template.hpp index 8fef5f83..45e70316 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/signal_template.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/detail/signal_template.hpp @@ -112,7 +112,7 @@ namespace boost {} ExtendedSlotFunction _fun; - boost::std::shared_ptr _connection; + boost::shared_ptr _connection; }; template @@ -139,7 +139,7 @@ namespace boost #endif // BOOST_NO_CXX11_VARIADIC_TEMPLATES typedef slot_call_iterator_cache slot_call_iterator_cache_type; typedef typename group_key::type group_key_type; - typedef std::shared_ptr > connection_body_type; + typedef shared_ptr > connection_body_type; typedef grouped_list connection_list_type; typedef BOOST_SIGNALS2_BOUND_EXTENDED_SLOT_FUNCTION_N(BOOST_SIGNALS2_NUM_ARGS) bound_extended_slot_function_type; @@ -191,7 +191,7 @@ namespace boost // disconnect slot(s) void disconnect_all_slots() { - std::shared_ptr local_state = + shared_ptr local_state = get_readable_state(); typename connection_list_type::iterator it; for(it = local_state->connection_bodies().begin(); @@ -202,7 +202,7 @@ namespace boost } void disconnect(const group_type &group) { - std::shared_ptr local_state = + shared_ptr local_state = get_readable_state(); group_key_type group_key(grouped_slots, group); typename connection_list_type::iterator it; @@ -223,7 +223,7 @@ namespace boost // emit signal result_type operator ()(BOOST_SIGNALS2_SIGNATURE_FULL_ARGS(BOOST_SIGNALS2_NUM_ARGS)) { - std::shared_ptr local_state; + shared_ptr local_state; typename connection_list_type::iterator it; { unique_lock list_lock(_mutex); @@ -247,7 +247,7 @@ namespace boost } result_type operator ()(BOOST_SIGNALS2_SIGNATURE_FULL_ARGS(BOOST_SIGNALS2_NUM_ARGS)) const { - std::shared_ptr local_state; + shared_ptr local_state; typename connection_list_type::iterator it; { unique_lock list_lock(_mutex); @@ -271,7 +271,7 @@ namespace boost } std::size_t num_slots() const { - std::shared_ptr local_state = + shared_ptr local_state = get_readable_state(); typename connection_list_type::iterator it; std::size_t count = 0; @@ -284,7 +284,7 @@ namespace boost } bool empty() const { - std::shared_ptr local_state = + shared_ptr local_state = get_readable_state(); typename connection_list_type::iterator it; for(it = local_state->connection_bodies().begin(); @@ -396,8 +396,8 @@ namespace boost private: invocation_state(const invocation_state &); - std::shared_ptr _connection_bodies; - std::shared_ptr _combiner; + shared_ptr _connection_bodies; + shared_ptr _combiner; }; // Destructor of invocation_janitor does some cleanup when a signal invocation completes. // Code can't be put directly in signal's operator() due to complications from void return types. @@ -500,7 +500,7 @@ namespace boost } nolock_cleanup_connections_from(false, _shared_state->connection_bodies().begin()); } - std::shared_ptr get_readable_state() const + shared_ptr get_readable_state() const { unique_lock list_lock(_mutex); return _shared_state; @@ -517,7 +517,7 @@ namespace boost template void do_disconnect(const T &slot, mpl::bool_ /* is_group */) { - std::shared_ptr local_state = + shared_ptr local_state = get_readable_state(); typename connection_list_type::iterator it; for(it = local_state->connection_bodies().begin(); @@ -576,7 +576,7 @@ namespace boost } // _shared_state is mutable so we can do force_cleanup_connections during a const invocation - mutable std::shared_ptr _shared_state; + mutable shared_ptr _shared_state; mutable typename connection_list_type::iterator _garbage_collector_it; // connection list mutex must never be locked when attempting a blocking lock on a slot, // or you could deadlock. @@ -715,12 +715,12 @@ namespace boost return (*_pimpl).set_combiner(combiner_arg); } protected: - virtual std::shared_ptr lock_pimpl() const + virtual shared_ptr lock_pimpl() const { return _pimpl; } private: - std::shared_ptr + shared_ptr _pimpl; }; @@ -747,7 +747,7 @@ namespace boost {} result_type operator ()(BOOST_SIGNALS2_SIGNATURE_FULL_ARGS(BOOST_SIGNALS2_NUM_ARGS)) { - std::shared_ptr > shared_pimpl(_weak_pimpl.lock()); if(shared_pimpl == 0) boost::throw_exception(expired_slot()); @@ -755,7 +755,7 @@ namespace boost } result_type operator ()(BOOST_SIGNALS2_SIGNATURE_FULL_ARGS(BOOST_SIGNALS2_NUM_ARGS)) const { - std::shared_ptr > shared_pimpl(_weak_pimpl.lock()); if(shared_pimpl == 0) boost::throw_exception(expired_slot()); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/postconstructible.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/postconstructible.hpp index 5ee1d82c..faa14444 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/postconstructible.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/postconstructible.hpp @@ -2,7 +2,7 @@ // A simple framework for creating objects with postconstructors. // The objects must inherit from boost::signals2::postconstructible, and // have their lifetimes managed by -// boost::std::shared_ptr created with the boost::signals2::deconstruct_ptr() +// boost::shared_ptr created with the boost::signals2::deconstruct_ptr() // function. // // Copyright Frank Mori Hess 2007-2008. @@ -17,7 +17,7 @@ namespace boost { - template class std::shared_ptr; + template class shared_ptr; namespace signals2 { @@ -37,7 +37,7 @@ namespace boost public: friend void detail::do_postconstruct(const postconstructible *ptr); template - friend void adl_postconstruct(const std::shared_ptr &sp, postconstructible *p) + friend void adl_postconstruct(const shared_ptr &sp, postconstructible *p) { p->postconstruct(); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/predestructible.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/predestructible.hpp index bc7f574c..0f6806dc 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/predestructible.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/predestructible.hpp @@ -2,7 +2,7 @@ // A simple framework for creating objects with predestructors. // The objects must inherit from boost::signals2::predestructible, and // have their lifetimes managed by -// boost::std::shared_ptr created with the boost::signals2::deconstruct_ptr() +// boost::shared_ptr created with the boost::signals2::deconstruct_ptr() // function. // // Copyright Frank Mori Hess 2007-2008. @@ -29,7 +29,7 @@ namespace boost predestructible() {} public: template - friend void adl_postconstruct(const std::shared_ptr &, ...) + friend void adl_postconstruct(const shared_ptr &, ...) {} friend void adl_predestruct(predestructible *p) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/shared_connection_block.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/shared_connection_block.hpp index aa11a90a..c16bf9b9 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/shared_connection_block.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/shared_connection_block.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_SIGNALS2_SHARED_CONNECTION_BLOCK_HPP #define BOOST_SIGNALS2_SHARED_CONNECTION_BLOCK_HPP -#include +#include #include #include @@ -31,7 +31,7 @@ namespace boost void block() { if(blocking()) return; - boost::std::shared_ptr connection_body(_weak_connection_body.lock()); + boost::shared_ptr connection_body(_weak_connection_body.lock()); if(connection_body == 0) { // Make _blocker non-empty so the blocking() method still returns the correct value @@ -47,7 +47,7 @@ namespace boost } bool blocking() const { - std::shared_ptr empty; + shared_ptr empty; return _blocker < empty || empty < _blocker; } signals2::connection connection() const @@ -56,7 +56,7 @@ namespace boost } private: boost::weak_ptr _weak_connection_body; - std::shared_ptr _blocker; + shared_ptr _blocker; }; } } // end namespace boost diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal.hpp index f82d541b..4300eeea 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal.hpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal_base.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal_base.hpp index 31edf33d..05b6b5fd 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal_base.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/signal_base.hpp @@ -12,7 +12,7 @@ #define BOOST_SIGNALS2_SIGNAL_BASE_HPP #include -#include +#include namespace boost { namespace signals2 { @@ -25,7 +25,7 @@ namespace boost { virtual ~signal_base() {} protected: - virtual std::shared_ptr lock_pimpl() const = 0; + virtual shared_ptr lock_pimpl() const = 0; }; } // end namespace signals2 } // end namespace boost diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/slot_base.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/slot_base.hpp index fabc1403..f7f6d39f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/slot_base.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/slot_base.hpp @@ -13,7 +13,7 @@ #define BOOST_SIGNALS2_SLOT_BASE_HPP #include -#include +#include #include #include #include @@ -32,7 +32,7 @@ namespace boost class tracked_objects_visitor; typedef boost::variant, detail::foreign_void_weak_ptr > void_weak_ptr_variant; - typedef boost::variant, detail::foreign_void_shared_ptr > void_shared_ptr_variant; + typedef boost::variant, detail::foreign_void_shared_ptr > void_shared_ptr_variant; class lock_weak_ptr_visitor { public: diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/trackable.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/trackable.hpp index 1438a0c1..d6a60149 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/trackable.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/signals2/trackable.hpp @@ -17,7 +17,7 @@ #define BOOST_SIGNALS2_TRACKABLE_HPP #include -#include +#include namespace boost { namespace signals2 { @@ -36,12 +36,12 @@ namespace boost { ~trackable() {} private: friend class detail::tracked_objects_visitor; - const std::shared_ptr& get_shared_ptr() const + const shared_ptr& get_shared_ptr() const { return _tracked_ptr; } - std::shared_ptr _tracked_ptr; + shared_ptr _tracked_ptr; }; } // end namespace signals2 } // end namespace boost diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr.hpp index ec6d2813..b5e569d8 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr.hpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #if !defined(BOOST_NO_MEMBER_TEMPLATES) || defined(BOOST_MSVC6_MEMBER_TEMPLATES) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/allocate_shared_array.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/allocate_shared_array.hpp index d5be0454..3ee16552 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/allocate_shared_array.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/allocate_shared_array.hpp @@ -9,7 +9,7 @@ #ifndef BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP #define BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP -#include +#include #include #include #include @@ -29,12 +29,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total::size; boost::detail::allocate_array_helper a1(allocator, n1, &p2); boost::detail::array_deleter d1(n1); - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template @@ -47,12 +47,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total::size; boost::detail::allocate_array_helper a1(allocator, n1, &p2); boost::detail::array_deleter d1(n1); - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(args)...); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type @@ -66,12 +66,12 @@ namespace boost { T2* p2 = 0; boost::detail::allocate_array_helper a1(allocator, &p2); boost::detail::array_deleter d1; - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(args)...); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } #endif #if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) @@ -89,13 +89,13 @@ namespace boost { T3* p3 = 0; boost::detail::allocate_array_helper a1(allocator, &p2); boost::detail::array_deleter d1; - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init_list(p2, p3); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_array::type @@ -113,13 +113,13 @@ namespace boost { std::size_t n1 = M * size; boost::detail::allocate_array_helper a1(allocator, n1, &p2); boost::detail::array_deleter d1(n1); - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->template init_list(p2, p3); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type @@ -137,13 +137,13 @@ namespace boost { T3* p3 = 0; boost::detail::allocate_array_helper a1(allocator, &p2); boost::detail::array_deleter d1; - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->template init_list(p2, p3); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template @@ -159,13 +159,13 @@ namespace boost { std::size_t n1 = list.size() * boost::detail::array_total::size; boost::detail::allocate_array_helper a1(allocator, n1, &p2); boost::detail::array_deleter d1(n1); - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list.begin()); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init_list(p2, p3); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } #endif #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) @@ -180,12 +180,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total::size; boost::detail::allocate_array_helper a1(allocator, n1, &p2); boost::detail::array_deleter d1(n1); - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(value)); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type @@ -200,12 +200,12 @@ namespace boost { T2* p2 = 0; boost::detail::allocate_array_helper a1(allocator, &p2); boost::detail::array_deleter d1; - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(value)); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } #endif #endif @@ -219,12 +219,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total::size; boost::detail::allocate_array_helper a1(allocator, n1, &p2); boost::detail::array_deleter d1(n1); - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->noinit(p2); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type @@ -238,12 +238,12 @@ namespace boost { T2* p2 = 0; boost::detail::allocate_array_helper a1(allocator, &p2); boost::detail::array_deleter d1; - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->noinit(p2); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/shared_ptr_nmt.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/shared_ptr_nmt.hpp index bb3d739c..afc1ec03 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/shared_ptr_nmt.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/shared_ptr_nmt.hpp @@ -2,7 +2,7 @@ #define BOOST_SMART_PTR_DETAIL_SHARED_PTR_NMT_HPP_INCLUDED // -// detail/shared_ptr_nmt.hpp - std::shared_ptr.hpp without member templates +// detail/shared_ptr_nmt.hpp - shared_ptr.hpp without member templates // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001, 2002 Peter Dimov @@ -11,7 +11,7 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -// See http://www.boost.org/libs/smart_ptr/std::shared_ptr.htm for documentation. +// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. // #include @@ -30,7 +30,7 @@ namespace boost { -template class std::shared_ptr +template class shared_ptr { private: @@ -41,7 +41,7 @@ public: typedef T element_type; typedef T value_type; - explicit std::shared_ptr(T * p = 0): px(p) + explicit shared_ptr(T * p = 0): px(p) { #ifndef BOOST_NO_EXCEPTIONS @@ -68,7 +68,7 @@ public: #endif } - ~std::shared_ptr() + ~shared_ptr() { if(--*pn == 0) { @@ -77,29 +77,29 @@ public: } } - std::shared_ptr(std::shared_ptr const & r): px(r.px) // never throws + shared_ptr(shared_ptr const & r): px(r.px) // never throws { pn = r.pn; ++*pn; } - std::shared_ptr & operator=(std::shared_ptr const & r) + shared_ptr & operator=(shared_ptr const & r) { - std::shared_ptr(r).swap(*this); + shared_ptr(r).swap(*this); return *this; } #ifndef BOOST_NO_AUTO_PTR - explicit std::shared_ptr(std::auto_ptr & r) - { + explicit shared_ptr(std::auto_ptr & r) + { pn = new count_type(1); // may throw px = r.release(); // fix: moved here to stop leak if new throws - } + } - std::shared_ptr & operator=(std::auto_ptr & r) + shared_ptr & operator=(std::auto_ptr & r) { - std::shared_ptr(r).swap(*this); + shared_ptr(r).swap(*this); return *this; } @@ -108,7 +108,7 @@ public: void reset(T * p = 0) { BOOST_ASSERT(p == 0 || p != px); - std::shared_ptr(p).swap(*this); + shared_ptr(p).swap(*this); } T & operator*() const // never throws @@ -137,8 +137,8 @@ public: { return *pn == 1; } - - void swap(std::shared_ptr & other) // never throws + + void swap(shared_ptr & other) // never throws { std::swap(px, other.px); std::swap(pn, other.pn); @@ -150,29 +150,29 @@ private: count_type * pn; // ptr to reference counter }; -template inline bool operator==(std::shared_ptr const & a, std::shared_ptr const & b) +template inline bool operator==(shared_ptr const & a, shared_ptr const & b) { return a.get() == b.get(); } -template inline bool operator!=(std::shared_ptr const & a, std::shared_ptr const & b) +template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) { return a.get() != b.get(); } -template inline bool operator<(std::shared_ptr const & a, std::shared_ptr const & b) +template inline bool operator<(shared_ptr const & a, shared_ptr const & b) { return std::less()(a.get(), b.get()); } -template void swap(std::shared_ptr & a, std::shared_ptr & b) +template void swap(shared_ptr & a, shared_ptr & b) { a.swap(b); } -// get_pointer() enables boost::mem_fn to recognize std::shared_ptr +// get_pointer() enables boost::mem_fn to recognize shared_ptr -template inline T * get_pointer(std::shared_ptr const & p) +template inline T * get_pointer(shared_ptr const & p) { return p.get(); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/sp_if_array.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/sp_if_array.hpp index a364cb55..661e1785 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/sp_if_array.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/sp_if_array.hpp @@ -1,29 +1,29 @@ /* - * Copyright (c) 2012 Glen Joseph Fernandes + * Copyright (c) 2012 Glen Joseph Fernandes * glenfe at live dot com * - * Distributed under the Boost Software License, - * Version 1.0. (See accompanying file LICENSE_1_0.txt + * Distributed under the Boost Software License, + * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_SMART_PTR_DETAIL_SP_IF_ARRAY_HPP #define BOOST_SMART_PTR_DETAIL_SP_IF_ARRAY_HPP -#include +#include namespace boost { namespace detail { - template + template struct sp_if_array; template struct sp_if_array { - typedef boost::std::shared_ptr type; + typedef boost::shared_ptr type; }; template struct sp_if_size_array; template struct sp_if_size_array { - typedef boost::std::shared_ptr type; + typedef boost::shared_ptr type; }; } } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/spinlock_pool.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/spinlock_pool.hpp index 5d3e9e6a..f09d5c64 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/spinlock_pool.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/detail/spinlock_pool.hpp @@ -17,8 +17,8 @@ // http://www.boost.org/LICENSE_1_0.txt) // // spinlock_pool<0> is reserved for atomic<>, when/if it arrives -// spinlock_pool<1> is reserved for std::shared_ptr reference counts -// spinlock_pool<2> is reserved for std::shared_ptr atomic access +// spinlock_pool<1> is reserved for shared_ptr reference counts +// spinlock_pool<2> is reserved for shared_ptr atomic access // #include @@ -41,11 +41,11 @@ public: static spinlock & spinlock_for( void const * pv ) { -#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 +#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 std::size_t i = reinterpret_cast< unsigned long long >( pv ) % 41; -#else +#else std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41; -#endif +#endif return pool_[ i ]; } @@ -74,14 +74,14 @@ public: template< int I > spinlock spinlock_pool< I >::pool_[ 41 ] = { - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, - BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, + BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_raw.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_raw.hpp index 2ebd0466..f659c046 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_raw.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_raw.hpp @@ -13,19 +13,19 @@ // #include -#include +#include #include #include #include namespace boost { -template boost::std::shared_ptr shared_from_raw(T *); +template boost::shared_ptr shared_from_raw(T *); template boost::weak_ptr weak_from_raw(T *); namespace detail { -template< class X, class Y > inline void sp_enable_shared_from_this( boost::std::shared_ptr * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); +template< class X, class Y > inline void sp_enable_shared_from_this( boost::shared_ptr * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); } // namespace detail @@ -48,7 +48,7 @@ protected: ~enable_shared_from_raw() { - BOOST_ASSERT( shared_this_.use_count() <= 1 ); // make sure no dangling std::shared_ptr objects exist + BOOST_ASSERT( shared_this_.use_count() <= 1 ); // make sure no dangling shared_ptr objects exist } private: @@ -66,26 +66,26 @@ private: public: #else private: - template friend class std::shared_ptr; - template friend boost::std::shared_ptr shared_from_raw(T *); + template friend class shared_ptr; + template friend boost::shared_ptr shared_from_raw(T *); template friend boost::weak_ptr weak_from_raw(T *); - template< class X, class Y > friend inline void detail::sp_enable_shared_from_this( boost::std::shared_ptr * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); + template< class X, class Y > friend inline void detail::sp_enable_shared_from_this( boost::shared_ptr * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); #endif - std::shared_ptr shared_from_this() + shared_ptr shared_from_this() { init_weak_once(); - return std::shared_ptr( weak_this_ ); + return shared_ptr( weak_this_ ); } - std::shared_ptr shared_from_this() const + shared_ptr shared_from_this() const { init_weak_once(); - return std::shared_ptr( weak_this_ ); + return shared_ptr( weak_this_ ); } - // Note: invoked automatically by std::shared_ptr; do not call - template void _internal_accept_owner( std::shared_ptr * ppx, Y * py ) const + // Note: invoked automatically by shared_ptr; do not call + template void _internal_accept_owner( shared_ptr * ppx, Y * py ) const { BOOST_ASSERT( ppx != 0 ); @@ -109,14 +109,14 @@ private: mutable weak_ptr weak_this_; private: - mutable std::shared_ptr shared_this_; + mutable shared_ptr shared_this_; }; template -boost::std::shared_ptr shared_from_raw(T *p) +boost::shared_ptr shared_from_raw(T *p) { BOOST_ASSERT(p != 0); - return boost::std::shared_ptr(p->enable_shared_from_raw::shared_from_this(), p); + return boost::shared_ptr(p->enable_shared_from_raw::shared_from_this(), p); } template @@ -130,7 +130,7 @@ boost::weak_ptr weak_from_raw(T *p) namespace detail { - template< class X, class Y > inline void sp_enable_shared_from_this( boost::std::shared_ptr * ppx, Y const * py, boost::enable_shared_from_raw const * pe ) + template< class X, class Y > inline void sp_enable_shared_from_this( boost::shared_ptr * ppx, Y const * py, boost::enable_shared_from_raw const * pe ) { if( pe != 0 ) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_this.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_this.hpp index e0eddd0d..3230f025 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_this.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/enable_shared_from_this.hpp @@ -14,7 +14,7 @@ // #include -#include +#include #include #include @@ -44,28 +44,28 @@ protected: public: - std::shared_ptr shared_from_this() + shared_ptr shared_from_this() { - std::shared_ptr p( weak_this_ ); + shared_ptr p( weak_this_ ); BOOST_ASSERT( p.get() == this ); return p; } - std::shared_ptr shared_from_this() const + shared_ptr shared_from_this() const { - std::shared_ptr p( weak_this_ ); + shared_ptr p( weak_this_ ); BOOST_ASSERT( p.get() == this ); return p; } public: // actually private, but avoids compiler template friendship issues - // Note: invoked automatically by std::shared_ptr; do not call - template void _internal_accept_owner( std::shared_ptr const * ppx, Y * py ) const + // Note: invoked automatically by shared_ptr; do not call + template void _internal_accept_owner( shared_ptr const * ppx, Y * py ) const { if( weak_this_.expired() ) { - weak_this_ = std::shared_ptr( *ppx, py ); + weak_this_ = shared_ptr( *ppx, py ); } } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_array.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_array.hpp index b8abaf55..eb0578d9 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_array.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_array.hpp @@ -9,7 +9,7 @@ #ifndef BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP #define BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP -#include +#include #include #include #include @@ -29,12 +29,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total::size; boost::detail::make_array_helper a1(n1, &p2); boost::detail::array_deleter d1(n1); - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template @@ -47,12 +47,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total::size; boost::detail::make_array_helper a1(n1, &p2); boost::detail::array_deleter d1(n1); - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(args)...); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type @@ -66,12 +66,12 @@ namespace boost { T2* p2 = 0; boost::detail::make_array_helper a1(&p2); boost::detail::array_deleter d1; - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(args)...); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } #endif #if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) @@ -89,13 +89,13 @@ namespace boost { T3* p3 = 0; boost::detail::make_array_helper a1(&p2); boost::detail::array_deleter d1; - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init_list(p2, p3); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_array::type @@ -113,13 +113,13 @@ namespace boost { std::size_t n1 = M * size; boost::detail::make_array_helper a1(n1, &p2); boost::detail::array_deleter d1(n1); - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->template init_list(p2, p3); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type @@ -136,13 +136,13 @@ namespace boost { T3* p3 = 0; boost::detail::make_array_helper a1(&p2); boost::detail::array_deleter d1; - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->template init_list(p2, p3); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template @@ -157,13 +157,13 @@ namespace boost { std::size_t n1 = list.size() * boost::detail::array_total::size; boost::detail::make_array_helper a1(n1, &p2); boost::detail::array_deleter d1(n1); - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list.begin()); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init_list(p2, p3); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } #endif #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) @@ -178,12 +178,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total::size; boost::detail::make_array_helper a1(n1, &p2); boost::detail::array_deleter d1(n1); - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(value)); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type @@ -197,12 +197,12 @@ namespace boost { T2* p2 = 0; boost::detail::make_array_helper a1(&p2); boost::detail::array_deleter d1; - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(value)); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } #endif #endif @@ -216,12 +216,12 @@ namespace boost { std::size_t n1 = size * boost::detail::array_total::size; boost::detail::make_array_helper a1(n1, &p2); boost::detail::array_deleter d1(n1); - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->noinit(p2); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type @@ -235,12 +235,12 @@ namespace boost { T2* p2 = 0; boost::detail::make_array_helper a1(&p2); boost::detail::array_deleter d1; - boost::std::shared_ptr s1(p1, d1, a1); + boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->noinit(p2); - return boost::std::shared_ptr(s1, p1); + return boost::shared_ptr(s1, p1); } } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_object.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_object.hpp index 3b4bb108..89a71168 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_object.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/make_shared_object.hpp @@ -13,7 +13,7 @@ // for documentation. #include -#include +#include #include #include #include @@ -100,7 +100,7 @@ public: template< class T > struct sp_if_not_array { - typedef boost::std::shared_ptr< T > type; + typedef boost::shared_ptr< T > type; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) @@ -133,7 +133,7 @@ template< class T, std::size_t N > struct sp_if_not_array< T[N] > template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared() { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -145,12 +145,12 @@ template< class T > typename boost::detail::sp_if_not_array< T >::type make_shar T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared_noinit() { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -162,12 +162,12 @@ template< class T > typename boost::detail::sp_if_not_array< T >::type make_shar T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -179,12 +179,12 @@ template< class T, class A > typename boost::detail::sp_if_not_array< T >::type T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared_noinit( A const & a ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -196,7 +196,7 @@ template< class T, class A > typename boost::detail::sp_if_not_array< T >::type T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } #if !defined( BOOST_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) @@ -205,7 +205,7 @@ template< class T, class A > typename boost::detail::sp_if_not_array< T >::type template< class T, class Arg1, class... Args > typename boost::detail::sp_if_not_array< T >::type make_shared( Arg1 && arg1, Args && ... args ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -217,12 +217,12 @@ template< class T, class Arg1, class... Args > typename boost::detail::sp_if_not T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class Arg1, class... Args > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, Arg1 && arg1, Args && ... args ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -234,7 +234,7 @@ template< class T, class A, class Arg1, class... Args > typename boost::detail:: T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } #elif !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) @@ -244,7 +244,7 @@ template< class T, class A, class Arg1, class... Args > typename boost::detail:: template< class T, class A1 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -259,19 +259,19 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1 ) T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( + ::new( pv ) T( boost::detail::sp_forward( a1 ) ); @@ -280,20 +280,20 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ) ); @@ -302,20 +302,20 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward( a1 ), + ::new( pv ) T( + boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ) ); @@ -324,21 +324,21 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward( a1 ), - boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ) ); @@ -347,21 +347,21 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward( a1 ), - boost::detail::sp_forward( a2 ), + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ) ); @@ -370,22 +370,22 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward( a1 ), - boost::detail::sp_forward( a2 ), - boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ) ); @@ -394,22 +394,22 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward( a1 ), - boost::detail::sp_forward( a2 ), - boost::detail::sp_forward( a3 ), + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ) ); @@ -418,23 +418,23 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward( a1 ), - boost::detail::sp_forward( a2 ), - boost::detail::sp_forward( a3 ), - boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), boost::detail::sp_forward( a5 ) ); @@ -443,23 +443,23 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward( a1 ), - boost::detail::sp_forward( a2 ), - boost::detail::sp_forward( a3 ), - boost::detail::sp_forward( a4 ), + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), boost::detail::sp_forward( a5 ) ); @@ -468,24 +468,24 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward( a1 ), - boost::detail::sp_forward( a2 ), - boost::detail::sp_forward( a3 ), - boost::detail::sp_forward( a4 ), - boost::detail::sp_forward( a5 ), + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), boost::detail::sp_forward( a6 ) ); @@ -494,24 +494,24 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward( a1 ), - boost::detail::sp_forward( a2 ), - boost::detail::sp_forward( a3 ), - boost::detail::sp_forward( a4 ), - boost::detail::sp_forward( a5 ), + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), boost::detail::sp_forward( a6 ) ); @@ -520,25 +520,25 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward( a1 ), - boost::detail::sp_forward( a2 ), - boost::detail::sp_forward( a3 ), - boost::detail::sp_forward( a4 ), - boost::detail::sp_forward( a5 ), - boost::detail::sp_forward( a6 ), + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), + boost::detail::sp_forward( a6 ), boost::detail::sp_forward( a7 ) ); @@ -547,25 +547,25 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward( a1 ), - boost::detail::sp_forward( a2 ), - boost::detail::sp_forward( a3 ), - boost::detail::sp_forward( a4 ), - boost::detail::sp_forward( a5 ), - boost::detail::sp_forward( a6 ), + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), + boost::detail::sp_forward( a6 ), boost::detail::sp_forward( a7 ) ); @@ -574,26 +574,26 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward( a1 ), - boost::detail::sp_forward( a2 ), - boost::detail::sp_forward( a3 ), - boost::detail::sp_forward( a4 ), - boost::detail::sp_forward( a5 ), - boost::detail::sp_forward( a6 ), - boost::detail::sp_forward( a7 ), + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), + boost::detail::sp_forward( a6 ), + boost::detail::sp_forward( a7 ), boost::detail::sp_forward( a8 ) ); @@ -602,26 +602,26 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward( a1 ), - boost::detail::sp_forward( a2 ), - boost::detail::sp_forward( a3 ), - boost::detail::sp_forward( a4 ), - boost::detail::sp_forward( a5 ), - boost::detail::sp_forward( a6 ), - boost::detail::sp_forward( a7 ), + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), + boost::detail::sp_forward( a6 ), + boost::detail::sp_forward( a7 ), boost::detail::sp_forward( a8 ) ); @@ -630,27 +630,27 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( - boost::detail::sp_forward( a1 ), - boost::detail::sp_forward( a2 ), - boost::detail::sp_forward( a3 ), - boost::detail::sp_forward( a4 ), - boost::detail::sp_forward( a5 ), - boost::detail::sp_forward( a6 ), - boost::detail::sp_forward( a7 ), - boost::detail::sp_forward( a8 ), + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), + boost::detail::sp_forward( a6 ), + boost::detail::sp_forward( a7 ), + boost::detail::sp_forward( a8 ), boost::detail::sp_forward( a9 ) ); @@ -659,27 +659,27 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T( - boost::detail::sp_forward( a1 ), - boost::detail::sp_forward( a2 ), - boost::detail::sp_forward( a3 ), - boost::detail::sp_forward( a4 ), - boost::detail::sp_forward( a5 ), - boost::detail::sp_forward( a6 ), - boost::detail::sp_forward( a7 ), - boost::detail::sp_forward( a8 ), + ::new( pv ) T( + boost::detail::sp_forward( a1 ), + boost::detail::sp_forward( a2 ), + boost::detail::sp_forward( a3 ), + boost::detail::sp_forward( a4 ), + boost::detail::sp_forward( a5 ), + boost::detail::sp_forward( a6 ), + boost::detail::sp_forward( a7 ), + boost::detail::sp_forward( a8 ), boost::detail::sp_forward( a9 ) ); @@ -688,7 +688,7 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } #else @@ -698,7 +698,7 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, template< class T, class A1 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -710,13 +710,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1 ) T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -728,13 +728,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -746,13 +746,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -764,13 +764,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -782,13 +782,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -800,13 +800,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -818,13 +818,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -836,13 +836,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -854,13 +854,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -872,13 +872,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -890,13 +890,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -908,13 +908,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -926,13 +926,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -944,13 +944,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -962,13 +962,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -980,13 +980,13 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -998,13 +998,13 @@ typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9 ) { - boost::std::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -1016,7 +1016,7 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); - return boost::std::shared_ptr< T >( pt, pt2 ); + return boost::shared_ptr< T >( pt, pt2 ); } #endif diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/owner_less.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/owner_less.hpp index f621533d..6899325b 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/owner_less.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/owner_less.hpp @@ -17,7 +17,7 @@ namespace boost { - template class std::shared_ptr; + template class shared_ptr; template class weak_ptr; namespace detail @@ -43,13 +43,13 @@ namespace boost template struct owner_less; template - struct owner_less >: - public detail::generic_owner_less, weak_ptr > + struct owner_less >: + public detail::generic_owner_less, weak_ptr > {}; template struct owner_less >: - public detail::generic_owner_less, std::shared_ptr > + public detail::generic_owner_less, shared_ptr > {}; } // namespace boost diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/scoped_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/scoped_ptr.hpp index 162395db..be6722d5 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/scoped_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/scoped_ptr.hpp @@ -36,7 +36,7 @@ void sp_scalar_destructor_hook(void * p); // scoped_ptr mimics a built-in pointer except that it guarantees deletion // of the object pointed to, either on destruction of the scoped_ptr or via // an explicit reset(). scoped_ptr is a simple solution for simple needs; -// use std::shared_ptr or std::auto_ptr if your needs are more complex. +// use shared_ptr or std::auto_ptr if your needs are more complex. template class scoped_ptr // noncopyable { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_array.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_array.hpp index bf55aa65..73a07ae1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_array.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_array.hpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include @@ -40,7 +40,7 @@ namespace boost // // shared_array // -// shared_array extends std::shared_ptr to arrays. +// shared_array extends shared_ptr to arrays. // The array pointed to is deleted when the last shared_array pointing to it // is destroyed or reset. // @@ -195,7 +195,7 @@ public: BOOST_ASSERT(i >= 0); return px[i]; } - + T * get() const BOOST_NOEXCEPT { return px; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_ptr.hpp index ea010b16..2f0ce7bc 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/shared_ptr.hpp @@ -2,7 +2,7 @@ #define BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED // -// std::shared_ptr.hpp +// shared_ptr.hpp // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001-2008 Peter Dimov @@ -11,7 +11,7 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -// See http://www.boost.org/libs/smart_ptr/std::shared_ptr.htm for documentation. +// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. // #include // for broken compiler workarounds @@ -22,7 +22,7 @@ // In order to avoid circular dependencies with Boost.TR1 // we make sure that our include of doesn't try to -// pull in the TR1 headers: that's why we use this header +// pull in the TR1 headers: that's why we use this header // rather than including directly: #include // std::auto_ptr @@ -55,7 +55,7 @@ namespace boost { -template class std::shared_ptr; +template class shared_ptr; template class weak_ptr; template class enable_shared_from_this; class enable_shared_from_raw; @@ -205,7 +205,7 @@ template< class T, std::size_t N > struct sp_extent< T[N] > // enable_shared_from_this support -template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::std::shared_ptr const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe ) +template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe ) { if( pe != 0 ) { @@ -213,7 +213,7 @@ template< class X, class Y, class T > inline void sp_enable_shared_from_this( bo } } -template< class X, class Y > inline void sp_enable_shared_from_this( boost::std::shared_ptr * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); +template< class X, class Y > inline void sp_enable_shared_from_this( boost::shared_ptr * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); #ifdef _MANAGED @@ -247,7 +247,7 @@ template< class T, class R > struct sp_enable_if_auto_ptr template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R > { typedef R type; -}; +}; #endif @@ -271,7 +271,7 @@ template< class Y, class T > inline void sp_assert_convertible() // pointer constructor helper -template< class T, class Y > inline void sp_pointer_construct( boost::std::shared_ptr< T > * ppx, Y * p, boost::detail::shared_count & pn ) +template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T > * ppx, Y * p, boost::detail::shared_count & pn ) { boost::detail::shared_count( p ).swap( pn ); boost::detail::sp_enable_shared_from_this( ppx, p, p ); @@ -279,13 +279,13 @@ template< class T, class Y > inline void sp_pointer_construct( boost::std::share #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) -template< class T, class Y > inline void sp_pointer_construct( boost::std::shared_ptr< T[] > * /*ppx*/, Y * p, boost::detail::shared_count & pn ) +template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * p, boost::detail::shared_count & pn ) { sp_assert_convertible< Y[], T[] >(); boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); } -template< class T, std::size_t N, class Y > inline void sp_pointer_construct( boost::std::shared_ptr< T[N] > * /*ppx*/, Y * p, boost::detail::shared_count & pn ) +template< class T, std::size_t N, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * p, boost::detail::shared_count & pn ) { sp_assert_convertible< Y[N], T[N] >(); boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); @@ -295,19 +295,19 @@ template< class T, std::size_t N, class Y > inline void sp_pointer_construct( bo // deleter constructor helper -template< class T, class Y > inline void sp_deleter_construct( boost::std::shared_ptr< T > * ppx, Y * p ) +template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T > * ppx, Y * p ) { boost::detail::sp_enable_shared_from_this( ppx, p, p ); } #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) -template< class T, class Y > inline void sp_deleter_construct( boost::std::shared_ptr< T[] > * /*ppx*/, Y * /*p*/ ) +template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * /*p*/ ) { sp_assert_convertible< Y[], T[] >(); } -template< class T, std::size_t N, class Y > inline void sp_deleter_construct( boost::std::shared_ptr< T[N] > * /*ppx*/, Y * /*p*/ ) +template< class T, std::size_t N, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * /*p*/ ) { sp_assert_convertible< Y[N], T[N] >(); } @@ -318,38 +318,38 @@ template< class T, std::size_t N, class Y > inline void sp_deleter_construct( bo // -// std::shared_ptr +// shared_ptr // // An enhanced relative of scoped_ptr with reference counted copy semantics. -// The object pointed to is deleted when the last std::shared_ptr pointing to it +// The object pointed to is deleted when the last shared_ptr pointing to it // is destroyed or reset. // -template class std::shared_ptr +template class shared_ptr { private: // Borland 5.5.1 specific workaround - typedef std::shared_ptr this_type; + typedef shared_ptr this_type; public: typedef typename boost::detail::sp_element< T >::type element_type; - std::shared_ptr() BOOST_NOEXCEPT : px( 0 ), pn() // never throws in 1.30+ + shared_ptr() BOOST_NOEXCEPT : px( 0 ), pn() // never throws in 1.30+ { } #if !defined( BOOST_NO_CXX11_NULLPTR ) - std::shared_ptr( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT : px( 0 ), pn() // never throws + shared_ptr( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT : px( 0 ), pn() // never throws { } #endif template - explicit std::shared_ptr( Y * p ): px( p ), pn() // Y must be complete + explicit shared_ptr( Y * p ): px( p ), pn() // Y must be complete { boost::detail::sp_pointer_construct( this, p, pn ); } @@ -357,17 +357,17 @@ public: // // Requirements: D's copy constructor must not throw // - // std::shared_ptr will release p by calling d(p) + // shared_ptr will release p by calling d(p) // - template std::shared_ptr( Y * p, D d ): px( p ), pn( p, d ) + template shared_ptr( Y * p, D d ): px( p ), pn( p, d ) { boost::detail::sp_deleter_construct( this, p ); } #if !defined( BOOST_NO_CXX11_NULLPTR ) - template std::shared_ptr( boost::detail::sp_nullptr_t p, D d ): px( p ), pn( p, d ) + template shared_ptr( boost::detail::sp_nullptr_t p, D d ): px( p ), pn( p, d ) { } @@ -375,14 +375,14 @@ public: // As above, but with allocator. A's copy constructor shall not throw. - template std::shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a ) + template shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a ) { boost::detail::sp_deleter_construct( this, p ); } #if !defined( BOOST_NO_CXX11_NULLPTR ) - template std::shared_ptr( boost::detail::sp_nullptr_t p, D d, A a ): px( p ), pn( p, d, a ) + template shared_ptr( boost::detail::sp_nullptr_t p, D d, A a ): px( p ), pn( p, d, a ) { } @@ -394,14 +394,14 @@ public: // ... except in C++0x, move disables the implicit copy - std::shared_ptr( std::shared_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) + shared_ptr( shared_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) { } #endif template - explicit std::shared_ptr( weak_ptr const & r ): pn( r.pn ) // may throw + explicit shared_ptr( weak_ptr const & r ): pn( r.pn ) // may throw { boost::detail::sp_assert_convertible< Y, T >(); @@ -410,7 +410,7 @@ public: } template - std::shared_ptr( weak_ptr const & r, boost::detail::sp_nothrow_tag ) + shared_ptr( weak_ptr const & r, boost::detail::sp_nothrow_tag ) BOOST_NOEXCEPT : px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) { if( !pn.empty() ) @@ -422,11 +422,11 @@ public: template #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) - std::shared_ptr( std::shared_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) + shared_ptr( shared_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) #else - std::shared_ptr( std::shared_ptr const & r ) + shared_ptr( shared_ptr const & r ) #endif BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) @@ -436,14 +436,14 @@ public: // aliasing template< class Y > - std::shared_ptr( std::shared_ptr const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn ) + shared_ptr( shared_ptr const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn ) { } #ifndef BOOST_NO_AUTO_PTR template - explicit std::shared_ptr( std::auto_ptr & r ): px(r.get()), pn() + explicit shared_ptr( std::auto_ptr & r ): px(r.get()), pn() { boost::detail::sp_assert_convertible< Y, T >(); @@ -456,7 +456,7 @@ public: #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) template - std::shared_ptr( std::auto_ptr && r ): px(r.get()), pn() + shared_ptr( std::auto_ptr && r ): px(r.get()), pn() { boost::detail::sp_assert_convertible< Y, T >(); @@ -469,7 +469,7 @@ public: #elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template - explicit std::shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr::type = 0 ): px( r.get() ), pn() + explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr::type = 0 ): px( r.get() ), pn() { typedef typename Ap::element_type Y; @@ -488,7 +488,7 @@ public: #if !defined( BOOST_NO_CXX11_SMART_PTR ) template< class Y, class D > - std::shared_ptr( std::unique_ptr< Y, D > && r ): px( r.get() ), pn() + shared_ptr( std::unique_ptr< Y, D > && r ): px( r.get() ), pn() { boost::detail::sp_assert_convertible< Y, T >(); @@ -502,7 +502,7 @@ public: // assignment - std::shared_ptr & operator=( std::shared_ptr const & r ) BOOST_NOEXCEPT + shared_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT { this_type(r).swap(*this); return *this; @@ -511,7 +511,7 @@ public: #if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400) template - std::shared_ptr & operator=(std::shared_ptr const & r) BOOST_NOEXCEPT + shared_ptr & operator=(shared_ptr const & r) BOOST_NOEXCEPT { this_type(r).swap(*this); return *this; @@ -522,7 +522,7 @@ public: #ifndef BOOST_NO_AUTO_PTR template - std::shared_ptr & operator=( std::auto_ptr & r ) + shared_ptr & operator=( std::auto_ptr & r ) { this_type( r ).swap( *this ); return *this; @@ -531,7 +531,7 @@ public: #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) template - std::shared_ptr & operator=( std::auto_ptr && r ) + shared_ptr & operator=( std::auto_ptr && r ) { this_type( static_cast< std::auto_ptr && >( r ) ).swap( *this ); return *this; @@ -540,7 +540,7 @@ public: #elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template - typename boost::detail::sp_enable_if_auto_ptr< Ap, std::shared_ptr & >::type operator=( Ap r ) + typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r ) { this_type( r ).swap( *this ); return *this; @@ -553,7 +553,7 @@ public: #if !defined( BOOST_NO_CXX11_SMART_PTR ) template - std::shared_ptr & operator=( std::unique_ptr && r ) + shared_ptr & operator=( std::unique_ptr && r ) { this_type( static_cast< std::unique_ptr && >( r ) ).swap(*this); return *this; @@ -565,7 +565,7 @@ public: #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) - std::shared_ptr( std::shared_ptr && r ) BOOST_NOEXCEPT : px( r.px ), pn() + shared_ptr( shared_ptr && r ) BOOST_NOEXCEPT : px( r.px ), pn() { pn.swap( r.pn ); r.px = 0; @@ -574,11 +574,11 @@ public: template #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) - std::shared_ptr( std::shared_ptr && r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) + shared_ptr( shared_ptr && r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) #else - std::shared_ptr( std::shared_ptr && r ) + shared_ptr( shared_ptr && r ) #endif BOOST_NOEXCEPT : px( r.px ), pn() @@ -589,16 +589,16 @@ public: r.px = 0; } - std::shared_ptr & operator=( std::shared_ptr && r ) BOOST_NOEXCEPT + shared_ptr & operator=( shared_ptr && r ) BOOST_NOEXCEPT { - this_type( static_cast< std::shared_ptr && >( r ) ).swap( *this ); + this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); return *this; } template - std::shared_ptr & operator=( std::shared_ptr && r ) BOOST_NOEXCEPT + shared_ptr & operator=( shared_ptr && r ) BOOST_NOEXCEPT { - this_type( static_cast< std::shared_ptr && >( r ) ).swap( *this ); + this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); return *this; } @@ -606,7 +606,7 @@ public: #if !defined( BOOST_NO_CXX11_NULLPTR ) - std::shared_ptr & operator=( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT // never throws + shared_ptr & operator=( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT // never throws { this_type().swap(*this); return *this; @@ -635,25 +635,25 @@ public: this_type( p, d, a ).swap( *this ); } - template void reset( std::shared_ptr const & r, element_type * p ) + template void reset( shared_ptr const & r, element_type * p ) { this_type( r, p ).swap( *this ); } - + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) typename boost::detail::sp_dereference< T >::type operator* () const { BOOST_ASSERT( px != 0 ); return *px; } - + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) - typename boost::detail::sp_member_access< T >::type operator-> () const + typename boost::detail::sp_member_access< T >::type operator-> () const { BOOST_ASSERT( px != 0 ); return px; } - + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const { @@ -681,13 +681,13 @@ public: return pn.use_count(); } - void swap( std::shared_ptr & other ) BOOST_NOEXCEPT + void swap( shared_ptr & other ) BOOST_NOEXCEPT { std::swap(px, other.px); pn.swap(other.pn); } - template bool owner_before( std::shared_ptr const & rhs ) const BOOST_NOEXCEPT + template bool owner_before( shared_ptr const & rhs ) const BOOST_NOEXCEPT { return pn < rhs.pn; } @@ -707,7 +707,7 @@ public: return pn.get_untyped_deleter(); } - bool _internal_equiv( std::shared_ptr const & r ) const BOOST_NOEXCEPT + bool _internal_equiv( shared_ptr const & r ) const BOOST_NOEXCEPT { return px == r.px && pn == r.pn; } @@ -719,7 +719,7 @@ public: private: - template friend class std::shared_ptr; + template friend class shared_ptr; template friend class weak_ptr; @@ -728,14 +728,14 @@ private: element_type * px; // contained pointer boost::detail::shared_count pn; // reference counter -}; // std::shared_ptr +}; // shared_ptr -template inline bool operator==(std::shared_ptr const & a, std::shared_ptr const & b) BOOST_NOEXCEPT +template inline bool operator==(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT { return a.get() == b.get(); } -template inline bool operator!=(std::shared_ptr const & a, std::shared_ptr const & b) BOOST_NOEXCEPT +template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT { return a.get() != b.get(); } @@ -744,7 +744,7 @@ template inline bool operator!=(std::shared_ptr const & a, // Resolve the ambiguity between our op!= and the one in rel_ops -template inline bool operator!=(std::shared_ptr const & a, std::shared_ptr const & b) BOOST_NOEXCEPT +template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT { return a.get() != b.get(); } @@ -753,81 +753,81 @@ template inline bool operator!=(std::shared_ptr const & a, std::shar #if !defined( BOOST_NO_CXX11_NULLPTR ) -template inline bool operator==( std::shared_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +template inline bool operator==( shared_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT { return p.get() == 0; } -template inline bool operator==( boost::detail::sp_nullptr_t, std::shared_ptr const & p ) BOOST_NOEXCEPT +template inline bool operator==( boost::detail::sp_nullptr_t, shared_ptr const & p ) BOOST_NOEXCEPT { return p.get() == 0; } -template inline bool operator!=( std::shared_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +template inline bool operator!=( shared_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT { return p.get() != 0; } -template inline bool operator!=( boost::detail::sp_nullptr_t, std::shared_ptr const & p ) BOOST_NOEXCEPT +template inline bool operator!=( boost::detail::sp_nullptr_t, shared_ptr const & p ) BOOST_NOEXCEPT { return p.get() != 0; } #endif -template inline bool operator<(std::shared_ptr const & a, std::shared_ptr const & b) BOOST_NOEXCEPT +template inline bool operator<(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT { return a.owner_before( b ); } -template inline void swap(std::shared_ptr & a, std::shared_ptr & b) BOOST_NOEXCEPT +template inline void swap(shared_ptr & a, shared_ptr & b) BOOST_NOEXCEPT { a.swap(b); } -template std::shared_ptr static_pointer_cast( std::shared_ptr const & r ) BOOST_NOEXCEPT +template shared_ptr static_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT { (void) static_cast< T* >( static_cast< U* >( 0 ) ); - typedef typename std::shared_ptr::element_type E; + typedef typename shared_ptr::element_type E; E * p = static_cast< E* >( r.get() ); - return std::shared_ptr( r, p ); + return shared_ptr( r, p ); } -template std::shared_ptr const_pointer_cast( std::shared_ptr const & r ) BOOST_NOEXCEPT +template shared_ptr const_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT { (void) const_cast< T* >( static_cast< U* >( 0 ) ); - typedef typename std::shared_ptr::element_type E; + typedef typename shared_ptr::element_type E; E * p = const_cast< E* >( r.get() ); - return std::shared_ptr( r, p ); + return shared_ptr( r, p ); } -template std::shared_ptr dynamic_pointer_cast( std::shared_ptr const & r ) BOOST_NOEXCEPT +template shared_ptr dynamic_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT { //(void) dynamic_cast< T* >( static_cast< U* >( 0 ) ); // // MGH - TODO - FIX - removed this check, as it was breaking the PS3 compile, and I've no idea why :-s - typedef typename std::shared_ptr::element_type E; + typedef typename shared_ptr::element_type E; E * p = dynamic_cast< E* >( r.get() ); - return p? std::shared_ptr( r, p ): std::shared_ptr(); + return p? shared_ptr( r, p ): shared_ptr(); } -template std::shared_ptr reinterpret_pointer_cast( std::shared_ptr const & r ) BOOST_NOEXCEPT +template shared_ptr reinterpret_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT { (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) ); - typedef typename std::shared_ptr::element_type E; + typedef typename shared_ptr::element_type E; E * p = reinterpret_cast< E* >( r.get() ); - return std::shared_ptr( r, p ); + return shared_ptr( r, p ); } -// get_pointer() enables boost::mem_fn to recognize std::shared_ptr +// get_pointer() enables boost::mem_fn to recognize shared_ptr -template inline typename std::shared_ptr::element_type * get_pointer(std::shared_ptr const & p) BOOST_NOEXCEPT +template inline typename shared_ptr::element_type * get_pointer(shared_ptr const & p) BOOST_NOEXCEPT { return p.get(); } @@ -838,7 +838,7 @@ template inline typename std::shared_ptr::element_type * get_pointer #if defined(BOOST_NO_TEMPLATED_IOSTREAMS) || ( defined(__GNUC__) && (__GNUC__ < 3) ) -template std::ostream & operator<< (std::ostream & os, std::shared_ptr const & p) +template std::ostream & operator<< (std::ostream & os, shared_ptr const & p) { os << p.get(); return os; @@ -852,9 +852,9 @@ template std::ostream & operator<< (std::ostream & os, std::shared_ptr< # if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300 && __SGI_STL_PORT) // MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL using std::basic_ostream; -template basic_ostream & operator<< (basic_ostream & os, std::shared_ptr const & p) +template basic_ostream & operator<< (basic_ostream & os, shared_ptr const & p) # else -template std::basic_ostream & operator<< (std::basic_ostream & os, std::shared_ptr const & p) +template std::basic_ostream & operator<< (std::basic_ostream & os, shared_ptr const & p) # endif { os << p.get(); @@ -879,7 +879,7 @@ namespace detail // g++ 2.9x doesn't allow static_cast(void *) // apparently EDG 2.38 and HP aCC A.03.35 also don't accept it -template D * basic_get_deleter(std::shared_ptr const & p) +template D * basic_get_deleter(shared_ptr const & p) { void const * q = p._internal_get_deleter(BOOST_SP_TYPEID(D)); return const_cast(static_cast(q)); @@ -887,7 +887,7 @@ template D * basic_get_deleter(std::shared_ptr const & p) #else -template D * basic_get_deleter( std::shared_ptr const & p ) BOOST_NOEXCEPT +template D * basic_get_deleter( shared_ptr const & p ) BOOST_NOEXCEPT { return static_cast( p._internal_get_deleter(BOOST_SP_TYPEID(D)) ); } @@ -898,7 +898,7 @@ class esft2_deleter_wrapper { private: - std::shared_ptr deleter_; + shared_ptr deleter_; public: @@ -906,7 +906,7 @@ public: { } - template< class T > void set_deleter( std::shared_ptr const & deleter ) + template< class T > void set_deleter( shared_ptr const & deleter ) { deleter_ = deleter; } @@ -925,7 +925,7 @@ public: } // namespace detail -template D * get_deleter( std::shared_ptr const & p ) BOOST_NOEXCEPT +template D * get_deleter( shared_ptr const & p ) BOOST_NOEXCEPT { D *del = boost::detail::basic_get_deleter(p); @@ -944,34 +944,34 @@ template D * get_deleter( std::shared_ptr const & p ) BOOST #if !defined(BOOST_SP_NO_ATOMIC_ACCESS) -template inline bool atomic_is_lock_free( std::shared_ptr const * /*p*/ ) BOOST_NOEXCEPT +template inline bool atomic_is_lock_free( shared_ptr const * /*p*/ ) BOOST_NOEXCEPT { return false; } -template std::shared_ptr atomic_load( std::shared_ptr const * p ) +template shared_ptr atomic_load( shared_ptr const * p ) { boost::detail::spinlock_pool<2>::scoped_lock lock( p ); return *p; } -template inline std::shared_ptr atomic_load_explicit( std::shared_ptr const * p, memory_order /*mo*/ ) +template inline shared_ptr atomic_load_explicit( shared_ptr const * p, memory_order /*mo*/ ) { return atomic_load( p ); } -template void atomic_store( std::shared_ptr * p, std::shared_ptr r ) +template void atomic_store( shared_ptr * p, shared_ptr r ) { boost::detail::spinlock_pool<2>::scoped_lock lock( p ); p->swap( r ); } -template inline void atomic_store_explicit( std::shared_ptr * p, std::shared_ptr r, memory_order /*mo*/ ) +template inline void atomic_store_explicit( shared_ptr * p, shared_ptr r, memory_order /*mo*/ ) { atomic_store( p, r ); // std::move( r ) } -template std::shared_ptr atomic_exchange( std::shared_ptr * p, std::shared_ptr r ) +template shared_ptr atomic_exchange( shared_ptr * p, shared_ptr r ) { boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); @@ -982,12 +982,12 @@ template std::shared_ptr atomic_exchange( std::shared_ptr * p, st return r; // return std::move( r ) } -template std::shared_ptr atomic_exchange_explicit( std::shared_ptr * p, std::shared_ptr r, memory_order /*mo*/ ) +template shared_ptr atomic_exchange_explicit( shared_ptr * p, shared_ptr r, memory_order /*mo*/ ) { return atomic_exchange( p, r ); // std::move( r ) } -template bool atomic_compare_exchange( std::shared_ptr * p, std::shared_ptr * v, std::shared_ptr w ) +template bool atomic_compare_exchange( shared_ptr * p, shared_ptr * v, shared_ptr w ) { boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); @@ -1003,7 +1003,7 @@ template bool atomic_compare_exchange( std::shared_ptr * p, std::sha } else { - std::shared_ptr tmp( *p ); + shared_ptr tmp( *p ); sp.unlock(); @@ -1012,7 +1012,7 @@ template bool atomic_compare_exchange( std::shared_ptr * p, std::sha } } -template inline bool atomic_compare_exchange_explicit( std::shared_ptr * p, std::shared_ptr * v, std::shared_ptr w, memory_order /*success*/, memory_order /*failure*/ ) +template inline bool atomic_compare_exchange_explicit( shared_ptr * p, shared_ptr * v, shared_ptr w, memory_order /*success*/, memory_order /*failure*/ ) { return atomic_compare_exchange( p, v, w ); // std::move( w ) } @@ -1023,7 +1023,7 @@ template inline bool atomic_compare_exchange_explicit( std::shared_ptr< template< class T > struct hash; -template< class T > std::size_t hash_value( boost::std::shared_ptr const & p ) BOOST_NOEXCEPT +template< class T > std::size_t hash_value( boost::shared_ptr const & p ) BOOST_NOEXCEPT { return boost::hash< T* >()( p.get() ); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/weak_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/weak_ptr.hpp index e30124ad..e3e9ad9b 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/weak_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/smart_ptr/weak_ptr.hpp @@ -15,7 +15,7 @@ #include // boost.TR1 include order fix #include -#include +#include namespace boost { @@ -124,11 +124,11 @@ public: template #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) - weak_ptr( std::shared_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) + weak_ptr( shared_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) #else - weak_ptr( std::shared_ptr const & r ) + weak_ptr( shared_ptr const & r ) #endif BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) @@ -161,7 +161,7 @@ public: #endif template - weak_ptr & operator=( std::shared_ptr const & r ) BOOST_NOEXCEPT + weak_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT { boost::detail::sp_assert_convertible< Y, T >(); @@ -173,9 +173,9 @@ public: #endif - std::shared_ptr lock() const BOOST_NOEXCEPT + shared_ptr lock() const BOOST_NOEXCEPT { - return std::shared_ptr( *this, boost::detail::sp_nothrow_tag() ); + return shared_ptr( *this, boost::detail::sp_nothrow_tag() ); } long use_count() const BOOST_NOEXCEPT @@ -216,7 +216,7 @@ public: return pn < rhs.pn; } - template bool owner_before( std::shared_ptr const & rhs ) const BOOST_NOEXCEPT + template bool owner_before( shared_ptr const & rhs ) const BOOST_NOEXCEPT { return pn < rhs.pn; } @@ -229,7 +229,7 @@ public: private: template friend class weak_ptr; - template friend class std::shared_ptr; + template friend class shared_ptr; #endif diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp index b3e7b91f..3b25b3d2 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp @@ -147,7 +147,7 @@ struct grammar_definition typedef typename grammar_definition::type definition_t; typedef grammar_helper helper_t; - typedef boost::std::shared_ptr helper_ptr_t; + typedef boost::shared_ptr helper_ptr_t; typedef boost::weak_ptr helper_weak_ptr_t; grammar_helper* diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp index b5e832b0..822180a9 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp @@ -11,7 +11,7 @@ #define BOOST_SPIRIT_OBJECT_WITH_ID_IPP #include -#include +#include #ifdef BOOST_SPIRIT_THREADSAFE #include @@ -64,7 +64,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN static void mutex_init(); #endif - boost::std::shared_ptr > id_supply; + boost::shared_ptr > id_supply; }; ////////////////////////////////// @@ -141,7 +141,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN boost::mutex &mutex = mutex_instance(); boost::mutex::scoped_lock lock(mutex); #endif - static boost::std::shared_ptr > + static boost::shared_ptr > static_supply; if (!static_supply.get()) @@ -174,7 +174,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN ////////////////////////////////// #ifdef BOOST_SPIRIT_THREADSAFE template - inline void + inline void object_with_id_base::mutex_init() { mutex_instance(); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/dynamic/stored_rule.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/dynamic/stored_rule.hpp index 81bafd17..5661ef88 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/dynamic/stored_rule.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/dynamic/stored_rule.hpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include @@ -27,7 +27,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN // /////////////////////////////////////////////////////////////////////////// template < - typename T0 + typename T0 , typename T1 , typename T2 , bool EmbedByValue @@ -113,10 +113,10 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN private: #endif - stored_rule(std::shared_ptr const& ptr) + stored_rule(shared_ptr const& ptr) : ptr(ptr) {} - std::shared_ptr ptr; + shared_ptr ptr; }; /////////////////////////////////////////////////////////////////////////////// diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/file_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/file_iterator.hpp index 9ee354b8..5c20f15f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/file_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/file_iterator.hpp @@ -177,7 +177,7 @@ public: inline file_iterator& operator=(const base_t& iter); file_iterator make_end(void); - // operator bool. This borrows a trick from boost::std::shared_ptr to avoid + // operator bool. This borrows a trick from boost::shared_ptr to avoid // to interfere with arithmetic operations. bool operator_bool(void) const { return this->base(); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/impl/file_iterator.ipp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/impl/file_iterator.ipp index c9f41aa1..4227b696 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/impl/file_iterator.ipp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/iterator/impl/file_iterator.ipp @@ -17,7 +17,7 @@ #endif #include -#include +#include #ifdef BOOST_SPIRIT_FILEITERATOR_WINDOWS # include @@ -48,7 +48,7 @@ namespace fileiter_impl { // the base components on which the iterator is built (through the // iterator adaptor library). // -// The opened file stream (FILE) is held with a std::shared_ptr<>, whose +// The opened file stream (FILE) is held with a shared_ptr<>, whose // custom deleter invokes fcose(). This makes the syntax of the class // very easy, especially everything related to copying. // @@ -93,7 +93,7 @@ public: } // Nasty bug in Comeau up to 4.3.0.1, we need explicit boolean context - // for std::shared_ptr to evaluate correctly + // for shared_ptr to evaluate correctly operator bool() const { return m_file ? true : false; } @@ -140,7 +140,7 @@ public: } private: - boost::std::shared_ptr m_file; + boost::shared_ptr m_file; std::size_t m_pos; CharT m_curChar; bool m_eof; @@ -236,7 +236,7 @@ public: // a reference is hold by the filemap object). ::CloseHandle(hFile); - // Store the handles inside the std::shared_ptr (with the custom destructors) + // Store the handles inside the shared_ptr (with the custom destructors) m_mem.reset(static_cast(pMem), ::UnmapViewOfFile); // Start of the file @@ -256,7 +256,7 @@ public: } // Nasty bug in Comeau up to 4.3.0.1, we need explicit boolean context - // for std::shared_ptr to evaluate correctly + // for shared_ptr to evaluate correctly operator bool() const { return m_mem ? true : false; } @@ -291,7 +291,7 @@ private: typedef void handle_t; #endif - boost::std::shared_ptr m_mem; + boost::shared_ptr m_mem; std::size_t m_filesize; CharT* m_curChar; }; @@ -403,7 +403,7 @@ public: } // Nasty bug in Comeau up to 4.3.0.1, we need explicit boolean context - // for std::shared_ptr to evaluate correctly + // for shared_ptr to evaluate correctly operator bool() const { return m_mem ? true : false; } @@ -432,7 +432,7 @@ public: private: - boost::std::shared_ptr m_mem; + boost::shared_ptr m_mem; CharT const* m_curChar; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/chset.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/chset.hpp index 62b174cb..36354564 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/chset.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/chset.hpp @@ -10,7 +10,7 @@ #define BOOST_SPIRIT_CHSET_HPP /////////////////////////////////////////////////////////////////////////////// -#include +#include #include #include #include @@ -26,7 +26,7 @@ namespace utility { namespace impl { // template functions. And we don't want to put the whole algorithm // in the chset constructor in the class definition. template - void construct_chset(boost::std::shared_ptr >& ptr, + void construct_chset(boost::shared_ptr >& ptr, CharT2 const* definition); }} // namespace utility::impl @@ -84,7 +84,7 @@ public: private: - boost::std::shared_ptr > ptr; + boost::shared_ptr > ptr; }; /////////////////////////////////////////////////////////////////////////////// diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/impl/chset.ipp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/impl/chset.ipp index a8514a3b..30170351 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/impl/chset.ipp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/classic/utility/impl/chset.ipp @@ -27,16 +27,16 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN namespace utility { namespace impl { template inline void - detach(boost::std::shared_ptr >& ptr) + detach(boost::shared_ptr >& ptr) { if (!ptr.unique()) - ptr = boost::std::shared_ptr > + ptr = boost::shared_ptr > (new basic_chset(*ptr)); } template inline void - detach_clear(boost::std::shared_ptr >& ptr) + detach_clear(boost::shared_ptr >& ptr) { if (ptr.unique()) ptr->clear(); @@ -45,7 +45,7 @@ namespace utility { namespace impl { } template - void construct_chset(boost::std::shared_ptr >& ptr, + void construct_chset(boost::shared_ptr >& ptr, CharT2 const* definition) { CharT2 ch = *definition++; @@ -76,7 +76,7 @@ namespace utility { namespace impl { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) template - void chset_negated_set(boost::std::shared_ptr > &ptr, chlit const &ch, + void chset_negated_set(boost::shared_ptr > &ptr, chlit const &ch, FakeT) { if(ch.ch != (std::numeric_limits::min)()) { @@ -86,9 +86,9 @@ namespace utility { namespace impl { ptr->set(ch.ch + 1, (std::numeric_limits::max)()); } } - + template - void chset_negated_set(boost::std::shared_ptr > &ptr, + void chset_negated_set(boost::shared_ptr > &ptr, spirit::range const &rng, FakeT) { if(rng.first != (std::numeric_limits::min)()) { @@ -255,7 +255,7 @@ inline void chset::set(negated_char_parser > const& arg_) { utility::impl::detach(ptr); - + if(arg_.positive.ch != (std::numeric_limits::min)()) { ptr->set((std::numeric_limits::min)(), arg_.positive.ch - 1); } @@ -269,7 +269,7 @@ inline void chset::set(negated_char_parser > const& arg_) { utility::impl::detach(ptr); - + if(arg_.positive.first != (std::numeric_limits::min)()) { ptr->set((std::numeric_limits::min)(), arg_.positive.first - 1); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/karma/string/symbols.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/karma/string/symbols.hpp index 550154e1..185a280a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/karma/string/symbols.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/karma/string/symbols.hpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -451,7 +451,7 @@ namespace boost { namespace spirit { namespace karma adder add; remover remove; - std::shared_ptr lookup; + shared_ptr lookup; std::string name_; }; @@ -710,7 +710,7 @@ namespace boost { namespace spirit { namespace karma adder add; remover remove; - std::shared_ptr lookup; + shared_ptr lookup; std::string name_; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/phoenix/operator/member.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/phoenix/operator/member.hpp index df5d106c..27f3e8d1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/phoenix/operator/member.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/phoenix/operator/member.hpp @@ -2,7 +2,7 @@ Copyright (c) 2005-2007 Dan Marsden Copyright (c) 2005-2007 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ @@ -33,8 +33,8 @@ #include -namespace boost { - template class std::shared_ptr; +namespace boost { + template class shared_ptr; template class scoped_ptr; namespace phoenix { @@ -42,7 +42,7 @@ namespace phoenix { { template struct member_type; - + template struct member_type { @@ -52,7 +52,7 @@ namespace phoenix { namespace meta { - template + template struct pointed_type; template @@ -62,11 +62,11 @@ namespace phoenix { }; template - struct pointed_type > + struct pointed_type > { typedef T type; }; - + template struct pointed_type > { @@ -116,7 +116,7 @@ namespace phoenix { member_object_eval, actor, typename as_actor::type>::type> >::type operator->*( - const actor& ptrActor, + const actor& ptrActor, MemObjPtr memObjPtr) { return compose( diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/qi/string/symbols.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/qi/string/symbols.hpp index b4f9bb1b..a9656f18 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/qi/string/symbols.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/home/qi/string/symbols.hpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #if defined(BOOST_MSVC) # pragma warning(push) @@ -373,7 +373,7 @@ public: adder add; remover remove; - std::shared_ptr lookup; + shared_ptr lookup; std::string name_; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/repository/home/qi/operator/detail/keywords.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/repository/home/qi/operator/detail/keywords.hpp index 0beb3871..06836f77 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/repository/home/qi/operator/detail/keywords.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/spirit/repository/home/qi/operator/detail/keywords.hpp @@ -15,10 +15,10 @@ #include namespace boost { namespace spirit { namespace repository { namespace qi { namespace detail { // Variant visitor class which handles dispatching the parsing to the selected parser - // This also handles passing the correct attributes and flags/counters to the subject parsers + // This also handles passing the correct attributes and flags/counters to the subject parsers template struct is_distinct : T::distinct { }; - + template struct is_distinct< spirit::qi::action > : T::distinct { }; @@ -38,22 +38,22 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names typedef Skipper skipper_type; typedef Elements elements_type; - typedef typename add_reference::type attr_reference; + typedef typename add_reference::type attr_reference; public: parse_dispatcher(const Elements &elements,Iterator& first, Iterator const& last , Context& context, Skipper const& skipper - , Flags &flags, Counters &counters, attr_reference attr) : + , Flags &flags, Counters &counters, attr_reference attr) : elements(elements), first(first), last(last) , context(context), skipper(skipper) , flags(flags),counters(counters), attr(attr) {} - + template bool operator()(T& idx) const - { + { return call(idx,typename traits::not_is_unused::type()); } - - template + + template bool call_subject_unused( Subject const &subject, Iterator &first, Iterator const &last , Context& context, Skipper const& skipper @@ -62,25 +62,25 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names Iterator save = first; skipper_keyword_marker marked_skipper(skipper,flags[Index::value],counters[Index::value]); - + if(subject.parse(first,last,context,marked_skipper,unused)) { return true; } save = save; return false; - } - - - template + } + + + template bool call_subject( Subject const &subject, Iterator &first, Iterator const &last , Context& context, Skipper const& skipper , Index& idx ) const { - + Iterator save = first; - skipper_keyword_marker + skipper_keyword_marker marked_skipper(skipper,flags[Index::value],counters[Index::value]); if(subject.parse(first,last,context,marked_skipper,fusion::at_c(attr))) { @@ -91,8 +91,8 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names } // Handle unused attributes - template bool call(T &idx, mpl::false_) const{ - + template bool call(T &idx, mpl::false_) const{ + typedef typename mpl::at::type ElementType; if( (!is_distinct::value) @@ -114,7 +114,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names } return false; } - + const Elements &elements; Iterator &first; const Iterator &last; @@ -132,7 +132,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names typedef typename spirit::detail::as_variant< IndexList >::type parser_index_type; - + /////////////////////////////////////////////////////////////////////////// // build_char_type_sequence // @@ -351,7 +351,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names { typedef int result_type; - keyword_entry_adder(std::shared_ptr lookup,FlagsType &flags, Elements &elements) : + keyword_entry_adder(shared_ptr lookup,FlagsType &flags, Elements &elements) : lookup(lookup) ,flags(flags) ,elements(elements) @@ -421,7 +421,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names - std::shared_ptr lookup; + shared_ptr lookup; FlagsType & flags; Elements &elements; }; @@ -443,7 +443,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names { if(parser_index_type* val_ptr = lookup->find(first,last,first_pass_filter_type())) - { + { if(!apply_visitor(parse_visitor,*val_ptr)){ return false; } @@ -481,7 +481,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi { names } return false; } - std::shared_ptr lookup; + shared_ptr lookup; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/statechart/processor_container.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/statechart/processor_container.hpp index 2b914958..797e2f8f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/statechart/processor_container.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/statechart/processor_container.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include // BOOST_INTEL @@ -65,7 +65,7 @@ class processor_container : noncopyable { typedef event_processor< Scheduler > processor_base_type; typedef std::auto_ptr< processor_base_type > processor_holder_type; - typedef std::shared_ptr< processor_holder_type > processor_holder_ptr_type; + typedef shared_ptr< processor_holder_type > processor_holder_ptr_type; public: ////////////////////////////////////////////////////////////////////////// @@ -426,8 +426,8 @@ class processor_container : noncopyable } } - typedef std::set< - processor_holder_ptr_type, + typedef std::set< + processor_holder_ptr_type, std::less< processor_holder_ptr_type >, typename boost::detail::allocator::rebind_to< Allocator, processor_holder_ptr_type >::type diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/parameterized_test.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/parameterized_test.hpp index 22b7452d..930dc81a 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/parameterized_test.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/parameterized_test.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2001-2008. // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -73,7 +73,7 @@ template class param_test_case_generator : public test_unit_generator { public: param_test_case_generator( callback1 const& test_func, - const_string tc_name, + const_string tc_name, ParamIter par_begin, ParamIter par_end ) : m_test_func( test_func ) @@ -110,13 +110,13 @@ struct user_param_tc_method_invoker { typedef void (UserTestCase::*test_method)( ParamType ); // Constructor - user_param_tc_method_invoker( std::shared_ptr inst, test_method test_method ) + user_param_tc_method_invoker( shared_ptr inst, test_method test_method ) : m_inst( inst ), m_test_method( test_method ) {} void operator()( ParamType p ) { ((*m_inst).*m_test_method)( p ); } // Data members - std::shared_ptr m_inst; + shared_ptr m_inst; test_method m_test_method; }; @@ -127,7 +127,7 @@ struct user_param_tc_method_invoker { template inline ut_detail::param_test_case_generator make_test_case( callback1 const& test_func, - const_string tc_name, + const_string tc_name, ParamIter par_begin, ParamIter par_end ) { @@ -140,7 +140,7 @@ template inline ut_detail::param_test_case_generator< BOOST_DEDUCED_TYPENAME remove_const::type>::type,ParamIter> make_test_case( void (*test_func)( ParamType ), - const_string tc_name, + const_string tc_name, ParamIter par_begin, ParamIter par_end ) { @@ -155,13 +155,13 @@ inline ut_detail::param_test_case_generator< BOOST_DEDUCED_TYPENAME remove_const::type>::type,ParamIter> make_test_case( void (UserTestCase::*test_method )( ParamType ), const_string tc_name, - boost::std::shared_ptr const& user_test_case, + boost::shared_ptr const& user_test_case, ParamIter par_begin, ParamIter par_end ) { typedef BOOST_DEDUCED_TYPENAME remove_const::type>::type param_value_type; - return ut_detail::param_test_case_generator( - ut_detail::user_param_tc_method_invoker( user_test_case, test_method ), + return ut_detail::param_test_case_generator( + ut_detail::user_param_tc_method_invoker( user_test_case, test_method ), tc_name, par_begin, par_end ); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/predicate_result.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/predicate_result.hpp index 773024e8..16ae4882 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/predicate_result.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/predicate_result.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2001-2008. // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -21,7 +21,7 @@ #include // Boost -#include +#include #include // STL @@ -46,7 +46,7 @@ class BOOST_TEST_DECL predicate_result { public: // Constructor - predicate_result( bool pv_ ) + predicate_result( bool pv_ ) : p_predicate_value( pv_ ) {} @@ -74,7 +74,7 @@ public: private: // Data members - std::shared_ptr m_message; + shared_ptr m_message; }; } // namespace test_tools diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/unit_test_suite_impl.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/unit_test_suite_impl.hpp index 478524a5..993e0560 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/unit_test_suite_impl.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/unit_test_suite_impl.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2001-2008. // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -25,7 +25,7 @@ #include // Boost -#include +#include #include #include #include @@ -70,7 +70,7 @@ public: // Public r/w properties readwrite_property p_name; // name for this test unit - readwrite_property p_timeout; // timeout for the test unit execution + readwrite_property p_timeout; // timeout for the test unit execution readwrite_property p_expected_failures; // number of expected failures in this test unit mutable readwrite_property p_enabled; // enabled status for this unit @@ -140,7 +140,7 @@ public: std::size_t size() const { return m_members.size(); } protected: - friend BOOST_TEST_DECL + friend BOOST_TEST_DECL void traverse_test_tree( test_suite const&, test_tree_visitor& ); friend class framework_impl; virtual ~test_suite() {} @@ -159,8 +159,8 @@ public: , argc( 0 ) , argv( 0 ) {} - - // Data members + + // Data members int argc; char** argv; }; @@ -236,12 +236,12 @@ template struct user_tc_method_invoker { typedef void (UserTestCase::*TestMethod )(); - user_tc_method_invoker( std::shared_ptr inst, TestMethod test_method ) + user_tc_method_invoker( shared_ptr inst, TestMethod test_method ) : m_inst( inst ), m_test_method( test_method ) {} void operator()() { ((*m_inst).*m_test_method)(); } - std::shared_ptr m_inst; + shared_ptr m_inst; TestMethod m_test_method; }; @@ -261,9 +261,9 @@ template inline test_case* make_test_case( void (UserTestCase::* test_method )(), const_string tc_name, - boost::std::shared_ptr user_test_case ) + boost::shared_ptr user_test_case ) { - return new test_case( ut_detail::normalize_test_case_name( tc_name ), + return new test_case( ut_detail::normalize_test_case_name( tc_name ), ut_detail::user_tc_method_invoker( user_test_case, test_method ) ); } @@ -299,10 +299,10 @@ struct auto_tc_exp_fail { instance() = this; } - static auto_tc_exp_fail*& instance() + static auto_tc_exp_fail*& instance() { - static auto_tc_exp_fail inst; - static auto_tc_exp_fail* inst_ptr = &inst; + static auto_tc_exp_fail inst; + static auto_tc_exp_fail* inst_ptr = &inst; return inst_ptr; } @@ -322,30 +322,30 @@ private: // ************** global_fixture ************** // // ************************************************************************** // -class BOOST_TEST_DECL global_fixture : public test_observer { -public: +class BOOST_TEST_DECL global_fixture : public test_observer { +public: // Constructor global_fixture(); -}; +}; //____________________________________________________________________________// namespace ut_detail { -template +template struct global_fixture_impl : public global_fixture { // Constructor global_fixture_impl(): m_fixure( 0 ) {} // test observer interface virtual void test_start( counter_t ) { m_fixure = new F; } - virtual void test_finish() { delete m_fixure; m_fixure = 0; } - virtual void test_aborted() { delete m_fixure; m_fixure = 0; } + virtual void test_finish() { delete m_fixure; m_fixure = 0; } + virtual void test_aborted() { delete m_fixure; m_fixure = 0; } private: // Data members F* m_fixure; -}; +}; // ************************************************************************** // // ************** test_case_template_invoker ************** // @@ -379,7 +379,7 @@ struct generate_test_case_4_type { full_name += " const"; full_name += '>'; - m_holder.m_test_cases.push_back( + m_holder.m_test_cases.push_back( new test_case( full_name, test_case_template_invoker() ) ); } @@ -409,7 +409,7 @@ public: { if( m_test_cases.empty() ) return 0; - + test_unit* res = m_test_cases.front(); m_test_cases.pop_front(); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/callback.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/callback.hpp index f4241225..bd7d3e12 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/callback.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/callback.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. -// Use, modification, and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -9,7 +9,7 @@ // // Version : $Revision: 49312 $ // -// Description : +// Description : // *************************************************************************** #ifndef BOOST_TEST_CALLBACK_020505GER @@ -18,7 +18,7 @@ // Boost #include #include -#include +#include #include @@ -109,7 +109,7 @@ public: template callback0( Functor f ) : m_impl( new ut_detail::callback0_impl_t( f ) ) {} - + void operator=( callback0 const& rhs ) { m_impl = rhs.m_impl; } template @@ -121,7 +121,7 @@ public: private: // Data members - boost::std::shared_ptr > m_impl; + boost::shared_ptr > m_impl; }; // ************************************************************************** // @@ -179,7 +179,7 @@ public: private: // Data members - boost::std::shared_ptr > m_impl; + boost::shared_ptr > m_impl; }; // ************************************************************************** // @@ -236,7 +236,7 @@ public: private: // Data members - boost::std::shared_ptr > m_impl; + boost::shared_ptr > m_impl; }; // ************************************************************************** // @@ -294,7 +294,7 @@ public: private: // Data members - boost::std::shared_ptr > m_impl; + boost::shared_ptr > m_impl; }; } // namespace unit_test diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/basic_parameter.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/basic_parameter.hpp index c98027cd..e7e084cd 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/basic_parameter.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/basic_parameter.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. -// Use, modification, and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -40,7 +40,7 @@ template class basic_parameter : private base_from_member, public typed_parameter { public: // Constructors - explicit basic_parameter( cstring n ) + explicit basic_parameter( cstring n ) : base_from_member() , typed_parameter( base_from_member::member ) { @@ -61,16 +61,16 @@ public: #define BOOST_RT_CLA_NAMED_PARAM_GENERATORS( param_type ) \ template \ -inline std::shared_ptr > \ +inline shared_ptr > \ param_type( cstring name = cstring() ) \ { \ - return std::shared_ptr >( new param_type ## _t( name ) ); \ + return shared_ptr >( new param_type ## _t( name ) ); \ } \ \ -inline std::shared_ptr > \ +inline shared_ptr > \ param_type( cstring name = cstring() ) \ { \ - return std::shared_ptr >( new param_type ## _t( name ) ); \ + return shared_ptr >( new param_type ## _t( name ) ); \ } \ /**/ diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/char_parameter.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/char_parameter.hpp index ac686e06..3e9b2d84 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/char_parameter.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/char_parameter.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. -// Use, modification, and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -66,18 +66,18 @@ public: //____________________________________________________________________________// template -inline std::shared_ptr > +inline shared_ptr > char_parameter( char_type name ) { - return std::shared_ptr >( new char_parameter_t( name ) ); + return shared_ptr >( new char_parameter_t( name ) ); } //____________________________________________________________________________// -inline std::shared_ptr > +inline shared_ptr > char_parameter( char_type name ) { - return std::shared_ptr >( new char_parameter_t( name ) ); + return shared_ptr >( new char_parameter_t( name ) ); } //____________________________________________________________________________// diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/fwd.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/fwd.hpp index 9a351bd0..66d6efc1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/fwd.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/fwd.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. -// Use, modification, and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -19,7 +19,7 @@ #include // Boost -#include +#include namespace boost { @@ -29,9 +29,9 @@ namespace cla { class parser; class parameter; -typedef std::shared_ptr parameter_ptr; +typedef shared_ptr parameter_ptr; class naming_policy; -typedef std::shared_ptr naming_policy_ptr; +typedef shared_ptr naming_policy_ptr; class argv_traverser; namespace rt_cla_detail { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parameter.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parameter.hpp index 46a6aebf..753268a9 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parameter.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parameter.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. -// Use, modification, and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -88,12 +88,12 @@ public: bool conflict_with( parameter const& p ) const { return (id_2_report() == p.id_2_report() && !id_2_report().is_empty()) || - m_id_policy.conflict_with( p.m_id_policy ) || + m_id_policy.conflict_with( p.m_id_policy ) || ((m_id_policy.p_type_id != p.m_id_policy.p_type_id) && p.m_id_policy.conflict_with( m_id_policy )); } cstring id_2_report() const { return m_id_policy.id_2_report(); } void usage_info( format_stream& fs ) const - { + { m_id_policy.usage_info( fs ); if( p_optional_value ) fs << BOOST_RT_PARAM_LITERAL( '[' ); @@ -131,8 +131,8 @@ private: //____________________________________________________________________________// template -inline std::shared_ptr -operator-( std::shared_ptr p, Modifier const& m ) +inline shared_ptr +operator-( shared_ptr p, Modifier const& m ) { p->accept_modifier( m ); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parser.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parser.hpp index a37e7877..5c3c341d 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parser.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/cla/parser.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. -// Use, modification, and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -52,7 +52,7 @@ public: template global_mod_parser const& - operator<<( std::shared_ptr param ) const + operator<<( shared_ptr param ) const { param->accept_modifier( m_modifiers ); @@ -103,7 +103,7 @@ public: // arguments access const_argument_ptr operator[]( cstring string_id ) const; - cstring get( cstring string_id ) const; + cstring get( cstring string_id ) const; template T const& get( cstring string_id ) const diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/file/config_file_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/file/config_file_iterator.hpp index 8cfe4880..85467f66 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/file/config_file_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/file/config_file_iterator.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. -// Use, modification, and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// Use, modification, and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -26,7 +26,7 @@ #include // Boost -#include +#include namespace boost { @@ -34,7 +34,7 @@ namespace BOOST_RT_PARAM_NAMESPACE { namespace file { -// Public typedef +// Public typedef typedef std::pair location; // ************************************************************************** // @@ -154,7 +154,7 @@ private: // Data members struct Impl; - std::shared_ptr m_pimpl; + shared_ptr m_pimpl; }; } // namespace file diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/fwd.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/fwd.hpp index a4f1a77a..8d298d72 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/fwd.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/fwd.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -19,7 +19,7 @@ #include // Boost -#include +#include namespace boost { @@ -28,8 +28,8 @@ namespace BOOST_RT_PARAM_NAMESPACE { class parameter; class argument; -typedef std::shared_ptr argument_ptr; -typedef std::shared_ptr const_argument_ptr; +typedef shared_ptr argument_ptr; +typedef shared_ptr const_argument_ptr; template class value_interpreter; template class typed_argument; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/validation.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/validation.hpp index 2a3f1d02..ff8e4691 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/validation.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/test/utils/runtime/validation.hpp @@ -1,6 +1,6 @@ // (C) Copyright Gennadiy Rozental 2005-2008. // Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. @@ -22,7 +22,7 @@ #include // Boost -#include +#include // STL #ifdef BOOST_RT_PARAM_EXCEPTION_INHERIT_STD @@ -37,14 +37,14 @@ namespace BOOST_RT_PARAM_NAMESPACE { // ************** runtime::logic_error ************** // // ************************************************************************** // -class logic_error +class logic_error #ifdef BOOST_RT_PARAM_EXCEPTION_INHERIT_STD : public std::exception #endif { - typedef std::shared_ptr dstring_ptr; + typedef shared_ptr dstring_ptr; public: - // Constructor // !! could we eliminate std::shared_ptr + // Constructor // !! could we eliminate shared_ptr explicit logic_error( cstring msg ) : m_msg( new dstring( msg.begin(), msg.size() ) ) {} ~logic_error() throw() {} diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/future.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/future.hpp index c818c945..de23fda4 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/future.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/future.hpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -236,9 +236,9 @@ namespace boost bool thread_was_interrupted; //#endif #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION - std::shared_ptr continuation_ptr; + shared_ptr continuation_ptr; #else - std::shared_ptr continuation_ptr; + shared_ptr continuation_ptr; #endif future_object_base(): done(false), @@ -998,11 +998,11 @@ namespace boost struct registered_waiter { - boost::std::shared_ptr future_; + boost::shared_ptr future_; detail::future_object_base::waiter_list::iterator wait_iterator; count_type index; - registered_waiter(boost::std::shared_ptr const& a_future, + registered_waiter(boost::shared_ptr const& a_future, detail::future_object_base::waiter_list::iterator wait_iterator_, count_type index_): future_(a_future),wait_iterator(wait_iterator_),index(index_) @@ -1236,7 +1236,7 @@ namespace boost { protected: - typedef boost::std::shared_ptr > future_ptr; + typedef boost::shared_ptr > future_ptr; future_ptr future_; @@ -1566,7 +1566,7 @@ namespace boost template class promise { - typedef boost::std::shared_ptr > future_ptr; + typedef boost::shared_ptr > future_ptr; future_ptr future_; bool future_obtained; @@ -1729,7 +1729,7 @@ namespace boost template class promise { - typedef boost::std::shared_ptr > future_ptr; + typedef boost::shared_ptr > future_ptr; future_ptr future_; bool future_obtained; @@ -1871,7 +1871,7 @@ namespace boost template <> class promise { - typedef boost::std::shared_ptr > future_ptr; + typedef boost::shared_ptr > future_ptr; future_ptr future_; bool future_obtained; @@ -1927,7 +1927,7 @@ namespace boost promise(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT : future_(BOOST_THREAD_RV(rhs).future_),future_obtained(BOOST_THREAD_RV(rhs).future_obtained) { - // we need to release the future as std::shared_ptr doesn't implements move semantics + // we need to release the future as shared_ptr doesn't implements move semantics BOOST_THREAD_RV(rhs).future_.reset(); BOOST_THREAD_RV(rhs).future_obtained=false; } @@ -2461,21 +2461,21 @@ namespace boost template class packaged_task { - typedef boost::std::shared_ptr > task_ptr; - boost::std::shared_ptr > task; + typedef boost::shared_ptr > task_ptr; + boost::shared_ptr > task; #else template class packaged_task { - typedef boost::std::shared_ptr > task_ptr; - boost::std::shared_ptr > task; + typedef boost::shared_ptr > task_ptr; + boost::shared_ptr > task; #endif #else template class packaged_task { - typedef boost::std::shared_ptr > task_ptr; - boost::std::shared_ptr > task; + typedef boost::shared_ptr > task_ptr; + boost::shared_ptr > task; #endif bool future_obtained; struct dummy; @@ -2806,7 +2806,7 @@ namespace boost BOOST_THREAD_FUTURE make_future_deferred_object(BOOST_THREAD_FWD_REF(Fp) f) { - std::shared_ptr > + shared_ptr > h(new future_deferred_object(boost::forward(f))); return BOOST_THREAD_FUTURE(h); } @@ -2818,7 +2818,7 @@ namespace boost BOOST_THREAD_FUTURE make_future_async_object(BOOST_THREAD_FWD_REF(Fp) f) { - std::shared_ptr > + shared_ptr > h(new future_async_object(boost::forward(f))); return BOOST_THREAD_FUTURE(h); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/pthread/thread_data.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/pthread/thread_data.hpp index 18dacc0f..5c3b4f02 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/pthread/thread_data.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/pthread/thread_data.hpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include #include @@ -87,17 +87,17 @@ namespace boost struct thread_exit_callback_node; struct tss_data_node { - boost::std::shared_ptr func; + boost::shared_ptr func; void* value; - tss_data_node(boost::std::shared_ptr func_, + tss_data_node(boost::shared_ptr func_, void* value_): func(func_),value(value_) {} }; struct thread_data_base; - typedef boost::std::shared_ptr thread_data_ptr; + typedef boost::shared_ptr thread_data_ptr; struct BOOST_THREAD_DECL thread_data_base: enable_shared_from_this @@ -121,7 +121,7 @@ namespace boost > notify_list_t; notify_list_t notify; - typedef std::vector > async_states_t; + typedef std::vector > async_states_t; async_states_t async_states_; //#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS @@ -152,7 +152,7 @@ namespace boost notify.push_back(std::pair(cv, m)); } - void make_ready_at_thread_exit(std::shared_ptr as) + void make_ready_at_thread_exit(shared_ptr as) { async_states_.push_back(as); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/tss.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/tss.hpp index e5d518fd..c920024b 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/tss.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/thread/tss.hpp @@ -6,7 +6,7 @@ // (C) Copyright 2007-8 Anthony Williams #include -#include +#include #include #include @@ -19,11 +19,11 @@ namespace boost { virtual ~tss_cleanup_function() {} - + virtual void operator()(void* data)=0; }; - - BOOST_THREAD_DECL void set_tss_data(void const* key,boost::std::shared_ptr func,void* tss_data,bool cleanup_existing); + + BOOST_THREAD_DECL void set_tss_data(void const* key,boost::shared_ptr func,void* tss_data,bool cleanup_existing); BOOST_THREAD_DECL void* get_tss_data(void const* key); } @@ -42,16 +42,16 @@ namespace boost delete static_cast(data); } }; - + struct run_custom_cleanup_function: detail::tss_cleanup_function { void (*cleanup_function)(T*); - + explicit run_custom_cleanup_function(void (*cleanup_function_)(T*)): cleanup_function(cleanup_function_) {} - + void operator()(void* data) { cleanup_function(static_cast(data)); @@ -59,11 +59,11 @@ namespace boost }; - boost::std::shared_ptr cleanup; - + boost::shared_ptr cleanup; + public: typedef T element_type; - + thread_specific_ptr(): cleanup(detail::heap_new(),detail::do_heap_delete()) {} @@ -76,7 +76,7 @@ namespace boost } ~thread_specific_ptr() { - detail::set_tss_data(this,boost::std::shared_ptr(),0,true); + detail::set_tss_data(this,boost::shared_ptr(),0,true); } T* get() const @@ -94,7 +94,7 @@ namespace boost T* release() { T* const temp=get(); - detail::set_tss_data(this,boost::std::shared_ptr(),0,false); + detail::set_tss_data(this,boost::shared_ptr(),0,false); return temp; } void reset(T* new_value=0) diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/tr1/memory.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/tr1/memory.hpp index 8b50bba3..16908774 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/tr1/memory.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/tr1/memory.hpp @@ -12,23 +12,23 @@ #ifndef BOOST_HAS_TR1_SHARED_PTR // -// This header can get included by boost/std::shared_ptr.hpp which leads +// This header can get included by boost/shared_ptr.hpp which leads // to cyclic dependencies, the workaround is to forward declare all // the boost components, and then include the actual headers afterwards. // This is fragile, but seems to work, and doesn't require modification -// of boost/std::shared_ptr.hpp. +// of boost/shared_ptr.hpp. // namespace boost{ class bad_weak_ptr; template class weak_ptr; -template class std::shared_ptr; +template class shared_ptr; template void swap(weak_ptr & a, weak_ptr & b) BOOST_NOEXCEPT; -template void swap(std::shared_ptr & a, std::shared_ptr & b) BOOST_NOEXCEPT; -template std::shared_ptr static_pointer_cast(std::shared_ptr const & r) BOOST_NOEXCEPT; -template std::shared_ptr dynamic_pointer_cast(std::shared_ptr const & r) BOOST_NOEXCEPT; -template std::shared_ptr const_pointer_cast(std::shared_ptr const & r) BOOST_NOEXCEPT; -template D * get_deleter(std::shared_ptr const & p) BOOST_NOEXCEPT; +template void swap(shared_ptr & a, shared_ptr & b) BOOST_NOEXCEPT; +template shared_ptr static_pointer_cast(shared_ptr const & r) BOOST_NOEXCEPT; +template shared_ptr dynamic_pointer_cast(shared_ptr const & r) BOOST_NOEXCEPT; +template shared_ptr const_pointer_cast(shared_ptr const & r) BOOST_NOEXCEPT; +template D * get_deleter(shared_ptr const & p) BOOST_NOEXCEPT; template class enable_shared_from_this; namespace detail{ @@ -41,7 +41,7 @@ class weak_count; namespace std{ namespace tr1{ using ::boost::bad_weak_ptr; - using ::boost::std::shared_ptr; + using ::boost::shared_ptr; #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582) using ::boost::swap; #endif @@ -53,7 +53,7 @@ namespace std{ namespace tr1{ using ::boost::enable_shared_from_this; } } -#include +#include #include #include diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/uuid/random_generator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/uuid/random_generator.hpp index 82fa2e23..0f4a0ab6 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/uuid/random_generator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/uuid/random_generator.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include namespace boost { @@ -34,7 +34,7 @@ private: public: typedef uuid result_type; - + // default constructor creates the random number generator basic_random_generator() : pURNG(new UniformRandomNumberGenerator) @@ -49,7 +49,7 @@ public: // seed the random number generator detail::seed(*pURNG); } - + // keep a reference to a random number generator // don't seed a given random number generator explicit basic_random_generator(UniformRandomNumberGenerator& gen) @@ -62,7 +62,7 @@ public: ) ) {} - + // keep a pointer to a random number generator // don't seed a given random number generator explicit basic_random_generator(UniformRandomNumberGenerator* pGen) @@ -77,11 +77,11 @@ public: { BOOST_ASSERT(pURNG); } - + uuid operator()() { uuid u; - + int i=0; unsigned long random_value = generator(); for (uuid::iterator it=u.begin(); it!=u.end(); ++it, ++i) { @@ -108,7 +108,7 @@ public: } private: - std::shared_ptr pURNG; + shared_ptr pURNG; generator_type generator; }; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/cpp_context.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/cpp_context.hpp index 9d67f4f5..50c1d1ce 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/cpp_context.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/cpp_context.hpp @@ -1,7 +1,7 @@ /*============================================================================= Boost.Wave: A Standard compliant C++ preprocessor library Definition of the preprocessor context - + http://www.boost.org/ Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost @@ -52,10 +52,10 @@ namespace boost { namespace wave { /////////////////////////////////////////////////////////////////////////////// -// +// // The C/C++ preprocessor context template class // -// The boost::wave::context template is the main interface class to +// The boost::wave::context template is the main interface class to // control the behavior of the preprocessing engine. // // The following template parameters has to be supplied: @@ -63,18 +63,18 @@ namespace wave { // IteratorT The iterator type of the underlying input stream // LexIteratorT The lexer iterator type to use as the token factory // InputPolicyT The input policy type to use for loading the files -// to be included. This template parameter is optional and -// defaults to the +// to be included. This template parameter is optional and +// defaults to the // iteration_context_policies::load_file_to_string // type. -// HooksT The hooks policy to use for different notification +// HooksT The hooks policy to use for different notification // callbacks. This template parameter is optional and // defaults to the // context_policies::default_preprocessing_hooks // type. // DerivedT The type of the type being derived from the context // type (if any). This template parameter is optional and -// defaults to 'this_type', which means that the context +// defaults to 'this_type', which means that the context // type will be used assuming no derived type exists. // /////////////////////////////////////////////////////////////////////////////// @@ -83,7 +83,7 @@ struct this_type {}; template < typename IteratorT, - typename LexIteratorT, + typename LexIteratorT, typename InputPolicyT = iteration_context_policies::load_file_to_string, typename HooksT = context_policies::eat_whitespace, typename DerivedT = this_type @@ -113,35 +113,35 @@ public: typedef typename token_type::position_type position_type; // type of a token sequence - typedef std::list > + typedef std::list > token_sequence_type; // type of the policies typedef HooksT hook_policy_type; private: -// stack of std::shared_ptr's to the pending iteration contexts - typedef boost::std::shared_ptr > +// stack of shared_ptr's to the pending iteration contexts + typedef boost::shared_ptr > iteration_ptr_type; - typedef boost::wave::util::iteration_context_stack + typedef boost::wave::util::iteration_context_stack iteration_context_stack_type; typedef typename iteration_context_stack_type::size_type iter_size_type; context *this_() { return this; } // avoid warning in constructor public: - context(target_iterator_type const &first_, target_iterator_type const &last_, + context(target_iterator_type const &first_, target_iterator_type const &last_, char const *fname = "", HooksT const &hooks_ = HooksT()) : first(first_), last(last_), filename(fname) , has_been_initialized(false) #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0 , current_filename(fname) -#endif +#endif , current_relative_filename(fname) , macros(*this_()) , language(language_support( - support_cpp - | support_option_convert_trigraphs - | support_option_emit_line_directives + support_cpp + | support_option_convert_trigraphs + | support_option_emit_line_directives #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0 | support_option_include_guard_detection #endif @@ -160,29 +160,29 @@ public: // default destructor // iterator interface - iterator_type begin() - { + iterator_type begin() + { std::string fname(filename); if (filename != "" && filename != "") { using namespace boost::filesystem; path fpath(util::complete_path(path(filename))); fname = fpath.string(); } - return iterator_type(*this, first, last, position_type(fname.c_str())); + return iterator_type(*this, first, last, position_type(fname.c_str())); } iterator_type begin( - target_iterator_type const &first_, - target_iterator_type const &last_) - { + target_iterator_type const &first_, + target_iterator_type const &last_) + { std::string fname(filename); if (filename != "" && filename != "") { using namespace boost::filesystem; path fpath(util::complete_path(path(filename))); fname = fpath.string(); } - return iterator_type(*this, first_, last_, position_type(fname.c_str())); + return iterator_type(*this, first_, last_, position_type(fname.c_str())); } - iterator_type end() const + iterator_type end() const { return iterator_type(); } // maintain include paths @@ -191,46 +191,46 @@ public: bool add_sysinclude_path(char const *path_) { return includes.add_include_path(path_, true);} void set_sysinclude_delimiter() { includes.set_sys_include_delimiter(); } - typename iteration_context_stack_type::size_type get_iteration_depth() const + typename iteration_context_stack_type::size_type get_iteration_depth() const { return iter_ctxs.size(); } // maintain defined macros #if BOOST_WAVE_ENABLE_COMMANDLINE_MACROS != 0 template bool add_macro_definition(StringT macrostring, bool is_predefined = false) - { - return boost::wave::util::add_macro_definition(*this, - util::to_string(macrostring), is_predefined, - get_language()); + { + return boost::wave::util::add_macro_definition(*this, + util::to_string(macrostring), is_predefined, + get_language()); } -#endif +#endif // Define and undefine macros, macro introspection template - bool add_macro_definition(StringT const &name, position_type const& pos, - bool has_params, std::vector ¶meters, + bool add_macro_definition(StringT const &name, position_type const& pos, + bool has_params, std::vector ¶meters, token_sequence_type &definition, bool is_predefined = false) - { + { return macros.add_macro( - token_type(T_IDENTIFIER, util::to_string(name), pos), - has_params, parameters, definition, is_predefined); + token_type(T_IDENTIFIER, util::to_string(name), pos), + has_params, parameters, definition, is_predefined); } template bool is_defined_macro(StringT const &str) const - { - return macros.is_defined(util::to_string(str)); + { + return macros.is_defined(util::to_string(str)); } template - bool get_macro_definition(StringT const &name, + bool get_macro_definition(StringT const &name, bool &has_params, bool &is_predefined, position_type &pos, - std::vector ¶meters, + std::vector ¶meters, token_sequence_type &definition) const - { - return macros.get_macro(util::to_string(name), - has_params, is_predefined, pos, parameters, definition); + { + return macros.get_macro(util::to_string(name), + has_params, is_predefined, pos, parameters, definition); } template bool remove_macro_definition(StringT const& undefname, bool even_predefined = false) - { + { // strip leading and trailing whitespace string_type name = util::to_string(undefname); typename string_type::size_type pos = name.find_first_not_of(" \t"); @@ -244,9 +244,9 @@ public: includes.remove_pragma_once_header( util::to_string(name)); #endif - return macros.remove_macro(name, macros.get_main_pos(), even_predefined); + return macros.remove_macro(name, macros.get_main_pos(), even_predefined); } - void reset_macro_definitions() + void reset_macro_definitions() { macros.reset_macromap(); macros.init_predefined_macros(); } // Iterate over names of defined macros @@ -264,28 +264,28 @@ public: bool add_macro_definition(token_type const &name, bool has_params, std::vector ¶meters, token_sequence_type &definition, bool is_predefined = false) - { - return macros.add_macro(name, has_params, parameters, definition, - is_predefined); + { + return macros.add_macro(name, has_params, parameters, definition, + is_predefined); } -// get the Wave version information - static std::string get_version() - { - boost::wave::util::predefined_macros p; - return util::to_string(p.get_fullversion()); +// get the Wave version information + static std::string get_version() + { + boost::wave::util::predefined_macros p; + return util::to_string(p.get_fullversion()); } - static std::string get_version_string() + static std::string get_version_string() { boost::wave::util::predefined_macros p; - return util::to_string(p.get_versionstr()); + return util::to_string(p.get_versionstr()); } // access current language options void set_language(boost::wave::language_support language_, - bool reset_macros = true) - { - language = language_; + bool reset_macros = true) + { + language = language_; if (reset_macros) reset_macro_definitions(); } @@ -305,10 +305,10 @@ public: hook_policy_type const &get_hooks() const { return hooks; } // return type of actually used context type (might be the derived type) - actual_context_type& derived() - { return *static_cast(this); } + actual_context_type& derived() + { return *static_cast(this); } actual_context_type const& derived() const - { return *static_cast(this); } + { return *static_cast(this); } // return the directory of the currently preprocessed file boost::filesystem::path get_current_directory() const @@ -320,7 +320,7 @@ protected: friend class boost::wave::impl::pp_iterator_functor; #endif -// make sure the context has been initialized +// make sure the context has been initialized void init_context() { if (!has_been_initialized) { @@ -340,22 +340,22 @@ protected: { return macros.is_defined(begin, end); } // maintain include paths (helper functions) - void set_current_directory(char const *path_) + void set_current_directory(char const *path_) { includes.set_current_directory(path_); } // conditional compilation contexts bool get_if_block_status() const { return ifblocks.get_status(); } - bool get_if_block_some_part_status() const - { return ifblocks.get_some_part_status(); } + bool get_if_block_some_part_status() const + { return ifblocks.get_some_part_status(); } bool get_enclosing_if_block_status() const { return ifblocks.get_enclosing_status(); } - void enter_if_block(bool new_status) + void enter_if_block(bool new_status) { ifblocks.enter_if_block(new_status); } - bool enter_elif_block(bool new_status) + bool enter_elif_block(bool new_status) { return ifblocks.enter_elif_block(new_status); } bool enter_else_block() { return ifblocks.enter_else_block(); } bool exit_if_block() { return ifblocks.exit_if_block(); } - typename boost::wave::util::if_block_stack::size_type get_if_block_depth() const + typename boost::wave::util::if_block_stack::size_type get_if_block_depth() const { return ifblocks.get_if_block_depth(); } // stack of iteration contexts @@ -366,29 +366,29 @@ protected: /////////////////////////////////////////////////////////////////////////////// // -// expand_tokensequence(): -// expands all macros contained in a given token sequence, handles '##' -// and '#' pp operators and re-scans the resulting sequence +// expand_tokensequence(): +// expands all macros contained in a given token sequence, handles '##' +// and '#' pp operators and re-scans the resulting sequence // (essentially pre-processes the token sequence). // // The expand_undefined parameter is true during macro expansion inside -// a C++ expression given for a #if or #elif statement. +// a C++ expression given for a #if or #elif statement. // /////////////////////////////////////////////////////////////////////////////// template - token_type expand_tokensequence(IteratorT2 &first_, IteratorT2 const &last_, - token_sequence_type &pending, token_sequence_type &expanded, + token_type expand_tokensequence(IteratorT2 &first_, IteratorT2 const &last_, + token_sequence_type &pending, token_sequence_type &expanded, bool& seen_newline, bool expand_undefined = false) { - return macros.expand_tokensequence(first_, last_, pending, expanded, + return macros.expand_tokensequence(first_, last_, pending, expanded, seen_newline, expand_undefined); } template - void expand_whole_tokensequence(IteratorT2 &first_, IteratorT2 const &last_, + void expand_whole_tokensequence(IteratorT2 &first_, IteratorT2 const &last_, token_sequence_type &expanded, bool expand_undefined = true) { - macros.expand_whole_tokensequence(expanded, first_, last_, + macros.expand_whole_tokensequence(expanded, first_, last_, expand_undefined); // remove any contained placeholder @@ -401,33 +401,33 @@ public: // maintain the real name of the current preprocessed file void set_current_filename(char const *real_name) { current_filename = real_name; } - std::string const &get_current_filename() const + std::string const &get_current_filename() const { return current_filename; } -// maintain the list of known headers containing #pragma once +// maintain the list of known headers containing #pragma once bool has_pragma_once(std::string const &filename_) { return includes.has_pragma_once(filename_); } bool add_pragma_once_header(std::string const &filename_, std::string const& guard_name) - { + { get_hooks().detected_include_guard(derived(), filename_, guard_name); - return includes.add_pragma_once_header(filename_, guard_name); + return includes.add_pragma_once_header(filename_, guard_name); } - bool add_pragma_once_header(token_type const &pragma_, + bool add_pragma_once_header(token_type const &pragma_, std::string const &filename_) - { + { get_hooks().detected_pragma_once(derived(), pragma_, filename_); - return includes.add_pragma_once_header(filename_, - "__BOOST_WAVE_PRAGMA_ONCE__"); + return includes.add_pragma_once_header(filename_, + "__BOOST_WAVE_PRAGMA_ONCE__"); } -#endif +#endif void set_current_relative_filename(char const *real_name) { current_relative_filename = real_name; } - std::string const &get_current_relative_filename() const + std::string const &get_current_relative_filename() const { return current_relative_filename; } - bool find_include_file (std::string &s, std::string &d, bool is_system, + bool find_include_file (std::string &s, std::string &d, bool is_system, char const *current_file) const { return includes.find_include_file(s, d, is_system, current_file); } @@ -459,8 +459,8 @@ private: { using namespace boost::serialization; if (version != (loaded_version & ~version_mask)) { - BOOST_WAVE_THROW_CTX((*this), preprocess_exception, - incompatible_config, "cpp_context state version", + BOOST_WAVE_THROW_CTX((*this), preprocess_exception, + incompatible_config, "cpp_context state version", get_main_pos()); return; } @@ -471,7 +471,7 @@ private: // BOOST_PP_STRINGIZE(BOOST_WAVE_CONFIG) ar & make_nvp("config", config); if (config != BOOST_PP_STRINGIZE(BOOST_WAVE_CONFIG)) { - BOOST_WAVE_THROW_CTX((*this), preprocess_exception, + BOOST_WAVE_THROW_CTX((*this), preprocess_exception, incompatible_config, "BOOST_WAVE_CONFIG", get_main_pos()); return; } @@ -479,8 +479,8 @@ private: // BOOST_WAVE_PRAGMA_KEYWORD ar & make_nvp("pragma_keyword", pragma_keyword); if (pragma_keyword != BOOST_WAVE_PRAGMA_KEYWORD) { - BOOST_WAVE_THROW_CTX((*this), preprocess_exception, - incompatible_config, "BOOST_WAVE_PRAGMA_KEYWORD", + BOOST_WAVE_THROW_CTX((*this), preprocess_exception, + incompatible_config, "BOOST_WAVE_PRAGMA_KEYWORD", get_main_pos()); return; } @@ -488,7 +488,7 @@ private: // BOOST_PP_STRINGIZE((BOOST_WAVE_STRINGTYPE)) ar & make_nvp("string_type", string_type_str); if (string_type_str != BOOST_PP_STRINGIZE((BOOST_WAVE_STRINGTYPE))) { - BOOST_WAVE_THROW_CTX((*this), preprocess_exception, + BOOST_WAVE_THROW_CTX((*this), preprocess_exception, incompatible_config, "BOOST_WAVE_STRINGTYPE", get_main_pos()); return; } @@ -501,7 +501,7 @@ private: } catch (boost::wave::preprocess_exception const& e) { // catch version mismatch exceptions and call error handler - get_hooks().throw_exception(derived(), e); + get_hooks().throw_exception(derived(), e); } } BOOST_SERIALIZATION_SPLIT_MEMBER() @@ -515,7 +515,7 @@ private: bool has_been_initialized; // set cwd once #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0 std::string current_filename; // real name of current preprocessed file -#endif +#endif std::string current_relative_filename; // real relative name of current preprocessed file boost::wave::util::if_block_stack ifblocks; // conditional compilation contexts @@ -534,7 +534,7 @@ private: namespace boost { namespace serialization { template< - typename Iterator, typename LexIterator, + typename Iterator, typename LexIterator, typename InputPolicy, typename Hooks > struct tracking_level > @@ -548,7 +548,7 @@ struct tracking_level struct version > diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_iterator.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_iterator.hpp index b1bd8ee6..dc2d9342 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_iterator.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_iterator.hpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include @@ -359,7 +359,7 @@ protected: private: ContextT &ctx; // context, this iterator is associated with - boost::std::shared_ptr iter_ctx; + boost::shared_ptr iter_ctx; bool seen_newline; // needed for recognizing begin of line bool skipped_newline; // a newline has been skipped since last one @@ -1608,7 +1608,7 @@ char const *current_name = 0; // never try to match current file name ctx.set_current_directory(native_path_str.c_str()); // preprocess the opened file - boost::std::shared_ptr new_iter_ctx ( + boost::shared_ptr new_iter_ctx ( new iteration_context_type(ctx, native_path_str.c_str(), act_pos, boost::wave::enable_prefer_pp_numbers(ctx.get_language()), is_system ? base_iteration_context_type::system_header : diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_macromap.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_macromap.hpp index 9ccefca1..fb251ea1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_macromap.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/cpp_macromap.hpp @@ -28,7 +28,7 @@ #include #if BOOST_WAVE_SERIALIZATION != 0 #include -#include +#include #endif #include @@ -259,7 +259,7 @@ private: private: defined_macros_type *current_macros; // current symbol table - boost::std::shared_ptr defined_macros; // global symbol table + boost::shared_ptr defined_macros; // global symbol table token_type act_token; // current token position_type main_pos; // last token position in the pp_iterator diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/symbol_table.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/symbol_table.hpp index f622d45c..312b0a2f 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/symbol_table.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/wave/util/symbol_table.hpp @@ -14,14 +14,14 @@ #include #include -#include +#include #if BOOST_WAVE_SERIALIZATION != 0 #include #include -#include +#include #else -#include +#include #endif #include @@ -38,27 +38,27 @@ namespace util { /////////////////////////////////////////////////////////////////////////////// // -// The symbol_table class is used for the storage of defined macros. +// The symbol_table class is used for the storage of defined macros. // /////////////////////////////////////////////////////////////////////////////// template -struct symbol_table +struct symbol_table #if BOOST_WAVE_SERIALIZATION != 0 -: public std::map > +: public std::map > #else -: public std::map > +: public std::map > #endif { #if BOOST_WAVE_SERIALIZATION != 0 - typedef std::map > base_type; + typedef std::map > base_type; #else typedef std::map > base_type; #endif typedef typename base_type::iterator iterator_type; typedef typename base_type::const_iterator const_iterator_type; - symbol_table(long uid_ = 0) + symbol_table(long uid_ = 0) {} #if BOOST_WAVE_SERIALIZATION != 0 @@ -68,7 +68,7 @@ private: void serialize(Archive &ar, const unsigned int version) { using namespace boost::serialization; - ar & make_nvp("symbol_table", + ar & make_nvp("symbol_table", boost::serialization::base_object(*this)); } #endif @@ -76,7 +76,7 @@ private: private: /////////////////////////////////////////////////////////////////////////// // - // This is a special iterator allowing to iterate the names of all defined + // This is a special iterator allowing to iterate the names of all defined // macros. // /////////////////////////////////////////////////////////////////////////// @@ -94,13 +94,13 @@ private: typedef get_first unary_functor; public: - typedef transform_iterator + typedef transform_iterator name_iterator; - typedef transform_iterator + typedef transform_iterator const_name_iterator; template - static + static transform_iterator make_iterator(Iterator it) { return boost::make_transform_iterator(it); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/access.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/access.hpp index a1fe00f2..d984a432 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/access.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/access.hpp @@ -14,7 +14,7 @@ #endif #include -#include +#include #include #include #include @@ -41,7 +41,7 @@ struct core_access return rex.match_(state); } - static std::shared_ptr > const & + static shared_ptr > const & get_regex_impl(basic_regex const &rex) { return proto::value(rex).get(); diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/linker.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/linker.hpp index 15c2d951..e87e26d1 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/linker.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/linker.hpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_byref_matcher.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_byref_matcher.hpp index bb036635..f9282042 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_byref_matcher.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_byref_matcher.hpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include #include @@ -41,7 +41,7 @@ namespace boost { namespace xpressive { namespace detail // we don't have to worry about it going away. regex_impl const *pimpl_; - regex_byref_matcher(std::shared_ptr > const &impl) + regex_byref_matcher(shared_ptr > const &impl) : wimpl_(impl) , pimpl_(impl.get()) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_matcher.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_matcher.hpp index 100317df..e7eee7d3 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_matcher.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/core/matcher/regex_matcher.hpp @@ -34,7 +34,7 @@ namespace boost { namespace xpressive { namespace detail { regex_impl impl_; - regex_matcher(std::shared_ptr > const &impl) + regex_matcher(shared_ptr > const &impl) : impl_() { this->impl_.xpr_ = impl->xpr_; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/detail_fwd.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/detail_fwd.hpp index 7fd3088b..52deaae9 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/detail_fwd.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/detail_fwd.hpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include namespace boost { namespace xpressive { namespace detail @@ -353,7 +353,7 @@ namespace boost { namespace xpressive { namespace detail int get_mark_number(basic_mark_tag const &); template - void static_compile(Xpr const &xpr, std::shared_ptr > const &impl); + void static_compile(Xpr const &xpr, shared_ptr > const &impl); struct quant_spec; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/compile.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/compile.hpp index 023a238a..bc8af05b 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/compile.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/compile.hpp @@ -32,7 +32,7 @@ namespace boost { namespace xpressive { namespace detail /////////////////////////////////////////////////////////////////////////////// // static_compile_impl2 template - void static_compile_impl2(Xpr const &xpr, std::shared_ptr > const &impl, Traits const &tr) + void static_compile_impl2(Xpr const &xpr, shared_ptr > const &impl, Traits const &tr) { typedef typename iterator_value::type char_type; impl->tracking_clear(); @@ -70,7 +70,7 @@ namespace boost { namespace xpressive { namespace detail // static_compile_impl1 template typename disable_if >::type - static_compile_impl1(Xpr const &xpr, std::shared_ptr > const &impl) + static_compile_impl1(Xpr const &xpr, shared_ptr > const &impl) { // use default traits typedef typename iterator_value::type char_type; @@ -83,7 +83,7 @@ namespace boost { namespace xpressive { namespace detail // static_compile_impl1 template typename enable_if >::type - static_compile_impl1(Xpr const &xpr, std::shared_ptr > const &impl) + static_compile_impl1(Xpr const &xpr, shared_ptr > const &impl) { // use specified traits typedef typename proto::result_of::value::type>::type::locale_type locale_type; @@ -94,7 +94,7 @@ namespace boost { namespace xpressive { namespace detail /////////////////////////////////////////////////////////////////////////////// // static_compile template - void static_compile(Xpr const &xpr, std::shared_ptr > const &impl) + void static_compile(Xpr const &xpr, shared_ptr > const &impl) { static_compile_impl1(xpr, impl); } diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/placeholders.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/placeholders.hpp index 75c09b4a..5c955384 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/placeholders.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/placeholders.hpp @@ -17,7 +17,7 @@ #endif #include -#include +#include #include #include diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/visitor.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/visitor.hpp index 68ac32f1..5a0213f6 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/visitor.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/static/visitor.hpp @@ -14,7 +14,7 @@ #endif #include -#include +#include #include #include #include @@ -27,7 +27,7 @@ namespace boost { namespace xpressive { namespace detail template struct xpression_visitor_base { - explicit xpression_visitor_base(std::shared_ptr > const &self) + explicit xpression_visitor_base(shared_ptr > const &self) : self_(self) { } @@ -51,7 +51,7 @@ namespace boost { namespace xpressive { namespace detail } } - std::shared_ptr > &self() + shared_ptr > &self() { return this->self_; } @@ -94,7 +94,7 @@ namespace boost { namespace xpressive { namespace detail } private: - std::shared_ptr > self_; + shared_ptr > self_; }; /////////////////////////////////////////////////////////////////////////////// @@ -108,7 +108,7 @@ namespace boost { namespace xpressive { namespace detail typedef Traits traits_type; typedef typename boost::iterator_value::type char_type; - explicit xpression_visitor(Traits const &tr, std::shared_ptr > const &self) + explicit xpression_visitor(Traits const &tr, shared_ptr > const &self) : xpression_visitor_base(self) , traits_(tr) { diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/symbols.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/symbols.hpp index ffb9b552..5efa4aba 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/symbols.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/symbols.hpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include namespace boost { namespace xpressive { namespace detail { @@ -75,9 +75,9 @@ namespace boost { namespace xpressive { namespace detail private: /////////////////////////////////////////////////////////////////////////////// - // struct node : a node in the TST. + // struct node : a node in the TST. // The "eq" field stores the result pointer when ch is zero. - // + // struct node : boost::noncopyable { @@ -125,7 +125,7 @@ namespace boost { namespace xpressive { namespace detail /////////////////////////////////////////////////////////////////////////////// // insert : insert a string into the TST - // + // template node* insert(node* p, key_iterator &begin, key_iterator end, result_type r, Trans trans) const { @@ -168,7 +168,7 @@ namespace boost { namespace xpressive { namespace detail /////////////////////////////////////////////////////////////////////////////// // conditional rotation : the goal is to minimize the overall // weighted path length of each binary search tree - // + // bool cond_rotation(bool left, node* const i, node* const j) const { // don't rotate top node in binary search tree @@ -201,7 +201,7 @@ namespace boost { namespace xpressive { namespace detail /////////////////////////////////////////////////////////////////////////////// // search : find a string in the TST - // + // template result_type search(BidiIter &begin, BidiIter end, Trans trans, node* p) const { @@ -276,7 +276,7 @@ namespace boost { namespace xpressive { namespace detail } } - boost::std::shared_ptr root; + boost::shared_ptr root; }; }}} // namespace boost::xpressive::detail diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/tracking_ptr.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/tracking_ptr.hpp index 0c211c3c..c6a0353e 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/tracking_ptr.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/detail/utility/tracking_ptr.hpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -48,7 +48,7 @@ struct weak_iterator : iterator_facade < weak_iterator - , std::shared_ptr const + , shared_ptr const , std::forward_iterator_tag > { @@ -73,7 +73,7 @@ struct weak_iterator private: friend class boost::iterator_core_access; - std::shared_ptr const &dereference() const + shared_ptr const &dereference() const { return this->cur_; } @@ -102,7 +102,7 @@ private: this->cur_.reset(); } - std::shared_ptr cur_; + shared_ptr cur_; base_iterator iter_; set_type *set_; }; @@ -112,14 +112,14 @@ private: // for use with a filter_iterator to filter a node out of a list of dependencies template struct filter_self - : std::unary_function, bool> + : std::unary_function, bool> { filter_self(enable_reference_tracking *self) : self_(self) { } - bool operator ()(std::shared_ptr const &that) const + bool operator ()(shared_ptr const &that) const { return this->self_ != that.get(); } @@ -144,7 +144,7 @@ void adl_swap(T &t1, T &t2) template struct enable_reference_tracking { - typedef std::set > references_type; + typedef std::set > references_type; typedef std::set > dependents_type; void tracking_copy(Derived const &that) @@ -321,7 +321,7 @@ private: references_type refs_; dependents_type deps_; - std::shared_ptr self_; + shared_ptr self_; boost::detail::atomic_count cnt_; }; @@ -345,7 +345,7 @@ inline void intrusive_ptr_release(enable_reference_tracking *p) template inline void enable_reference_tracking::dump_(std::ostream &sout) const { - std::shared_ptr this_ = this->self_; + shared_ptr this_ = this->self_; sout << "0x" << (void*)this << " cnt=" << this_.use_count()-1 << " refs={"; typename references_type::const_iterator cur1 = this->refs_.begin(); typename references_type::const_iterator end1 = this->refs_.end(); @@ -358,8 +358,8 @@ inline void enable_reference_tracking::dump_(std::ostream &sout) const typename dependents_type::const_iterator end2 = this->deps_.end(); for(; cur2 != end2; ++cur2) { - // ericne, 27/nov/05: CW9_4 doesn't like if(std::shared_ptr x = y) - std::shared_ptr dep = cur2->lock(); + // ericne, 27/nov/05: CW9_4 doesn't like if(shared_ptr x = y) + shared_ptr dep = cur2->lock(); if(dep.get()) { sout << "0x" << (void*)&*dep << ','; @@ -425,7 +425,7 @@ struct tracking_ptr } // calling this forces this->impl_ to fork. - std::shared_ptr const &get() const + shared_ptr const &get() const { if(intrusive_ptr impl = this->fork_()) { @@ -480,7 +480,7 @@ private: { impl = this->impl_; BOOST_ASSERT(!this->has_deps_()); - std::shared_ptr simpl(new element_type); + shared_ptr simpl(new element_type); this->impl_ = get_pointer(simpl->self_ = simpl); } return impl; diff --git a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/regex_compiler.hpp b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/regex_compiler.hpp index ca47501e..4a2a9d74 100644 --- a/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/regex_compiler.hpp +++ b/Minecraft.Client/PS3/PS3Extras/boost_1_53_0/boost/xpressive/regex_compiler.hpp @@ -375,7 +375,7 @@ private: , "mismatched parenthesis" ); basic_regex &rex = this->rules_[name]; - std::shared_ptr > impl = access::get_regex_impl(rex); + shared_ptr > impl = access::get_regex_impl(rex); this->self_->track_reference(*impl); return detail::make_dynamic(detail::regex_byref_matcher(impl)); } @@ -735,7 +735,7 @@ private: std::size_t hidden_mark_count_; CompilerTraits traits_; typename RegexTraits::char_class_type upper_; - std::shared_ptr > self_; + shared_ptr > self_; std::map > rules_; }; diff --git a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/ChunkRebuildData.cpp b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/ChunkRebuildData.cpp index a5e97a2f..1cb5e2ee 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/ChunkRebuildData.cpp +++ b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/ChunkRebuildData.cpp @@ -3,7 +3,7 @@ #ifndef SN_TARGET_PS3_SPU // #include "..\..\..\stdafx.h" #endif -#endif +#endif #include "ChunkRebuildData.h" #include "Tesselator_SPU.h" @@ -13,7 +13,7 @@ #include "..\..\..\..\Minecraft.World\Tile.h" #include "..\..\..\..\Minecraft.World\Level.h" #include "..\..\..\..\Minecraft.World\Dimension.h" -// +// // #include "..\..\..\Chunk.h" // #include "..\..\..\TileRenderer.h" // #include "..\..\..\TileEntityRenderDispatcher.h" @@ -26,13 +26,13 @@ #include "..\..\..\..\Minecraft.World\BiomeSource.h" #else - + #include "..\Common\spu_assert.h" #endif //SN_TARGET_PS3_SPU static const int Level_maxBuildHeight = 256; -static const int Level_MAX_LEVEL_SIZE = 30000000; +static const int Level_MAX_LEVEL_SIZE = 30000000; static const int Level_MAX_BRIGHTNESS = 15; @@ -53,7 +53,7 @@ int ChunkRebuildData::getGrassColor( int x, int z ) { return m_grassColor[get int ChunkRebuildData::getFoliageColor( int x, int z ) { return m_foliageColor[getTileIdx(x,z)]; } int ChunkRebuildData::getFlags(int x, int y, int z) { return m_data_flags[getTileIdx(x,y,z)] >> 4; } void ChunkRebuildData::setFlag(int x, int y, int z, int flag) { m_data_flags[getTileIdx(x,y,z)] |= (flag<<4);} -#endif +#endif @@ -77,7 +77,7 @@ void ChunkRebuildData::disableUnseenTiles() int tileID = getTile(iX,iY,iZ); if( tileID == 0 ) continue; m_flags &= ~e_flag_EmptyChunk; - + // Don't bother trying to work out neighbours for this tile if we are at the edge of the chunk - apart from the very // bottom of the world where we shouldn't ever be able to see @@ -120,7 +120,7 @@ void ChunkRebuildData::disableUnseenTiles() } } } - + #ifndef SN_TARGET_PS3_SPU void setIconSPUFromIcon(Icon_SPU* iconSpu, Icon* icon) @@ -145,78 +145,78 @@ void ChunkRebuildData::buildMaterial(int matSPUIndex, Material* mat) void ChunkRebuildData::buildMaterials() { - buildMaterial(Material_SPU::air_Id, Material::air); - buildMaterial(Material_SPU::grass_Id, Material::grass); - buildMaterial(Material_SPU::dirt_Id, Material::dirt); - buildMaterial(Material_SPU::wood_Id, Material::wood); - buildMaterial(Material_SPU::stone_Id, Material::stone); - buildMaterial(Material_SPU::metal_Id, Material::metal); - buildMaterial(Material_SPU::water_Id, Material::water); - buildMaterial(Material_SPU::lava_Id, Material::lava); - buildMaterial(Material_SPU::leaves_Id, Material::leaves); - buildMaterial(Material_SPU::plant_Id, Material::plant); - buildMaterial(Material_SPU::replaceable_plant_Id, Material::replaceable_plant); - buildMaterial(Material_SPU::sponge_Id, Material::sponge); - buildMaterial(Material_SPU::cloth_Id, Material::cloth); - buildMaterial(Material_SPU::fire_Id, Material::fire); - buildMaterial(Material_SPU::sand_Id, Material::sand); - buildMaterial(Material_SPU::decoration_Id, Material::decoration); - buildMaterial(Material_SPU::clothDecoration_Id, Material::clothDecoration); - buildMaterial(Material_SPU::glass_Id, Material::glass); - buildMaterial(Material_SPU::explosive_Id, Material::explosive); - buildMaterial(Material_SPU::coral_Id, Material::coral); - buildMaterial(Material_SPU::ice_Id, Material::ice); - buildMaterial(Material_SPU::topSnow_Id, Material::topSnow); - buildMaterial(Material_SPU::snow_Id, Material::snow); - buildMaterial(Material_SPU::cactus_Id, Material::cactus); - buildMaterial(Material_SPU::clay_Id, Material::clay); - buildMaterial(Material_SPU::vegetable_Id, Material::vegetable); - buildMaterial(Material_SPU::egg_Id, Material::egg); - buildMaterial(Material_SPU::portal_Id, Material::portal); - buildMaterial(Material_SPU::cake_Id, Material::cake); - buildMaterial(Material_SPU::web_Id, Material::web); - buildMaterial(Material_SPU::piston_Id, Material::piston); - buildMaterial(Material_SPU::buildable_glass_Id, Material::buildable_glass); - buildMaterial(Material_SPU::heavyMetal_Id, Material::heavyMetal); + buildMaterial(Material_SPU::air_Id, Material::air); + buildMaterial(Material_SPU::grass_Id, Material::grass); + buildMaterial(Material_SPU::dirt_Id, Material::dirt); + buildMaterial(Material_SPU::wood_Id, Material::wood); + buildMaterial(Material_SPU::stone_Id, Material::stone); + buildMaterial(Material_SPU::metal_Id, Material::metal); + buildMaterial(Material_SPU::water_Id, Material::water); + buildMaterial(Material_SPU::lava_Id, Material::lava); + buildMaterial(Material_SPU::leaves_Id, Material::leaves); + buildMaterial(Material_SPU::plant_Id, Material::plant); + buildMaterial(Material_SPU::replaceable_plant_Id, Material::replaceable_plant); + buildMaterial(Material_SPU::sponge_Id, Material::sponge); + buildMaterial(Material_SPU::cloth_Id, Material::cloth); + buildMaterial(Material_SPU::fire_Id, Material::fire); + buildMaterial(Material_SPU::sand_Id, Material::sand); + buildMaterial(Material_SPU::decoration_Id, Material::decoration); + buildMaterial(Material_SPU::clothDecoration_Id, Material::clothDecoration); + buildMaterial(Material_SPU::glass_Id, Material::glass); + buildMaterial(Material_SPU::explosive_Id, Material::explosive); + buildMaterial(Material_SPU::coral_Id, Material::coral); + buildMaterial(Material_SPU::ice_Id, Material::ice); + buildMaterial(Material_SPU::topSnow_Id, Material::topSnow); + buildMaterial(Material_SPU::snow_Id, Material::snow); + buildMaterial(Material_SPU::cactus_Id, Material::cactus); + buildMaterial(Material_SPU::clay_Id, Material::clay); + buildMaterial(Material_SPU::vegetable_Id, Material::vegetable); + buildMaterial(Material_SPU::egg_Id, Material::egg); + buildMaterial(Material_SPU::portal_Id, Material::portal); + buildMaterial(Material_SPU::cake_Id, Material::cake); + buildMaterial(Material_SPU::web_Id, Material::web); + buildMaterial(Material_SPU::piston_Id, Material::piston); + buildMaterial(Material_SPU::buildable_glass_Id, Material::buildable_glass); + buildMaterial(Material_SPU::heavyMetal_Id, Material::heavyMetal); } int ChunkRebuildData::getMaterialID(Tile* pTile) { Material* m = pTile->material; - if(m == Material::air) return Material_SPU::air_Id; - if(m == Material::grass) return Material_SPU::grass_Id; - if(m == Material::dirt) return Material_SPU::dirt_Id; - if(m == Material::wood) return Material_SPU::wood_Id; - if(m == Material::stone) return Material_SPU::stone_Id; - if(m == Material::metal) return Material_SPU::metal_Id; - if(m == Material::water) return Material_SPU::water_Id; - if(m == Material::lava) return Material_SPU::lava_Id; - if(m == Material::leaves) return Material_SPU::leaves_Id; - if(m == Material::plant) return Material_SPU::plant_Id; - if(m == Material::replaceable_plant)return Material_SPU::replaceable_plant_Id; - if(m == Material::sponge) return Material_SPU::sponge_Id; - if(m == Material::cloth) return Material_SPU::cloth_Id; - if(m == Material::fire) return Material_SPU::fire_Id; - if(m == Material::sand) return Material_SPU::sand_Id; - if(m == Material::decoration) return Material_SPU::decoration_Id; - if(m == Material::clothDecoration) return Material_SPU::clothDecoration_Id; + if(m == Material::air) return Material_SPU::air_Id; + if(m == Material::grass) return Material_SPU::grass_Id; + if(m == Material::dirt) return Material_SPU::dirt_Id; + if(m == Material::wood) return Material_SPU::wood_Id; + if(m == Material::stone) return Material_SPU::stone_Id; + if(m == Material::metal) return Material_SPU::metal_Id; + if(m == Material::water) return Material_SPU::water_Id; + if(m == Material::lava) return Material_SPU::lava_Id; + if(m == Material::leaves) return Material_SPU::leaves_Id; + if(m == Material::plant) return Material_SPU::plant_Id; + if(m == Material::replaceable_plant)return Material_SPU::replaceable_plant_Id; + if(m == Material::sponge) return Material_SPU::sponge_Id; + if(m == Material::cloth) return Material_SPU::cloth_Id; + if(m == Material::fire) return Material_SPU::fire_Id; + if(m == Material::sand) return Material_SPU::sand_Id; + if(m == Material::decoration) return Material_SPU::decoration_Id; + if(m == Material::clothDecoration) return Material_SPU::clothDecoration_Id; if(m == Material::glass) return Material_SPU::glass_Id; - if(m == Material::explosive) return Material_SPU::explosive_Id; - if(m == Material::coral) return Material_SPU::coral_Id; - if(m == Material::ice) return Material_SPU::ice_Id; - if(m == Material::topSnow) return Material_SPU::topSnow_Id; - if(m == Material::snow) return Material_SPU::snow_Id; - if(m == Material::cactus) return Material_SPU::cactus_Id; - if(m == Material::clay) return Material_SPU::clay_Id; - if(m == Material::vegetable) return Material_SPU::vegetable_Id; - if(m == Material::egg) return Material_SPU::egg_Id; - if(m == Material::portal) return Material_SPU::portal_Id; - if(m == Material::cake) return Material_SPU::cake_Id; - if(m == Material::web) return Material_SPU::web_Id; - if(m == Material::piston) return Material_SPU::piston_Id; + if(m == Material::explosive) return Material_SPU::explosive_Id; + if(m == Material::coral) return Material_SPU::coral_Id; + if(m == Material::ice) return Material_SPU::ice_Id; + if(m == Material::topSnow) return Material_SPU::topSnow_Id; + if(m == Material::snow) return Material_SPU::snow_Id; + if(m == Material::cactus) return Material_SPU::cactus_Id; + if(m == Material::clay) return Material_SPU::clay_Id; + if(m == Material::vegetable) return Material_SPU::vegetable_Id; + if(m == Material::egg) return Material_SPU::egg_Id; + if(m == Material::portal) return Material_SPU::portal_Id; + if(m == Material::cake) return Material_SPU::cake_Id; + if(m == Material::web) return Material_SPU::web_Id; + if(m == Material::piston) return Material_SPU::piston_Id; if(m == Material::buildable_glass) return Material_SPU::buildable_glass_Id; if(m == Material::heavyMetal) return Material_SPU::heavyMetal_Id; - assert(0); + assert(0); return Material_SPU::air_Id; } @@ -364,12 +364,12 @@ void ChunkRebuildData::createTileData() // recordPlayer setIconSPUFromIcon(&m_tileData.recordPlayer_iconTop, ((RecordPlayerTile*)Tile::recordPlayer)->iconTop); - // pumpkin + // pumpkin setIconSPUFromIcon(&m_tileData.pumpkinTile_iconTop, ((PumpkinTile*)Tile::pumpkin)->iconTop); setIconSPUFromIcon(&m_tileData.pumpkinTile_iconFace, ((PumpkinTile*)Tile::pumpkin)->iconFace); setIconSPUFromIcon(&m_tileData.pumpkinTile_iconFaceLit, ((PumpkinTile*)Tile::litPumpkin)->iconFace); - // cakeTile + // cakeTile setIconSPUFromIcon(&m_tileData.cakeTile_iconTop, ((CakeTile*)Tile::cake)->iconTop); setIconSPUFromIcon(&m_tileData.cakeTile_iconBottom, ((CakeTile*)Tile::cake)->iconBottom); setIconSPUFromIcon(&m_tileData.cakeTile_iconInner, ((CakeTile*)Tile::cake)->iconInner); @@ -509,7 +509,7 @@ void ChunkRebuildData::buildForChunk( Region* region, Level* level, int x0, int // assert(index < 400); int cacheBlockIndex = (cacheMap[iZ-m_z0]*3) + cacheMap[iX-m_x0]; BiomeCache::Block* pCacheBlock = cacheBlocks[cacheBlockIndex]; -// assert(region->getBiomeSource()->getBlockAt(iX, iZ) == pCacheBlock); +// assert(region->getBiomeSource()->getBlockAt(iX, iZ) == pCacheBlock); Biome* pBiome = pCacheBlock->getBiome(iX, iZ); m_grassColor[index] = pColourTable->getColor(pBiome->m_grassColor); m_foliageColor[index] = pColourTable->getColor(pBiome->m_foliageColor); @@ -537,7 +537,7 @@ void ChunkRebuildData::copyFromTesselator() m_tesselator.m_PPUOffset = 0; // copy tesselator vars over - m_tesselator.vertices = t->vertices; + m_tesselator.vertices = t->vertices; m_tesselator.u = t->u; m_tesselator.v = t->v; m_tesselator._tex2 = t->_tex2; @@ -588,7 +588,7 @@ void ChunkRebuildData::storeInTesselator() Tesselator* t = Tesselator::getInstance(); // 4J - added - static initialiser being set at the wrong time // copy tesselator vars over - t->vertices = m_tesselator.vertices; + t->vertices = m_tesselator.vertices; t->u = m_tesselator.u; t->v = m_tesselator.v; t->_tex2 = m_tesselator._tex2; @@ -647,7 +647,7 @@ void ChunkRebuildData::tesselateAllTiles(TileRenderer_SPU* pTileRenderer) { // if (m_currentLayer == 0 && m_tileData.isEntityTile[tileId]) // { -// std::shared_ptr et = region->getTileEntity(x, y, z); +// shared_ptr et = region->getTileEntity(x, y, z); // if (TileEntityRenderDispatcher::instance->hasRenderer(et)) // { // renderableTileEntities.push_back(et); @@ -801,7 +801,7 @@ int ChunkRebuildData::getBrightnessPropagate(LightLayer::variety layer, int x, i if(layer == LightLayer::Sky) return getBrightnessSky(x, y, z); return getBrightnessBlock(x, y, z); - + } int ChunkRebuildData::getLightColor(int x, int y, int z, int emitt) // 4J - change brought forward from 1.8.2 { @@ -865,7 +865,7 @@ int ChunkRebuildData::getRawBrightness(int x, int y, int z, bool propagate) int ChunkRebuildData::LevelChunk_getRawBrightness(int x, int y, int z, int skyDampen) { int light = (m_flags & e_flag_HasCeiling) ? 0 : getBrightnessSky(x, y, z); - if (light > 0) + if (light > 0) m_flags |= e_flag_TouchedSky; light -= skyDampen; int block = getBrightnessBlock(x, y, z); diff --git a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/LeverTile_SPU.h b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/LeverTile_SPU.h index 53c9f3ec..06dda5bb 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/LeverTile_SPU.h +++ b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/LeverTile_SPU.h @@ -8,5 +8,5 @@ public: virtual bool blocksLight() { return false; } virtual bool isSolidRender(bool isServerLevel = false) { return false; } virtual int getRenderShape() { return Tile_SPU::SHAPE_LEVER; } -// virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, std::shared_ptr forceEntity = std::shared_ptr()); // 4J added forceData, forceEntity param +// virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr forceEntity = shared_ptr()); // 4J added forceData, forceEntity param }; diff --git a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonBaseTile_SPU.h b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonBaseTile_SPU.h index a8c6851c..e8411c88 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonBaseTile_SPU.h +++ b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonBaseTile_SPU.h @@ -12,7 +12,7 @@ public: virtual int getRenderShape() { return SHAPE_PISTON_BASE; } virtual bool isSolidRender(bool isServerLevel = false) { return false; } - // virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, std::shared_ptr forceEntity = std::shared_ptr()); // 4J added forceData, forceEntity param + // virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr forceEntity = shared_ptr()); // 4J added forceData, forceEntity param // virtual void updateDefaultShape(); }; \ No newline at end of file diff --git a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonExtensionTile_SPU.h b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonExtensionTile_SPU.h index 3323cfd0..d5460492 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonExtensionTile_SPU.h +++ b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/PistonExtensionTile_SPU.h @@ -9,5 +9,5 @@ public: virtual Icon_SPU *getTexture(int face, int data) { return NULL; } virtual int getRenderShape() { return SHAPE_PISTON_EXTENSION; } virtual bool isSolidRender(bool isServerLevel = false) { return false; } -// virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, std::shared_ptr forceEntity = std::shared_ptr()); // 4J added forceData, forceEntity param +// virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr forceEntity = shared_ptr()); // 4J added forceData, forceEntity param }; \ No newline at end of file diff --git a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/TheEndPortal_SPU.h b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/TheEndPortal_SPU.h index b8bed9a8..f6e3b3e7 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/TheEndPortal_SPU.h +++ b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/TheEndPortal_SPU.h @@ -6,7 +6,7 @@ class TheEndPortal_SPU : public EntityTile_SPU public: TheEndPortal_SPU(int id) : EntityTile_SPU(id) {} -// virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, std::shared_ptr forceEntity = std::shared_ptr()); // 4J added forceData, forceEntity param +// virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr forceEntity = shared_ptr()); // 4J added forceData, forceEntity param virtual bool shouldRenderFace(ChunkRebuildData *level, int x, int y, int z, int face) { if (face != 0) return false; diff --git a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/Tile_SPU.cpp b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/Tile_SPU.cpp index 552345fd..f2dfeaac 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/Tile_SPU.cpp +++ b/Minecraft.Client/PS3/SPU_Tasks/ChunkUpdate/Tile_SPU.cpp @@ -118,14 +118,14 @@ float Tile_SPU::getBrightness(ChunkRebuildData *level, int x, int y, int z) { return level->getBrightness(x, y, z, ms_pTileData->lightEmission[id]); } -// +// // // 4J - brought forward from 1.8.2 int Tile_SPU::getLightColor(ChunkRebuildData *level, int x, int y, int z) { int tileID = level->getTile(x, y, z); return level->getLightColor(x, y, z, ms_pTileData->lightEmission[tileID]); } -// +// // bool Tile_SPU::isFaceVisible(Level *level, int x, int y, int z, int f) // { // if (f == 0) y--; @@ -136,7 +136,7 @@ int Tile_SPU::getLightColor(ChunkRebuildData *level, int x, int y, int z) // if (f == 5) x++; // return !level->isSolidRenderTile(x, y, z); // } -// +// bool Tile_SPU::shouldRenderFace(ChunkRebuildData *level, int x, int y, int z, int face) { if (face == 0 && getShapeY0() > 0) return true; @@ -147,7 +147,7 @@ bool Tile_SPU::shouldRenderFace(ChunkRebuildData *level, int x, int y, int z, in if (face == 5 && getShapeX1() < 1) return true; return (!level->isSolidRenderTile(x, y, z)); } -// +// bool Tile_SPU::isSolidFace(ChunkRebuildData *level, int x, int y, int z, int face) { return (level->getMaterial(x, y, z)->isSolid()); @@ -196,39 +196,39 @@ Icon_SPU *Tile_SPU::getTexture(ChunkRebuildData *level, int x, int y, int z, int } return getTexture(face, tileData); } -// +// Icon_SPU *Tile_SPU::getTexture(int face, int data) { return &ms_pTileData->iconData[id]; } -// +// Icon_SPU *Tile_SPU::getTexture(int face) { return getTexture(face, 0); } -// +// // AABB *Tile_SPU::getTileAABB(Level *level, int x, int y, int z) // { // return AABB::newTemp(x + xx0, y + yy0, z + zz0, x + xx1, y + yy1, z + zz1); // } -// -// void Tile_SPU::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes, Entity *source) +// +// void Tile_SPU::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes, Entity *source) // { // AABB *aabb = getAABB(level, x, y, z); // if (aabb != NULL && box->intersects(aabb)) boxes->push_back(aabb); // } -// +// // void Tile_SPU::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes) // { // AABB *aabb = getAABB(level, x, y, z); // if (aabb != NULL && box->intersects(aabb)) boxes->push_back(aabb); // } -// +// // AABB *Tile_SPU::getAABB(Level *level, int x, int y, int z) // { // return AABB::newTemp(x + xx0, y + yy0, z + zz0, x + xx1, y + yy1, z + zz1); // } -// +// bool Tile_SPU::isSolidRender(bool isServerLevel) { return true; @@ -239,67 +239,67 @@ Icon_SPU *Tile_SPU::getTexture(int face) // { // return mayPick(); // } -// +// // bool Tile_SPU::mayPick() // { // return true; // } -// +// // void Tile_SPU::tick(Level *level, int x, int y, int z, Random *random) // { // } -// +// // void Tile_SPU::animateTick(Level *level, int x, int y, int z, Random *random) // { // } -// +// // void Tile_SPU::destroy(Level *level, int x, int y, int z, int data) // { // } -// +// // void Tile_SPU::neighborChanged(Level *level, int x, int y, int z, int type) // { // } -// +// // void Tile_SPU::addLights(Level *level, int x, int y, int z) // { // } -// +// // int Tile_SPU::getTickDelay() // { // return 10; // } -// +// // void Tile_SPU::onPlace(Level *level, int x, int y, int z) // { // } -// +// // void Tile_SPU::onRemove(Level *level, int x, int y, int z) // { // } -// +// // int Tile_SPU::getResourceCount(Random *random) // { // return 1; // } -// +// // int Tile_SPU::getResource(int data, Random *random, int playerBonusLevel) // { // return id; // } -// -// float Tile_SPU::getDestroyProgress(std::shared_ptr player) +// +// float Tile_SPU::getDestroyProgress(shared_ptr player) // { // if (destroySpeed < 0) return 0; // if (!player->canDestroy(this)) return 1 / destroySpeed / 100.0f; // return (player->getDestroySpeed(this) / destroySpeed) / 30; // } -// +// // void Tile_SPU::spawnResources(Level *level, int x, int y, int z, int data, int playerBonusLevel) // { // spawnResources(level, x, y, z, data, 1, playerBonusLevel); // } -// +// // void Tile_SPU::spawnResources(Level *level, int x, int y, int z, int data, float odds, int playerBonusLevel) // { // if (level->isClientSide) return; @@ -309,24 +309,24 @@ Icon_SPU *Tile_SPU::getTexture(int face) // if (level->random->nextFloat() > odds) continue; // int type = getResource(data, level->random, playerBonusLevel); // if (type <= 0) continue; -// -// popResource(level, x, y, z, std::shared_ptr( new ItemInstance(type, 1, getSpawnResourcesAuxValue(data) ) ) ); +// +// popResource(level, x, y, z, shared_ptr( new ItemInstance(type, 1, getSpawnResourcesAuxValue(data) ) ) ); // } // } -// -// void Tile_SPU::popResource(Level *level, int x, int y, int z, std::shared_ptr itemInstance) +// +// void Tile_SPU::popResource(Level *level, int x, int y, int z, shared_ptr itemInstance) // { // if( level->isClientSide ) return; -// +// // float s = 0.7f; // double xo = level->random->nextFloat() * s + (1 - s) * 0.5; // double yo = level->random->nextFloat() * s + (1 - s) * 0.5; // double zo = level->random->nextFloat() * s + (1 - s) * 0.5; -// std::shared_ptr item = std::shared_ptr( new ItemEntity(level, x + xo, y + yo, z + zo, itemInstance ) ); +// shared_ptr item = shared_ptr( new ItemEntity(level, x + xo, y + yo, z + zo, itemInstance ) ); // item->throwTime = 10; // level->addEntity(item); // } -// +// // // Brought forward for TU7 // void Tile_SPU::popExperience(Level *level, int x, int y, int z, int amount) // { @@ -336,182 +336,182 @@ Icon_SPU *Tile_SPU::getTexture(int face) // { // int newCount = ExperienceOrb::getExperienceValue(amount); // amount -= newCount; -// level->addEntity(std::shared_ptr( new ExperienceOrb(level, x + .5, y + .5, z + .5, newCount))); +// level->addEntity(shared_ptr( new ExperienceOrb(level, x + .5, y + .5, z + .5, newCount))); // } // } // } -// +// // int Tile_SPU::getSpawnResourcesAuxValue(int data) // { // return 0; // } -// -// float Tile_SPU::getExplosionResistance(std::shared_ptr source) +// +// float Tile_SPU::getExplosionResistance(shared_ptr source) // { // return explosionResistance / 5.0f; // } -// +// // HitResult *Tile_SPU::clip(Level *level, int xt, int yt, int zt, Vec3 *a, Vec3 *b) // { // EnterCriticalSection(&m_csShape); // updateShape(level, xt, yt, zt); -// +// // a = a->add(-xt, -yt, -zt); // b = b->add(-xt, -yt, -zt); -// +// // Vec3 *xh0 = a->clipX(b, xx0); // Vec3 *xh1 = a->clipX(b, xx1); -// +// // Vec3 *yh0 = a->clipY(b, yy0); // Vec3 *yh1 = a->clipY(b, yy1); -// +// // Vec3 *zh0 = a->clipZ(b, zz0); // Vec3 *zh1 = a->clipZ(b, zz1); -// +// // Vec3 *closest = NULL; -// +// // if (containsX(xh0) && (closest == NULL || a->distanceTo(xh0) < a->distanceTo(closest))) closest = xh0; // if (containsX(xh1) && (closest == NULL || a->distanceTo(xh1) < a->distanceTo(closest))) closest = xh1; // if (containsY(yh0) && (closest == NULL || a->distanceTo(yh0) < a->distanceTo(closest))) closest = yh0; // if (containsY(yh1) && (closest == NULL || a->distanceTo(yh1) < a->distanceTo(closest))) closest = yh1; // if (containsZ(zh0) && (closest == NULL || a->distanceTo(zh0) < a->distanceTo(closest))) closest = zh0; // if (containsZ(zh1) && (closest == NULL || a->distanceTo(zh1) < a->distanceTo(closest))) closest = zh1; -// +// // LeaveCriticalSection(&m_csShape); -// +// // if (closest == NULL) return NULL; -// +// // int face = -1; -// +// // if (closest == xh0) face = 4; // if (closest == xh1) face = 5; // if (closest == yh0) face = 0; // if (closest == yh1) face = 1; // if (closest == zh0) face = 2; // if (closest == zh1) face = 3; -// +// // return new HitResult(xt, yt, zt, face, closest->add(xt, yt, zt)); // } -// +// // bool Tile_SPU::containsX(Vec3 *v) // { // if( v == NULL) return false; // return v->y >= yy0 && v->y <= yy1 && v->z >= zz0 && v->z <= zz1; // } -// +// // bool Tile_SPU::containsY(Vec3 *v) // { // if( v == NULL) return false; // return v->x >= xx0 && v->x <= xx1 && v->z >= zz0 && v->z <= zz1; // } -// +// // bool Tile_SPU::containsZ(Vec3 *v) // { // if( v == NULL) return false; // return v->x >= xx0 && v->x <= xx1 && v->y >= yy0 && v->y <= yy1; // } -// +// // void Tile_SPU::wasExploded(Level *level, int x, int y, int z) // { // } -// +// int Tile_SPU::getRenderLayer() { return 0; } -// +// // bool Tile_SPU::mayPlace(Level *level, int x, int y, int z, int face) // { // return mayPlace(level, x, y, z); // } -// +// // bool Tile_SPU::mayPlace(Level *level, int x, int y, int z) // { // int t = level->getTile(x, y, z); // return t == 0 || Tile_SPU::tiles[t]->material->isReplaceable(); // } -// +// // // 4J-PB - Adding a TestUse for tooltip display // bool Tile_SPU::TestUse() // { // return false; // } -// -// bool Tile_SPU::TestUse(Level *level, int x, int y, int z, std::shared_ptr player) +// +// bool Tile_SPU::TestUse(Level *level, int x, int y, int z, shared_ptr player) // { // return false; // } -// -// bool Tile_SPU::use(Level *level, int x, int y, int z, std::shared_ptr player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly/*=false*/) // 4J added soundOnly param +// +// bool Tile_SPU::use(Level *level, int x, int y, int z, shared_ptr player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly/*=false*/) // 4J added soundOnly param // { // return false; // } -// -// void Tile_SPU::stepOn(Level *level, int x, int y, int z, std::shared_ptr entity) +// +// void Tile_SPU::stepOn(Level *level, int x, int y, int z, shared_ptr entity) // { // } -// +// // void Tile_SPU::setPlacedOnFace(Level *level, int x, int y, int z, int face) // { // } -// +// // void Tile_SPU::prepareRender(Level *level, int x, int y, int z) // { // } -// -// void Tile_SPU::attack(Level *level, int x, int y, int z, std::shared_ptr player) +// +// void Tile_SPU::attack(Level *level, int x, int y, int z, shared_ptr player) // { // } -// -// void Tile_SPU::handleEntityInside(Level *level, int x, int y, int z, std::shared_ptr e, Vec3 *current) +// +// void Tile_SPU::handleEntityInside(Level *level, int x, int y, int z, shared_ptr e, Vec3 *current) // { // } -// +// void Tile_SPU::updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData, TileEntity* forceEntity) // 4J added forceData, forceEntity param { } -// +// int Tile_SPU::getColor(ChunkRebuildData *level, int x, int y, int z) { return 0xffffff; } -// +// // int Tile_SPU::getColor(LevelSource *level, int x, int y, int z, int data) // { // return 0xffffff; // } -// +// // bool Tile_SPU::getSignal(LevelSource *level, int x, int y, int z) // { // return false; // } -// +// // bool Tile_SPU::getSignal(LevelSource *level, int x, int y, int z, int dir) // { // return false; // } -// +// // bool Tile_SPU::isSignalSource() // { // return false; // } -// -// void Tile_SPU::entityInside(Level *level, int x, int y, int z, std::shared_ptr entity) +// +// void Tile_SPU::entityInside(Level *level, int x, int y, int z, shared_ptr entity) // { // } -// +// // bool Tile_SPU::getDirectSignal(Level *level, int x, int y, int z, int dir) // { // return false; // } -// +// void Tile_SPU::updateDefaultShape() { } -// -// void Tile_SPU::playerDestroy(Level *level, std::shared_ptr player, int x, int y, int z, int data) +// +// void Tile_SPU::playerDestroy(Level *level, shared_ptr player, int x, int y, int z, int data) // { // // 4J Stu - Special case - only record a crop destroy if is fully grown // if(id==Tile_SPU::crops_Id) @@ -525,14 +525,14 @@ void Tile_SPU::updateDefaultShape() // } // player->awardStat(Stats::totalBlocksMined, 1); // 4J : WESTY : Added for other award. // player->causeFoodExhaustion(FoodConstants::EXHAUSTION_MINE); -// +// // if( id == Tile_SPU::treeTrunk_Id ) // player->awardStat(Achievements::mineWood); -// -// +// +// // if (isCubeShaped() && !isEntityTile[id] && EnchantmentHelper::hasSilkTouch(player->inventory)) // { -// std::shared_ptr item = getSilkTouchItemInstance(data); +// shared_ptr item = getSilkTouchItemInstance(data); // if (item != NULL) // { // popResource(level, x, y, z, item); @@ -544,78 +544,78 @@ void Tile_SPU::updateDefaultShape() // spawnResources(level, x, y, z, data, playerBonusLevel); // } // } -// -// std::shared_ptr Tile_SPU::getSilkTouchItemInstance(int data) +// +// shared_ptr Tile_SPU::getSilkTouchItemInstance(int data) // { // int popData = 0; // if (id >= 0 && id < Item::items.length && Item::items[id]->isStackedByData()) // { // popData = data; // } -// return std::shared_ptr(new ItemInstance(id, 1, popData)); +// return shared_ptr(new ItemInstance(id, 1, popData)); // } -// +// // int Tile_SPU::getResourceCountForLootBonus(int bonusLevel, Random *random) // { // return getResourceCount(random); // } -// +// // bool Tile_SPU::canSurvive(Level *level, int x, int y, int z) // { // return true; // } -// -// void Tile_SPU::setPlacedBy(Level *level, int x, int y, int z, std::shared_ptr by) +// +// void Tile_SPU::setPlacedBy(Level *level, int x, int y, int z, shared_ptr by) // { // } -// +// // Tile *Tile_SPU::setDescriptionId(unsigned int id) // { // this->descriptionId = id; // return this; // } -// +// // wstring Tile_SPU::getName() // { // return I18n::get(getDescriptionId() + L".name"); // } -// +// // unsigned int Tile_SPU::getDescriptionId(int iData /*= -1*/) // { // return descriptionId; // } -// +// // Tile *Tile_SPU::setUseDescriptionId(unsigned int id) // { // this->useDescriptionId = id; // return this; // } -// +// // unsigned int Tile_SPU::getUseDescriptionId() // { // return useDescriptionId; // } -// +// // void Tile_SPU::triggerEvent(Level *level, int x, int y, int z, int b0, int b1) // { // } -// +// // bool Tile_SPU::isCollectStatistics() // { // return collectStatistics; // } -// +// // Tile *Tile_SPU::setNotCollectStatistics() // { // collectStatistics = false; // return this; // } -// +// // int Tile_SPU::getPistonPushReaction() // { // return material->getPushReaction(); // } -// +// // // 4J - brought forward from 1.8.2 float Tile_SPU::getShadeBrightness(ChunkRebuildData *level, int x, int y, int z) { @@ -629,37 +629,37 @@ Tile_SPU* Tile_SPU::createFromID( int tileID ) if(m_tiles[tileID].id != -1) return &m_tiles[tileID]; - + #ifndef SN_TARGET_PS3_SPU app.DebugPrintf("missing tile ID %d\n", tileID); #else spu_print("missing tile ID %d\n", tileID); -#endif +#endif return &m_tiles[1]; } Material_SPU* Tile_SPU::getMaterial() { - int matID = ms_pTileData->materialIDs[id]; + int matID = ms_pTileData->materialIDs[id]; return &ms_pTileData->materials[matID]; } -// -// void Tile_SPU::fallOn(Level *level, int x, int y, int z, std::shared_ptr entity, float fallDistance) +// +// void Tile_SPU::fallOn(Level *level, int x, int y, int z, shared_ptr entity, float fallDistance) // { // } -// +// // void Tile_SPU::registerIcons(IconRegister *iconRegister) // { // icon = iconRegister->registerIcon(m_textureName); // } -// +// // wstring Tile_SPU::getTileItemIconName() // { // return L""; // } -// +// // Tile *Tile_SPU::setTextureName(const wstring &name) // { // m_textureName = name; @@ -690,7 +690,7 @@ void Tile_SPU::initTilePointers() CREATE_TILE_TYPE(stairs_wood_Id, StairTile_SPU); CREATE_TILE_TYPE(stairs_stone_Id, StairTile_SPU); - CREATE_TILE_TYPE(stairs_bricks_Id, StairTile_SPU); + CREATE_TILE_TYPE(stairs_bricks_Id, StairTile_SPU); CREATE_TILE_TYPE(stairs_stoneBrickSmooth_Id, StairTile_SPU); CREATE_TILE_TYPE(stairs_netherBricks_Id, StairTile_SPU); CREATE_TILE_TYPE(stairs_sandstone_Id, StairTile_SPU); @@ -863,7 +863,7 @@ void Tile_SPU::initTilePointers() CREATE_TILE_TYPE(goldOre_Id, Tile_SPU); // OreTile CREATE_TILE_TYPE(ironOre_Id, Tile_SPU); // OreTile CREATE_TILE_TYPE(coalOre_Id, Tile_SPU); // OreTile - CREATE_TILE_TYPE(lapisOre_Id, Tile_SPU); // OreTile + CREATE_TILE_TYPE(lapisOre_Id, Tile_SPU); // OreTile CREATE_TILE_TYPE(diamondOre_Id, Tile_SPU); // OreTile CREATE_TILE_TYPE(clay_Id, Tile_SPU); // ClayTile CREATE_TILE_TYPE(redStoneOre_Id, Tile_SPU); // RedStoneOreTile @@ -884,7 +884,7 @@ void Tile_SPU::initTilePointers() CREATE_TILE_TYPE(enderChest_Id, EnderChestTile_SPU); CREATE_TILE_TYPE(tripWireSource_Id, TripWireSourceTile_SPU); CREATE_TILE_TYPE(tripWire_Id, TripWireTile_SPU); -// +// CREATE_TILE_TYPE(emeraldBlock_Id, Tile_SPU); // MetalTile CREATE_TILE_TYPE(cobbleWall_Id, WallTile_SPU); CREATE_TILE_TYPE(flowerPot_Id, FlowerPotTile_SPU); diff --git a/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.cpp b/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.cpp index 3de39461..0912e33a 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.cpp +++ b/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.cpp @@ -21,7 +21,7 @@ PlayStation(R)3 Programmer Tool Runtime Library 430.001 // #define SPU_HEAPSIZE (128*1024) // #define SPU_STACKSIZE (16*1024) -// +// // CELL_SPU_LS_PARAM(128*1024, 16*1024); // can't use #defines here as it seems to create an asm instruction @@ -132,7 +132,7 @@ bool LevelRenderer_FindNearestChunk_DataIn::MultiplayerChunkCache::getChunkEmpty } -bool LevelRenderer_FindNearestChunk_DataIn::CompressedTileStorage::isRenderChunkEmpty(int y) // y == 0, 16, 32... 112 (representing a 16 byte range) +bool LevelRenderer_FindNearestChunk_DataIn::CompressedTileStorage::isRenderChunkEmpty(int y) // y == 0, 16, 32... 112 (representing a 16 byte range) { int blockIdx; unsigned short *blockIndices = (unsigned short *)indicesAndData; @@ -162,30 +162,30 @@ void LevelRenderer_FindNearestChunk_DataIn::findNearestChunk() unsigned char* globalChunkFlags = (unsigned char*)alloca(numGlobalChunks); // 164K !!! DmaData_SPU::getAndWait(globalChunkFlags, (uintptr_t)pGlobalChunkFlags, sizeof(unsigned char)*numGlobalChunks); - + nearChunk = NULL; // Nearest chunk that is dirty veryNearCount = 0; int minDistSq = 0x7fffffff; // Distances to this chunk - + // Find nearest chunk that is dirty for( int p = 0; p < 4; p++ ) { // It's possible that the localplayers member can be set to NULL on the main thread when a player chooses to exit the game - // So take a reference to the player object now. As it is a std::shared_ptr it should live as long as we need it - PlayerData* player = &playerData[p]; + // So take a reference to the player object now. As it is a shared_ptr it should live as long as we need it + PlayerData* player = &playerData[p]; if( player->bValid == NULL ) continue; if( chunks[p] == NULL ) continue; if( level[p] == NULL ) continue; if( chunkLengths[p] != xChunks * zChunks * CHUNK_Y_COUNT ) continue; int px = (int)player->x; int py = (int)player->y; - int pz = (int)player->z; + int pz = (int)player->z; ClipChunk clipChunk[512]; for( int z = 0; z < zChunks; z++ ) - { + { uintptr_t ClipChunkX_PPU = (uintptr_t)&chunks[p][(z * yChunks + 0) * xChunks + 0]; DmaData_SPU::getAndWait(&clipChunk[0], ClipChunkX_PPU, sizeof(ClipChunk) * xChunks*CHUNK_Y_COUNT); for( int y = 0; y < CHUNK_Y_COUNT; y++ ) @@ -196,7 +196,7 @@ void LevelRenderer_FindNearestChunk_DataIn::findNearestChunk() // Get distance to this chunk - deliberately not calling the chunk's method of doing this to avoid overheads (passing entitie, type conversion etc.) that this involves int xd = pClipChunk->xm - px; - int yd = pClipChunk->ym - py; + int yd = pClipChunk->ym - py; int zd = pClipChunk->zm - pz; int distSq = xd * xd + yd * yd + zd * zd; int distSqWeighted = xd * xd + yd * yd * 4 + zd * zd; // Weighting against y to prioritise things in same x/z plane as player first @@ -257,12 +257,12 @@ void cellSpursJobQueueMain(CellSpursJobContext2 *pContext, CellSpursJob256 *pJob spu_print("LevelRenderer_cull [SPU#%u] start\n", idSpu); g_pSpursJobContext = pContext; - uint32_t eaDataIn = pJob->workArea.userData[0]; + uint32_t eaDataIn = pJob->workArea.userData[0]; // uint32_t eaDataOut =pJob->workArea.userData[1]; LevelRenderer_FindNearestChunk_DataIn dataIn; DmaData_SPU::getAndWait(&dataIn, eaDataIn, sizeof(LevelRenderer_FindNearestChunk_DataIn)); - + dataIn.findNearestChunk(); DmaData_SPU::putAndWait(&dataIn, eaDataIn, sizeof(LevelRenderer_FindNearestChunk_DataIn)); diff --git a/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.h b/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.h index a6c3ef2a..55ffcabd 100644 --- a/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.h +++ b/Minecraft.Client/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.h @@ -23,7 +23,7 @@ public: int xm, ym, zm; }; - class AABB + class AABB { double x0, y0, z0; double x1, y1, z1; @@ -64,7 +64,7 @@ public: int id; int padding[1]; //public: - // vector > renderableTileEntities; // 4J - removed + // vector > renderableTileEntities; // 4J - removed private: void *globalRenderableTileEntities; @@ -86,7 +86,7 @@ public: MultiplayerChunkCache multiplayerChunkCache[4]; int lowerOffset; // offsets into the level class, we don't want to compile the entire class - int upperOffset; + int upperOffset; int xChunks, yChunks, zChunks; diff --git a/Minecraft.Client/PaintingRenderer.cpp b/Minecraft.Client/PaintingRenderer.cpp index b3a8acd2..4238f759 100644 --- a/Minecraft.Client/PaintingRenderer.cpp +++ b/Minecraft.Client/PaintingRenderer.cpp @@ -11,11 +11,11 @@ PaintingRenderer::PaintingRenderer() random = new Random(); } -void PaintingRenderer::render(std::shared_ptr _painting, double x, double y, double z, float rot, float a) +void PaintingRenderer::render(shared_ptr _painting, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr painting = dynamic_pointer_cast(_painting); - + shared_ptr painting = dynamic_pointer_cast(_painting); + random->setSeed(187); glPushMatrix(); @@ -33,7 +33,7 @@ void PaintingRenderer::render(std::shared_ptr _painting, double x, doubl glPopMatrix(); } -void PaintingRenderer::renderPainting(std::shared_ptr painting, int w, int h, int uo, int vo) +void PaintingRenderer::renderPainting(shared_ptr painting, int w, int h, int uo, int vo) { float xx0 = -w / 2.0f; float yy0 = -h / 2.0f; @@ -113,7 +113,7 @@ void PaintingRenderer::renderPainting(std::shared_ptr painting, int w, } -void PaintingRenderer::setBrightness(std::shared_ptr painting, float ss, float ya) +void PaintingRenderer::setBrightness(shared_ptr painting, float ss, float ya) { int x = Mth::floor(painting->x); int y = Mth::floor(painting->y + ya/16.0f); diff --git a/Minecraft.Client/PaintingRenderer.h b/Minecraft.Client/PaintingRenderer.h index f940c169..a750e128 100644 --- a/Minecraft.Client/PaintingRenderer.h +++ b/Minecraft.Client/PaintingRenderer.h @@ -11,9 +11,9 @@ private: public: PaintingRenderer(); // 4J -added - virtual void render(std::shared_ptr _painting, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr _painting, double x, double y, double z, float rot, float a); private: - void renderPainting(std::shared_ptr painting, int w, int h, int uo, int vo); - void setBrightness(std::shared_ptr painting, float ss, float ya); + void renderPainting(shared_ptr painting, int w, int h, int uo, int vo); + void setBrightness(shared_ptr painting, float ss, float ya); }; diff --git a/Minecraft.Client/Particle.cpp b/Minecraft.Client/Particle.cpp index 30f14878..90ef93bc 100644 --- a/Minecraft.Client/Particle.cpp +++ b/Minecraft.Client/Particle.cpp @@ -61,7 +61,7 @@ Particle::Particle(Level *level, double x, double y, double z, double xa, double yd = yd / dd * speed * 0.4f + 0.1f; zd = zd / dd * speed * 0.4f;} -std::shared_ptr Particle::setPower(float power) +shared_ptr Particle::setPower(float power) { xd *= power; yd = (yd - 0.1f) * power + 0.1f; @@ -69,7 +69,7 @@ std::shared_ptr Particle::setPower(float power) return dynamic_pointer_cast( shared_from_this() ); } -std::shared_ptr Particle::scale(float scale) +shared_ptr Particle::scale(float scale) { setSize(0.2f * scale, 0.2f * scale); size *= scale; @@ -168,9 +168,9 @@ void Particle::render(Tesselator *t, float a, float xa, float ya, float za, floa #ifdef __PSVITA__ // AP - this will set up the 4 vertices in half the time. t->tileParticleQuad((float)(x - xa * r - xa2 * r), (float)( y - ya * r), (float)( z - za * r - za2 * r), (float)( u1), (float)( v1), - (float)(x - xa * r + xa2 * r), (float)( y + ya * r), (float)( z - za * r + za2 * r), (float)( u1), (float)( v0), - (float)(x + xa * r + xa2 * r), (float)( y + ya * r), (float)( z + za * r + za2 * r), (float)( u0), (float)( v0), - (float)(x + xa * r - xa2 * r), (float)( y - ya * r), (float)( z + za * r - za2 * r), (float)( u0), (float)( v1), + (float)(x - xa * r + xa2 * r), (float)( y + ya * r), (float)( z - za * r + za2 * r), (float)( u1), (float)( v0), + (float)(x + xa * r + xa2 * r), (float)( y + ya * r), (float)( z + za * r + za2 * r), (float)( u0), (float)( v0), + (float)(x + xa * r - xa2 * r), (float)( y - ya * r), (float)( z + za * r - za2 * r), (float)( u0), (float)( v1), rCol * br, gCol * br, bCol * br, alpha); #else t->color(rCol * br, gCol * br, bCol * br, alpha); diff --git a/Minecraft.Client/Particle.h b/Minecraft.Client/Particle.h index a56c2e4d..d9b0ba3a 100644 --- a/Minecraft.Client/Particle.h +++ b/Minecraft.Client/Particle.h @@ -28,8 +28,8 @@ protected: Particle(Level *level, double x, double y, double z); public: Particle(Level *level, double x, double y, double z, double xa, double ya, double za); - virtual std::shared_ptr setPower(float power); - virtual std::shared_ptr scale(float scale); + virtual shared_ptr setPower(float power); + virtual shared_ptr scale(float scale); void setColor(float r, float g, float b); void setAlpha(float alpha); float getRedCol(); diff --git a/Minecraft.Client/ParticleEngine.cpp b/Minecraft.Client/ParticleEngine.cpp index 12ef4a87..3a34253a 100644 --- a/Minecraft.Client/ParticleEngine.cpp +++ b/Minecraft.Client/ParticleEngine.cpp @@ -18,7 +18,7 @@ ParticleEngine::ParticleEngine(Level *level, Textures *textures) this->level = level; } this->textures = textures; - + this->random = new Random(); } @@ -27,7 +27,7 @@ ParticleEngine::~ParticleEngine() delete random; } -void ParticleEngine::add(std::shared_ptr p) +void ParticleEngine::add(shared_ptr p) { int t = p->getParticleTexture(); int l = p->level->dimension->id == 0 ? 0 : ( p->level->dimension->id == -1 ? 1 : 2); @@ -43,7 +43,7 @@ void ParticleEngine::tick() { for (unsigned int i = 0; i < particles[l][tt].size(); i++) { - std::shared_ptr p = particles[l][tt][i]; + shared_ptr p = particles[l][tt][i]; p->tick(); if (p->removed) { @@ -56,7 +56,7 @@ void ParticleEngine::tick() } } -void ParticleEngine::render(std::shared_ptr player, float a) +void ParticleEngine::render(shared_ptr player, float a) { // 4J - change brought forward from 1.2.3 float xa = Camera::xa; @@ -99,7 +99,7 @@ void ParticleEngine::render(std::shared_ptr player, float a) t->end(); t->begin(); } - std::shared_ptr p = particles[l][tt][i]; + shared_ptr p = particles[l][tt][i]; if (SharedConstants::TEXTURE_LIGHTING) // 4J - change brought forward from 1.8.2 { @@ -118,7 +118,7 @@ void ParticleEngine::render(std::shared_ptr player, float a) } -void ParticleEngine::renderLit(std::shared_ptr player, float a) +void ParticleEngine::renderLit(shared_ptr player, float a) { // 4J - added. We call this before ParticleEngine::render in the general render per player, so if we // don't set this here then the offsets will be from the previous player - a single frame lag for the @@ -142,7 +142,7 @@ void ParticleEngine::renderLit(std::shared_ptr player, float a) Tesselator *t = Tesselator::getInstance(); for (unsigned int i = 0; i < particles[l][tt].size(); i++) { - std::shared_ptr p = particles[l][tt][i]; + shared_ptr p = particles[l][tt][i]; if (SharedConstants::TEXTURE_LIGHTING) // 4J - change brought forward from 1.8.2 { @@ -182,7 +182,7 @@ void ParticleEngine::destroy(int x, int y, int z, int tid, int data) double yp = y + (yy + 0.5) / SD; double zp = z + (zz + 0.5) / SD; int face = random->nextInt(6); - add(( std::shared_ptr(new TerrainParticle(level, xp, yp, zp, xp - x - 0.5f, yp - y - 0.5f, zp - z - 0.5f, tile, face, data, textures) ) )->init(x, y, z, data)); + add(( shared_ptr(new TerrainParticle(level, xp, yp, zp, xp - x - 0.5f, yp - y - 0.5f, zp - z - 0.5f, tile, face, data, textures) ) )->init(x, y, z, data)); } } @@ -201,7 +201,7 @@ void ParticleEngine::crack(int x, int y, int z, int face) if (face == 3) zp = z + tile->getShapeZ1() + r; if (face == 4) xp = x + tile->getShapeX0() - r; if (face == 5) xp = x + tile->getShapeX1() + r; - add(( std::shared_ptr(new TerrainParticle(level, xp, yp, zp, 0, 0, 0, tile, face, level->getData(x, y, z), textures) ) )->init(x, y, z, level->getData(x, y, z))->setPower(0.2f)->scale(0.6f)); + add(( shared_ptr(new TerrainParticle(level, xp, yp, zp, 0, 0, 0, tile, face, level->getData(x, y, z), textures) ) )->init(x, y, z, level->getData(x, y, z))->setPower(0.2f)->scale(0.6f)); } diff --git a/Minecraft.Client/ParticleEngine.h b/Minecraft.Client/ParticleEngine.h index 0fee7a16..09e3685b 100644 --- a/Minecraft.Client/ParticleEngine.h +++ b/Minecraft.Client/ParticleEngine.h @@ -26,17 +26,17 @@ public: protected: Level *level; private: - deque > particles[3][TEXTURE_COUNT]; // 4J made two arrays to cope with simultaneous two dimensions + deque > particles[3][TEXTURE_COUNT]; // 4J made two arrays to cope with simultaneous two dimensions Textures *textures; Random *random; public: ParticleEngine(Level *level, Textures *textures); ~ParticleEngine(); - void add(std::shared_ptr p); + void add(shared_ptr p); void tick(); - void render(std::shared_ptr player, float a); - void renderLit(std::shared_ptr player, float a); + void render(shared_ptr player, float a); + void renderLit(shared_ptr player, float a); void setLevel(Level *level); void destroy(int x, int y, int z, int tid, int data); void crack(int x, int y, int z, int face); diff --git a/Minecraft.Client/PendingConnection.cpp b/Minecraft.Client/PendingConnection.cpp index f8f61bdb..841863b6 100644 --- a/Minecraft.Client/PendingConnection.cpp +++ b/Minecraft.Client/PendingConnection.cpp @@ -61,7 +61,7 @@ void PendingConnection::disconnect(DisconnectPacket::eDisconnectReason reason) // try { // 4J - removed try/catch // logger.info("Disconnecting " + getName() + ": " + reason); app.DebugPrintf("Pending connection disconnect: %d\n", reason ); - connection->send( std::shared_ptr( new DisconnectPacket(reason) ) ); + connection->send( shared_ptr( new DisconnectPacket(reason) ) ); connection->sendAndQuit(); done = true; // } catch (Exception e) { @@ -69,7 +69,7 @@ void PendingConnection::disconnect(DisconnectPacket::eDisconnectReason reason) // } } -void PendingConnection::handlePreLogin(std::shared_ptr packet) +void PendingConnection::handlePreLogin(shared_ptr packet) { if (packet->m_netcodeVersion != MINECRAFT_NET_VERSION) { @@ -103,10 +103,10 @@ void PendingConnection::sendPreLoginResponse() PlayerList *playerList = MinecraftServer::getInstance()->getPlayers(); for(AUTO_VAR(it, playerList->players.begin()); it != playerList->players.end(); ++it) { - std::shared_ptr player = *it; + shared_ptr player = *it; // If the offline Xuid is invalid but the online one is not then that's guest which we should ignore // If the online Xuid is invalid but the offline one is not then we are definitely an offline game so dont care about UGC - + // PADDY - this is failing when a local player with chat restrictions joins an online game if( player != NULL && player->connection->m_offlineXUID != INVALID_XUID && player->connection->m_onlineXUID != INVALID_XUID ) @@ -128,16 +128,16 @@ void PendingConnection::sendPreLoginResponse() if (false)// server->onlineMode) // 4J - removed { loginKey = L"TOIMPLEMENT"; // 4J - todo Long.toHexString(random.nextLong()); - connection->send( std::shared_ptr( new PreLoginPacket(loginKey, ugcXuids, ugcXuidCount, ugcFriendsOnlyBits, server->m_ugcPlayersVersion, szUniqueMapName,app.GetGameHostOption(eGameHostOption_All),hostIndex) ) ); + connection->send( shared_ptr( new PreLoginPacket(loginKey, ugcXuids, ugcXuidCount, ugcFriendsOnlyBits, server->m_ugcPlayersVersion, szUniqueMapName,app.GetGameHostOption(eGameHostOption_All),hostIndex) ) ); } else #endif { - connection->send( std::shared_ptr( new PreLoginPacket(L"-", ugcXuids, ugcXuidCount, ugcFriendsOnlyBits, server->m_ugcPlayersVersion,szUniqueMapName,app.GetGameHostOption(eGameHostOption_All),hostIndex, server->m_texturePackId) ) ); + connection->send( shared_ptr( new PreLoginPacket(L"-", ugcXuids, ugcXuidCount, ugcFriendsOnlyBits, server->m_ugcPlayersVersion,szUniqueMapName,app.GetGameHostOption(eGameHostOption_All),hostIndex, server->m_texturePackId) ) ); } } -void PendingConnection::handleLogin(std::shared_ptr packet) +void PendingConnection::handleLogin(shared_ptr packet) { // printf("Server: handleLogin\n"); //name = packet->userName; @@ -173,7 +173,7 @@ void PendingConnection::handleLogin(std::shared_ptr packet) //else { //4J - removed -#if 0 +#if 0 new Thread() { public void run() { try { @@ -198,7 +198,7 @@ void PendingConnection::handleLogin(std::shared_ptr packet) } -void PendingConnection::handleAcceptedLogin(std::shared_ptr packet) +void PendingConnection::handleAcceptedLogin(shared_ptr packet) { if(packet->m_ugcPlayersVersion != server->m_ugcPlayersVersion) { @@ -211,7 +211,7 @@ void PendingConnection::handleAcceptedLogin(std::shared_ptr packet) PlayerUID playerXuid = packet->m_offlineXuid; if(playerXuid == INVALID_XUID) playerXuid = packet->m_onlineXuid; - std::shared_ptr playerEntity = server->getPlayers()->getPlayerForLogin(this, name, playerXuid,packet->m_onlineXuid); + shared_ptr playerEntity = server->getPlayers()->getPlayerForLogin(this, name, playerXuid,packet->m_onlineXuid); if (playerEntity != NULL) { server->getPlayers()->placeNewPlayer(connection, playerEntity, packet); @@ -227,12 +227,12 @@ void PendingConnection::onDisconnect(DisconnectPacket::eDisconnectReason reason, done = true; } -void PendingConnection::handleGetInfo(std::shared_ptr packet) +void PendingConnection::handleGetInfo(shared_ptr packet) { //try { - //String message = server->motd + "�" + server->players->getPlayerCount() + "�" + server->players->getMaxPlayers(); + //String message = server->motd + "§" + server->players->getPlayerCount() + "§" + server->players->getMaxPlayers(); //connection->send(new DisconnectPacket(message)); - connection->send(std::shared_ptr(new DisconnectPacket(DisconnectPacket::eDisconnect_ServerFull) ) ); + connection->send(shared_ptr(new DisconnectPacket(DisconnectPacket::eDisconnect_ServerFull) ) ); connection->sendAndQuit(); server->connection->removeSpamProtection(connection->getSocket()); done = true; @@ -241,17 +241,17 @@ void PendingConnection::handleGetInfo(std::shared_ptr packet) //} } -void PendingConnection::handleKeepAlive(std::shared_ptr packet) +void PendingConnection::handleKeepAlive(shared_ptr packet) { // Ignore } -void PendingConnection::onUnhandledPacket(std::shared_ptr packet) +void PendingConnection::onUnhandledPacket(shared_ptr packet) { disconnect(DisconnectPacket::eDisconnect_UnexpectedPacket); } -void PendingConnection::send(std::shared_ptr packet) +void PendingConnection::send(shared_ptr packet) { connection->send(packet); } diff --git a/Minecraft.Client/PendingConnection.h b/Minecraft.Client/PendingConnection.h index 45d8163d..02d706f9 100644 --- a/Minecraft.Client/PendingConnection.h +++ b/Minecraft.Client/PendingConnection.h @@ -24,7 +24,7 @@ private: MinecraftServer *server; int _tick; wstring name; - std::shared_ptr acceptedLogin; + shared_ptr acceptedLogin; wstring loginKey; public: @@ -32,14 +32,14 @@ public: ~PendingConnection(); void tick(); void disconnect(DisconnectPacket::eDisconnectReason reason); - virtual void handlePreLogin(std::shared_ptr packet); - virtual void handleLogin(std::shared_ptr packet); - virtual void handleAcceptedLogin(std::shared_ptr packet); + virtual void handlePreLogin(shared_ptr packet); + virtual void handleLogin(shared_ptr packet); + virtual void handleAcceptedLogin(shared_ptr packet); virtual void onDisconnect(DisconnectPacket::eDisconnectReason reason, void *reasonObjects); - virtual void handleGetInfo(std::shared_ptr packet); - virtual void handleKeepAlive(std::shared_ptr packet); - virtual void onUnhandledPacket(std::shared_ptr packet); - void send(std::shared_ptr packet); + virtual void handleGetInfo(shared_ptr packet); + virtual void handleKeepAlive(shared_ptr packet); + virtual void onUnhandledPacket(shared_ptr packet); + void send(shared_ptr packet); wstring getName(); virtual bool isServerPacketListener(); diff --git a/Minecraft.Client/PigRenderer.cpp b/Minecraft.Client/PigRenderer.cpp index 7e50fe35..eb78cd20 100644 --- a/Minecraft.Client/PigRenderer.cpp +++ b/Minecraft.Client/PigRenderer.cpp @@ -7,10 +7,10 @@ PigRenderer::PigRenderer(Model *model, Model *armor, float shadow) : MobRenderer setArmor(armor); } -int PigRenderer::prepareArmor(std::shared_ptr _pig, int layer, float a) +int PigRenderer::prepareArmor(shared_ptr _pig, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr pig = dynamic_pointer_cast(_pig); + shared_ptr pig = dynamic_pointer_cast(_pig); MemSect(31); bindTexture(TN_MOB_SADDLE); // 4J was L"/mob/saddle.png" @@ -18,7 +18,7 @@ int PigRenderer::prepareArmor(std::shared_ptr _pig, int layer, float a) return (layer == 0 && pig->hasSaddle()) ? 1 : -1; } -void PigRenderer::render(std::shared_ptr mob, double x, double y, double z, float rot, float a) +void PigRenderer::render(shared_ptr mob, double x, double y, double z, float rot, float a) { MobRenderer::render(mob, x, y, z, rot, a); -} \ No newline at end of file +} \ No newline at end of file diff --git a/Minecraft.Client/PigRenderer.h b/Minecraft.Client/PigRenderer.h index 9dc3edfa..e674b508 100644 --- a/Minecraft.Client/PigRenderer.h +++ b/Minecraft.Client/PigRenderer.h @@ -6,8 +6,8 @@ class PigRenderer : public MobRenderer public: PigRenderer(Model *model, Model *armor, float shadow); protected: - virtual int prepareArmor(std::shared_ptr _pig, int layer, float a); + virtual int prepareArmor(shared_ptr _pig, int layer, float a); public: - virtual void render(std::shared_ptr mob, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr mob, double x, double y, double z, float rot, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/PistonPieceRenderer.cpp b/Minecraft.Client/PistonPieceRenderer.cpp index b33df7b2..1ce084cf 100644 --- a/Minecraft.Client/PistonPieceRenderer.cpp +++ b/Minecraft.Client/PistonPieceRenderer.cpp @@ -12,10 +12,10 @@ PistonPieceRenderer::PistonPieceRenderer() tileRenderer = NULL; } -void PistonPieceRenderer::render(std::shared_ptr _entity, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void PistonPieceRenderer::render(shared_ptr _entity, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr entity = dynamic_pointer_cast(_entity); + shared_ptr entity = dynamic_pointer_cast(_entity); Tile *tile = Tile::tiles[entity->getId()]; if (tile != NULL && entity->getProgress(a) <= 1) // 4J - changed condition from < to <= as our chunk update is async to main thread and so we can have to render these with progress of 1 @@ -60,7 +60,7 @@ void PistonPieceRenderer::render(std::shared_ptr _entity, double x, } } - + void PistonPieceRenderer::onNewLevel(Level *level) { delete tileRenderer; diff --git a/Minecraft.Client/PistonPieceRenderer.h b/Minecraft.Client/PistonPieceRenderer.h index 7a2a3b7d..830ddd43 100644 --- a/Minecraft.Client/PistonPieceRenderer.h +++ b/Minecraft.Client/PistonPieceRenderer.h @@ -2,13 +2,13 @@ class PistonPieceEntity; class TileRenderer; -class PistonPieceRenderer : public TileEntityRenderer +class PistonPieceRenderer : public TileEntityRenderer { private: TileRenderer *tileRenderer; public: PistonPieceRenderer(); - virtual void render(std::shared_ptr _entity, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param + virtual void render(shared_ptr _entity, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param virtual void onNewLevel(Level *level); }; diff --git a/Minecraft.Client/PlayerChunkMap.cpp b/Minecraft.Client/PlayerChunkMap.cpp index 06bdcf73..1c7516cf 100644 --- a/Minecraft.Client/PlayerChunkMap.cpp +++ b/Minecraft.Client/PlayerChunkMap.cpp @@ -44,12 +44,12 @@ void PlayerChunkMap::flagEntitiesToBeRemoved(unsigned int *flags, bool *flagToBe { for(AUTO_VAR(it,players.begin()); it != players.end(); it++) { - std::shared_ptr serverPlayer = *it; + shared_ptr serverPlayer = *it; serverPlayer->flagEntitiesToBeRemoved(flags, flagToBeRemoved); } } -void PlayerChunkMap::PlayerChunk::add(std::shared_ptr player, bool sendPacket /*= true*/) +void PlayerChunkMap::PlayerChunk::add(shared_ptr player, bool sendPacket /*= true*/) { //app.DebugPrintf("--- Adding player to chunk x=%d\tz=%d\n",x, z); if (find(players.begin(),players.end(),player) != players.end()) @@ -66,7 +66,7 @@ void PlayerChunkMap::PlayerChunk::add(std::shared_ptr player, bool player->seenChunks.insert(pos); // 4J Added the sendPacket check. See PlayerChunkMap::add for the usage - if( sendPacket ) player->connection->send( std::shared_ptr( new ChunkVisibilityPacket(pos.x, pos.z, true) ) ); + if( sendPacket ) player->connection->send( shared_ptr( new ChunkVisibilityPacket(pos.x, pos.z, true) ) ); players.push_back(player); @@ -77,7 +77,7 @@ void PlayerChunkMap::PlayerChunk::add(std::shared_ptr player, bool #endif } -void PlayerChunkMap::PlayerChunk::remove(std::shared_ptr player) +void PlayerChunkMap::PlayerChunk::remove(shared_ptr player) { PlayerChunkMap::PlayerChunk *toDelete = NULL; @@ -121,7 +121,7 @@ void PlayerChunkMap::PlayerChunk::remove(std::shared_ptr player) { for( AUTO_VAR(it, players.begin()); it < players.end(); ++it ) { - std::shared_ptr currPlayer = *it; + shared_ptr currPlayer = *it; INetworkPlayer *currNetPlayer = currPlayer->connection->getNetworkPlayer(); if( currNetPlayer != NULL && currNetPlayer->IsSameSystem( thisNetPlayer ) && currPlayer->seenChunks.find(pos) != currPlayer->seenChunks.end() ) { @@ -132,7 +132,7 @@ void PlayerChunkMap::PlayerChunk::remove(std::shared_ptr player) if(noOtherPlayersFound) { //wprintf(L"Sending ChunkVisiblity packet false for chunk (%d,%d) to player %ls\n", x, z, player->name.c_str() ); - player->connection->send( std::shared_ptr( new ChunkVisibilityPacket(pos.x, pos.z, false) ) ); + player->connection->send( shared_ptr( new ChunkVisibilityPacket(pos.x, pos.z, false) ) ); } } else @@ -181,12 +181,12 @@ void PlayerChunkMap::PlayerChunk::prioritiseTileChanges() prioritised = true; } -void PlayerChunkMap::PlayerChunk::broadcast(std::shared_ptr packet) +void PlayerChunkMap::PlayerChunk::broadcast(shared_ptr packet) { - vector< std::shared_ptr > sentTo; + vector< shared_ptr > sentTo; for (unsigned int i = 0; i < players.size(); i++) { - std::shared_ptr player = players[i]; + shared_ptr player = players[i]; // 4J - don't send to a player we've already sent this data to that shares the same machine. TileUpdatePacket, // ChunkTilesUpdatePacket and SignUpdatePacket all used to limit themselves to sending once to each machine @@ -205,7 +205,7 @@ void PlayerChunkMap::PlayerChunk::broadcast(std::shared_ptr packet) { for(unsigned int j = 0; j < sentTo.size(); j++ ) { - std::shared_ptr player2 = sentTo[j]; + shared_ptr player2 = sentTo[j]; INetworkPlayer *otherPlayer = player2->connection->getNetworkPlayer(); if( otherPlayer != NULL && thisPlayer->IsSameSystem(otherPlayer) ) { @@ -244,7 +244,7 @@ void PlayerChunkMap::PlayerChunk::broadcast(std::shared_ptr packet) for( int i = 0; i < parent->level->getServer()->getPlayers()->players.size(); i++ ) { - std::shared_ptr player = parent->level->getServer()->getPlayers()->players[i]; + shared_ptr player = parent->level->getServer()->getPlayers()->players[i]; // Don't worry about local players, they get all their updates through sharing level with the server anyway if ( player->connection == NULL ) continue; if( player->connection->isLocal() ) continue; @@ -267,7 +267,7 @@ void PlayerChunkMap::PlayerChunk::broadcast(std::shared_ptr packet) { for(unsigned int j = 0; j < sentTo.size(); j++ ) { - std::shared_ptr player2 = sentTo[j]; + shared_ptr player2 = sentTo[j]; INetworkPlayer *otherPlayer = player2->connection->getNetworkPlayer(); if( otherPlayer != NULL && thisPlayer->IsSameSystem(otherPlayer) ) { @@ -299,7 +299,7 @@ bool PlayerChunkMap::PlayerChunk::broadcastChanges(bool allowRegionUpdate) int x = pos.x * 16 + xChangeMin; int y = yChangeMin; int z = pos.z * 16 + zChangeMin; - broadcast( std::shared_ptr( new TileUpdatePacket(x, y, z, level) ) ); + broadcast( shared_ptr( new TileUpdatePacket(x, y, z, level) ) ); if (level->isEntityTile(x, y, z)) { broadcast(level->getTileEntity(x, y, z)); @@ -329,8 +329,8 @@ bool PlayerChunkMap::PlayerChunk::broadcastChanges(bool allowRegionUpdate) // Block region update packets can only encode ys in a range of 1 - 256 if( ys > 256 ) ys = 256; - broadcast( std::shared_ptr( new BlockRegionUpdatePacket(xp, yp, zp, xs, ys, zs, level) ) ); - vector > *tes = level->getTileEntitiesInRegion(xp, yp, zp, xp + xs, yp + ys, zp + zs); + broadcast( shared_ptr( new BlockRegionUpdatePacket(xp, yp, zp, xs, ys, zs, level) ) ); + vector > *tes = level->getTileEntitiesInRegion(xp, yp, zp, xp + xs, yp + ys, zp + zs); for (unsigned int i = 0; i < tes->size(); i++) { broadcast(tes->at(i)); @@ -342,7 +342,7 @@ bool PlayerChunkMap::PlayerChunk::broadcastChanges(bool allowRegionUpdate) else { // 4J As we only get here if changes is less than MAX_CHANGES_BEFORE_RESEND (10) we only need to send a byte value in the packet - broadcast( std::shared_ptr( new ChunkTilesUpdatePacket(pos.x, pos.z, changedTiles, (byte)changes, level) ) ); + broadcast( shared_ptr( new ChunkTilesUpdatePacket(pos.x, pos.z, changedTiles, (byte)changes, level) ) ); for (int i = 0; i < changes; i++) { int x = pos.x * 16 + ((changedTiles[i] >> 12) & 15); @@ -361,11 +361,11 @@ bool PlayerChunkMap::PlayerChunk::broadcastChanges(bool allowRegionUpdate) return didRegionUpdate; } -void PlayerChunkMap::PlayerChunk::broadcast(std::shared_ptr te) +void PlayerChunkMap::PlayerChunk::broadcast(shared_ptr te) { if (te != NULL) { - std::shared_ptr p = te->getUpdatePacket(); + shared_ptr p = te->getUpdatePacket(); if (p != NULL) { broadcast(p); @@ -458,7 +458,7 @@ PlayerChunkMap::PlayerChunk *PlayerChunkMap::getChunk(int x, int z, bool create) // 4J - added. If a chunk exists, add a player to it straight away. If it doesn't exist, // queue a request for it to be created. -void PlayerChunkMap::getChunkAndAddPlayer(int x, int z, std::shared_ptr player) +void PlayerChunkMap::getChunkAndAddPlayer(int x, int z, shared_ptr player) { int64_t id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32); AUTO_VAR(it, chunks.find(id)); @@ -475,7 +475,7 @@ void PlayerChunkMap::getChunkAndAddPlayer(int x, int z, std::shared_ptr player) +void PlayerChunkMap::getChunkAndRemovePlayer(int x, int z, shared_ptr player) { for( AUTO_VAR(it, addRequests.begin()); it != addRequests.end(); it++ ) { @@ -497,7 +497,7 @@ void PlayerChunkMap::getChunkAndRemovePlayer(int x, int z, std::shared_ptr player) +void PlayerChunkMap::tickAddRequests(shared_ptr player) { if( addRequests.size() ) { @@ -533,7 +533,7 @@ void PlayerChunkMap::tickAddRequests(std::shared_ptr player) } } -void PlayerChunkMap::broadcastTileUpdate(std::shared_ptr packet, int x, int y, int z) +void PlayerChunkMap::broadcastTileUpdate(shared_ptr packet, int x, int y, int z) { int xc = x >> 4; int zc = z >> 4; @@ -576,7 +576,7 @@ void PlayerChunkMap::prioritiseTileChanges(int x, int y, int z) } } -void PlayerChunkMap::add(std::shared_ptr player) +void PlayerChunkMap::add(shared_ptr player) { static int direction[4][2] = { { 1, 0 }, { 0, 1 }, { -1, 0 }, {0, -1} }; @@ -649,7 +649,7 @@ void PlayerChunkMap::add(std::shared_ptr player) } // CraftBukkit end - player->connection->send( std::shared_ptr( new ChunkVisibilityAreaPacket(minX, maxX, minZ, maxZ) ) ); + player->connection->send( shared_ptr( new ChunkVisibilityAreaPacket(minX, maxX, minZ, maxZ) ) ); #ifdef _LARGE_WORLDS getLevel()->cache->dontDrop(xc,zc); @@ -659,7 +659,7 @@ void PlayerChunkMap::add(std::shared_ptr player) } -void PlayerChunkMap::remove(std::shared_ptr player) +void PlayerChunkMap::remove(shared_ptr player) { int xc = ((int) player->lastMoveX) >> 4; int zc = ((int) player->lastMoveZ) >> 4; @@ -702,7 +702,7 @@ bool PlayerChunkMap::chunkInRange(int x, int z, int xc, int zc) // 4J - have changed this so that we queue requests to add the player to chunks if they // need to be created, so that we aren't creating potentially 20 chunks per player per tick -void PlayerChunkMap::move(std::shared_ptr player) +void PlayerChunkMap::move(shared_ptr player) { int xc = ((int) player->x) >> 4; int zc = ((int) player->z) >> 4; @@ -744,7 +744,7 @@ int PlayerChunkMap::getMaxRange() return radius * 16 - 16; } -bool PlayerChunkMap::isPlayerIn(std::shared_ptr player, int xChunk, int zChunk) +bool PlayerChunkMap::isPlayerIn(shared_ptr player, int xChunk, int zChunk) { PlayerChunk *chunk = getChunk(xChunk, zChunk, false); @@ -775,7 +775,7 @@ void PlayerChunkMap::setRadius(int newRadius) PlayerList* players = level->getServer()->getPlayerList(); for( int i = 0;i < players->players.size();i += 1 ) { - std::shared_ptr player = players->players[i]; + shared_ptr player = players->players[i]; if( player->level == level ) { int xc = ((int) player->x) >> 4; diff --git a/Minecraft.Client/PlayerChunkMap.h b/Minecraft.Client/PlayerChunkMap.h index 5e87934b..08cda2a7 100644 --- a/Minecraft.Client/PlayerChunkMap.h +++ b/Minecraft.Client/PlayerChunkMap.h @@ -25,8 +25,8 @@ public: { public: int x,z; - std::shared_ptr player; - PlayerChunkAddRequest(int x, int z, std::shared_ptr player ) : x(x), z(z), player(player) {} + shared_ptr player; + PlayerChunkAddRequest(int x, int z, shared_ptr player ) : x(x), z(z), player(player) {} }; class PlayerChunk @@ -34,7 +34,7 @@ public: friend class PlayerChunkMap; private: PlayerChunkMap *parent; // 4J added - vector > players; + vector > players; //int x, z; ChunkPos pos; @@ -51,25 +51,25 @@ public: ~PlayerChunk(); // 4J Added sendPacket param so we can aggregate the initial send into one much smaller packet - void add(std::shared_ptr player, bool sendPacket = true); - void remove(std::shared_ptr player); + void add(shared_ptr player, bool sendPacket = true); + void remove(shared_ptr player); void tileChanged(int x, int y, int z); void prioritiseTileChanges(); // 4J added - void broadcast(std::shared_ptr packet); + void broadcast(shared_ptr packet); bool broadcastChanges(bool allowRegionUpdate); // 4J - added parm private: - void broadcast(std::shared_ptr te); + void broadcast(shared_ptr te); }; public: - vector > players; + vector > players; void flagEntitiesToBeRemoved(unsigned int *flags, bool *removedFound); // 4J added private: unordered_map chunks; // 4J - was LongHashMap vector changedChunks; vector addRequests; // 4J added - void tickAddRequests(std::shared_ptr player); // 4J added + void tickAddRequests(shared_ptr player); // 4J added ServerLevel *level; int radius; @@ -83,21 +83,21 @@ public: bool hasChunk(int x, int z); private: PlayerChunk *getChunk(int x, int z, bool create); - void getChunkAndAddPlayer(int x, int z, std::shared_ptr player); // 4J added - void getChunkAndRemovePlayer(int x, int z, std::shared_ptr player); // 4J added + void getChunkAndAddPlayer(int x, int z, shared_ptr player); // 4J added + void getChunkAndRemovePlayer(int x, int z, shared_ptr player); // 4J added public: - void broadcastTileUpdate(std::shared_ptr packet, int x, int y, int z); + void broadcastTileUpdate(shared_ptr packet, int x, int y, int z); void tileChanged(int x, int y, int z); bool isTrackingTile(int x, int y, int z); // 4J added void prioritiseTileChanges(int x, int y, int z); // 4J added - void add(std::shared_ptr player); - void remove(std::shared_ptr player); + void add(shared_ptr player); + void remove(shared_ptr player); private: bool chunkInRange(int x, int z, int xc, int zc); public: - void move(std::shared_ptr player); + void move(shared_ptr player); int getMaxRange(); - bool isPlayerIn(std::shared_ptr player, int xChunk, int zChunk); + bool isPlayerIn(shared_ptr player, int xChunk, int zChunk); static int convertChunkRangeToBlock(int radius); // AP added for Vita diff --git a/Minecraft.Client/PlayerCloudParticle.cpp b/Minecraft.Client/PlayerCloudParticle.cpp index ca7e9d90..6976fbab 100644 --- a/Minecraft.Client/PlayerCloudParticle.cpp +++ b/Minecraft.Client/PlayerCloudParticle.cpp @@ -49,7 +49,7 @@ void PlayerCloudParticle::tick() xd *= 0.96f; yd *= 0.96f; zd *= 0.96f; - std::shared_ptr p = level->getNearestPlayer(shared_from_this(), 2); + shared_ptr p = level->getNearestPlayer(shared_from_this(), 2); if (p != NULL) { if (y > p->bb->y0) diff --git a/Minecraft.Client/PlayerConnection.cpp b/Minecraft.Client/PlayerConnection.cpp index 393ae105..f0e538a8 100644 --- a/Minecraft.Client/PlayerConnection.cpp +++ b/Minecraft.Client/PlayerConnection.cpp @@ -34,7 +34,7 @@ Random PlayerConnection::random; -PlayerConnection::PlayerConnection(MinecraftServer *server, Connection *connection, std::shared_ptr player) +PlayerConnection::PlayerConnection(MinecraftServer *server, Connection *connection, shared_ptr player) { // 4J - added initialisers done = false; @@ -93,12 +93,12 @@ void PlayerConnection::tick() lastKeepAliveTick = tickCount; lastKeepAliveTime = System::nanoTime() / 1000000; lastKeepAliveId = random.nextInt(); - send( std::shared_ptr( new KeepAlivePacket(lastKeepAliveId) ) ); + send( shared_ptr( new KeepAlivePacket(lastKeepAliveId) ) ); } // if (!didTick) { // player->doTick(false); // } - + if (chatSpamTickCount > 0) { chatSpamTickCount--; @@ -123,30 +123,30 @@ void PlayerConnection::disconnect(DisconnectPacket::eDisconnectReason reason) // 4J Stu - Need to remove the player from the receiving list before their socket is NULLed so that we can find another player on their system server->getPlayers()->removePlayerFromReceiving( player ); - send( std::shared_ptr( new DisconnectPacket(reason) )); + send( shared_ptr( new DisconnectPacket(reason) )); connection->sendAndQuit(); // 4J-PB - removed, since it needs to be localised in the language the client is in - //server->players->broadcastAll( std::shared_ptr( new ChatPacket(L"�e" + player->name + L" left the game.") ) ); + //server->players->broadcastAll( shared_ptr( new ChatPacket(L"§e" + player->name + L" left the game.") ) ); if(getWasKicked()) { - server->getPlayers()->broadcastAll( std::shared_ptr( new ChatPacket(player->name, ChatPacket::e_ChatPlayerKickedFromGame) ) ); + server->getPlayers()->broadcastAll( shared_ptr( new ChatPacket(player->name, ChatPacket::e_ChatPlayerKickedFromGame) ) ); } else { - server->getPlayers()->broadcastAll( std::shared_ptr( new ChatPacket(player->name, ChatPacket::e_ChatPlayerLeftGame) ) ); + server->getPlayers()->broadcastAll( shared_ptr( new ChatPacket(player->name, ChatPacket::e_ChatPlayerLeftGame) ) ); } - + server->getPlayers()->remove(player); done = true; LeaveCriticalSection(&done_cs); } -void PlayerConnection::handlePlayerInput(std::shared_ptr packet) +void PlayerConnection::handlePlayerInput(shared_ptr packet) { player->setPlayerInput(packet->getXa(), packet->getYa(), packet->isJumping(), packet->isSneaking(), packet->getXRot(), packet->getYRot()); } -void PlayerConnection::handleMovePlayer(std::shared_ptr packet) +void PlayerConnection::handleMovePlayer(shared_ptr packet) { ServerLevel *level = server->getLevel(player->dimension); @@ -391,10 +391,10 @@ void PlayerConnection::teleport(double x, double y, double z, float yRot, float player->absMoveTo(x, y, z, yRot, xRot); // 4J - note that 1.62 is added to the height here as the client connection that receives this will presume it represents y + heightOffset at that end // This is different to the way that height is sent back to the server, where it represents the bottom of the player bounding volume - if(sendPacket) player->connection->send( std::shared_ptr( new MovePlayerPacket::PosRot(x, y + 1.62f, y, z, yRot, xRot, false, false) ) ); + if(sendPacket) player->connection->send( shared_ptr( new MovePlayerPacket::PosRot(x, y + 1.62f, y, z, yRot, xRot, false, false) ) ); } -void PlayerConnection::handlePlayerAction(std::shared_ptr packet) +void PlayerConnection::handlePlayerAction(shared_ptr packet) { ServerLevel *level = server->getLevel(player->dimension); @@ -442,19 +442,19 @@ void PlayerConnection::handlePlayerAction(std::shared_ptr pa if (packet->action == PlayerActionPacket::START_DESTROY_BLOCK) { if (zd > 16 || canEditSpawn) player->gameMode->startDestroyBlock(x, y, z, packet->face); - else player->connection->send( std::shared_ptr( new TileUpdatePacket(x, y, z, level) ) ); + else player->connection->send( shared_ptr( new TileUpdatePacket(x, y, z, level) ) ); } else if (packet->action == PlayerActionPacket::STOP_DESTROY_BLOCK) { player->gameMode->stopDestroyBlock(x, y, z); server->getPlayers()->prioritiseTileChanges(x, y, z, level->dimension->id); // 4J added - make sure that the update packets for this get prioritised over other general world updates - if (level->getTile(x, y, z) != 0) player->connection->send( std::shared_ptr( new TileUpdatePacket(x, y, z, level) ) ); + if (level->getTile(x, y, z) != 0) player->connection->send( shared_ptr( new TileUpdatePacket(x, y, z, level) ) ); } else if (packet->action == PlayerActionPacket::ABORT_DESTROY_BLOCK) { player->gameMode->abortDestroyBlock(x, y, z); - if (level->getTile(x, y, z) != 0) player->connection->send(std::shared_ptr( new TileUpdatePacket(x, y, z, level))); + if (level->getTile(x, y, z) != 0) player->connection->send(shared_ptr( new TileUpdatePacket(x, y, z, level))); } else if (packet->action == PlayerActionPacket::GET_UPDATED_BLOCK) { @@ -464,7 +464,7 @@ void PlayerConnection::handlePlayerAction(std::shared_ptr pa double dist = xDist * xDist + yDist * yDist + zDist * zDist; if (dist < 16 * 16) { - player->connection->send( std::shared_ptr( new TileUpdatePacket(x, y, z, level) ) ); + player->connection->send( shared_ptr( new TileUpdatePacket(x, y, z, level) ) ); } } @@ -473,16 +473,16 @@ void PlayerConnection::handlePlayerAction(std::shared_ptr pa } -void PlayerConnection::handleUseItem(std::shared_ptr packet) +void PlayerConnection::handleUseItem(shared_ptr packet) { ServerLevel *level = server->getLevel(player->dimension); - std::shared_ptr item = player->inventory->getSelected(); + shared_ptr item = player->inventory->getSelected(); bool informClient = false; int x = packet->getX(); int y = packet->getY(); int z = packet->getZ(); int face = packet->getFace(); - + // 4J Stu - We don't have ops, so just use the levels setting bool canEditSpawn = level->canEditSpawn; // = level->dimension->id != 0 || server->players->isOp(player->name); if (packet->getFace() == 255) @@ -509,14 +509,14 @@ void PlayerConnection::handleUseItem(std::shared_ptr packet) } else { - //player->connection->send(std::shared_ptr(new ChatPacket("\u00A77Height limit for building is " + server->maxBuildHeight))); + //player->connection->send(shared_ptr(new ChatPacket("\u00A77Height limit for building is " + server->maxBuildHeight))); informClient = true; } if (informClient) { - player->connection->send( std::shared_ptr( new TileUpdatePacket(x, y, z, level) ) ); + player->connection->send( shared_ptr( new TileUpdatePacket(x, y, z, level) ) ); if (face == 0) y--; if (face == 1) y++; @@ -524,7 +524,7 @@ void PlayerConnection::handleUseItem(std::shared_ptr packet) if (face == 3) z++; if (face == 4) x--; if (face == 5) x++; - + // 4J - Fixes an issue where pistons briefly disappear when retracting. The pistons themselves shouldn't have their change from being pistonBase_Id to pistonMovingPiece_Id // directly sent to the client, as this will happen on the client as a result of it actioning (via a tile event) the retraction of the piston locally. However, by putting a switch // beside a piston and then performing an action on the side of it facing a piston, the following line of code will send a TileUpdatePacket containing the change to pistonMovingPiece_Id @@ -532,7 +532,7 @@ void PlayerConnection::handleUseItem(std::shared_ptr packet) // isn't what it is expecting. if( level->getTile(x,y,z) != Tile::pistonMovingPiece_Id ) { - player->connection->send( std::shared_ptr( new TileUpdatePacket(x, y, z, level) ) ); + player->connection->send( shared_ptr( new TileUpdatePacket(x, y, z, level) ) ); } } @@ -554,7 +554,7 @@ void PlayerConnection::handleUseItem(std::shared_ptr packet) if (!ItemInstance::matches(player->inventory->getSelected(), packet->getItem())) { - send( std::shared_ptr( new ContainerSetSlotPacket(player->containerMenu->containerId, s->index, player->inventory->getSelected()) ) ); + send( shared_ptr( new ContainerSetSlotPacket(player->containerMenu->containerId, s->index, player->inventory->getSelected()) ) ); } } @@ -569,27 +569,27 @@ void PlayerConnection::onDisconnect(DisconnectPacket::eDisconnectReason reason, if( done ) return; // logger.info(player.name + " lost connection: " + reason); // 4J-PB - removed, since it needs to be localised in the language the client is in - //server->players->broadcastAll( std::shared_ptr( new ChatPacket(L"�e" + player->name + L" left the game.") ) ); + //server->players->broadcastAll( shared_ptr( new ChatPacket(L"§e" + player->name + L" left the game.") ) ); if(getWasKicked()) { - server->getPlayers()->broadcastAll( std::shared_ptr( new ChatPacket(player->name, ChatPacket::e_ChatPlayerKickedFromGame) ) ); + server->getPlayers()->broadcastAll( shared_ptr( new ChatPacket(player->name, ChatPacket::e_ChatPlayerKickedFromGame) ) ); } else { - server->getPlayers()->broadcastAll( std::shared_ptr( new ChatPacket(player->name, ChatPacket::e_ChatPlayerLeftGame) ) ); + server->getPlayers()->broadcastAll( shared_ptr( new ChatPacket(player->name, ChatPacket::e_ChatPlayerLeftGame) ) ); } server->getPlayers()->remove(player); done = true; LeaveCriticalSection(&done_cs); } -void PlayerConnection::onUnhandledPacket(std::shared_ptr packet) +void PlayerConnection::onUnhandledPacket(shared_ptr packet) { // logger.warning(getClass() + " wasn't prepared to deal with a " + packet.getClass()); disconnect(DisconnectPacket::eDisconnect_UnexpectedPacket); } -void PlayerConnection::send(std::shared_ptr packet) +void PlayerConnection::send(shared_ptr packet) { if( connection->getSocket() != NULL ) { @@ -607,7 +607,7 @@ void PlayerConnection::send(std::shared_ptr packet) } // 4J Added -void PlayerConnection::queueSend(std::shared_ptr packet) +void PlayerConnection::queueSend(shared_ptr packet) { if( connection->getSocket() != NULL ) { @@ -624,7 +624,7 @@ void PlayerConnection::queueSend(std::shared_ptr packet) } } -void PlayerConnection::handleSetCarriedItem(std::shared_ptr packet) +void PlayerConnection::handleSetCarriedItem(shared_ptr packet) { if (packet->slot < 0 || packet->slot >= Inventory::getSelectionSize()) { @@ -634,7 +634,7 @@ void PlayerConnection::handleSetCarriedItem(std::shared_ptrinventory->selected = packet->slot; } -void PlayerConnection::handleChat(std::shared_ptr packet) +void PlayerConnection::handleChat(shared_ptr packet) { // 4J - TODO #if 0 @@ -678,7 +678,7 @@ void PlayerConnection::handleCommand(const wstring& message) #endif } -void PlayerConnection::handleAnimate(std::shared_ptr packet) +void PlayerConnection::handleAnimate(shared_ptr packet) { if (packet->action == AnimatePacket::SWING) { @@ -686,7 +686,7 @@ void PlayerConnection::handleAnimate(std::shared_ptr packet) } } -void PlayerConnection::handlePlayerCommand(std::shared_ptr packet) +void PlayerConnection::handlePlayerCommand(shared_ptr packet) { if (packet->action == PlayerCommandPacket::START_SNEAKING) { @@ -725,7 +725,7 @@ void PlayerConnection::setShowOnMaps(bool bVal) player->setShowOnMaps(bVal); } -void PlayerConnection::handleDisconnect(std::shared_ptr packet) +void PlayerConnection::handleDisconnect(shared_ptr packet) { // 4J Stu - Need to remove the player from the receiving list before their socket is NULLed so that we can find another player on their system server->getPlayers()->removePlayerFromReceiving( player ); @@ -740,13 +740,13 @@ int PlayerConnection::countDelayedPackets() void PlayerConnection::info(const wstring& string) { // 4J-PB - removed, since it needs to be localised in the language the client is in - //send( std::shared_ptr( new ChatPacket(L"�7" + string) ) ); + //send( shared_ptr( new ChatPacket(L"§7" + string) ) ); } void PlayerConnection::warn(const wstring& string) { // 4J-PB - removed, since it needs to be localised in the language the client is in - //send( std::shared_ptr( new ChatPacket(L"�9" + string) ) ); + //send( shared_ptr( new ChatPacket(L"§9" + string) ) ); } wstring PlayerConnection::getConsoleName() @@ -754,10 +754,10 @@ wstring PlayerConnection::getConsoleName() return player->name; } -void PlayerConnection::handleInteract(std::shared_ptr packet) +void PlayerConnection::handleInteract(shared_ptr packet) { ServerLevel *level = server->getLevel(player->dimension); - std::shared_ptr target = level->getEntity(packet->target); + shared_ptr target = level->getEntity(packet->target); // Fix for #8218 - Gameplay: Attacking zombies from a different level often results in no hits being registered // 4J Stu - If the client says that we hit something, then agree with it. The canSee can fail here as it checks @@ -792,7 +792,7 @@ bool PlayerConnection::canHandleAsyncPackets() return true; } -void PlayerConnection::handleTexture(std::shared_ptr packet) +void PlayerConnection::handleTexture(shared_ptr packet) { // Both PlayerConnection and ClientConnection should handle this mostly the same way @@ -803,12 +803,12 @@ void PlayerConnection::handleTexture(std::shared_ptr packet) wprintf(L"Server received request for custom texture %ls\n",packet->textureName.c_str()); #endif PBYTE pbData=NULL; - DWORD dwBytes=0; + DWORD dwBytes=0; app.GetMemFileDetails(packet->textureName,&pbData,&dwBytes); if(dwBytes!=0) { - send( std::shared_ptr( new TexturePacket(packet->textureName,pbData,dwBytes) ) ); + send( shared_ptr( new TexturePacket(packet->textureName,pbData,dwBytes) ) ); } else { @@ -826,7 +826,7 @@ void PlayerConnection::handleTexture(std::shared_ptr packet) } } -void PlayerConnection::handleTextureAndGeometry(std::shared_ptr packet) +void PlayerConnection::handleTextureAndGeometry(shared_ptr packet) { // Both PlayerConnection and ClientConnection should handle this mostly the same way @@ -837,7 +837,7 @@ void PlayerConnection::handleTextureAndGeometry(std::shared_ptrtextureName.c_str()); #endif PBYTE pbData=NULL; - DWORD dwTextureBytes=0; + DWORD dwTextureBytes=0; app.GetMemFileDetails(packet->textureName,&pbData,&dwTextureBytes); DLCSkinFile *pDLCSkinFile = app.m_dlcManager.getSkinFile(packet->textureName); @@ -848,11 +848,11 @@ void PlayerConnection::handleTextureAndGeometry(std::shared_ptrgetAdditionalBoxesCount()!=0) { - send( std::shared_ptr( new TextureAndGeometryPacket(packet->textureName,pbData,dwTextureBytes,pDLCSkinFile) ) ); + send( shared_ptr( new TextureAndGeometryPacket(packet->textureName,pbData,dwTextureBytes,pDLCSkinFile) ) ); } else { - send( std::shared_ptr( new TextureAndGeometryPacket(packet->textureName,pbData,dwTextureBytes) ) ); + send( shared_ptr( new TextureAndGeometryPacket(packet->textureName,pbData,dwTextureBytes) ) ); } } else @@ -861,7 +861,7 @@ void PlayerConnection::handleTextureAndGeometry(std::shared_ptr *pvSkinBoxes = app.GetAdditionalSkinBoxes(packet->dwSkinID); unsigned int uiAnimOverrideBitmask= app.GetAnimOverrideBitmask(packet->dwSkinID); - send( std::shared_ptr( new TextureAndGeometryPacket(packet->textureName,pbData,dwTextureBytes,pvSkinBoxes,uiAnimOverrideBitmask) ) ); + send( shared_ptr( new TextureAndGeometryPacket(packet->textureName,pbData,dwTextureBytes,pvSkinBoxes,uiAnimOverrideBitmask) ) ); } } else @@ -901,12 +901,12 @@ void PlayerConnection::handleTextureReceived(const wstring &textureName) if( it != m_texturesRequested.end() ) { PBYTE pbData=NULL; - DWORD dwBytes=0; + DWORD dwBytes=0; app.GetMemFileDetails(textureName,&pbData,&dwBytes); if(dwBytes!=0) { - send( std::shared_ptr( new TexturePacket(textureName,pbData,dwBytes) ) ); + send( shared_ptr( new TexturePacket(textureName,pbData,dwBytes) ) ); m_texturesRequested.erase(it); } } @@ -919,7 +919,7 @@ void PlayerConnection::handleTextureAndGeometryReceived(const wstring &textureNa if( it != m_texturesRequested.end() ) { PBYTE pbData=NULL; - DWORD dwTextureBytes=0; + DWORD dwTextureBytes=0; app.GetMemFileDetails(textureName,&pbData,&dwTextureBytes); DLCSkinFile *pDLCSkinFile=app.m_dlcManager.getSkinFile(textureName); @@ -927,7 +927,7 @@ void PlayerConnection::handleTextureAndGeometryReceived(const wstring &textureNa { if(pDLCSkinFile && (pDLCSkinFile->getAdditionalBoxesCount()!=0)) { - send( std::shared_ptr( new TextureAndGeometryPacket(textureName,pbData,dwTextureBytes,pDLCSkinFile) ) ); + send( shared_ptr( new TextureAndGeometryPacket(textureName,pbData,dwTextureBytes,pDLCSkinFile) ) ); } else { @@ -936,14 +936,14 @@ void PlayerConnection::handleTextureAndGeometryReceived(const wstring &textureNa vector *pvSkinBoxes = app.GetAdditionalSkinBoxes(dwSkinID); unsigned int uiAnimOverrideBitmask= app.GetAnimOverrideBitmask(dwSkinID); - send( std::shared_ptr( new TextureAndGeometryPacket(textureName,pbData,dwTextureBytes, pvSkinBoxes, uiAnimOverrideBitmask) ) ); + send( shared_ptr( new TextureAndGeometryPacket(textureName,pbData,dwTextureBytes, pvSkinBoxes, uiAnimOverrideBitmask) ) ); } - m_texturesRequested.erase(it); + m_texturesRequested.erase(it); } } } -void PlayerConnection::handleTextureChange(std::shared_ptr packet) +void PlayerConnection::handleTextureChange(shared_ptr packet) { switch(packet->action) { @@ -968,26 +968,26 @@ void PlayerConnection::handleTextureChange(std::shared_ptr #ifndef _CONTENT_PACKAGE wprintf(L"Sending texture packet to get custom skin %ls from player %ls\n",packet->path.c_str(), player->name.c_str()); #endif - send(std::shared_ptr( new TexturePacket(packet->path,NULL,0) ) ); + send(shared_ptr( new TexturePacket(packet->path,NULL,0) ) ); } } else if(!packet->path.empty() && app.IsFileInMemoryTextures(packet->path)) - { + { // Update the ref count on the memory texture data app.AddMemoryTextureFile(packet->path,NULL,0); } - server->getPlayers()->broadcastAll( std::shared_ptr( new TextureChangePacket(player,packet->action,packet->path) ), player->dimension ); + server->getPlayers()->broadcastAll( shared_ptr( new TextureChangePacket(player,packet->action,packet->path) ), player->dimension ); } -void PlayerConnection::handleTextureAndGeometryChange(std::shared_ptr packet) +void PlayerConnection::handleTextureAndGeometryChange(shared_ptr packet) { player->setCustomSkin( app.getSkinIdFromPath( packet->path ) ); #ifndef _CONTENT_PACKAGE wprintf(L"PlayerConnection::handleTextureAndGeometryChange - Skin for server player %ls has changed to %ls (%d)\n", player->name.c_str(), player->customTextureUrl.c_str(), player->getPlayerDefaultSkin() ); #endif - - + + if(!packet->path.empty() && packet->path.substr(0,3).compare(L"def") != 0 && !app.IsFileInMemoryTextures(packet->path)) { if( server->connection->addPendingTextureRequest(packet->path)) @@ -995,11 +995,11 @@ void PlayerConnection::handleTextureAndGeometryChange(std::shared_ptrpath.c_str(), player->name.c_str()); #endif - send(std::shared_ptr( new TextureAndGeometryPacket(packet->path,NULL,0) ) ); + send(shared_ptr( new TextureAndGeometryPacket(packet->path,NULL,0) ) ); } } else if(!packet->path.empty() && app.IsFileInMemoryTextures(packet->path)) - { + { // Update the ref count on the memory texture data app.AddMemoryTextureFile(packet->path,NULL,0); @@ -1009,10 +1009,10 @@ void PlayerConnection::handleTextureAndGeometryChange(std::shared_ptrdwSkinID,) //DebugBreak(); } - server->getPlayers()->broadcastAll( std::shared_ptr( new TextureAndGeometryChangePacket(player,packet->path) ), player->dimension ); + server->getPlayers()->broadcastAll( shared_ptr( new TextureAndGeometryChangePacket(player,packet->path) ), player->dimension ); } -void PlayerConnection::handleServerSettingsChanged(std::shared_ptr packet) +void PlayerConnection::handleServerSettingsChanged(shared_ptr packet) { if(packet->action==ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS) { @@ -1024,7 +1024,7 @@ void PlayerConnection::handleServerSettingsChanged(std::shared_ptrdata,eGameHostOption_FireSpreads)); app.SetGameHostOption(eGameHostOption_TNT, app.GetGameHostOption(packet->data,eGameHostOption_TNT)); - server->getPlayers()->broadcastAll( std::shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS,app.GetGameHostOption(eGameHostOption_All) ) ) ); + server->getPlayers()->broadcastAll( shared_ptr( new ServerSettingsChangedPacket( ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS,app.GetGameHostOption(eGameHostOption_All) ) ) ); // Update the QoS data g_NetworkManager.UpdateAndSetGameSessionData(); @@ -1032,21 +1032,21 @@ void PlayerConnection::handleServerSettingsChanged(std::shared_ptr packet) +void PlayerConnection::handleKickPlayer(shared_ptr packet) { INetworkPlayer *networkPlayer = getNetworkPlayer(); if( (networkPlayer != NULL && networkPlayer->IsHost()) || player->isModerator()) - { + { server->getPlayers()->kickPlayerByShortId(packet->m_networkSmallId); } } -void PlayerConnection::handleGameCommand(std::shared_ptr packet) +void PlayerConnection::handleGameCommand(shared_ptr packet) { MinecraftServer::getInstance()->getCommandDispatcher()->performCommand(player, packet->command, packet->data); } -void PlayerConnection::handleClientCommand(std::shared_ptr packet) +void PlayerConnection::handleClientCommand(shared_ptr packet) { if (packet->action == ClientCommandPacket::PERFORM_RESPAWN) { @@ -1078,17 +1078,17 @@ void PlayerConnection::handleClientCommand(std::shared_ptr } } -void PlayerConnection::handleRespawn(std::shared_ptr packet) +void PlayerConnection::handleRespawn(shared_ptr packet) { } -void PlayerConnection::handleContainerClose(std::shared_ptr packet) +void PlayerConnection::handleContainerClose(shared_ptr packet) { player->doCloseContainer(); } -#ifndef _CONTENT_PACKAGE -void PlayerConnection::handleContainerSetSlot(std::shared_ptr packet) +#ifndef _CONTENT_PACKAGE +void PlayerConnection::handleContainerSetSlot(shared_ptr packet) { if (packet->containerId == AbstractContainerMenu::CONTAINER_ID_CARRIED ) { @@ -1098,7 +1098,7 @@ void PlayerConnection::handleContainerSetSlot(std::shared_ptrcontainerId == AbstractContainerMenu::CONTAINER_ID_INVENTORY && packet->slot >= 36 && packet->slot < 36 + 9) { - std::shared_ptr lastItem = player->inventoryMenu->getSlot(packet->slot)->getItem(); + shared_ptr lastItem = player->inventoryMenu->getSlot(packet->slot)->getItem(); if (packet->item != NULL) { if (lastItem == NULL || lastItem->count < packet->item->count) @@ -1124,16 +1124,16 @@ void PlayerConnection::handleContainerSetSlot(std::shared_ptr packet) +void PlayerConnection::handleContainerClick(shared_ptr packet) { if (player->containerMenu->containerId == packet->containerId && player->containerMenu->isSynched(player)) { - std::shared_ptr clicked = player->containerMenu->clicked(packet->slotNum, packet->buttonNum, packet->quickKey?AbstractContainerMenu::CLICK_QUICK_MOVE:AbstractContainerMenu::CLICK_PICKUP, player); + shared_ptr clicked = player->containerMenu->clicked(packet->slotNum, packet->buttonNum, packet->quickKey?AbstractContainerMenu::CLICK_QUICK_MOVE:AbstractContainerMenu::CLICK_PICKUP, player); if (ItemInstance::matches(packet->item, clicked)) { // Yep, you sure did click what you claimed to click! - player->connection->send( std::shared_ptr( new ContainerAckPacket(packet->containerId, packet->uid, true) ) ); + player->connection->send( shared_ptr( new ContainerAckPacket(packet->containerId, packet->uid, true) ) ); player->ignoreSlotUpdateHack = true; player->containerMenu->broadcastChanges(); player->broadcastCarriedItem(); @@ -1143,10 +1143,10 @@ void PlayerConnection::handleContainerClick(std::shared_ptrcontainerMenu->containerId] = packet->uid; - player->connection->send( std::shared_ptr( new ContainerAckPacket(packet->containerId, packet->uid, false) ) ); + player->connection->send( shared_ptr( new ContainerAckPacket(packet->containerId, packet->uid, false) ) ); player->containerMenu->setSynched(player, false); - vector > items; + vector > items; for (unsigned int i = 0; i < player->containerMenu->slots->size(); i++) { items.push_back(player->containerMenu->slots->at(i)->getItem()); @@ -1159,7 +1159,7 @@ void PlayerConnection::handleContainerClick(std::shared_ptr packet) +void PlayerConnection::handleContainerButtonClick(shared_ptr packet) { if (player->containerMenu->containerId == packet->containerId && player->containerMenu->isSynched(player)) { @@ -1168,12 +1168,12 @@ void PlayerConnection::handleContainerButtonClick(std::shared_ptr packet) +void PlayerConnection::handleSetCreativeModeSlot(shared_ptr packet) { if (player->gameMode->isCreative()) { bool drop = packet->slotNum < 0; - std::shared_ptr item = packet->item; + shared_ptr item = packet->item; if(item != NULL && item->id == Item::map_Id) { @@ -1187,9 +1187,9 @@ void PlayerConnection::handleSetCreativeModeSlot(std::shared_ptrsetAuxValue( player->level->getAuxValueForMap(player->getXuid(), player->dimension, centreXC, centreZC, mapScale) ); + item->setAuxValue( player->level->getAuxValueForMap(player->getXuid(), player->dimension, centreXC, centreZC, mapScale) ); - std::shared_ptr data = MapItem::getSavedData(item->getAuxValue(), player->level); + shared_ptr data = MapItem::getSavedData(item->getAuxValue(), player->level); // 4J Stu - We only have one map per player per dimension, so don't reset the one that they have // when a new one is created wchar_t buf[64]; @@ -1197,9 +1197,9 @@ void PlayerConnection::handleSetCreativeModeSlot(std::shared_ptr( new MapItemSavedData(id) ); + data = shared_ptr( new MapItemSavedData(id) ); } - player->level->setSavedData(id, (std::shared_ptr ) data); + player->level->setSavedData(id, (shared_ptr ) data); data->scale = mapScale; // 4J-PB - for Xbox maps, we'll centre them on the origin of the world, since we can fit the whole world in our map @@ -1232,7 +1232,7 @@ void PlayerConnection::handleSetCreativeModeSlot(std::shared_ptr dropped = player->drop(item); + shared_ptr dropped = player->drop(item); if (dropped != NULL) { dropped->setShortLifeTime(); @@ -1244,7 +1244,7 @@ void PlayerConnection::handleSetCreativeModeSlot(std::shared_ptr > items; + vector > items; for (unsigned int i = 0; i < player->inventoryMenu->slots->size(); i++) { items.push_back(player->inventoryMenu->slots->at(i)->getItem()); @@ -1254,7 +1254,7 @@ void PlayerConnection::handleSetCreativeModeSlot(std::shared_ptr packet) +void PlayerConnection::handleContainerAck(shared_ptr packet) { AUTO_VAR(it, expectedAcks.find(player->containerMenu->containerId)); @@ -1264,18 +1264,18 @@ void PlayerConnection::handleContainerAck(std::shared_ptr pa } } -void PlayerConnection::handleSignUpdate(std::shared_ptr packet) +void PlayerConnection::handleSignUpdate(shared_ptr packet) { app.DebugPrintf("PlayerConnection::handleSignUpdate\n"); ServerLevel *level = server->getLevel(player->dimension); if (level->hasChunkAt(packet->x, packet->y, packet->z)) { - std::shared_ptr te = level->getTileEntity(packet->x, packet->y, packet->z); + shared_ptr te = level->getTileEntity(packet->x, packet->y, packet->z); if (dynamic_pointer_cast(te) != NULL) { - std::shared_ptr ste = dynamic_pointer_cast(te); + shared_ptr ste = dynamic_pointer_cast(te); if (!ste->isEditable()) { server->warn(L"Player " + player->name + L" just tried to change non-editable sign"); @@ -1289,7 +1289,7 @@ void PlayerConnection::handleSignUpdate(std::shared_ptr packet int x = packet->x; int y = packet->y; int z = packet->z; - std::shared_ptr ste = dynamic_pointer_cast(te); + shared_ptr ste = dynamic_pointer_cast(te); for (int i = 0; i < 4; i++) { wstring lineText = packet->lines[i].substr(0,15); @@ -1303,7 +1303,7 @@ void PlayerConnection::handleSignUpdate(std::shared_ptr packet } -void PlayerConnection::handleKeepAlive(std::shared_ptr packet) +void PlayerConnection::handleKeepAlive(shared_ptr packet) { if (packet->id == lastKeepAliveId) { @@ -1312,18 +1312,18 @@ void PlayerConnection::handleKeepAlive(std::shared_ptr packet) } } -void PlayerConnection::handlePlayerInfo(std::shared_ptr packet) -{ +void PlayerConnection::handlePlayerInfo(shared_ptr packet) +{ // Need to check that this player has permission to change each individual setting? INetworkPlayer *networkPlayer = getNetworkPlayer(); if( (networkPlayer != NULL && networkPlayer->IsHost()) || player->isModerator() ) { - std::shared_ptr serverPlayer; + shared_ptr serverPlayer; // Find the player being edited for(AUTO_VAR(it, server->getPlayers()->players.begin()); it != server->getPlayers()->players.end(); ++it) { - std::shared_ptr checkingPlayer = *it; + shared_ptr checkingPlayer = *it; if(checkingPlayer->connection->getNetworkPlayer() != NULL && checkingPlayer->connection->getNetworkPlayer()->GetSmallId() == packet->m_networkSmallId) { serverPlayer = checkingPlayer; @@ -1348,7 +1348,7 @@ void PlayerConnection::handlePlayerInfo(std::shared_ptr packet #endif serverPlayer->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_CreativeMode,Player::getPlayerGamePrivilege(packet->m_playerPrivileges,Player::ePlayerGamePrivilege_CreativeMode) ); serverPlayer->gameMode->setGameModeForPlayer(gameType); - serverPlayer->connection->send( std::shared_ptr( new GameEventPacket(GameEventPacket::CHANGE_GAME_MODE, gameType->getId()) )); + serverPlayer->connection->send( shared_ptr( new GameEventPacket(GameEventPacket::CHANGE_GAME_MODE, gameType->getId()) )); } else { @@ -1376,7 +1376,7 @@ void PlayerConnection::handlePlayerInfo(std::shared_ptr packet } else { - // Editing someone else + // Editing someone else if(!trustPlayers && !serverPlayer->connection->getNetworkPlayer()->IsHost()) { serverPlayer->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_CannotMine,Player::getPlayerGamePrivilege(packet->m_playerPrivileges,Player::ePlayerGamePrivilege_CannotMine) ); @@ -1400,7 +1400,7 @@ void PlayerConnection::handlePlayerInfo(std::shared_ptr packet } } - server->getPlayers()->broadcastAll( std::shared_ptr( new PlayerInfoPacket( serverPlayer ) ) ); + server->getPlayers()->broadcastAll( shared_ptr( new PlayerInfoPacket( serverPlayer ) ) ); } } } @@ -1410,7 +1410,7 @@ bool PlayerConnection::isServerPacketListener() return true; } -void PlayerConnection::handlePlayerAbilities(std::shared_ptr playerAbilitiesPacket) +void PlayerConnection::handlePlayerAbilities(shared_ptr playerAbilitiesPacket) { player->abilities.flying = playerAbilitiesPacket->isFlying() && player->abilities.mayfly; } @@ -1427,19 +1427,19 @@ void PlayerConnection::handlePlayerAbilities(std::shared_ptr packet) +//void handleClientInformation(shared_ptr packet) //{ // player->updateOptions(packet); //} -void PlayerConnection::handleCustomPayload(std::shared_ptr customPayloadPacket) +void PlayerConnection::handleCustomPayload(shared_ptr customPayloadPacket) { #if 0 if (CustomPayloadPacket.CUSTOM_BOOK_PACKET.equals(customPayloadPacket.identifier)) { ByteArrayInputStream bais(customPayloadPacket->data); DataInputStream input(&bais); - std::shared_ptr sentItem = Packet::readItem(input); + shared_ptr sentItem = Packet::readItem(input); if (!WritingBookItem.makeSureTagIsValid(sentItem.getTag())) { @@ -1510,13 +1510,13 @@ void PlayerConnection::handleCustomPayload(std::shared_ptr // 4J Added -void PlayerConnection::handleDebugOptions(std::shared_ptr packet) +void PlayerConnection::handleDebugOptions(shared_ptr packet) { //Player player = dynamic_pointer_cast( player->shared_from_this() ); player->SetDebugOptions(packet->m_uiVal); } -void PlayerConnection::handleCraftItem(std::shared_ptr packet) +void PlayerConnection::handleCraftItem(shared_ptr packet) { int iRecipe = packet->recipe; @@ -1524,7 +1524,7 @@ void PlayerConnection::handleCraftItem(std::shared_ptr packet) return; Recipy::INGREDIENTS_REQUIRED *pRecipeIngredientsRequired=Recipes::getInstance()->getRecipeIngredientsArray(); - std::shared_ptr pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); + shared_ptr pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr); if(app.DebugSettingsOn() && (player->GetDebugOptions()&(1L< packet) else { - + // TODO 4J Stu - Assume at the moment that the client can work this out for us... - //if(pRecipeIngredientsRequired[iRecipe].bCanMake) + //if(pRecipeIngredientsRequired[iRecipe].bCanMake) //{ pTempItemInst->onCraftedBy(player->level, dynamic_pointer_cast( player->shared_from_this() ), pTempItemInst->count ); @@ -1549,7 +1549,7 @@ void PlayerConnection::handleCraftItem(std::shared_ptr packet) { for(int j=0;j ingItemInst = nullptr; + shared_ptr ingItemInst = nullptr; // do we need to remove a specific aux value? if(pRecipeIngredientsRequired[iRecipe].iIngAuxValA[i]!=Recipes::ANY_AUX_VALUE) { @@ -1568,13 +1568,13 @@ void PlayerConnection::handleCraftItem(std::shared_ptr packet) if (ingItemInst->getItem()->hasCraftingRemainingItem()) { // replace item with remaining result - player->inventory->add( std::shared_ptr( new ItemInstance(ingItemInst->getItem()->getCraftingRemainingItem()) ) ); + player->inventory->add( shared_ptr( new ItemInstance(ingItemInst->getItem()->getCraftingRemainingItem()) ) ); } } } } - + // 4J Stu - Fix for #13119 - We should add the item after we remove the ingredients if(player->inventory->add(pTempItemInst)==false ) { @@ -1586,7 +1586,7 @@ void PlayerConnection::handleCraftItem(std::shared_ptr packet) { // 4J Stu - Maps need to have their aux value update, so the client should always be assumed to be wrong // This is how the Java works, as the client also incorrectly predicts the auxvalue of the mapItem - vector > items; + vector > items; for (unsigned int i = 0; i < player->containerMenu->slots->size(); i++) { items.push_back(player->containerMenu->slots->at(i)->getItem()); @@ -1625,7 +1625,7 @@ void PlayerConnection::handleCraftItem(std::shared_ptr packet) } -void PlayerConnection::handleTradeItem(std::shared_ptr packet) +void PlayerConnection::handleTradeItem(shared_ptr packet) { if (player->containerMenu->containerId == packet->containerId) { @@ -1642,8 +1642,8 @@ void PlayerConnection::handleTradeItem(std::shared_ptr packet) if(!activeRecipe->isDeprecated()) { // Do we have the ingredients? - std::shared_ptr buyAItem = activeRecipe->getBuyAItem(); - std::shared_ptr buyBItem = activeRecipe->getBuyBItem(); + shared_ptr buyAItem = activeRecipe->getBuyAItem(); + shared_ptr buyBItem = activeRecipe->getBuyBItem(); int buyAMatches = player->inventory->countMatches(buyAItem); int buyBMatches = player->inventory->countMatches(buyBItem); @@ -1656,8 +1656,8 @@ void PlayerConnection::handleTradeItem(std::shared_ptr packet) player->inventory->removeResources(buyBItem); // Add the item we have purchased - std::shared_ptr result = activeRecipe->getSellItem()->copy(); - + shared_ptr result = activeRecipe->getSellItem()->copy(); + // 4J JEV - Award itemsBought stat. player->awardStat( GenericStats::itemsBought(result->getItem()->id), @@ -1667,7 +1667,7 @@ void PlayerConnection::handleTradeItem(std::shared_ptr packet) result->GetCount() ) ); - + if (!player->inventory->add(result)) { player->drop(result); @@ -1687,7 +1687,7 @@ INetworkPlayer *PlayerConnection::getNetworkPlayer() bool PlayerConnection::isLocal() { - if( connection->getSocket() == NULL ) + if( connection->getSocket() == NULL ) { return false; } @@ -1700,7 +1700,7 @@ bool PlayerConnection::isLocal() bool PlayerConnection::isGuest() { - if( connection->getSocket() == NULL ) + if( connection->getSocket() == NULL ) { return false; } diff --git a/Minecraft.Client/PlayerConnection.h b/Minecraft.Client/PlayerConnection.h index c00ee1c1..d7b56a83 100644 --- a/Minecraft.Client/PlayerConnection.h +++ b/Minecraft.Client/PlayerConnection.h @@ -24,7 +24,7 @@ public: private: MinecraftServer *server; - std::shared_ptr player; + shared_ptr player; int tickCount; int aboveGroundTickCount; @@ -39,7 +39,7 @@ private: bool m_bHasClientTickedOnce; public: - PlayerConnection(MinecraftServer *server, Connection *connection, std::shared_ptr player); + PlayerConnection(MinecraftServer *server, Connection *connection, shared_ptr player); ~PlayerConnection(); void tick(); void disconnect(DisconnectPacket::eDisconnectReason reason); @@ -49,32 +49,32 @@ private: bool synched; public: - virtual void handlePlayerInput(std::shared_ptr packet); - virtual void handleMovePlayer(std::shared_ptr packet); + virtual void handlePlayerInput(shared_ptr packet); + virtual void handleMovePlayer(shared_ptr packet); void teleport(double x, double y, double z, float yRot, float xRot, bool sendPacket = true); // 4J Added sendPacket param - virtual void handlePlayerAction(std::shared_ptr packet); - virtual void handleUseItem(std::shared_ptr packet); + virtual void handlePlayerAction(shared_ptr packet); + virtual void handleUseItem(shared_ptr packet); virtual void onDisconnect(DisconnectPacket::eDisconnectReason reason, void *reasonObjects); - virtual void onUnhandledPacket(std::shared_ptr packet); - void send(std::shared_ptr packet); - void queueSend(std::shared_ptr packet); // 4J Added - virtual void handleSetCarriedItem(std::shared_ptr packet); - virtual void handleChat(std::shared_ptr packet); + virtual void onUnhandledPacket(shared_ptr packet); + void send(shared_ptr packet); + void queueSend(shared_ptr packet); // 4J Added + virtual void handleSetCarriedItem(shared_ptr packet); + virtual void handleChat(shared_ptr packet); private: void handleCommand(const wstring& message); public: - virtual void handleAnimate(std::shared_ptr packet); - virtual void handlePlayerCommand(std::shared_ptr packet); - virtual void handleDisconnect(std::shared_ptr packet); + virtual void handleAnimate(shared_ptr packet); + virtual void handlePlayerCommand(shared_ptr packet); + virtual void handleDisconnect(shared_ptr packet); int countDelayedPackets(); virtual void info(const wstring& string); virtual void warn(const wstring& string); virtual wstring getConsoleName(); - virtual void handleInteract(std::shared_ptr packet); + virtual void handleInteract(shared_ptr packet); bool canHandleAsyncPackets(); - virtual void handleClientCommand(std::shared_ptr packet); - virtual void handleRespawn(std::shared_ptr packet); - virtual void handleContainerClose(std::shared_ptr packet); + virtual void handleClientCommand(shared_ptr packet); + virtual void handleRespawn(shared_ptr packet); + virtual void handleContainerClose(shared_ptr packet); private: unordered_map expectedAcks; @@ -82,38 +82,38 @@ private: public: // 4J Stu - Handlers only valid in debug mode #ifndef _CONTENT_PACKAGE - virtual void handleContainerSetSlot(std::shared_ptr packet); + virtual void handleContainerSetSlot(shared_ptr packet); #endif - virtual void handleContainerClick(std::shared_ptr packet); - virtual void handleContainerButtonClick(std::shared_ptr packet); - virtual void handleSetCreativeModeSlot(std::shared_ptr packet); - virtual void handleContainerAck(std::shared_ptr packet); - virtual void handleSignUpdate(std::shared_ptr packet); - virtual void handleKeepAlive(std::shared_ptr packet); - virtual void handlePlayerInfo(std::shared_ptr packet); // 4J Added + virtual void handleContainerClick(shared_ptr packet); + virtual void handleContainerButtonClick(shared_ptr packet); + virtual void handleSetCreativeModeSlot(shared_ptr packet); + virtual void handleContainerAck(shared_ptr packet); + virtual void handleSignUpdate(shared_ptr packet); + virtual void handleKeepAlive(shared_ptr packet); + virtual void handlePlayerInfo(shared_ptr packet); // 4J Added virtual bool isServerPacketListener(); - virtual void handlePlayerAbilities(std::shared_ptr playerAbilitiesPacket); - virtual void handleCustomPayload(std::shared_ptr customPayloadPacket); + virtual void handlePlayerAbilities(shared_ptr playerAbilitiesPacket); + virtual void handleCustomPayload(shared_ptr customPayloadPacket); // 4J Added - virtual void handleCraftItem(std::shared_ptr packet); - virtual void handleTradeItem(std::shared_ptr packet); - virtual void handleDebugOptions(std::shared_ptr packet); - virtual void handleTexture(std::shared_ptr packet); - virtual void handleTextureAndGeometry(std::shared_ptr packet); - virtual void handleTextureChange(std::shared_ptr packet); - virtual void handleTextureAndGeometryChange(std::shared_ptr packet); - virtual void handleServerSettingsChanged(std::shared_ptr packet); - virtual void handleKickPlayer(std::shared_ptr packet); - virtual void handleGameCommand(std::shared_ptr packet); + virtual void handleCraftItem(shared_ptr packet); + virtual void handleTradeItem(shared_ptr packet); + virtual void handleDebugOptions(shared_ptr packet); + virtual void handleTexture(shared_ptr packet); + virtual void handleTextureAndGeometry(shared_ptr packet); + virtual void handleTextureChange(shared_ptr packet); + virtual void handleTextureAndGeometryChange(shared_ptr packet); + virtual void handleServerSettingsChanged(shared_ptr packet); + virtual void handleKickPlayer(shared_ptr packet); + virtual void handleGameCommand(shared_ptr packet); INetworkPlayer *getNetworkPlayer(); bool isLocal(); bool isGuest(); // 4J Added as we need to set this from outside sometimes - void setPlayer(std::shared_ptr player) { this->player = player; } - std::shared_ptr getPlayer() { return player; } + void setPlayer(shared_ptr player) { this->player = player; } + shared_ptr getPlayer() { return player; } // 4J Added to signal a disconnect from another thread void closeOnTick() { m_bCloseOnTick = true; } diff --git a/Minecraft.Client/PlayerList.cpp b/Minecraft.Client/PlayerList.cpp index 9beea76b..7921cbf8 100644 --- a/Minecraft.Client/PlayerList.cpp +++ b/Minecraft.Client/PlayerList.cpp @@ -54,7 +54,7 @@ PlayerList::PlayerList(MinecraftServer *server) maxPlayers = server->settings->getInt(L"max-players", 20); doWhiteList = false; - + InitializeCriticalSection(&m_kickPlayersCS); InitializeCriticalSection(&m_closePlayersCS); } @@ -72,7 +72,7 @@ PlayerList::~PlayerList() DeleteCriticalSection(&m_closePlayersCS); } -void PlayerList::placeNewPlayer(Connection *connection, std::shared_ptr player, std::shared_ptr packet) +void PlayerList::placeNewPlayer(Connection *connection, shared_ptr player, shared_ptr packet) { bool newPlayer = load(player); player->setLevel(server->getLevel(player->dimension)); @@ -82,7 +82,7 @@ void PlayerList::placeNewPlayer(Connection *connection, std::shared_ptrgetSocket()->getPlayer(); if(networkPlayer != NULL && networkPlayer->IsHost()) { - player->enableAllPlayerPrivileges(true); + player->enableAllPlayerPrivileges(true); player->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_HOST,1); } @@ -127,8 +127,8 @@ void PlayerList::placeNewPlayer(Connection *connection, std::shared_ptrsetCustomCape( packet->m_playerCapeId ); // 4J-JEV: Moved this here so we can send player-model texture and geometry data. - std::shared_ptr playerConnection = std::shared_ptr(new PlayerConnection(server, connection, player)); - //player->connection = playerConnection; // Used to be assigned in PlayerConnection ctor but moved out so we can use std::shared_ptr + shared_ptr playerConnection = shared_ptr(new PlayerConnection(server, connection, player)); + //player->connection = playerConnection; // Used to be assigned in PlayerConnection ctor but moved out so we can use shared_ptr if(newPlayer) { @@ -143,7 +143,7 @@ void PlayerList::placeNewPlayer(Connection *connection, std::shared_ptrinventory->setItem( 9, std::shared_ptr( new ItemInstance(Item::map_Id, 1, level->getAuxValueForMap(player->getXuid(),0,centreXC, centreZC, mapScale ) ) ) ); + player->inventory->setItem( 9, shared_ptr( new ItemInstance(Item::map_Id, 1, level->getAuxValueForMap(player->getXuid(),0,centreXC, centreZC, mapScale ) ) ) ); if(app.getGameRuleDefinitions() != NULL) { app.getGameRuleDefinitions()->postProcessPlayer(player); @@ -157,11 +157,11 @@ void PlayerList::placeNewPlayer(Connection *connection, std::shared_ptrcustomTextureUrl.c_str(), player->name.c_str()); #endif - playerConnection->send(std::shared_ptr( new TextureAndGeometryPacket(player->customTextureUrl,NULL,0) ) ); + playerConnection->send(shared_ptr( new TextureAndGeometryPacket(player->customTextureUrl,NULL,0) ) ); } } else if(!player->customTextureUrl.empty() && app.IsFileInMemoryTextures(player->customTextureUrl)) - { + { // Update the ref count on the memory texture data app.AddMemoryTextureFile(player->customTextureUrl,NULL,0); } @@ -173,11 +173,11 @@ void PlayerList::placeNewPlayer(Connection *connection, std::shared_ptrcustomTextureUrl2.c_str(), player->name.c_str()); #endif - playerConnection->send(std::shared_ptr( new TexturePacket(player->customTextureUrl2,NULL,0) ) ); + playerConnection->send(shared_ptr( new TexturePacket(player->customTextureUrl2,NULL,0) ) ); } } else if(!player->customTextureUrl2.empty() && app.IsFileInMemoryTextures(player->customTextureUrl2)) - { + { // Update the ref count on the memory texture data app.AddMemoryTextureFile(player->customTextureUrl2,NULL,0); } @@ -196,8 +196,8 @@ void PlayerList::placeNewPlayer(Connection *connection, std::shared_ptrsetPlayerGamePrivilege(Player::ePlayerGamePrivilege_CreativeMode,player->gameMode->getGameModeForPlayer()->getId() ); } - //std::shared_ptr playerConnection = std::shared_ptr(new PlayerConnection(server, connection, player)); - player->connection = playerConnection; // Used to be assigned in PlayerConnection ctor but moved out so we can use std::shared_ptr + //shared_ptr playerConnection = shared_ptr(new PlayerConnection(server, connection, player)); + player->connection = playerConnection; // Used to be assigned in PlayerConnection ctor but moved out so we can use shared_ptr // 4J Added to store UGC settings playerConnection->m_friendsOnlyUGC = packet->m_friendsOnlyUGC; @@ -209,19 +209,19 @@ void PlayerList::placeNewPlayer(Connection *connection, std::shared_ptrsend( std::shared_ptr( new LoginPacket(L"", player->entityId, level->getLevelData()->getGenerator(), level->getSeed(), player->gameMode->getGameModeForPlayer()->getId(), + playerConnection->send( shared_ptr( new LoginPacket(L"", player->entityId, level->getLevelData()->getGenerator(), level->getSeed(), player->gameMode->getGameModeForPlayer()->getId(), (byte) level->dimension->id, (byte) level->getMaxBuildHeight(), (byte) getMaxPlayers(), level->difficulty, TelemetryManager->GetMultiplayerInstanceID(), (BYTE)playerIndex, level->useNewSeaLevel(), player->getAllPlayerGamePrivileges(), level->getLevelData()->getXZSize(), level->getLevelData()->getHellScale() ) ) ); - playerConnection->send( std::shared_ptr( new SetSpawnPositionPacket(spawnPos->x, spawnPos->y, spawnPos->z) ) ); - playerConnection->send( std::shared_ptr( new PlayerAbilitiesPacket(&player->abilities)) ); + playerConnection->send( shared_ptr( new SetSpawnPositionPacket(spawnPos->x, spawnPos->y, spawnPos->z) ) ); + playerConnection->send( shared_ptr( new PlayerAbilitiesPacket(&player->abilities)) ); delete spawnPos; sendLevelInfo(player, level); // 4J-PB - removed, since it needs to be localised in the language the client is in - //server->players->broadcastAll( std::shared_ptr( new ChatPacket(L"�e" + playerEntity->name + L" joined the game.") ) ); - broadcastAll( std::shared_ptr( new ChatPacket(player->name, ChatPacket::e_ChatPlayerJoinedGame) ) ); + //server->players->broadcastAll( shared_ptr( new ChatPacket(L"§e" + playerEntity->name + L" joined the game.") ) ); + broadcastAll( shared_ptr( new ChatPacket(player->name, ChatPacket::e_ChatPlayerJoinedGame) ) ); MemSect(14); add(player); @@ -231,13 +231,13 @@ void PlayerList::placeNewPlayer(Connection *connection, std::shared_ptrteleport(player->x, player->y, player->z, player->yRot, player->xRot); server->getConnection()->addPlayerConnection(playerConnection); - playerConnection->send( std::shared_ptr( new SetTimePacket(level->getTime()) ) ); + playerConnection->send( shared_ptr( new SetTimePacket(level->getTime()) ) ); AUTO_VAR(activeEffects, player->getActiveEffects()); for(AUTO_VAR(it, activeEffects->begin()); it != activeEffects->end(); ++it) { MobEffectInstance *effect = *it; - playerConnection->send(std::shared_ptr( new UpdateMobEffectPacket(player->entityId, effect) ) ); + playerConnection->send(shared_ptr( new UpdateMobEffectPacket(player->entityId, effect) ) ); } player->initMenu(); @@ -249,7 +249,7 @@ void PlayerList::placeNewPlayer(Connection *connection, std::shared_ptr servPlayer = *it; + shared_ptr servPlayer = *it; INetworkPlayer *checkPlayer = servPlayer->connection->getNetworkPlayer(); if(thisPlayer != checkPlayer && checkPlayer != NULL && thisPlayer->IsSameSystem( checkPlayer ) && servPlayer->wonGame ) { @@ -265,7 +265,7 @@ void PlayerList::setLevel(ServerLevelArray levels) playerIo = levels[0]->getLevelStorage()->getPlayerIO(); } -void PlayerList::changeDimension(std::shared_ptr player, ServerLevel *from) +void PlayerList::changeDimension(shared_ptr player, ServerLevel *from) { ServerLevel *to = player->getLevel(); @@ -281,12 +281,12 @@ int PlayerList::getMaxRange() } // 4J Changed return val to bool to check if new player or loaded player -bool PlayerList::load(std::shared_ptr player) +bool PlayerList::load(shared_ptr player) { return playerIo->load(player); } -void PlayerList::save(std::shared_ptr player) +void PlayerList::save(shared_ptr player) { playerIo->save(player); } @@ -295,7 +295,7 @@ void PlayerList::save(std::shared_ptr player) // Add this function to take some of the code from the PlayerList::add function with the fixes // for checking spawn area, especially in the nether. These needed to be done in a different order from before // Fix for #13150 - When a player loads/joins a game after saving/leaving in the nether, sometimes they are spawned on top of the nether and cannot mine down -void PlayerList::validatePlayerSpawnPosition(std::shared_ptr player) +void PlayerList::validatePlayerSpawnPosition(shared_ptr player) { // 4J Stu - Some adjustments to make sure the current players position is correct // Make sure that the player is on the ground, and in the centre x/z of the current column @@ -354,17 +354,17 @@ void PlayerList::validatePlayerSpawnPosition(std::shared_ptr playe { player->setPos(player->x, player->y + 1, player->z); } - + app.DebugPrintf("Updated pos is %f, %f, %f in dimension %d\n", player->x, player->y, player->z, player->dimension); } } -void PlayerList::add(std::shared_ptr player) +void PlayerList::add(shared_ptr player) { - //broadcastAll(std::shared_ptr( new PlayerInfoPacket(player->name, true, 1000) ) ); + //broadcastAll(shared_ptr( new PlayerInfoPacket(player->name, true, 1000) ) ); if( player->connection->getNetworkPlayer() ) { - broadcastAll(std::shared_ptr( new PlayerInfoPacket( player ) ) ); + broadcastAll(shared_ptr( new PlayerInfoPacket( player ) ) ); } players.push_back(player); @@ -380,42 +380,42 @@ void PlayerList::add(std::shared_ptr player) // Some code from here has been moved to the above validatePlayerSpawnPosition function // 4J Stu - Swapped these lines about so that we get the chunk visiblity packet way ahead of all the add tracked entity packets - // Fix for #9169 - ART : Sign text is replaced with the words �Awaiting approval�. + // Fix for #9169 - ART : Sign text is replaced with the words “Awaiting approval”. changeDimension(player, NULL); level->addEntity(player); for (int i = 0; i < players.size(); i++) { - std::shared_ptr op = players.at(i); - //player->connection->send(std::shared_ptr( new PlayerInfoPacket(op->name, true, op->latency) ) ); + shared_ptr op = players.at(i); + //player->connection->send(shared_ptr( new PlayerInfoPacket(op->name, true, op->latency) ) ); if( op->connection->getNetworkPlayer() ) { - player->connection->send(std::shared_ptr( new PlayerInfoPacket( op ) ) ); + player->connection->send(shared_ptr( new PlayerInfoPacket( op ) ) ); } } if(level->isAtLeastOnePlayerSleeping()) { - std::shared_ptr firstSleepingPlayer = nullptr; + shared_ptr firstSleepingPlayer = nullptr; for (unsigned int i = 0; i < players.size(); i++) { - std::shared_ptr thisPlayer = players[i]; + shared_ptr thisPlayer = players[i]; if(thisPlayer->isSleeping()) { - if(firstSleepingPlayer == NULL) firstSleepingPlayer = thisPlayer; - thisPlayer->connection->send(std::shared_ptr( new ChatPacket(thisPlayer->name, ChatPacket::e_ChatBedMeSleep))); + if(firstSleepingPlayer == NULL) firstSleepingPlayer = thisPlayer; + thisPlayer->connection->send(shared_ptr( new ChatPacket(thisPlayer->name, ChatPacket::e_ChatBedMeSleep))); } } - player->connection->send(std::shared_ptr( new ChatPacket(firstSleepingPlayer->name, ChatPacket::e_ChatBedPlayerSleep))); + player->connection->send(shared_ptr( new ChatPacket(firstSleepingPlayer->name, ChatPacket::e_ChatBedPlayerSleep))); } } -void PlayerList::move(std::shared_ptr player) +void PlayerList::move(shared_ptr player) { player->getLevel()->getChunkMap()->move(player); } -void PlayerList::remove(std::shared_ptr player) +void PlayerList::remove(shared_ptr player) { save(player); //4J Stu - We don't want to save the map data for guests, so when we are sure that the player is gone delete the map @@ -428,7 +428,7 @@ void PlayerList::remove(std::shared_ptr player) { players.erase(it); } - //broadcastAll(std::shared_ptr( new PlayerInfoPacket(player->name, false, 9999) ) ); + //broadcastAll(shared_ptr( new PlayerInfoPacket(player->name, false, 9999) ) ); removePlayerFromReceiving(player); player->connection = nullptr; // Must remove reference to connection, or else there is a circular dependency @@ -439,15 +439,15 @@ void PlayerList::remove(std::shared_ptr player) saveAll(NULL,false); } -std::shared_ptr PlayerList::getPlayerForLogin(PendingConnection *pendingConnection, const wstring& userName, PlayerUID xuid, PlayerUID onlineXuid) +shared_ptr PlayerList::getPlayerForLogin(PendingConnection *pendingConnection, const wstring& userName, PlayerUID xuid, PlayerUID onlineXuid) { if (players.size() >= maxPlayers) { pendingConnection->disconnect(DisconnectPacket::eDisconnect_ServerFull); - return std::shared_ptr(); + return shared_ptr(); } - - std::shared_ptr player = std::shared_ptr(new ServerPlayer(server, server->getLevel(0), userName, new ServerPlayerGameMode(server->getLevel(0)) )); + + shared_ptr player = shared_ptr(new ServerPlayer(server, server->getLevel(0), userName, new ServerPlayerGameMode(server->getLevel(0)) )); player->gameMode->player = player; // 4J added as had to remove this assignment from ServerPlayer ctor player->setXuid( xuid ); // 4J Added player->setOnlineXuid( onlineXuid ); // 4J Added @@ -469,9 +469,9 @@ std::shared_ptr PlayerList::getPlayerForLogin(PendingConnection *p return player; } -std::shared_ptr PlayerList::respawn(std::shared_ptr serverPlayer, int targetDimension, bool keepAllPlayerData) +shared_ptr PlayerList::respawn(shared_ptr serverPlayer, int targetDimension, bool keepAllPlayerData) { - // How we handle the entity tracker depends on whether we are the primary player currently, and whether there will be any player in the same system in the same dimension once we finish respawning. + // How we handle the entity tracker depends on whether we are the primary player currently, and whether there will be any player in the same system in the same dimension once we finish respawning. bool isPrimary = canReceiveAllPackets(serverPlayer); // Is this the primary player in its current dimension? int oldDimension = serverPlayer->dimension; bool isEmptying = ( targetDimension != oldDimension); // We're not emptying this dimension on this machine if this player is going back into the same dimension @@ -483,7 +483,7 @@ std::shared_ptr PlayerList::respawn(std::shared_ptr for( unsigned int i = 0; i < players.size(); i++ ) { - std::shared_ptr ep = players[i]; + shared_ptr ep = players[i]; if( ep == serverPlayer ) continue; if( ep->dimension != oldDimension ) continue; @@ -539,8 +539,8 @@ std::shared_ptr PlayerList::respawn(std::shared_ptr PlayerUID playerXuid = serverPlayer->getXuid(); PlayerUID playerOnlineXuid = serverPlayer->getOnlineXuid(); - - std::shared_ptr player = std::shared_ptr(new ServerPlayer(server, server->getLevel(serverPlayer->dimension), serverPlayer->name, new ServerPlayerGameMode(server->getLevel(serverPlayer->dimension)))); + + shared_ptr player = shared_ptr(new ServerPlayer(server, server->getLevel(serverPlayer->dimension), serverPlayer->name, new ServerPlayerGameMode(server->getLevel(serverPlayer->dimension)))); player->restoreFrom(serverPlayer, keepAllPlayerData); if (keepAllPlayerData) { @@ -598,7 +598,7 @@ std::shared_ptr PlayerList::respawn(std::shared_ptr } else { - player->connection->send( std::shared_ptr( new GameEventPacket(GameEventPacket::NO_RESPAWN_BED_AVAILABLE, 0) ) ); + player->connection->send( shared_ptr( new GameEventPacket(GameEventPacket::NO_RESPAWN_BED_AVAILABLE, 0) ) ); } delete bedPosition; } @@ -611,7 +611,7 @@ std::shared_ptr PlayerList::respawn(std::shared_ptr player->setPos(player->x, player->y + 1, player->z); } - player->connection->send( std::shared_ptr( new RespawnPacket((char) player->dimension, player->level->getSeed(), player->level->getMaxBuildHeight(), + player->connection->send( shared_ptr( new RespawnPacket((char) player->dimension, player->level->getSeed(), player->level->getMaxBuildHeight(), player->gameMode->getGameModeForPlayer(), level->difficulty, level->getLevelData()->getGenerator(), player->level->useNewSeaLevel(), player->entityId, level->getLevelData()->getXZSize(), level->getLevelData()->getHellScale()) ) ); player->connection->teleport(player->x, player->y, player->z, player->yRot, player->xRot); @@ -623,7 +623,7 @@ std::shared_ptr PlayerList::respawn(std::shared_ptr { MobEffectInstance *effect = *it; - player->connection->send(std::shared_ptr( new UpdateMobEffectPacket(player->entityId, effect) ) ); + player->connection->send(shared_ptr( new UpdateMobEffectPacket(player->entityId, effect) ) ); } delete activeEffects; player->getEntityData()->markDirty(Mob::DATA_EFFECT_COLOR_ID); @@ -639,7 +639,7 @@ std::shared_ptr PlayerList::respawn(std::shared_ptr // 4J-JEV - Dying before this point in the tutorial is pretty annoying, // making sure to remove health/hunger and give you back your meat. - if( Minecraft::GetInstance()->isTutorial() + if( Minecraft::GetInstance()->isTutorial() && (!Minecraft::GetInstance()->gameMode->getTutorial()->isStateCompleted(e_Tutorial_State_Food_Bar)) ) { app.getGameRuleDefinitions()->postProcessPlayer(player); @@ -654,10 +654,10 @@ std::shared_ptr PlayerList::respawn(std::shared_ptr } -void PlayerList::toggleDimension(std::shared_ptr player, int targetDimension) +void PlayerList::toggleDimension(shared_ptr player, int targetDimension) { int lastDimension = player->dimension; - // How we handle the entity tracker depends on whether we are the primary player currently, and whether there will be any player in the same system in the same dimension once we finish respawning. + // How we handle the entity tracker depends on whether we are the primary player currently, and whether there will be any player in the same system in the same dimension once we finish respawning. bool isPrimary = canReceiveAllPackets(player); // Is this the primary player in its current dimension? bool isEmptying = true; @@ -666,7 +666,7 @@ void PlayerList::toggleDimension(std::shared_ptr player, int targe for( unsigned int i = 0; i < players.size(); i++ ) { - std::shared_ptr ep = players[i]; + shared_ptr ep = players[i]; if( ep == player ) continue; if( ep->dimension != lastDimension ) continue; @@ -728,7 +728,7 @@ void PlayerList::toggleDimension(std::shared_ptr player, int targe // 4J Stu Added so that we remove entities from the correct level, after the respawn packet we will be in the wrong level player->flushEntitiesToRemove(); - player->connection->send( std::shared_ptr( new RespawnPacket((char) player->dimension, newLevel->getSeed(), newLevel->getMaxBuildHeight(), + player->connection->send( shared_ptr( new RespawnPacket((char) player->dimension, newLevel->getSeed(), newLevel->getMaxBuildHeight(), player->gameMode->getGameModeForPlayer(), newLevel->difficulty, newLevel->getLevelData()->getGenerator(), newLevel->useNewSeaLevel(), player->entityId, newLevel->getLevelData()->getXZSize(), newLevel->getLevelData()->getHellScale()) ) ); @@ -772,7 +772,7 @@ void PlayerList::toggleDimension(std::shared_ptr player, int targe oldLevel->tick(player, false); } } - + removePlayerFromReceiving(player, false, lastDimension); addPlayerToReceiving(player); @@ -807,7 +807,7 @@ void PlayerList::toggleDimension(std::shared_ptr player, int targe // Force sending of the current chunk player->doTick(true, true, true); } - + player->connection->teleport(player->x, player->y, player->z, player->yRot, player->xRot); // 4J Stu - Fix for #64683 - Customer Encountered: TU7: Content: Gameplay: Potion effects are removed after using the Nether Portal @@ -816,7 +816,7 @@ void PlayerList::toggleDimension(std::shared_ptr player, int targe { MobEffectInstance *effect = *it; - player->connection->send(std::shared_ptr( new UpdateMobEffectPacket(player->entityId, effect) ) ); + player->connection->send(shared_ptr( new UpdateMobEffectPacket(player->entityId, effect) ) ); } delete activeEffects; player->getEntityData()->markDirty(Mob::DATA_EFFECT_COLOR_ID); @@ -833,13 +833,13 @@ void PlayerList::tick() sendAllPlayerInfoIn = 0; } - if (sendAllPlayerInfoIn < players.size()) + if (sendAllPlayerInfoIn < players.size()) { - std::shared_ptr op = players[sendAllPlayerInfoIn]; - //broadcastAll(std::shared_ptr( new PlayerInfoPacket(op->name, true, op->latency) ) ); + shared_ptr op = players[sendAllPlayerInfoIn]; + //broadcastAll(shared_ptr( new PlayerInfoPacket(op->name, true, op->latency) ) ); if( op->connection->getNetworkPlayer() ) { - broadcastAll(std::shared_ptr( new PlayerInfoPacket( op ) ) ); + broadcastAll(shared_ptr( new PlayerInfoPacket( op ) ) ); } } @@ -849,11 +849,11 @@ void PlayerList::tick() BYTE smallId = m_smallIdsToClose.front(); m_smallIdsToClose.pop_front(); - std::shared_ptr player = nullptr; + shared_ptr player = nullptr; for(unsigned int i = 0; i < players.size(); i++) { - std::shared_ptr p = players.at(i); + shared_ptr p = players.at(i); // 4J Stu - May be being a bit overprotective with all the NULL checks, but adding late in TU7 so want to be safe if (p != NULL && p->connection != NULL && p->connection->connection != NULL && p->connection->connection->getSocket() != NULL && p->connection->connection->getSocket()->getSmallId() == smallId ) { @@ -882,11 +882,11 @@ void PlayerList::tick() //#ifdef _XBOX PlayerUID xuid = selectedPlayer->GetUID(); // Kick this player from the game - std::shared_ptr player = nullptr; + shared_ptr player = nullptr; for(unsigned int i = 0; i < players.size(); i++) { - std::shared_ptr p = players.at(i); + shared_ptr p = players.at(i); PlayerUID playersXuid = p->getOnlineXuid(); if (p != NULL && ProfileManager.AreXUIDSEqual(playersXuid, xuid ) ) { @@ -901,7 +901,7 @@ void PlayerList::tick() // 4J Stu - If we have kicked a player, make sure that they have no privileges if they later try to join the world when trust players is off player->enableAllPlayerPrivileges( false ); player->connection->setWasKicked(); - player->connection->send( std::shared_ptr( new DisconnectPacket(DisconnectPacket::eDisconnect_Kicked) )); + player->connection->send( shared_ptr( new DisconnectPacket(DisconnectPacket::eDisconnect_Kicked) )); } //#endif } @@ -914,10 +914,10 @@ void PlayerList::tick() { for(unsigned int i = 0; i < receiveAllPlayers[dim].size(); ++i) { - std::shared_ptr currentPlayer = receiveAllPlayers[dim][i]; + shared_ptr currentPlayer = receiveAllPlayers[dim][i]; if(currentPlayer->removed) { - std::shared_ptr newPlayer = findAlivePlayerOnSystem(currentPlayer); + shared_ptr newPlayer = findAlivePlayerOnSystem(currentPlayer); if(newPlayer != NULL) { receiveAllPlayers[dim][i] = newPlayer; @@ -939,20 +939,20 @@ void PlayerList::prioritiseTileChanges(int x, int y, int z, int dimension) server->getLevel(dimension)->getChunkMap()->prioritiseTileChanges(x, y, z); } -void PlayerList::broadcastAll(std::shared_ptr packet) +void PlayerList::broadcastAll(shared_ptr packet) { for (unsigned int i = 0; i < players.size(); i++) { - std::shared_ptr player = players[i]; + shared_ptr player = players[i]; player->connection->send(packet); } } -void PlayerList::broadcastAll(std::shared_ptr packet, int dimension) +void PlayerList::broadcastAll(shared_ptr packet, int dimension) { for (unsigned int i = 0; i < players.size(); i++) { - std::shared_ptr player = players[i]; + shared_ptr player = players[i]; if (player->dimension == dimension) player->connection->send(packet); } } @@ -978,7 +978,7 @@ bool PlayerList::isOp(const wstring& name) return false; } -bool PlayerList::isOp(std::shared_ptr player) +bool PlayerList::isOp(shared_ptr player) { bool cheatsEnabled = app.GetGameHostOption(eGameHostOption_CheatsEnabled); #ifdef _DEBUG_MENUS_ENABLED @@ -989,11 +989,11 @@ bool PlayerList::isOp(std::shared_ptr player) return isOp; } -std::shared_ptr PlayerList::getPlayer(const wstring& name) +shared_ptr PlayerList::getPlayer(const wstring& name) { - for (unsigned int i = 0; i < players.size(); i++) + for (unsigned int i = 0; i < players.size(); i++) { - std::shared_ptr p = players[i]; + shared_ptr p = players[i]; if (p->name == name) // 4J - used to be case insensitive (using equalsIgnoreCase) - imagine we'll be shifting to XUIDs anyway { return p; @@ -1003,11 +1003,11 @@ std::shared_ptr PlayerList::getPlayer(const wstring& name) } // 4J Added -std::shared_ptr PlayerList::getPlayer(PlayerUID uid) +shared_ptr PlayerList::getPlayer(PlayerUID uid) { - for (unsigned int i = 0; i < players.size(); i++) + for (unsigned int i = 0; i < players.size(); i++) { - std::shared_ptr p = players[i]; + shared_ptr p = players[i]; if (p->getXuid() == uid || p->getOnlineXuid() == uid) // 4J - used to be case insensitive (using equalsIgnoreCase) - imagine we'll be shifting to XUIDs anyway { return p; @@ -1018,23 +1018,23 @@ std::shared_ptr PlayerList::getPlayer(PlayerUID uid) void PlayerList::sendMessage(const wstring& name, const wstring& message) { - std::shared_ptr player = getPlayer(name); + shared_ptr player = getPlayer(name); if (player != NULL) { - player->connection->send( std::shared_ptr( new ChatPacket(message) ) ); + player->connection->send( shared_ptr( new ChatPacket(message) ) ); } } -void PlayerList::broadcast(double x, double y, double z, double range, int dimension, std::shared_ptr packet) +void PlayerList::broadcast(double x, double y, double z, double range, int dimension, shared_ptr packet) { broadcast(nullptr, x, y, z, range, dimension, packet); } -void PlayerList::broadcast(std::shared_ptr except, double x, double y, double z, double range, int dimension, std::shared_ptr packet) +void PlayerList::broadcast(shared_ptr except, double x, double y, double z, double range, int dimension, shared_ptr packet) { // 4J - altered so that we don't send to the same machine more than once. Add the source player to the machines we have "sent" to as it doesn't need to go to that // machine either - vector< std::shared_ptr > sentTo; + vector< shared_ptr > sentTo; if( except != NULL ) { sentTo.push_back(dynamic_pointer_cast(except)); @@ -1042,7 +1042,7 @@ void PlayerList::broadcast(std::shared_ptr except, double x, double y, d for (unsigned int i = 0; i < players.size(); i++) { - std::shared_ptr p = players[i]; + shared_ptr p = players[i]; if (p == except) continue; if (p->dimension != dimension) continue; @@ -1057,9 +1057,9 @@ void PlayerList::broadcast(std::shared_ptr except, double x, double y, d } else { - for(unsigned int j = 0; j < sentTo.size(); j++ ) + for(unsigned int j = 0; j < sentTo.size(); j++ ) { - std::shared_ptr player2 = sentTo[j]; + shared_ptr player2 = sentTo[j]; INetworkPlayer *otherPlayer = player2->connection->getNetworkPlayer(); if( otherPlayer != NULL && thisPlayer->IsSameSystem(otherPlayer) ) { @@ -1080,7 +1080,7 @@ void PlayerList::broadcast(std::shared_ptr except, double x, double y, d if (xd * xd + yd * yd + zd * zd < range * range) { #if 0 // _DEBUG - std::shared_ptr SoundPacket= dynamic_pointer_cast(packet); + shared_ptr SoundPacket= dynamic_pointer_cast(packet); if(SoundPacket) { @@ -1099,10 +1099,10 @@ void PlayerList::broadcast(std::shared_ptr except, double x, double y, d void PlayerList::broadcastToAllOps(const wstring& message) { - std::shared_ptr chatPacket = std::shared_ptr( new ChatPacket(message) ); + shared_ptr chatPacket = shared_ptr( new ChatPacket(message) ); for (unsigned int i = 0; i < players.size(); i++) { - std::shared_ptr p = players[i]; + shared_ptr p = players[i]; if (isOp(p->name)) { p->connection->send(chatPacket); @@ -1110,9 +1110,9 @@ void PlayerList::broadcastToAllOps(const wstring& message) } } -bool PlayerList::sendTo(const wstring& name, std::shared_ptr packet) +bool PlayerList::sendTo(const wstring& name, shared_ptr packet) { - std::shared_ptr player = getPlayer(name); + shared_ptr player = getPlayer(name); if (player != NULL) { player->connection->send(packet); @@ -1131,7 +1131,7 @@ void PlayerList::saveAll(ProgressListener *progressListener, bool bDeleteGuestMa for (unsigned int i = 0; i < players.size(); i++) { playerIo->save(players[i]); - + //4J Stu - We don't want to save the map data for guests, so when we are sure that the player is gone delete the map if(bDeleteGuestMaps && players[i]->isGuest()) playerIo->deleteMapFilesForPlayer(players[i]); @@ -1154,28 +1154,28 @@ void PlayerList::reloadWhitelist() { } -void PlayerList::sendLevelInfo(std::shared_ptr player, ServerLevel *level) +void PlayerList::sendLevelInfo(shared_ptr player, ServerLevel *level) { - player->connection->send( std::shared_ptr( new SetTimePacket(level->getTime()) ) ); + player->connection->send( shared_ptr( new SetTimePacket(level->getTime()) ) ); if (level->isRaining()) { - player->connection->send( std::shared_ptr( new GameEventPacket(GameEventPacket::START_RAINING, 0) ) ); + player->connection->send( shared_ptr( new GameEventPacket(GameEventPacket::START_RAINING, 0) ) ); } else { // 4J Stu - Fix for #44836 - Customer Encountered: Out of Sync Weather [A-10] // If it was raining when the player left the level, and is now not raining we need to make sure that state is updated - player->connection->send( std::shared_ptr( new GameEventPacket(GameEventPacket::STOP_RAINING, 0) ) ); + player->connection->send( shared_ptr( new GameEventPacket(GameEventPacket::STOP_RAINING, 0) ) ); } - // send the stronghold position if there is one + // send the stronghold position if there is one if((level->dimension->id==0) && level->getLevelData()->getHasStronghold()) { - player->connection->send( std::shared_ptr( new XZPacket(XZPacket::STRONGHOLD,level->getLevelData()->getXStronghold(),level->getLevelData()->getZStronghold()) ) ); + player->connection->send( shared_ptr( new XZPacket(XZPacket::STRONGHOLD,level->getLevelData()->getXStronghold(),level->getLevelData()->getZStronghold()) ) ); } } -void PlayerList::sendAllPlayerInfo(std::shared_ptr player) +void PlayerList::sendAllPlayerInfo(shared_ptr player) { player->refreshContainer(player->inventoryMenu); player->resetSentInfo(); @@ -1218,7 +1218,7 @@ void PlayerList::setOverrideGameMode(GameType *gameMode) this->overrideGameMode = gameMode; } -void PlayerList::updatePlayerGameMode(std::shared_ptr newPlayer, std::shared_ptr oldPlayer, Level *level) +void PlayerList::updatePlayerGameMode(shared_ptr newPlayer, shared_ptr oldPlayer, Level *level) { // reset the player's game mode (first pick from old, then copy level if @@ -1239,7 +1239,7 @@ void PlayerList::setAllowCheatsForAllPlayers(bool allowCommands) this->allowCheatsForAllPlayers = allowCommands; } -std::shared_ptr PlayerList::findAlivePlayerOnSystem(std::shared_ptr player) +shared_ptr PlayerList::findAlivePlayerOnSystem(shared_ptr player) { int dimIndex, playerDim; dimIndex = playerDim = player->dimension; @@ -1251,7 +1251,7 @@ std::shared_ptr PlayerList::findAlivePlayerOnSystem(std::shared_pt { for(AUTO_VAR(itP, players.begin()); itP != players.end(); ++itP) { - std::shared_ptr newPlayer = *itP; + shared_ptr newPlayer = *itP; INetworkPlayer *otherPlayer = newPlayer->connection->getNetworkPlayer(); @@ -1270,7 +1270,7 @@ std::shared_ptr PlayerList::findAlivePlayerOnSystem(std::shared_pt return nullptr; } -void PlayerList::removePlayerFromReceiving(std::shared_ptr player, bool usePlayerDimension /*= true*/, int dimension /*= 0*/) +void PlayerList::removePlayerFromReceiving(shared_ptr player, bool usePlayerDimension /*= true*/, int dimension /*= 0*/) { int dimIndex, playerDim; dimIndex = playerDim = usePlayerDimension ? player->dimension : dimension; @@ -1297,7 +1297,7 @@ void PlayerList::removePlayerFromReceiving(std::shared_ptr player, { for(AUTO_VAR(itP, players.begin()); itP != players.end(); ++itP) { - std::shared_ptr newPlayer = *itP; + shared_ptr newPlayer = *itP; INetworkPlayer *otherPlayer = newPlayer->connection->getNetworkPlayer(); @@ -1324,7 +1324,7 @@ void PlayerList::removePlayerFromReceiving(std::shared_ptr player, // Re-check all active players and make sure they have someone on their system to receive all packets for(AUTO_VAR(itP, players.begin()); itP != players.end(); ++itP) { - std::shared_ptr newPlayer = *itP; + shared_ptr newPlayer = *itP; INetworkPlayer *checkingPlayer = newPlayer->connection->getNetworkPlayer(); if( checkingPlayer != NULL ) @@ -1335,7 +1335,7 @@ void PlayerList::removePlayerFromReceiving(std::shared_ptr player, bool foundPrimary = false; for(AUTO_VAR(it, receiveAllPlayers[newPlayerDim].begin()); it != receiveAllPlayers[newPlayerDim].end(); ++it) { - std::shared_ptr primaryPlayer = *it; + shared_ptr primaryPlayer = *it; INetworkPlayer *primPlayer = primaryPlayer->connection->getNetworkPlayer(); if(primPlayer != NULL && checkingPlayer->IsSameSystem( primPlayer ) ) { @@ -1355,7 +1355,7 @@ void PlayerList::removePlayerFromReceiving(std::shared_ptr player, } } -void PlayerList::addPlayerToReceiving(std::shared_ptr player) +void PlayerList::addPlayerToReceiving(shared_ptr player) { int playerDim = 0; if( player->dimension == -1 ) playerDim = 1; @@ -1380,16 +1380,16 @@ void PlayerList::addPlayerToReceiving(std::shared_ptr player) { for(AUTO_VAR(it, receiveAllPlayers[playerDim].begin()); it != receiveAllPlayers[playerDim].end(); ++it) { - std::shared_ptr oldPlayer = *it; + shared_ptr oldPlayer = *it; INetworkPlayer *checkingPlayer = oldPlayer->connection->getNetworkPlayer(); - if(checkingPlayer != NULL && checkingPlayer->IsSameSystem( thisPlayer ) ) + if(checkingPlayer != NULL && checkingPlayer->IsSameSystem( thisPlayer ) ) { shouldAddPlayer = false; break; } } } - + if( shouldAddPlayer ) { #ifndef _CONTENT_PACKAGE @@ -1399,14 +1399,14 @@ void PlayerList::addPlayerToReceiving(std::shared_ptr player) } } -bool PlayerList::canReceiveAllPackets(std::shared_ptr player) +bool PlayerList::canReceiveAllPackets(shared_ptr player) { int playerDim = 0; if( player->dimension == -1 ) playerDim = 1; else if( player->dimension == 1) playerDim = 2; for(AUTO_VAR(it, receiveAllPlayers[playerDim].begin()); it != receiveAllPlayers[playerDim].end(); ++it) { - std::shared_ptr newPlayer = *it; + shared_ptr newPlayer = *it; if(newPlayer == player) { return true; diff --git a/Minecraft.Client/PlayerList.h b/Minecraft.Client/PlayerList.h index 23b48f74..14bd6b2d 100644 --- a/Minecraft.Client/PlayerList.h +++ b/Minecraft.Client/PlayerList.h @@ -22,7 +22,7 @@ private: static const int SEND_PLAYER_INFO_INTERVAL = 20 * 10; // 4J - brought forward from 1.2.3 // public static Logger logger = Logger.getLogger("Minecraft"); public: - vector > players; + vector > players; private: MinecraftServer *server; @@ -51,60 +51,60 @@ private: int sendAllPlayerInfoIn; // 4J Added to maintain which players in which dimensions can receive all packet types - vector > receiveAllPlayers[3]; + vector > receiveAllPlayers[3]; private: - std::shared_ptr findAlivePlayerOnSystem(std::shared_ptr currentPlayer); + shared_ptr findAlivePlayerOnSystem(shared_ptr currentPlayer); public: - void removePlayerFromReceiving(std::shared_ptr player, bool usePlayerDimension = true, int dimension = 0); - void addPlayerToReceiving(std::shared_ptr player); - bool canReceiveAllPackets(std::shared_ptr player); + void removePlayerFromReceiving(shared_ptr player, bool usePlayerDimension = true, int dimension = 0); + void addPlayerToReceiving(shared_ptr player); + bool canReceiveAllPackets(shared_ptr player); public: PlayerList(MinecraftServer *server); ~PlayerList(); - void placeNewPlayer(Connection *connection, std::shared_ptr player, std::shared_ptr packet); + void placeNewPlayer(Connection *connection, shared_ptr player, shared_ptr packet); void setLevel(ServerLevelArray levels); - void changeDimension(std::shared_ptr player, ServerLevel *from); + void changeDimension(shared_ptr player, ServerLevel *from); int getMaxRange(); - bool load(std::shared_ptr player); // 4J Changed return val to bool to check if new player or loaded player + bool load(shared_ptr player); // 4J Changed return val to bool to check if new player or loaded player protected: - void save(std::shared_ptr player); + void save(shared_ptr player); public: - void validatePlayerSpawnPosition(std::shared_ptr player); // 4J Added - void add(std::shared_ptr player); - void move(std::shared_ptr player); - void remove(std::shared_ptr player); - std::shared_ptr getPlayerForLogin(PendingConnection *pendingConnection, const wstring& userName, PlayerUID xuid, PlayerUID OnlineXuid); - std::shared_ptr respawn(std::shared_ptr serverPlayer, int targetDimension, bool keepAllPlayerData); - void toggleDimension(std::shared_ptr player, int targetDimension); + void validatePlayerSpawnPosition(shared_ptr player); // 4J Added + void add(shared_ptr player); + void move(shared_ptr player); + void remove(shared_ptr player); + shared_ptr getPlayerForLogin(PendingConnection *pendingConnection, const wstring& userName, PlayerUID xuid, PlayerUID OnlineXuid); + shared_ptr respawn(shared_ptr serverPlayer, int targetDimension, bool keepAllPlayerData); + void toggleDimension(shared_ptr player, int targetDimension); void tick(); bool isTrackingTile(int x, int y, int z, int dimension); // 4J added void prioritiseTileChanges(int x, int y, int z, int dimension); // 4J added - void broadcastAll(std::shared_ptr packet); - void broadcastAll(std::shared_ptr packet, int dimension); + void broadcastAll(shared_ptr packet); + void broadcastAll(shared_ptr packet, int dimension); wstring getPlayerNames(); public: bool isWhiteListed(const wstring& name); bool isOp(const wstring& name); - bool isOp(std::shared_ptr player); // 4J Added - std::shared_ptr getPlayer(const wstring& name); - std::shared_ptr getPlayer(PlayerUID uid); + bool isOp(shared_ptr player); // 4J Added + shared_ptr getPlayer(const wstring& name); + shared_ptr getPlayer(PlayerUID uid); void sendMessage(const wstring& name, const wstring& message); - void broadcast(double x, double y, double z, double range, int dimension, std::shared_ptr packet); - void broadcast(std::shared_ptr except, double x, double y, double z, double range, int dimension, std::shared_ptr packet); + void broadcast(double x, double y, double z, double range, int dimension, shared_ptr packet); + void broadcast(shared_ptr except, double x, double y, double z, double range, int dimension, shared_ptr packet); void broadcastToAllOps(const wstring& message); - bool sendTo(const wstring& name, std::shared_ptr packet); + bool sendTo(const wstring& name, shared_ptr packet); // 4J Added ProgressListener *progressListener param and bDeleteGuestMaps param void saveAll(ProgressListener *progressListener, bool bDeleteGuestMaps = false); void whiteList(const wstring& playerName); void blackList(const wstring& playerName); // Set getWhiteList(); / 4J removed void reloadWhitelist(); - void sendLevelInfo(std::shared_ptr player, ServerLevel *level); - void sendAllPlayerInfo(std::shared_ptr player); + void sendLevelInfo(shared_ptr player, ServerLevel *level); + void sendAllPlayerInfo(shared_ptr player); int getPlayerCount(); int getPlayerCount(ServerLevel *level); // 4J Added int getMaxPlayers(); @@ -113,7 +113,7 @@ public: void setOverrideGameMode(GameType *gameMode); private: - void updatePlayerGameMode(std::shared_ptr newPlayer, std::shared_ptr oldPlayer, Level *level); + void updatePlayerGameMode(shared_ptr newPlayer, shared_ptr oldPlayer, Level *level); public: void setAllowCheatsForAllPlayers(bool allowCommands); diff --git a/Minecraft.Client/PlayerRenderer.cpp b/Minecraft.Client/PlayerRenderer.cpp index a4455c71..c332b41c 100644 --- a/Minecraft.Client/PlayerRenderer.cpp +++ b/Minecraft.Client/PlayerRenderer.cpp @@ -13,7 +13,7 @@ #include "..\Minecraft.World\net.minecraft.h" #include "..\Minecraft.World\StringHelpers.h" -const unsigned int PlayerRenderer::s_nametagColors[MINECRAFT_NET_MAX_PLAYERS] = +const unsigned int PlayerRenderer::s_nametagColors[MINECRAFT_NET_MAX_PLAYERS] = { 0xff000000, // WHITE (represents the "white" player, but using black as the colour) 0xff33cc33, // GREEN @@ -46,10 +46,10 @@ unsigned int PlayerRenderer::getNametagColour(int index) return 0xFF000000; } -int PlayerRenderer::prepareArmor(std::shared_ptr _player, int layer, float a) +int PlayerRenderer::prepareArmor(shared_ptr _player, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr player = dynamic_pointer_cast(_player); + shared_ptr player = dynamic_pointer_cast(_player); // 4J-PB - need to disable rendering armour for some special skins (Daleks) unsigned int uiAnimOverrideBitmask=player->getAnimOverrideBitmask(); @@ -58,7 +58,7 @@ int PlayerRenderer::prepareArmor(std::shared_ptr _player, int layer, float return -1; } - std::shared_ptr itemInstance = player->inventory->getArmor(3 - layer); + shared_ptr itemInstance = player->inventory->getArmor(3 - layer); if (itemInstance != NULL) { Item *item = itemInstance->getItem(); @@ -108,11 +108,11 @@ int PlayerRenderer::prepareArmor(std::shared_ptr _player, int layer, float } -void PlayerRenderer::prepareSecondPassArmor(std::shared_ptr _player, int layer, float a) +void PlayerRenderer::prepareSecondPassArmor(shared_ptr _player, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr player = dynamic_pointer_cast(_player); - std::shared_ptr itemInstance = player->inventory->getArmor(3 - layer); + shared_ptr player = dynamic_pointer_cast(_player); + shared_ptr itemInstance = player->inventory->getArmor(3 - layer); if (itemInstance != NULL) { Item *item = itemInstance->getItem(); @@ -127,14 +127,14 @@ void PlayerRenderer::prepareSecondPassArmor(std::shared_ptr _player, int la } } -void PlayerRenderer::render(std::shared_ptr _mob, double x, double y, double z, float rot, float a) +void PlayerRenderer::render(shared_ptr _mob, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); if(mob->hasInvisiblePrivilege()) return; - std::shared_ptr item = mob->inventory->getSelected(); + shared_ptr item = mob->inventory->getSelected(); armorParts1->holdingRightHand = armorParts2->holdingRightHand = humanoidModel->holdingRightHand = item != NULL ? 1 : 0; if (item != NULL) { @@ -228,10 +228,10 @@ void PlayerRenderer::render(std::shared_ptr _mob, double x, double y, do } -void PlayerRenderer::renderName(std::shared_ptr _mob, double x, double y, double z) +void PlayerRenderer::renderName(shared_ptr _mob, double x, double y, double z) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); if (Minecraft::renderNames() && mob != entityRenderDispatcher->cameraEntity && !mob->isInvisibleTo(Minecraft::GetInstance()->player) ) // 4J-JEV: Todo, move to LivingEntityRenderer. @@ -256,7 +256,7 @@ void PlayerRenderer::renderName(std::shared_ptr _mob, double x, double y, d { if ( app.GetGameSettings(eGameSetting_DisplayHUD)==0 ) { - // 4J-PB - turn off gamertag render + // 4J-PB - turn off gamertag render return; } @@ -316,14 +316,14 @@ void PlayerRenderer::renderName(std::shared_ptr _mob, double x, double y, d } -void PlayerRenderer::additionalRendering(std::shared_ptr _mob, float a) +void PlayerRenderer::additionalRendering(shared_ptr _mob, float a) { MobRenderer::additionalRendering(_mob,a); // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); - std::shared_ptr headGear = mob->inventory->getArmor(3); + shared_ptr headGear = mob->inventory->getArmor(3); if (headGear != NULL) { // don't render the pumpkin for the skins @@ -426,9 +426,9 @@ void PlayerRenderer::additionalRendering(std::shared_ptr _mob, float a) humanoidModel->renderCloak(1 / 16.0f,true); glPopMatrix(); } + - - std::shared_ptr item = mob->inventory->getSelected(); + shared_ptr item = mob->inventory->getSelected(); if (item != NULL) { @@ -438,7 +438,7 @@ void PlayerRenderer::additionalRendering(std::shared_ptr _mob, float a) if (mob->fishing != NULL) { - item = std::shared_ptr( new ItemInstance(Item::stick) ); + item = shared_ptr( new ItemInstance(Item::stick) ); } UseAnim anim = UseAnim_none;//null; @@ -521,7 +521,7 @@ void PlayerRenderer::additionalRendering(std::shared_ptr _mob, float a) } -void PlayerRenderer::scale(std::shared_ptr player, float a) +void PlayerRenderer::scale(shared_ptr player, float a) { float s = 15 / 16.0f; glScalef(s, s, s); @@ -540,10 +540,10 @@ void PlayerRenderer::renderHand() } } -void PlayerRenderer::setupPosition(std::shared_ptr _mob, double x, double y, double z) +void PlayerRenderer::setupPosition(shared_ptr _mob, double x, double y, double z) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); if (mob->isAlive() && mob->isSleeping()) { @@ -556,10 +556,10 @@ void PlayerRenderer::setupPosition(std::shared_ptr _mob, double x, double y } } -void PlayerRenderer::setupRotations(std::shared_ptr _mob, float bob, float bodyRot, float a) +void PlayerRenderer::setupRotations(shared_ptr _mob, float bob, float bodyRot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); if (mob->isAlive() && mob->isSleeping()) { @@ -574,11 +574,11 @@ void PlayerRenderer::setupRotations(std::shared_ptr _mob, float bob, float } // 4J Added override to stop rendering shadow if player is invisible -void PlayerRenderer::renderShadow(std::shared_ptr e, double x, double y, double z, float pow, float a) +void PlayerRenderer::renderShadow(shared_ptr e, double x, double y, double z, float pow, float a) { if(app.GetGameHostOption(eGameHostOption_HostCanBeInvisible) > 0) { - std::shared_ptr player = dynamic_pointer_cast(e); + shared_ptr player = dynamic_pointer_cast(e); if(player != NULL && player->hasInvisiblePrivilege()) return; } EntityRenderer::renderShadow(e,x,y,z,pow,a); diff --git a/Minecraft.Client/PlayerRenderer.h b/Minecraft.Client/PlayerRenderer.h index 0d82fb8f..10564104 100644 --- a/Minecraft.Client/PlayerRenderer.h +++ b/Minecraft.Client/PlayerRenderer.h @@ -23,20 +23,20 @@ private: static const wstring MATERIAL_NAMES[5]; protected: - virtual int prepareArmor(std::shared_ptr _player, int layer, float a); - virtual void prepareSecondPassArmor(std::shared_ptr mob, int layer, float a); + virtual int prepareArmor(shared_ptr _player, int layer, float a); + virtual void prepareSecondPassArmor(shared_ptr mob, int layer, float a); public: - virtual void render(std::shared_ptr _mob, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr _mob, double x, double y, double z, float rot, float a); protected: - virtual void renderName(std::shared_ptr _mob, double x, double y, double z); - virtual void additionalRendering(std::shared_ptr _mob, float a); - virtual void scale(std::shared_ptr _player, float a); + virtual void renderName(shared_ptr _mob, double x, double y, double z); + virtual void additionalRendering(shared_ptr _mob, float a); + virtual void scale(shared_ptr _player, float a); public: void renderHand(); protected: - virtual void setupPosition(std::shared_ptr _mob, double x, double y, double z); - virtual void setupRotations(std::shared_ptr _mob, float bob, float bodyRot, float a); + virtual void setupPosition(shared_ptr _mob, double x, double y, double z); + virtual void setupRotations(shared_ptr _mob, float bob, float bodyRot, float a); -private: - virtual void renderShadow(std::shared_ptr e, double x, double y, double z, float pow, float a); // 4J Added override +private: + virtual void renderShadow(shared_ptr e, double x, double y, double z, float pow, float a); // 4J Added override }; \ No newline at end of file diff --git a/Minecraft.Client/QuadrupedModel.cpp b/Minecraft.Client/QuadrupedModel.cpp index f106607d..fa7e3b4b 100644 --- a/Minecraft.Client/QuadrupedModel.cpp +++ b/Minecraft.Client/QuadrupedModel.cpp @@ -41,11 +41,11 @@ QuadrupedModel::QuadrupedModel(int legSize, float g) : Model() leg3->compile(1.0f/16.0f); } -void QuadrupedModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void QuadrupedModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); - if (young) + if (young) { float ss = 2.0f; glPushMatrix(); @@ -61,8 +61,8 @@ void QuadrupedModel::render(std::shared_ptr entity, float time, float r, leg2->render(scale, usecompiled); leg3->render(scale, usecompiled); glPopMatrix(); - } - else + } + else { head->render(scale, usecompiled); body->render(scale, usecompiled); @@ -102,7 +102,7 @@ void QuadrupedModel::render(QuadrupedModel *model, float scale, bool usecompiled leg2->xRot = model->leg2->xRot; leg3->xRot = model->leg3->xRot; - if (young) + if (young) { float ss = 2.0f; glPushMatrix(); @@ -118,8 +118,8 @@ void QuadrupedModel::render(QuadrupedModel *model, float scale, bool usecompiled leg2->render(scale, usecompiled); leg3->render(scale, usecompiled); glPopMatrix(); - } - else + } + else { head->render(scale, usecompiled); body->render(scale, usecompiled); diff --git a/Minecraft.Client/QuadrupedModel.h b/Minecraft.Client/QuadrupedModel.h index d1c24de7..47c50599 100644 --- a/Minecraft.Client/QuadrupedModel.h +++ b/Minecraft.Client/QuadrupedModel.h @@ -7,7 +7,7 @@ public: ModelPart *head, *body, *leg0, *leg1, *leg2, *leg3; QuadrupedModel(int legSize, float g); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); void render(QuadrupedModel *model, float scale, bool usecompiled); }; \ No newline at end of file diff --git a/Minecraft.Client/ReceivingLevelScreen.cpp b/Minecraft.Client/ReceivingLevelScreen.cpp index 1089dc51..0e9fe3ec 100644 --- a/Minecraft.Client/ReceivingLevelScreen.cpp +++ b/Minecraft.Client/ReceivingLevelScreen.cpp @@ -23,7 +23,7 @@ void ReceivingLevelScreen::tick() tickCount++; if (tickCount % 20 == 0) { - connection->send( std::shared_ptr( new KeepAlivePacket() ) ); + connection->send( shared_ptr( new KeepAlivePacket() ) ); } if (connection != NULL) { diff --git a/Minecraft.Client/RemotePlayer.cpp b/Minecraft.Client/RemotePlayer.cpp index d5deca18..c1b72864 100644 --- a/Minecraft.Client/RemotePlayer.cpp +++ b/Minecraft.Client/RemotePlayer.cpp @@ -66,7 +66,7 @@ void RemotePlayer::tick() if (!hasStartedUsingItem && isUsingItemFlag() && inventory->items[inventory->selected] != NULL) { - std::shared_ptr item = inventory->items[inventory->selected]; + shared_ptr item = inventory->items[inventory->selected]; startUsingItem(inventory->items[inventory->selected], Item::items[item->id]->getUseDuration(item)); hasStartedUsingItem = true; } @@ -129,7 +129,7 @@ void RemotePlayer::aiStep() } // 4J Stu - Brought forward change from 1.3 to fix #64688 - Customer Encountered: TU7: Content: Art: Aura of enchanted item is not displayed for other players in online game -void RemotePlayer::setEquippedSlot(int slot, std::shared_ptr item) +void RemotePlayer::setEquippedSlot(int slot, shared_ptr item) { if (slot == 0) { diff --git a/Minecraft.Client/RemotePlayer.h b/Minecraft.Client/RemotePlayer.h index 19076ef6..b55fab16 100644 --- a/Minecraft.Client/RemotePlayer.h +++ b/Minecraft.Client/RemotePlayer.h @@ -26,7 +26,7 @@ public: virtual void tick(); virtual float getShadowHeightOffs(); virtual void aiStep(); - virtual void setEquippedSlot(int slot, std::shared_ptr item);// 4J Stu - Brought forward change from 1.3 to fix #64688 - Customer Encountered: TU7: Content: Art: Aura of enchanted item is not displayed for other players in online game + virtual void setEquippedSlot(int slot, shared_ptr item);// 4J Stu - Brought forward change from 1.3 to fix #64688 - Customer Encountered: TU7: Content: Art: Aura of enchanted item is not displayed for other players in online game virtual void animateRespawn(); virtual float getHeadHeight(); bool hasPermission(EGameCommand command) { return false; } diff --git a/Minecraft.Client/ServerCommandDispatcher.cpp b/Minecraft.Client/ServerCommandDispatcher.cpp index af0271fe..51dd42fe 100644 --- a/Minecraft.Client/ServerCommandDispatcher.cpp +++ b/Minecraft.Client/ServerCommandDispatcher.cpp @@ -52,13 +52,13 @@ ServerCommandDispatcher::ServerCommandDispatcher() Command::setLogger(this); } -void ServerCommandDispatcher::logAdminCommand(std::shared_ptr source, int type, ChatPacket::EChatPacketMessage messageType, const wstring& message, int customData, const wstring& additionalMessage) +void ServerCommandDispatcher::logAdminCommand(shared_ptr source, int type, ChatPacket::EChatPacketMessage messageType, const wstring& message, int customData, const wstring& additionalMessage) { PlayerList *playerList = MinecraftServer::getInstance()->getPlayers(); //for (Player player : MinecraftServer.getInstance().getPlayers().players) for(AUTO_VAR(it, playerList->players.begin()); it != playerList->players.end(); ++it) { - std::shared_ptr player = *it; + shared_ptr player = *it; if (player != source && playerList->isOp(player)) { // TODO: Change chat packet to be able to send more bits of data diff --git a/Minecraft.Client/ServerCommandDispatcher.h b/Minecraft.Client/ServerCommandDispatcher.h index 04847fce..306d4384 100644 --- a/Minecraft.Client/ServerCommandDispatcher.h +++ b/Minecraft.Client/ServerCommandDispatcher.h @@ -7,5 +7,5 @@ class ServerCommandDispatcher : public CommandDispatcher, public AdminLogCommand { public: ServerCommandDispatcher(); - void logAdminCommand(std::shared_ptr source, int type, ChatPacket::EChatPacketMessage messageType, const wstring& message = L"", int customData = -1, const wstring& additionalMessage = L""); + void logAdminCommand(shared_ptr source, int type, ChatPacket::EChatPacketMessage messageType, const wstring& message = L"", int customData = -1, const wstring& additionalMessage = L""); }; \ No newline at end of file diff --git a/Minecraft.Client/ServerConnection.cpp b/Minecraft.Client/ServerConnection.cpp index 064c7b51..9880a8c6 100644 --- a/Minecraft.Client/ServerConnection.cpp +++ b/Minecraft.Client/ServerConnection.cpp @@ -26,16 +26,16 @@ ServerConnection::~ServerConnection() // 4J - added to handle incoming connections, to replace thread that original used to have void ServerConnection::NewIncomingSocket(Socket *socket) { - std::shared_ptr unconnectedClient = std::shared_ptr(new PendingConnection(server, socket, L"Connection #" + _toString(connectionCounter++))); - handleConnection(unconnectedClient); + shared_ptr unconnectedClient = shared_ptr(new PendingConnection(server, socket, L"Connection #" + _toString(connectionCounter++))); + handleConnection(unconnectedClient); } -void ServerConnection::addPlayerConnection(std::shared_ptr uc) +void ServerConnection::addPlayerConnection(shared_ptr uc) { players.push_back(uc); } -void ServerConnection::handleConnection(std::shared_ptr uc) +void ServerConnection::handleConnection(shared_ptr uc) { EnterCriticalSection(&pending_cs); pending.push_back(uc); @@ -47,14 +47,14 @@ void ServerConnection::stop() EnterCriticalSection(&pending_cs); for (unsigned int i = 0; i < pending.size(); i++) { - std::shared_ptr uc = pending[i]; + shared_ptr uc = pending[i]; uc->connection->close(DisconnectPacket::eDisconnect_Closed); } LeaveCriticalSection(&pending_cs); for (unsigned int i = 0; i < players.size(); i++) { - std::shared_ptr player = players[i]; + shared_ptr player = players[i]; player->connection->close(DisconnectPacket::eDisconnect_Closed); } } @@ -64,12 +64,12 @@ void ServerConnection::tick() { // MGH - changed this so that the the CS lock doesn't cover the tick (was causing a lockup when 2 players tried to join) EnterCriticalSection(&pending_cs); - vector< std::shared_ptr > tempPending = pending; + vector< shared_ptr > tempPending = pending; LeaveCriticalSection(&pending_cs); for (unsigned int i = 0; i < tempPending.size(); i++) { - std::shared_ptr uc = tempPending[i]; + shared_ptr uc = tempPending[i]; // try { // 4J - removed try/catch uc->tick(); // } catch (Exception e) { @@ -92,8 +92,8 @@ void ServerConnection::tick() for (unsigned int i = 0; i < players.size(); i++) { - std::shared_ptr player = players[i]; - std::shared_ptr serverPlayer = player->getPlayer(); + shared_ptr player = players[i]; + shared_ptr serverPlayer = player->getPlayer(); if( serverPlayer ) { serverPlayer->doChunkSendingTick(false); @@ -138,7 +138,7 @@ void ServerConnection::handleTextureReceived(const wstring &textureName) } for (unsigned int i = 0; i < players.size(); i++) { - std::shared_ptr player = players[i]; + shared_ptr player = players[i]; if (!player->done) { player->handleTextureReceived(textureName); @@ -155,7 +155,7 @@ void ServerConnection::handleTextureAndGeometryReceived(const wstring &textureNa } for (unsigned int i = 0; i < players.size(); i++) { - std::shared_ptr player = players[i]; + shared_ptr player = players[i]; if (!player->done) { player->handleTextureAndGeometryReceived(textureName); @@ -163,7 +163,7 @@ void ServerConnection::handleTextureAndGeometryReceived(const wstring &textureNa } } -void ServerConnection::handleServerSettingsChanged(std::shared_ptr packet) +void ServerConnection::handleServerSettingsChanged(shared_ptr packet) { Minecraft *pMinecraft = Minecraft::GetInstance(); @@ -176,7 +176,7 @@ void ServerConnection::handleServerSettingsChanged(std::shared_ptrdata); pMinecraft->levels[i]->difficulty = packet->data; } - } + } } // else if(packet->action==ServerSettingsChangedPacket::HOST_IN_GAME_SETTINGS)// options // { @@ -194,11 +194,11 @@ void ServerConnection::handleServerSettingsChanged(std::shared_ptroptions->SetGamertagSetting(false); // } -// +// // for (unsigned int i = 0; i < players.size(); i++) // { -// std::shared_ptr playerconnection = players[i]; -// playerconnection->setShowOnMaps(pMinecraft->options->GetGamertagSetting()); +// shared_ptr playerconnection = players[i]; +// playerconnection->setShowOnMaps(pMinecraft->options->GetGamertagSetting()); // } // } } \ No newline at end of file diff --git a/Minecraft.Client/ServerConnection.h b/Minecraft.Client/ServerConnection.h index e4105675..56c5d39e 100644 --- a/Minecraft.Client/ServerConnection.h +++ b/Minecraft.Client/ServerConnection.h @@ -20,8 +20,8 @@ private: int connectionCounter; private: CRITICAL_SECTION pending_cs; // 4J added - vector< std::shared_ptr > pending; - vector< std::shared_ptr > players; + vector< shared_ptr > pending; + vector< shared_ptr > players; // 4J - When the server requests a texture, it should add it to here while we are waiting for it vector m_pendingTextureRequests; @@ -34,9 +34,9 @@ public: void NewIncomingSocket(Socket *socket); // 4J - added void removeSpamProtection(Socket *socket) { }// 4J Stu - Not implemented as not required - void addPlayerConnection(std::shared_ptr uc); + void addPlayerConnection(shared_ptr uc); private: - void handleConnection(std::shared_ptr uc); + void handleConnection(shared_ptr uc); public: void stop(); void tick(); @@ -45,5 +45,5 @@ public: bool addPendingTextureRequest(const wstring &textureName); void handleTextureReceived(const wstring &textureName); void handleTextureAndGeometryReceived(const wstring &textureName); - void handleServerSettingsChanged(std::shared_ptr packet); + void handleServerSettingsChanged(shared_ptr packet); }; diff --git a/Minecraft.Client/ServerLevel.cpp b/Minecraft.Client/ServerLevel.cpp index c416bb85..05566ad8 100644 --- a/Minecraft.Client/ServerLevel.cpp +++ b/Minecraft.Client/ServerLevel.cpp @@ -91,7 +91,7 @@ void ServerLevel::staticCtor() }; -ServerLevel::ServerLevel(MinecraftServer *server, std::shared_ptrlevelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings) : Level(levelStorage, levelName, levelSettings, Dimension::getNew(dimension), false) +ServerLevel::ServerLevel(MinecraftServer *server, shared_ptrlevelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings) : Level(levelStorage, levelName, levelSettings, Dimension::getNew(dimension), false) { InitializeCriticalSection(&m_limiterCS); InitializeCriticalSection(&m_tickNextTickCS); @@ -289,7 +289,7 @@ void ServerLevel::updateSleepingPlayerList() m_bAtLeastOnePlayerSleeping = false; AUTO_VAR(itEnd, players.end()); - for (vector >::iterator it = players.begin(); it != itEnd; it++) + for (vector >::iterator it = players.begin(); it != itEnd; it++) { if (!(*it)->isSleeping()) { @@ -310,7 +310,7 @@ void ServerLevel::awakenAllPlayers() m_bAtLeastOnePlayerSleeping = false; AUTO_VAR(itEnd, players.end()); - for (vector >::iterator it = players.begin(); it != itEnd; it++) + for (vector >::iterator it = players.begin(); it != itEnd; it++) { if ((*it)->isSleeping()) { @@ -335,7 +335,7 @@ bool ServerLevel::allPlayersAreSleeping() { // all players are sleeping, but have they slept long enough? AUTO_VAR(itEnd, players.end()); - for (vector >::iterator it = players.begin(); it != itEnd; it++ ) + for (vector >::iterator it = players.begin(); it != itEnd; it++ ) { // System.out.println(player->entityId + ": " + player->getSleepTimer()); if (! (*it)->isSleepingLongEnough()) @@ -467,7 +467,7 @@ void ServerLevel::tickTiles() if (isRainingAt(x, y, z)) { - addGlobalEntity( std::shared_ptr( new LightningBolt(this, x, y, z) ) ); + addGlobalEntity( shared_ptr( new LightningBolt(this, x, y, z) ) ); lightningTime = 2; } } @@ -665,7 +665,7 @@ vector *ServerLevel::fetchTicksInChunk(LevelChunk *chunk, bool return results; } -void ServerLevel::tick(std::shared_ptr e, bool actual) +void ServerLevel::tick(shared_ptr e, bool actual) { if (!server->isAnimals() && ((e->GetType() & eTYPE_ANIMAL) || (e->GetType() & eTYPE_WATERANIMAL))) { @@ -681,7 +681,7 @@ void ServerLevel::tick(std::shared_ptr e, bool actual) } } -void ServerLevel::forceTick(std::shared_ptr e, bool actual) +void ServerLevel::forceTick(shared_ptr e, bool actual) { Level::tick(e, actual); } @@ -693,12 +693,12 @@ ChunkSource *ServerLevel::createChunkSource() return cache; } -vector > *ServerLevel::getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1) +vector > *ServerLevel::getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1) { - vector > *result = new vector >; + vector > *result = new vector >; for (unsigned int i = 0; i < tileEntityList.size(); i++) { - std::shared_ptr te = tileEntityList[i]; + shared_ptr te = tileEntityList[i]; if (te->x >= x0 && te->y >= y0 && te->z >= z0 && te->x < x1 && te->y < y1 && te->z < z1) { result->push_back(te); @@ -707,7 +707,7 @@ vector > *ServerLevel::getTileEntitiesInRegion(int x return result; } -bool ServerLevel::mayInteract(std::shared_ptr player, int xt, int yt, int zt, int content) +bool ServerLevel::mayInteract(shared_ptr player, int xt, int yt, int zt, int content) { // 4J-PB - This will look like a bug to players, and we really should have a message to explain why we're not allowing lava to be placed at or near a spawn point // We'll need to do this in a future update @@ -814,7 +814,7 @@ void ServerLevel::generateBonusItemsNearSpawn() if( getTile( x, y, z ) == Tile::chest_Id ) { - std::shared_ptr chest = dynamic_pointer_cast(getTileEntity(x, y, z)); + shared_ptr chest = dynamic_pointer_cast(getTileEntity(x, y, z)); if (chest != NULL) { if( chest->isBonusChest ) @@ -948,11 +948,11 @@ void ServerLevel::saveLevelData() savedDataStorage->save(); } -void ServerLevel::entityAdded(std::shared_ptr e) +void ServerLevel::entityAdded(shared_ptr e) { Level::entityAdded(e); entitiesById[e->entityId] = e; - vector > *es = e->getSubEntities(); + vector > *es = e->getSubEntities(); if (es != NULL) { //for (int i = 0; i < es.length; i++) @@ -964,11 +964,11 @@ void ServerLevel::entityAdded(std::shared_ptr e) entityAddedExtra(e); // 4J added } -void ServerLevel::entityRemoved(std::shared_ptr e) +void ServerLevel::entityRemoved(shared_ptr e) { Level::entityRemoved(e); entitiesById.erase(e->entityId); - vector > *es = e->getSubEntities(); + vector > *es = e->getSubEntities(); if (es != NULL) { //for (int i = 0; i < es.length; i++) @@ -980,32 +980,32 @@ void ServerLevel::entityRemoved(std::shared_ptr e) entityRemovedExtra(e); // 4J added } -std::shared_ptr ServerLevel::getEntity(int id) +shared_ptr ServerLevel::getEntity(int id) { return entitiesById[id]; } -bool ServerLevel::addGlobalEntity(std::shared_ptr e) +bool ServerLevel::addGlobalEntity(shared_ptr e) { if (Level::addGlobalEntity(e)) { - server->getPlayers()->broadcast(e->x, e->y, e->z, 512, dimension->id, std::shared_ptr( new AddGlobalEntityPacket(e) ) ); + server->getPlayers()->broadcast(e->x, e->y, e->z, 512, dimension->id, shared_ptr( new AddGlobalEntityPacket(e) ) ); return true; } return false; } -void ServerLevel::broadcastEntityEvent(std::shared_ptr e, byte event) +void ServerLevel::broadcastEntityEvent(shared_ptr e, byte event) { - std::shared_ptr p = std::shared_ptr( new EntityEventPacket(e->entityId, event) ); + shared_ptr p = shared_ptr( new EntityEventPacket(e->entityId, event) ); server->getLevel(dimension->id)->getTracker()->broadcastAndSend(e, p); } -std::shared_ptr ServerLevel::explode(std::shared_ptr source, double x, double y, double z, float r, bool fire, bool destroyBlocks) +shared_ptr ServerLevel::explode(shared_ptr source, double x, double y, double z, float r, bool fire, bool destroyBlocks) { // instead of calling super, we run the same explosion code here except // we don't generate any particles - std::shared_ptr explosion = std::shared_ptr( new Explosion(this, source, x, y, z, r) ); + shared_ptr explosion = shared_ptr( new Explosion(this, source, x, y, z, r) ); explosion->fire = fire; explosion->destroyBlocks = destroyBlocks; explosion->explode(); @@ -1016,10 +1016,10 @@ std::shared_ptr ServerLevel::explode(std::shared_ptr source, explosion->toBlow.clear(); } - vector > sentTo; + vector > sentTo; for(AUTO_VAR(it, players.begin()); it != players.end(); ++it) { - std::shared_ptr player = dynamic_pointer_cast(*it); + shared_ptr player = dynamic_pointer_cast(*it); if (player->dimension != dimension->id) continue; bool knockbackOnly = false; @@ -1034,7 +1034,7 @@ std::shared_ptr ServerLevel::explode(std::shared_ptr source, { for(unsigned int j = 0; j < sentTo.size(); j++ ) { - std::shared_ptr player2 = sentTo[j]; + shared_ptr player2 = sentTo[j]; INetworkPlayer *otherPlayer = player2->connection->getNetworkPlayer(); if( otherPlayer != NULL && thisPlayer->IsSameSystem(otherPlayer) ) { @@ -1049,7 +1049,7 @@ std::shared_ptr ServerLevel::explode(std::shared_ptr source, Vec3 *knockbackVec = explosion->getHitPlayerKnockback(player); //app.DebugPrintf("Sending %s with knockback (%f,%f,%f)\n", knockbackOnly?"knockbackOnly":"allExplosion",knockbackVec->x,knockbackVec->y,knockbackVec->z); // If the player is not the primary on the system, then we only want to send info for the knockback - player->connection->send( std::shared_ptr( new ExplodePacket(x, y, z, r, &explosion->toBlow, knockbackVec, knockbackOnly))); + player->connection->send( shared_ptr( new ExplodePacket(x, y, z, r, &explosion->toBlow, knockbackVec, knockbackOnly))); sentTo.push_back( player ); } } @@ -1088,7 +1088,7 @@ void ServerLevel::runTileEvents() if (doTileEvent(&(*it))) { TileEventData te = *it; - server->getPlayers()->broadcast(te.getX(), te.getY(), te.getZ(), 64, dimension->id, std::shared_ptr( new TileEventPacket(te.getX(), te.getY(), te.getZ(), te.getTile(), te.getParamA(), te.getParamB()))); + server->getPlayers()->broadcast(te.getX(), te.getY(), te.getZ(), 64, dimension->id, shared_ptr( new TileEventPacket(te.getX(), te.getY(), te.getZ(), te.getTile(), te.getParamA(), te.getParamB()))); } } tileEvents[runList].clear(); @@ -1119,11 +1119,11 @@ void ServerLevel::tickWeather() { if (wasRaining) { - server->getPlayers()->broadcastAll( std::shared_ptr( new GameEventPacket(GameEventPacket::STOP_RAINING, 0) ) ); + server->getPlayers()->broadcastAll( shared_ptr( new GameEventPacket(GameEventPacket::STOP_RAINING, 0) ) ); } else { - server->getPlayers()->broadcastAll( std::shared_ptr( new GameEventPacket(GameEventPacket::START_RAINING, 0) ) ); + server->getPlayers()->broadcastAll( shared_ptr( new GameEventPacket(GameEventPacket::START_RAINING, 0) ) ); } } @@ -1185,7 +1185,7 @@ void ServerLevel::runQueuedSendTileUpdates() } // 4J - added special versions of addEntity and extra processing on entity removed and added so we can limit the number of itementities created -bool ServerLevel::addEntity(std::shared_ptr e) +bool ServerLevel::addEntity(shared_ptr e) { // If its an item entity, and we've got to our capacity, delete the oldest if( dynamic_pointer_cast(e) != NULL ) @@ -1244,7 +1244,7 @@ bool ServerLevel::addEntity(std::shared_ptr e) } // Maintain a cound of primed tnt & falling tiles in this level -void ServerLevel::entityAddedExtra(std::shared_ptr e) +void ServerLevel::entityAddedExtra(shared_ptr e) { if( dynamic_pointer_cast(e) != NULL ) { @@ -1289,7 +1289,7 @@ void ServerLevel::entityAddedExtra(std::shared_ptr e) } // Maintain a cound of primed tnt & falling tiles in this level, and remove any item entities from our list -void ServerLevel::entityRemovedExtra(std::shared_ptr e) +void ServerLevel::entityRemovedExtra(shared_ptr e) { if( dynamic_pointer_cast(e) != NULL ) { diff --git a/Minecraft.Client/ServerLevel.h b/Minecraft.Client/ServerLevel.h index 82c5400e..ae413d11 100644 --- a/Minecraft.Client/ServerLevel.h +++ b/Minecraft.Client/ServerLevel.h @@ -41,7 +41,7 @@ private: int activeTileEventsList; public: static void staticCtor(); - ServerLevel(MinecraftServer *server, std::shared_ptrlevelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings); + ServerLevel(MinecraftServer *server, shared_ptrlevelStorage, const wstring& levelName, int dimension, LevelSettings *levelSettings); ~ServerLevel(); void tick(); Biome::MobSpawnerData *getRandomMobSpawnAt(MobCategory *mobCategory, int x, int y, int z); @@ -65,15 +65,15 @@ public: void tickEntities(); bool tickPendingTicks(bool force); vector *fetchTicksInChunk(LevelChunk *chunk, bool remove); - virtual void tick(std::shared_ptr e, bool actual); - void forceTick(std::shared_ptr e, bool actual); + virtual void tick(shared_ptr e, bool actual); + void forceTick(shared_ptr e, bool actual); bool AllPlayersAreSleeping() { return allPlayersSleeping;} // 4J added for a message to other players bool isAtLeastOnePlayerSleeping() { return m_bAtLeastOnePlayerSleeping;} protected: ChunkSource *createChunkSource(); // 4J - was virtual, but was called from parent ctor public: - vector > *getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1); - virtual bool mayInteract(std::shared_ptr player, int xt, int yt, int zt, int id); + vector > *getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1); + virtual bool mayInteract(shared_ptr player, int xt, int yt, int zt, int id); protected: virtual void initializeLevel(LevelSettings *settings); virtual void setInitialSpawn(LevelSettings *settings); @@ -90,16 +90,16 @@ public: private: void saveLevelData(); - typedef unordered_map , IntKeyHash2, IntKeyEq> intEntityMap; + typedef unordered_map , IntKeyHash2, IntKeyEq> intEntityMap; intEntityMap entitiesById; // 4J - was IntHashMap, using same hashing function as this uses protected: - virtual void entityAdded(std::shared_ptr e); - virtual void entityRemoved(std::shared_ptr e); + virtual void entityAdded(shared_ptr e); + virtual void entityRemoved(shared_ptr e); public: - std::shared_ptr getEntity(int id); - virtual bool addGlobalEntity(std::shared_ptr e); - void broadcastEntityEvent(std::shared_ptr e, byte event); - virtual std::shared_ptr explode(std::shared_ptr source, double x, double y, double z, float r, bool fire, bool destroyBlocks); + shared_ptr getEntity(int id); + virtual bool addGlobalEntity(shared_ptr e); + void broadcastEntityEvent(shared_ptr e, byte event); + virtual shared_ptr explode(shared_ptr source, double x, double y, double z, float r, bool fire, bool destroyBlocks); virtual void tileEvent(int x, int y, int z, int tile, int b0, int b1); private: @@ -134,14 +134,14 @@ public: int m_primedTntCount; int m_fallingTileCount; CRITICAL_SECTION m_limiterCS; - list< std::shared_ptr > m_itemEntities; - list< std::shared_ptr > m_hangingEntities; - list< std::shared_ptr > m_arrowEntities; - list< std::shared_ptr > m_experienceOrbEntities; - - virtual bool addEntity(std::shared_ptr e); - void entityAddedExtra(std::shared_ptr e); - void entityRemovedExtra(std::shared_ptr e); + list< shared_ptr > m_itemEntities; + list< shared_ptr > m_hangingEntities; + list< shared_ptr > m_arrowEntities; + list< shared_ptr > m_experienceOrbEntities; + + virtual bool addEntity(shared_ptr e); + void entityAddedExtra(shared_ptr e); + void entityRemovedExtra(shared_ptr e); virtual bool newPrimedTntAllowed(); virtual bool newFallingTileAllowed(); diff --git a/Minecraft.Client/ServerLevelListener.cpp b/Minecraft.Client/ServerLevelListener.cpp index 6bcf5d28..3b12630f 100644 --- a/Minecraft.Client/ServerLevelListener.cpp +++ b/Minecraft.Client/ServerLevelListener.cpp @@ -18,7 +18,7 @@ ServerLevelListener::ServerLevelListener(MinecraftServer *server, ServerLevel *l this->level = level; } -// 4J removed - +// 4J removed - /* void ServerLevelListener::addParticle(const wstring& name, double x, double y, double z, double xa, double ya, double za) { @@ -33,22 +33,22 @@ void ServerLevelListener::allChanged() { } -void ServerLevelListener::entityAdded(std::shared_ptr entity) +void ServerLevelListener::entityAdded(shared_ptr entity) { MemSect(10); level->getTracker()->addEntity(entity); MemSect(0); } -void ServerLevelListener::entityRemoved(std::shared_ptr entity) +void ServerLevelListener::entityRemoved(shared_ptr entity) { level->getTracker()->removeEntity(entity); } // 4J added -void ServerLevelListener::playerRemoved(std::shared_ptr entity) +void ServerLevelListener::playerRemoved(shared_ptr entity) { - std::shared_ptr player = dynamic_pointer_cast(entity); + shared_ptr player = dynamic_pointer_cast(entity); player->getLevel()->getTracker()->removePlayer(entity); } @@ -59,25 +59,25 @@ void ServerLevelListener::playSound(int iSound, double x, double y, double z, fl app.DebugPrintf("ServerLevelListener received request for sound less than 0, so ignoring\n"); } else - { + { // 4J-PB - I don't want to broadcast player sounds to my local machine, since we're already playing these in the LevelRenderer::playSound. // The PC version does seem to do this and the result is I can stop walking , and then I'll hear my footstep sound with a delay - server->getPlayers()->broadcast(x, y, z, volume > 1 ? 16 * volume : 16, level->dimension->id, std::shared_ptr(new LevelSoundPacket(iSound, x, y, z, volume, pitch))); + server->getPlayers()->broadcast(x, y, z, volume > 1 ? 16 * volume : 16, level->dimension->id, shared_ptr(new LevelSoundPacket(iSound, x, y, z, volume, pitch))); } } -void ServerLevelListener::playSound(std::shared_ptr entity,int iSound, double x, double y, double z, float volume, float pitch, float fClipSoundDist) +void ServerLevelListener::playSound(shared_ptr entity,int iSound, double x, double y, double z, float volume, float pitch, float fClipSoundDist) { if(iSound < 0) { app.DebugPrintf("ServerLevelListener received request for sound less than 0, so ignoring\n"); } else - { + { // 4J-PB - I don't want to broadcast player sounds to my local machine, since we're already playing these in the LevelRenderer::playSound. // The PC version does seem to do this and the result is I can stop walking , and then I'll hear my footstep sound with a delay - std::shared_ptr player= dynamic_pointer_cast(entity); - server->getPlayers()->broadcast(player,x, y, z, volume > 1 ? 16 * volume : 16, level->dimension->id, std::shared_ptr(new LevelSoundPacket(iSound, x, y, z, volume, pitch))); + shared_ptr player= dynamic_pointer_cast(entity); + server->getPlayers()->broadcast(player,x, y, z, volume > 1 ? 16 * volume : 16, level->dimension->id, shared_ptr(new LevelSoundPacket(iSound, x, y, z, volume, pitch))); } } @@ -102,9 +102,9 @@ void ServerLevelListener::playStreamingMusic(const wstring& name, int x, int y, { } -void ServerLevelListener::levelEvent(std::shared_ptr source, int type, int x, int y, int z, int data) +void ServerLevelListener::levelEvent(shared_ptr source, int type, int x, int y, int z, int data) { - server->getPlayers()->broadcast(source, x, y, z, 64, level->dimension->id, std::shared_ptr( new LevelEventPacket(type, x, y, z, data) ) ); + server->getPlayers()->broadcast(source, x, y, z, 64, level->dimension->id, shared_ptr( new LevelEventPacket(type, x, y, z, data) ) ); } void ServerLevelListener::destroyTileProgress(int id, int x, int y, int z, int progress) @@ -112,7 +112,7 @@ void ServerLevelListener::destroyTileProgress(int id, int x, int y, int z, int p //for (ServerPlayer p : server->getPlayers()->players) for(AUTO_VAR(it, server->getPlayers()->players.begin()); it != server->getPlayers()->players.end(); ++it) { - std::shared_ptr p = *it; + shared_ptr p = *it; if (p == NULL || p->level != level || p->entityId == id) continue; double xd = (double) x - p->x; double yd = (double) y - p->y; @@ -120,7 +120,7 @@ void ServerLevelListener::destroyTileProgress(int id, int x, int y, int z, int p if (xd * xd + yd * yd + zd * zd < 32 * 32) { - p->connection->send(std::shared_ptr(new TileDestructionPacket(id, x, y, z, progress))); + p->connection->send(shared_ptr(new TileDestructionPacket(id, x, y, z, progress))); } } } \ No newline at end of file diff --git a/Minecraft.Client/ServerLevelListener.h b/Minecraft.Client/ServerLevelListener.h index 562aa013..1886a89d 100644 --- a/Minecraft.Client/ServerLevelListener.h +++ b/Minecraft.Client/ServerLevelListener.h @@ -18,16 +18,16 @@ public: // 4J removed - virtual void addParticle(const wstring& name, double x, double y, double z, double xa, double ya, double za); virtual void addParticle(ePARTICLE_TYPE name, double x, double y, double z, double xa, double ya, double za); // 4J added virtual void allChanged(); - virtual void entityAdded(std::shared_ptr entity); - virtual void entityRemoved(std::shared_ptr entity); - virtual void playerRemoved(std::shared_ptr entity); // 4J added - for when a player is removed from the level's player array, not just the entity storage + virtual void entityAdded(shared_ptr entity); + virtual void entityRemoved(shared_ptr entity); + virtual void playerRemoved(shared_ptr entity); // 4J added - for when a player is removed from the level's player array, not just the entity storage virtual void playSound(int iSound, double x, double y, double z, float volume, float pitch, float fClipSoundDist); - virtual void playSound(std::shared_ptr entity,int iSound, double x, double y, double z, float volume, float pitch, float fClipSoundDist); + virtual void playSound(shared_ptr entity,int iSound, double x, double y, double z, float volume, float pitch, float fClipSoundDist); virtual void setTilesDirty(int x0, int y0, int z0, int x1, int y1, int z1, Level *level); // 4J - added level param virtual void skyColorChanged(); virtual void tileChanged(int x, int y, int z); virtual void tileLightChanged(int x, int y, int z); virtual void playStreamingMusic(const wstring& name, int x, int y, int z); - virtual void levelEvent(std::shared_ptr source, int type, int x, int y, int z, int data); + virtual void levelEvent(shared_ptr source, int type, int x, int y, int z, int data); virtual void destroyTileProgress(int id, int x, int y, int z, int progress); }; diff --git a/Minecraft.Client/ServerPlayer.cpp b/Minecraft.Client/ServerPlayer.cpp index 0f85998c..eebab435 100644 --- a/Minecraft.Client/ServerPlayer.cpp +++ b/Minecraft.Client/ServerPlayer.cpp @@ -236,10 +236,10 @@ void ServerPlayer::tick() for (int i = 0; i < 5; i++) { - std::shared_ptr currentCarried = getCarried(i); + shared_ptr currentCarried = getCarried(i); if (currentCarried != lastCarried[i]) { - getLevel()->getTracker()->broadcast(shared_from_this(), std::shared_ptr( new SetEquippedItemPacket(this->entityId, i, currentCarried) ) ); + getLevel()->getTracker()->broadcast(shared_from_this(), shared_ptr( new SetEquippedItemPacket(this->entityId, i, currentCarried) ) ); lastCarried[i] = currentCarried; } } @@ -264,7 +264,7 @@ void ServerPlayer::flushEntitiesToRemove() it = entitiesToRemove.erase(it); } - connection->send(std::shared_ptr(new RemoveEntitiesPacket(ids))); + connection->send(shared_ptr(new RemoveEntitiesPacket(ids))); } } @@ -286,14 +286,14 @@ void ServerPlayer::doTickA() for (unsigned int i = 0; i < inventory->getContainerSize(); i++) { - std::shared_ptr ie = inventory->getItem(i); + shared_ptr ie = inventory->getItem(i); if (ie != NULL) { // 4J - removed condition. These were getting lower priority than tile update packets etc. on the slow outbound queue, and so were extremely slow to send sometimes, // particularly at the start of a game. They don't typically seem to be massive and shouldn't be send when there isn't actually any updating to do. if (Item::items[ie->id]->isComplex() ) // && connection->countDelayedPackets() <= 2) { - std::shared_ptr packet = (dynamic_cast(Item::items[ie->id])->getUpdatePacket(ie, level, dynamic_pointer_cast( shared_from_this() ) ) ); + shared_ptr packet = (dynamic_cast(Item::items[ie->id])->getUpdatePacket(ie, level, dynamic_pointer_cast( shared_from_this() ) ) ); if (packet != NULL) { connection->send(packet); @@ -402,7 +402,7 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks) { // app.DebugPrintf("Creating BRUP for %d %d\n",nearest.x, nearest.z); PIXBeginNamedEvent(0,"Creation BRUP for sending\n"); - std::shared_ptr packet = std::shared_ptr( new BlockRegionUpdatePacket(nearest.x * 16, 0, nearest.z * 16, 16, Level::maxBuildHeight, 16, level) ); + shared_ptr packet = shared_ptr( new BlockRegionUpdatePacket(nearest.x * 16, 0, nearest.z * 16, 16, Level::maxBuildHeight, 16, level) ); PIXEndNamedEvent(); if( dontDelayChunks ) packet->shouldDelay = false; @@ -441,7 +441,7 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks) // Don't send TileEntity data until we have sent the block data if( connection->isLocal() || chunkDataSent) { - vector > *tes = level->getTileEntitiesInRegion(nearest.x * 16, 0, nearest.z * 16, nearest.x * 16 + 16, Level::maxBuildHeight, nearest.z * 16 + 16); + vector > *tes = level->getTileEntitiesInRegion(nearest.x * 16, 0, nearest.z * 16, nearest.x * 16 + 16, Level::maxBuildHeight, nearest.z * 16 + 16); for (unsigned int i = 0; i < tes->size(); i++) { // 4J Stu - Added delay param to ensure that these arrive after the BRUPs from above @@ -541,7 +541,7 @@ void ServerPlayer::doTickB(bool ignorePortal) if (getHealth() != lastSentHealth || lastSentFood != foodData.getFoodLevel() || ((foodData.getSaturationLevel() == 0) != lastFoodSaturationZero)) { // 4J Stu - Added m_lastDamageSource for telemetry - connection->send( std::shared_ptr( new SetHealthPacket(getHealth(), foodData.getFoodLevel(), foodData.getSaturationLevel(), m_lastDamageSource) ) ); + connection->send( shared_ptr( new SetHealthPacket(getHealth(), foodData.getFoodLevel(), foodData.getSaturationLevel(), m_lastDamageSource) ) ); lastSentHealth = getHealth(); lastSentFood = foodData.getFoodLevel(); lastFoodSaturationZero = foodData.getSaturationLevel() == 0; @@ -550,12 +550,12 @@ void ServerPlayer::doTickB(bool ignorePortal) if (totalExperience != lastSentExp) { lastSentExp = totalExperience; - connection->send( std::shared_ptr( new SetExperiencePacket(experienceProgress, totalExperience, experienceLevel) ) ); + connection->send( shared_ptr( new SetExperiencePacket(experienceProgress, totalExperience, experienceLevel) ) ); } } -std::shared_ptr ServerPlayer::getCarried(int slot) +shared_ptr ServerPlayer::getCarried(int slot) { if (slot == 0) return inventory->getSelected(); return inventory->armor[slot - 1]; @@ -575,7 +575,7 @@ bool ServerPlayer::hurt(DamageSource *dmgSource, int dmg) { // 4J Stu - Fix for #46422 - TU5: Crash: Gameplay: Crash when being hit by a trap using a dispenser // getEntity returns the owner of projectiles, and this would never be the arrow. The owner is sometimes NULL. - std::shared_ptr source = dmgSource->getDirectEntity(); + shared_ptr source = dmgSource->getDirectEntity(); if (dynamic_pointer_cast(source) != NULL && (!server->pvp || !dynamic_pointer_cast(source)->isAllowedToAttackPlayers()) ) @@ -585,7 +585,7 @@ bool ServerPlayer::hurt(DamageSource *dmgSource, int dmg) if (source != NULL && source->GetType() == eTYPE_ARROW) { - std::shared_ptr arrow = dynamic_pointer_cast(source); + shared_ptr arrow = dynamic_pointer_cast(source); if (dynamic_pointer_cast(arrow->owner) != NULL && (!server->pvp || !dynamic_pointer_cast(arrow->owner)->isAllowedToAttackPlayers()) ) { return false; @@ -608,7 +608,7 @@ bool ServerPlayer::hurt(DamageSource *dmgSource, int dmg) else if(dmgSource == DamageSource::cactus) m_lastDamageSource = eTelemetryPlayerDeathSource_Cactus; else { - std::shared_ptr source = dmgSource->getEntity(); + shared_ptr source = dmgSource->getEntity(); if( source != NULL ) { switch(source->GetType()) @@ -647,7 +647,7 @@ bool ServerPlayer::hurt(DamageSource *dmgSource, int dmg) case eTYPE_ARROW: if ((dynamic_pointer_cast(source))->owner != NULL) { - std::shared_ptr attacker = (dynamic_pointer_cast(source))->owner; + shared_ptr attacker = (dynamic_pointer_cast(source))->owner; if (attacker != NULL) { switch(attacker->GetType()) @@ -696,19 +696,19 @@ void ServerPlayer::changeDimension(int i) level->removeEntity(shared_from_this()); wonGame = true; m_enteredEndExitPortal = true; // We only flag this for the player in the portal - connection->send( std::shared_ptr( new GameEventPacket(GameEventPacket::WIN_GAME, thisPlayer->GetUserIndex()) ) ); + connection->send( shared_ptr( new GameEventPacket(GameEventPacket::WIN_GAME, thisPlayer->GetUserIndex()) ) ); app.DebugPrintf("Sending packet to %d\n", thisPlayer->GetUserIndex()); } if(thisPlayer != NULL) { for(AUTO_VAR(it, MinecraftServer::getInstance()->getPlayers()->players.begin()); it != MinecraftServer::getInstance()->getPlayers()->players.end(); ++it) { - std::shared_ptr servPlayer = *it; + shared_ptr servPlayer = *it; INetworkPlayer *checkPlayer = servPlayer->connection->getNetworkPlayer(); if(thisPlayer != checkPlayer && checkPlayer != NULL && thisPlayer->IsSameSystem( checkPlayer ) && !servPlayer->wonGame ) { servPlayer->wonGame = true; - servPlayer->connection->send( std::shared_ptr( new GameEventPacket(GameEventPacket::WIN_GAME, thisPlayer->GetUserIndex() ) ) ); + servPlayer->connection->send( shared_ptr( new GameEventPacket(GameEventPacket::WIN_GAME, thisPlayer->GetUserIndex() ) ) ); app.DebugPrintf("Sending packet to %d\n", thisPlayer->GetUserIndex()); } } @@ -733,11 +733,11 @@ void ServerPlayer::changeDimension(int i) } // 4J Added delay param -void ServerPlayer::broadcast(std::shared_ptr te, bool delay /*= false*/) +void ServerPlayer::broadcast(shared_ptr te, bool delay /*= false*/) { if (te != NULL) { - std::shared_ptr p = te->getUpdatePacket(); + shared_ptr p = te->getUpdatePacket(); if (p != NULL) { p->shouldDelay = delay; @@ -747,22 +747,22 @@ void ServerPlayer::broadcast(std::shared_ptr te, bool delay /*= fals } } -void ServerPlayer::take(std::shared_ptr e, int orgCount) +void ServerPlayer::take(shared_ptr e, int orgCount) { if (!e->removed) { EntityTracker *entityTracker = getLevel()->getTracker(); if (e->GetType() == eTYPE_ITEMENTITY) { - entityTracker->broadcast(e, std::shared_ptr( new TakeItemEntityPacket(e->entityId, entityId) ) ); + entityTracker->broadcast(e, shared_ptr( new TakeItemEntityPacket(e->entityId, entityId) ) ); } if (e->GetType() == eTYPE_ARROW) { - entityTracker->broadcast(e, std::shared_ptr( new TakeItemEntityPacket(e->entityId, entityId) ) ); + entityTracker->broadcast(e, shared_ptr( new TakeItemEntityPacket(e->entityId, entityId) ) ); } if (e->GetType() == eTYPE_EXPERIENCEORB) { - entityTracker->broadcast(e, std::shared_ptr( new TakeItemEntityPacket(e->entityId, entityId) ) ); + entityTracker->broadcast(e, shared_ptr( new TakeItemEntityPacket(e->entityId, entityId) ) ); } } Player::take(e, orgCount); @@ -775,7 +775,7 @@ void ServerPlayer::swing() { swingTime = -1; swinging = true; - getLevel()->getTracker()->broadcast(shared_from_this(), std::shared_ptr( new AnimatePacket(shared_from_this(), AnimatePacket::SWING) ) ); + getLevel()->getTracker()->broadcast(shared_from_this(), shared_ptr( new AnimatePacket(shared_from_this(), AnimatePacket::SWING) ) ); } } @@ -784,7 +784,7 @@ Player::BedSleepingResult ServerPlayer::startSleepInBed(int x, int y, int z, boo BedSleepingResult result = Player::startSleepInBed(x, y, z, bTestUse); if (result == OK) { - std::shared_ptr p = std::shared_ptr( new EntityActionAtPositionPacket(shared_from_this(), EntityActionAtPositionPacket::START_SLEEP, x, y, z) ); + shared_ptr p = shared_ptr( new EntityActionAtPositionPacket(shared_from_this(), EntityActionAtPositionPacket::START_SLEEP, x, y, z) ); getLevel()->getTracker()->broadcast(shared_from_this(), p); connection->teleport(this->x, this->y, this->z, yRot, xRot); connection->send(p); @@ -796,16 +796,16 @@ void ServerPlayer::stopSleepInBed(bool forcefulWakeUp, bool updateLevelList, boo { if (isSleeping()) { - getLevel()->getTracker()->broadcastAndSend(shared_from_this(), std::shared_ptr( new AnimatePacket(shared_from_this(), AnimatePacket::WAKE_UP) ) ); + getLevel()->getTracker()->broadcastAndSend(shared_from_this(), shared_ptr( new AnimatePacket(shared_from_this(), AnimatePacket::WAKE_UP) ) ); } Player::stopSleepInBed(forcefulWakeUp, updateLevelList, saveRespawnPoint); if (connection != NULL) connection->teleport(x, y, z, yRot, xRot); } -void ServerPlayer::ride(std::shared_ptr e) +void ServerPlayer::ride(shared_ptr e) { Player::ride(e); - connection->send( std::shared_ptr( new SetRidingPacket(shared_from_this(), riding) ) ); + connection->send( shared_ptr( new SetRidingPacket(shared_from_this(), riding) ) ); // 4J Removed this - The act of riding will be handled on the client and will change the position // of the player. If we also teleport it then we can end up with a repeating movements, e.g. bouncing @@ -832,7 +832,7 @@ bool ServerPlayer::startCrafting(int x, int y, int z) if(containerMenu == inventoryMenu) { nextContainerCounter(); - connection->send( std::shared_ptr( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::WORKBENCH, 0, 9) ) ); + connection->send( shared_ptr( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::WORKBENCH, 0, 9) ) ); containerMenu = new CraftingMenu(inventory, level, x, y, z); containerMenu->containerId = containerCounter; containerMenu->addSlotListener(this); @@ -850,7 +850,7 @@ bool ServerPlayer::startEnchanting(int x, int y, int z) if(containerMenu == inventoryMenu) { nextContainerCounter(); - connection->send(std::shared_ptr( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::ENCHANTMENT, 0, 9) )); + connection->send(shared_ptr( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::ENCHANTMENT, 0, 9) )); containerMenu = new EnchantmentMenu(inventory, level, x, y, z); containerMenu->containerId = containerCounter; containerMenu->addSlotListener(this); @@ -868,7 +868,7 @@ bool ServerPlayer::startRepairing(int x, int y, int z) if(containerMenu == inventoryMenu) { nextContainerCounter(); - connection->send(std::shared_ptr ( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::REPAIR_TABLE, 0, 9)) ); + connection->send(shared_ptr ( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::REPAIR_TABLE, 0, 9)) ); containerMenu = new RepairMenu(inventory, level, x, y, z, dynamic_pointer_cast(shared_from_this())); containerMenu->containerId = containerCounter; containerMenu->addSlotListener(this); @@ -881,12 +881,12 @@ bool ServerPlayer::startRepairing(int x, int y, int z) return true; } -bool ServerPlayer::openContainer(std::shared_ptr container) +bool ServerPlayer::openContainer(shared_ptr container) { if(containerMenu == inventoryMenu) { nextContainerCounter(); - connection->send( std::shared_ptr( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::CONTAINER, container->getName(), container->getContainerSize()) ) ); + connection->send( shared_ptr( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::CONTAINER, container->getName(), container->getContainerSize()) ) ); containerMenu = new ContainerMenu(inventory, container); containerMenu->containerId = containerCounter; @@ -900,12 +900,12 @@ bool ServerPlayer::openContainer(std::shared_ptr container) return true; } -bool ServerPlayer::openFurnace(std::shared_ptr furnace) +bool ServerPlayer::openFurnace(shared_ptr furnace) { if(containerMenu == inventoryMenu) { nextContainerCounter(); - connection->send( std::shared_ptr( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::FURNACE, 0, furnace->getContainerSize()) ) ); + connection->send( shared_ptr( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::FURNACE, 0, furnace->getContainerSize()) ) ); containerMenu = new FurnaceMenu(inventory, furnace); containerMenu->containerId = containerCounter; containerMenu->addSlotListener(this); @@ -918,12 +918,12 @@ bool ServerPlayer::openFurnace(std::shared_ptr furnace) return true; } -bool ServerPlayer::openTrap(std::shared_ptr trap) +bool ServerPlayer::openTrap(shared_ptr trap) { if(containerMenu == inventoryMenu) { nextContainerCounter(); - connection->send( std::shared_ptr( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::TRAP, 0, trap->getContainerSize()) ) ); + connection->send( shared_ptr( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::TRAP, 0, trap->getContainerSize()) ) ); containerMenu = new TrapMenu(inventory, trap); containerMenu->containerId = containerCounter; containerMenu->addSlotListener(this); @@ -936,12 +936,12 @@ bool ServerPlayer::openTrap(std::shared_ptr trap) return true; } -bool ServerPlayer::openBrewingStand(std::shared_ptr brewingStand) +bool ServerPlayer::openBrewingStand(shared_ptr brewingStand) { if(containerMenu == inventoryMenu) { nextContainerCounter(); - connection->send(std::shared_ptr( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::BREWING_STAND, 0, brewingStand->getContainerSize()))); + connection->send(shared_ptr( new ContainerOpenPacket(containerCounter, ContainerOpenPacket::BREWING_STAND, 0, brewingStand->getContainerSize()))); containerMenu = new BrewingStandMenu(inventory, brewingStand); containerMenu->containerId = containerCounter; containerMenu->addSlotListener(this); @@ -954,7 +954,7 @@ bool ServerPlayer::openBrewingStand(std::shared_ptr brew return true; } -bool ServerPlayer::openTrading(std::shared_ptr traderTarget) +bool ServerPlayer::openTrading(shared_ptr traderTarget) { if(containerMenu == inventoryMenu) { @@ -962,9 +962,9 @@ bool ServerPlayer::openTrading(std::shared_ptr traderTarget) containerMenu = new MerchantMenu(inventory, traderTarget, level); containerMenu->containerId = containerCounter; containerMenu->addSlotListener(this); - std::shared_ptr container = ((MerchantMenu *) containerMenu)->getTradeContainer(); + shared_ptr container = ((MerchantMenu *) containerMenu)->getTradeContainer(); - connection->send(std::shared_ptr(new ContainerOpenPacket(containerCounter, ContainerOpenPacket::TRADER_NPC, container->getName(), container->getContainerSize()))); + connection->send(shared_ptr(new ContainerOpenPacket(containerCounter, ContainerOpenPacket::TRADER_NPC, container->getName(), container->getContainerSize()))); MerchantRecipeList *offers = traderTarget->getOffers(dynamic_pointer_cast(shared_from_this())); if (offers != NULL) @@ -976,7 +976,7 @@ bool ServerPlayer::openTrading(std::shared_ptr traderTarget) output.writeInt(containerCounter); offers->writeToStream(&output); - connection->send(std::shared_ptr( new CustomPayloadPacket(CustomPayloadPacket::TRADER_LIST_PACKET, rawOutput.toByteArray()))); + connection->send(shared_ptr( new CustomPayloadPacket(CustomPayloadPacket::TRADER_LIST_PACKET, rawOutput.toByteArray()))); } } else @@ -987,7 +987,7 @@ bool ServerPlayer::openTrading(std::shared_ptr traderTarget) return true; } -void ServerPlayer::slotChanged(AbstractContainerMenu *container, int slotIndex, std::shared_ptr item) +void ServerPlayer::slotChanged(AbstractContainerMenu *container, int slotIndex, shared_ptr item) { if (dynamic_cast(container->getSlot(slotIndex))) { @@ -1004,21 +1004,21 @@ void ServerPlayer::slotChanged(AbstractContainerMenu *container, int slotIndex, return; } - connection->send( std::shared_ptr( new ContainerSetSlotPacket(container->containerId, slotIndex, item) ) ); + connection->send( shared_ptr( new ContainerSetSlotPacket(container->containerId, slotIndex, item) ) ); } void ServerPlayer::refreshContainer(AbstractContainerMenu *menu) { - vector > *items = menu->getItems(); + vector > *items = menu->getItems(); refreshContainer(menu, items); delete items; } -void ServerPlayer::refreshContainer(AbstractContainerMenu *container, vector > *items) +void ServerPlayer::refreshContainer(AbstractContainerMenu *container, vector > *items) { - connection->send( std::shared_ptr( new ContainerSetContentPacket(container->containerId, items) ) ); - connection->send( std::shared_ptr( new ContainerSetSlotPacket(-1, -1, inventory->getCarried()) ) ); + connection->send( shared_ptr( new ContainerSetContentPacket(container->containerId, items) ) ); + connection->send( shared_ptr( new ContainerSetSlotPacket(-1, -1, inventory->getCarried()) ) ); } void ServerPlayer::setContainerData(AbstractContainerMenu *container, int id, int value) @@ -1033,12 +1033,12 @@ void ServerPlayer::setContainerData(AbstractContainerMenu *container, int id, in // client again. return; } - connection->send( std::shared_ptr( new ContainerSetDataPacket(container->containerId, id, value) ) ); + connection->send( shared_ptr( new ContainerSetDataPacket(container->containerId, id, value) ) ); } void ServerPlayer::closeContainer() { - connection->send( std::shared_ptr( new ContainerClosePacket(containerMenu->containerId) ) ); + connection->send( shared_ptr( new ContainerClosePacket(containerMenu->containerId) ) ); doCloseContainer(); } @@ -1052,7 +1052,7 @@ void ServerPlayer::broadcastCarriedItem() // client again. return; } - connection->send( std::shared_ptr( new ContainerSetSlotPacket(-1, -1, inventory->getCarried()) ) ); + connection->send( shared_ptr( new ContainerSetSlotPacket(-1, -1, inventory->getCarried()) ) ); } void ServerPlayer::doCloseContainer() @@ -1087,12 +1087,12 @@ void ServerPlayer::awardStat(Stat *stat, byteArray param) while (count > 100) { - connection->send( std::shared_ptr( new AwardStatPacket(stat->id, 100) ) ); + connection->send( shared_ptr( new AwardStatPacket(stat->id, 100) ) ); count -= 100; } - connection->send( std::shared_ptr( new AwardStatPacket(stat->id, count) ) ); + connection->send( shared_ptr( new AwardStatPacket(stat->id, count) ) ); #else - connection->send( std::shared_ptr( new AwardStatPacket(stat->id, param) ) ); + connection->send( shared_ptr( new AwardStatPacket(stat->id, param) ) ); // byteArray deleted in AwardStatPacket destructor. #endif } @@ -1122,33 +1122,33 @@ void ServerPlayer::displayClientMessage(int messageId) { case IDS_TILE_BED_OCCUPIED: messageType = ChatPacket::e_ChatBedOccupied; - connection->send( std::shared_ptr( new ChatPacket(L"", messageType) ) ); + connection->send( shared_ptr( new ChatPacket(L"", messageType) ) ); break; case IDS_TILE_BED_NO_SLEEP: messageType = ChatPacket::e_ChatBedNoSleep; - connection->send( std::shared_ptr( new ChatPacket(L"", messageType) ) ); + connection->send( shared_ptr( new ChatPacket(L"", messageType) ) ); break; case IDS_TILE_BED_NOT_VALID: messageType = ChatPacket::e_ChatBedNotValid; - connection->send( std::shared_ptr( new ChatPacket(L"", messageType) ) ); + connection->send( shared_ptr( new ChatPacket(L"", messageType) ) ); break; case IDS_TILE_BED_NOTSAFE: messageType = ChatPacket::e_ChatBedNotSafe; - connection->send( std::shared_ptr( new ChatPacket(L"", messageType) ) ); + connection->send( shared_ptr( new ChatPacket(L"", messageType) ) ); break; case IDS_TILE_BED_PLAYERSLEEP: messageType = ChatPacket::e_ChatBedPlayerSleep; // broadcast to all the other players in the game for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()!=player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatBedPlayerSleep))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatBedPlayerSleep))); } else { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatBedMeSleep))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatBedMeSleep))); } } return; @@ -1156,85 +1156,85 @@ void ServerPlayer::displayClientMessage(int messageId) case IDS_PLAYER_ENTERED_END: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()!=player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerEnteredEnd))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerEnteredEnd))); } } break; case IDS_PLAYER_LEFT_END: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()!=player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerLeftEnd))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerLeftEnd))); } } break; case IDS_TILE_BED_MESLEEP: messageType = ChatPacket::e_ChatBedMeSleep; - connection->send( std::shared_ptr( new ChatPacket(L"", messageType) ) ); + connection->send( shared_ptr( new ChatPacket(L"", messageType) ) ); break; case IDS_MAX_PIGS_SHEEP_COWS_CATS_SPAWNED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxPigsSheepCows))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxPigsSheepCows))); } } break; case IDS_MAX_CHICKENS_SPAWNED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxChickens))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxChickens))); } } break; case IDS_MAX_SQUID_SPAWNED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxSquid))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxSquid))); } } break; case IDS_MAX_WOLVES_SPAWNED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxWolves))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxWolves))); } } break; case IDS_MAX_MOOSHROOMS_SPAWNED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxMooshrooms))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxMooshrooms))); } } break; case IDS_MAX_ENEMIES_SPAWNED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxEnemies))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxEnemies))); } } break; @@ -1242,40 +1242,40 @@ void ServerPlayer::displayClientMessage(int messageId) case IDS_MAX_VILLAGERS_SPAWNED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxVillagers))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxVillagers))); } } break; case IDS_MAX_PIGS_SHEEP_COWS_CATS_BRED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredPigsSheepCows))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredPigsSheepCows))); } } break; case IDS_MAX_CHICKENS_BRED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredChickens))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredChickens))); } } break; case IDS_MAX_MUSHROOMCOWS_BRED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredMooshrooms))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredMooshrooms))); } } break; @@ -1283,10 +1283,10 @@ void ServerPlayer::displayClientMessage(int messageId) case IDS_MAX_WOLVES_BRED: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredWolves))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBredWolves))); } } break; @@ -1294,10 +1294,10 @@ void ServerPlayer::displayClientMessage(int messageId) case IDS_CANT_SHEAR_MOOSHROOM: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerCantShearMooshroom))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerCantShearMooshroom))); } } break; @@ -1306,20 +1306,20 @@ void ServerPlayer::displayClientMessage(int messageId) case IDS_MAX_HANGINGENTITIES: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxHangingEntities))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxHangingEntities))); } } break; case IDS_CANT_SPAWN_IN_PEACEFUL: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerCantSpawnInPeaceful))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerCantSpawnInPeaceful))); } } break; @@ -1327,10 +1327,10 @@ void ServerPlayer::displayClientMessage(int messageId) case IDS_MAX_BOATS: for (unsigned int i = 0; i < server->getPlayers()->players.size(); i++) { - std::shared_ptr player = server->getPlayers()->players[i]; + shared_ptr player = server->getPlayers()->players[i]; if(shared_from_this()==player) { - player->connection->send(std::shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBoats))); + player->connection->send(shared_ptr( new ChatPacket(name, ChatPacket::e_ChatPlayerMaxBoats))); } } break; @@ -1343,26 +1343,26 @@ void ServerPlayer::displayClientMessage(int messageId) //Language *language = Language::getInstance(); //wstring languageString = app.GetString(messageId);//language->getElement(messageId); - //connection->send( std::shared_ptr( new ChatPacket(L"", messageType) ) ); + //connection->send( shared_ptr( new ChatPacket(L"", messageType) ) ); } void ServerPlayer::completeUsingItem() { - connection->send(std::shared_ptr( new EntityEventPacket(entityId, EntityEvent::USE_ITEM_COMPLETE) ) ); + connection->send(shared_ptr( new EntityEventPacket(entityId, EntityEvent::USE_ITEM_COMPLETE) ) ); Player::completeUsingItem(); } -void ServerPlayer::startUsingItem(std::shared_ptr instance, int duration) +void ServerPlayer::startUsingItem(shared_ptr instance, int duration) { Player::startUsingItem(instance, duration); if (instance != NULL && instance->getItem() != NULL && instance->getItem()->getUseAnimation(instance) == UseAnim_eat) { - getLevel()->getTracker()->broadcastAndSend(shared_from_this(), std::shared_ptr( new AnimatePacket(shared_from_this(), AnimatePacket::EAT) ) ); + getLevel()->getTracker()->broadcastAndSend(shared_from_this(), shared_ptr( new AnimatePacket(shared_from_this(), AnimatePacket::EAT) ) ); } } -void ServerPlayer::restoreFrom(std::shared_ptr oldPlayer, bool restoreAll) +void ServerPlayer::restoreFrom(shared_ptr oldPlayer, bool restoreAll) { Player::restoreFrom(oldPlayer, restoreAll); lastSentExp = -1; @@ -1374,21 +1374,21 @@ void ServerPlayer::restoreFrom(std::shared_ptr oldPlayer, bool restoreAl void ServerPlayer::onEffectAdded(MobEffectInstance *effect) { Player::onEffectAdded(effect); - connection->send(std::shared_ptr( new UpdateMobEffectPacket(entityId, effect) ) ); + connection->send(shared_ptr( new UpdateMobEffectPacket(entityId, effect) ) ); } void ServerPlayer::onEffectUpdated(MobEffectInstance *effect) { Player::onEffectUpdated(effect); - connection->send(std::shared_ptr( new UpdateMobEffectPacket(entityId, effect) ) ); + connection->send(shared_ptr( new UpdateMobEffectPacket(entityId, effect) ) ); } void ServerPlayer::onEffectRemoved(MobEffectInstance *effect) { Player::onEffectRemoved(effect); - connection->send(std::shared_ptr( new RemoveMobEffectPacket(entityId, effect) ) ); + connection->send(shared_ptr( new RemoveMobEffectPacket(entityId, effect) ) ); } void ServerPlayer::teleportTo(double x, double y, double z) @@ -1396,20 +1396,20 @@ void ServerPlayer::teleportTo(double x, double y, double z) connection->teleport(x, y, z, yRot, xRot); } -void ServerPlayer::crit(std::shared_ptr entity) +void ServerPlayer::crit(shared_ptr entity) { - getLevel()->getTracker()->broadcastAndSend(shared_from_this(), std::shared_ptr( new AnimatePacket(entity, AnimatePacket::CRITICAL_HIT) )); + getLevel()->getTracker()->broadcastAndSend(shared_from_this(), shared_ptr( new AnimatePacket(entity, AnimatePacket::CRITICAL_HIT) )); } -void ServerPlayer::magicCrit(std::shared_ptr entity) +void ServerPlayer::magicCrit(shared_ptr entity) { - getLevel()->getTracker()->broadcastAndSend(shared_from_this(), std::shared_ptr( new AnimatePacket(entity, AnimatePacket::MAGIC_CRITICAL_HIT) )); + getLevel()->getTracker()->broadcastAndSend(shared_from_this(), shared_ptr( new AnimatePacket(entity, AnimatePacket::MAGIC_CRITICAL_HIT) )); } void ServerPlayer::onUpdateAbilities() { if (connection == NULL) return; - connection->send(std::shared_ptr(new PlayerAbilitiesPacket(&abilities))); + connection->send(shared_ptr(new PlayerAbilitiesPacket(&abilities))); } ServerLevel *ServerPlayer::getLevel() @@ -1420,12 +1420,12 @@ ServerLevel *ServerPlayer::getLevel() void ServerPlayer::setGameMode(GameType *mode) { gameMode->setGameModeForPlayer(mode); - connection->send(std::shared_ptr(new GameEventPacket(GameEventPacket::CHANGE_GAME_MODE, mode->getId()))); + connection->send(shared_ptr(new GameEventPacket(GameEventPacket::CHANGE_GAME_MODE, mode->getId()))); } void ServerPlayer::sendMessage(const wstring& message, ChatPacket::EChatPacketMessage type /*= e_ChatCustom*/, int customData /*= -1*/, const wstring& additionalMessage /*= L""*/) { - connection->send(std::shared_ptr(new ChatPacket(message,type,customData,additionalMessage))); + connection->send(shared_ptr(new ChatPacket(message,type,customData,additionalMessage))); } bool ServerPlayer::hasPermission(EGameCommand command) @@ -1434,7 +1434,7 @@ bool ServerPlayer::hasPermission(EGameCommand command) } // 4J - Don't use -//void ServerPlayer::updateOptions(std::shared_ptr packet) +//void ServerPlayer::updateOptions(shared_ptr packet) //{ // // 4J - Don't need // //if (language.getLanguageList().containsKey(packet.getLanguage())) @@ -1502,7 +1502,7 @@ int ServerPlayer::getPlayerViewDistanceModifier() return value; } -void ServerPlayer::handleCollectItem(std::shared_ptr item) +void ServerPlayer::handleCollectItem(shared_ptr item) { if(gameMode->getGameRules() != NULL) gameMode->getGameRules()->onCollectItem(item); } diff --git a/Minecraft.Client/ServerPlayer.h b/Minecraft.Client/ServerPlayer.h index 1e896ec0..a9b37594 100644 --- a/Minecraft.Client/ServerPlayer.h +++ b/Minecraft.Client/ServerPlayer.h @@ -17,7 +17,7 @@ class ServerPlayer : public Player, public net_minecraft_world_inventory::Contai { public: eINSTANCEOF GetType() { return eTYPE_SERVERPLAYER; } - std::shared_ptr connection; + shared_ptr connection; MinecraftServer *server; ServerPlayerGameMode *gameMode; double lastMoveX, lastMoveZ; @@ -59,7 +59,7 @@ public: virtual float getHeadHeight(); virtual void tick(); void flushEntitiesToRemove(); - virtual std::shared_ptr getCarried(int slot); + virtual shared_ptr getCarried(int slot); virtual void die(DamageSource *source); virtual bool hurt(DamageSource *dmgSource, int dmg); virtual bool isPlayerVersusPlayer(); @@ -69,15 +69,15 @@ public: void doTickB(bool ignorePortal); virtual void changeDimension(int i); private: - void broadcast(std::shared_ptr te, bool delay = false); + void broadcast(shared_ptr te, bool delay = false); public: - virtual void take(std::shared_ptr e, int orgCount); + virtual void take(shared_ptr e, int orgCount); virtual void swing(); virtual BedSleepingResult startSleepInBed(int x, int y, int z, bool bTestUse = false); public: virtual void stopSleepInBed(bool forcefulWakeUp, bool updateLevelList, bool saveRespawnPoint); - virtual void ride(std::shared_ptr e); + virtual void ride(shared_ptr e); protected: virtual void checkFallDamage(double ya, bool onGround); public: @@ -97,14 +97,14 @@ public: virtual bool startCrafting(int x, int y, int z); // 4J added bool return virtual bool startEnchanting(int x, int y, int z); // 4J added bool return virtual bool startRepairing(int x, int y, int z); // 4J added bool return - virtual bool openContainer(std::shared_ptr container); // 4J added bool return - virtual bool openFurnace(std::shared_ptr furnace); // 4J added bool return - virtual bool openTrap(std::shared_ptr trap); // 4J added bool return - virtual bool openBrewingStand(std::shared_ptr brewingStand); // 4J added bool return - virtual bool openTrading(std::shared_ptr traderTarget); // 4J added bool return - virtual void slotChanged(AbstractContainerMenu *container, int slotIndex, std::shared_ptr item); + virtual bool openContainer(shared_ptr container); // 4J added bool return + virtual bool openFurnace(shared_ptr furnace); // 4J added bool return + virtual bool openTrap(shared_ptr trap); // 4J added bool return + virtual bool openBrewingStand(shared_ptr brewingStand); // 4J added bool return + virtual bool openTrading(shared_ptr traderTarget); // 4J added bool return + virtual void slotChanged(AbstractContainerMenu *container, int slotIndex, shared_ptr item); void refreshContainer(AbstractContainerMenu *menu); - virtual void refreshContainer(AbstractContainerMenu *container, vector > *items); + virtual void refreshContainer(AbstractContainerMenu *container, vector > *items); virtual void setContainerData(AbstractContainerMenu *container, int id, int value); virtual void closeContainer(); void broadcastCarriedItem(); @@ -121,8 +121,8 @@ protected: virtual void completeUsingItem(); public: - virtual void startUsingItem(std::shared_ptr instance, int duration); - virtual void restoreFrom(std::shared_ptr oldPlayer, bool restoreAll); + virtual void startUsingItem(shared_ptr instance, int duration); + virtual void restoreFrom(shared_ptr oldPlayer, bool restoreAll); protected: virtual void onEffectAdded(MobEffectInstance *effect); @@ -131,8 +131,8 @@ protected: public: virtual void teleportTo(double x, double y, double z); - virtual void crit(std::shared_ptr entity); - virtual void magicCrit(std::shared_ptr entity); + virtual void crit(shared_ptr entity); + virtual void magicCrit(shared_ptr entity); void onUpdateAbilities(); ServerLevel *getLevel(); @@ -140,7 +140,7 @@ public: void sendMessage(const wstring& message, ChatPacket::EChatPacketMessage type = ChatPacket::e_ChatCustom, int customData = -1, const wstring& additionalMessage = L""); bool hasPermission(EGameCommand command); // 4J - Don't use - //void updateOptions(std::shared_ptr packet); + //void updateOptions(shared_ptr packet); int getViewDistance(); //bool canChatInColor(); //int getChatVisibility(); @@ -152,7 +152,7 @@ public: public: // 4J Stu - Added hooks for the game rules - virtual void handleCollectItem(std::shared_ptr item); + virtual void handleCollectItem(shared_ptr item); #ifndef _CONTENT_PACKAGE void debug_setPosition(double,double,double,double,double); @@ -160,5 +160,5 @@ public: protected: // 4J Added to record telemetry of player deaths, this should store the last source of damage - ETelemetryChallenges m_lastDamageSource; + ETelemetryChallenges m_lastDamageSource; }; diff --git a/Minecraft.Client/ServerPlayerGameMode.cpp b/Minecraft.Client/ServerPlayerGameMode.cpp index 3bd69310..9b31df0d 100644 --- a/Minecraft.Client/ServerPlayerGameMode.cpp +++ b/Minecraft.Client/ServerPlayerGameMode.cpp @@ -235,9 +235,9 @@ bool ServerPlayerGameMode::destroyBlock(int x, int y, int z) int t = level->getTile(x, y, z); int data = level->getData(x, y, z); - + level->levelEvent(player, LevelEvent::PARTICLES_DESTROY_BLOCK, x, y, z, t + (level->getData(x, y, z) << Tile::TILE_NUM_SHIFT)); - + // 4J - In creative mode, the point where we need to tell the renderer that we are about to destroy a tile via destroyingTileAt is quite complicated. // If the player being told is remote, then we always want the client to do it as it does the final update. If the player being told is local, // then we need to update the renderer Here if we are sharing data between host & client as this is the final point where the original data is still intact. @@ -272,7 +272,7 @@ bool ServerPlayerGameMode::destroyBlock(int x, int y, int z) if (isCreative()) { - std::shared_ptr tup = std::shared_ptr( new TileUpdatePacket(x, y, z, level) ); + shared_ptr tup = shared_ptr( new TileUpdatePacket(x, y, z, level) ); // 4J - a bit of a hack here, but if we want to tell the client that it needs to inform the renderer of a block being destroyed, then send a block 255 instead of a 0. This is handled in ClientConnection::handleTileUpdate if( tup->block == 0 ) { @@ -280,9 +280,9 @@ bool ServerPlayerGameMode::destroyBlock(int x, int y, int z) } player->connection->send( tup ); } - else + else { - std::shared_ptr item = player->getSelectedItem(); + shared_ptr item = player->getSelectedItem(); bool canDestroy = player->canDestroy(Tile::tiles[t]); if (item != NULL) { @@ -301,13 +301,13 @@ bool ServerPlayerGameMode::destroyBlock(int x, int y, int z) } -bool ServerPlayerGameMode::useItem(std::shared_ptr player, Level *level, std::shared_ptr item, bool bTestUseOnly) +bool ServerPlayerGameMode::useItem(shared_ptr player, Level *level, shared_ptr item, bool bTestUseOnly) { if(!player->isAllowedToUse(item)) return false; int oldCount = item->count; int oldAux = item->getAuxValue(); - std::shared_ptr itemInstance = item->use(level, player); + shared_ptr itemInstance = item->use(level, player); if ((itemInstance != NULL && itemInstance != item) || (itemInstance != NULL && itemInstance->count != oldCount) || (itemInstance != NULL && itemInstance->getUseDuration() > 0)) { player->inventory->items[player->inventory->selected] = itemInstance; @@ -326,7 +326,7 @@ bool ServerPlayerGameMode::useItem(std::shared_ptr player, Level *level, } -bool ServerPlayerGameMode::useItemOn(std::shared_ptr player, Level *level, std::shared_ptr item, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly, bool *pbUsedItem) +bool ServerPlayerGameMode::useItemOn(shared_ptr player, Level *level, shared_ptr item, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly, bool *pbUsedItem) { // 4J-PB - Adding a test only version to allow tooltips to be displayed int t = level->getTile(x, y, z); @@ -336,7 +336,7 @@ bool ServerPlayerGameMode::useItemOn(std::shared_ptr player, Level *leve { if (Tile::tiles[t]->TestUse()) return true; } - else + else { if (Tile::tiles[t]->use(level, x, y, z, player, face, clickX, clickY, clickZ)) { @@ -345,7 +345,7 @@ bool ServerPlayerGameMode::useItemOn(std::shared_ptr player, Level *leve } } } - + if (item == NULL || !player->isAllowedToUse(item)) return false; if (isCreative()) { diff --git a/Minecraft.Client/ServerPlayerGameMode.h b/Minecraft.Client/ServerPlayerGameMode.h index c590f11e..89b9e9b4 100644 --- a/Minecraft.Client/ServerPlayerGameMode.h +++ b/Minecraft.Client/ServerPlayerGameMode.h @@ -10,7 +10,7 @@ class ServerPlayerGameMode { public: Level *level; - std::shared_ptr player; + shared_ptr player; private: GameType *gameModeForPlayer; @@ -53,8 +53,8 @@ private: public: bool destroyBlock(int x, int y, int z); - bool useItem(std::shared_ptr player, Level *level, std::shared_ptr item, bool bTestUseOnly=false); - bool useItemOn(std::shared_ptr player, Level *level, std::shared_ptr item, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly=false, bool *pbUsedItem=NULL); + bool useItem(shared_ptr player, Level *level, shared_ptr item, bool bTestUseOnly=false); + bool useItemOn(shared_ptr player, Level *level, shared_ptr item, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly=false, bool *pbUsedItem=NULL); void setLevel(ServerLevel *newLevel); }; \ No newline at end of file diff --git a/Minecraft.Client/SheepFurModel.cpp b/Minecraft.Client/SheepFurModel.cpp index 2e8b494d..bb84e80d 100644 --- a/Minecraft.Client/SheepFurModel.cpp +++ b/Minecraft.Client/SheepFurModel.cpp @@ -41,11 +41,11 @@ SheepFurModel::SheepFurModel() : QuadrupedModel(12, 0) leg3->compile(1.0f/16.0f); } -void SheepFurModel::prepareMobModel(std::shared_ptr mob, float time, float r, float a) +void SheepFurModel::prepareMobModel(shared_ptr mob, float time, float r, float a) { QuadrupedModel::prepareMobModel(mob, time, r, a); - std::shared_ptr sheep = dynamic_pointer_cast(mob); + shared_ptr sheep = dynamic_pointer_cast(mob); head->y = 6 + sheep->getHeadEatPositionScale(a) * 9.0f; headXRot = sheep->getHeadEatAngleScale(a); } diff --git a/Minecraft.Client/SheepFurModel.h b/Minecraft.Client/SheepFurModel.h index 65bb913e..c614765e 100644 --- a/Minecraft.Client/SheepFurModel.h +++ b/Minecraft.Client/SheepFurModel.h @@ -8,6 +8,6 @@ private: public: SheepFurModel(); - virtual void prepareMobModel(std::shared_ptr mob, float time, float r, float a); + virtual void prepareMobModel(shared_ptr mob, float time, float r, float a); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); }; \ No newline at end of file diff --git a/Minecraft.Client/SheepModel.cpp b/Minecraft.Client/SheepModel.cpp index 9c161c33..7d093353 100644 --- a/Minecraft.Client/SheepModel.cpp +++ b/Minecraft.Client/SheepModel.cpp @@ -10,7 +10,7 @@ SheepModel::SheepModel() : QuadrupedModel(12, 0) head = new ModelPart(this, 0, 0); head->addBox(-3, -4, -6, 6, 6, 8, 0); // Head head->setPos(0, 12-6, -8); - + body = new ModelPart(this, 28, 8); body->addBox(-4, -10, -7, 8, 16, 6, 0); // Body body->setPos(0, 11+6-12, 2); @@ -20,11 +20,11 @@ SheepModel::SheepModel() : QuadrupedModel(12, 0) body->compile(1.0f/16.0f); } -void SheepModel::prepareMobModel(std::shared_ptr mob, float time, float r, float a) +void SheepModel::prepareMobModel(shared_ptr mob, float time, float r, float a) { QuadrupedModel::prepareMobModel(mob, time, r, a); - std::shared_ptr sheep = dynamic_pointer_cast(mob); + shared_ptr sheep = dynamic_pointer_cast(mob); head->y = 6 + sheep->getHeadEatPositionScale(a) * 9.0f; headXRot = sheep->getHeadEatAngleScale(a); } diff --git a/Minecraft.Client/SheepModel.h b/Minecraft.Client/SheepModel.h index 78c3b7c8..d4136c25 100644 --- a/Minecraft.Client/SheepModel.h +++ b/Minecraft.Client/SheepModel.h @@ -8,6 +8,6 @@ private: public: SheepModel(); - virtual void prepareMobModel(std::shared_ptr mob, float time, float r, float a); + virtual void prepareMobModel(shared_ptr mob, float time, float r, float a); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); }; \ No newline at end of file diff --git a/Minecraft.Client/SheepRenderer.cpp b/Minecraft.Client/SheepRenderer.cpp index 0aab6c7c..4af155d3 100644 --- a/Minecraft.Client/SheepRenderer.cpp +++ b/Minecraft.Client/SheepRenderer.cpp @@ -8,10 +8,10 @@ SheepRenderer::SheepRenderer(Model *model, Model *armor, float shadow) : MobRend setArmor(armor); } -int SheepRenderer::prepareArmor(std::shared_ptr _sheep, int layer, float a) +int SheepRenderer::prepareArmor(shared_ptr _sheep, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr sheep = dynamic_pointer_cast(_sheep); + shared_ptr sheep = dynamic_pointer_cast(_sheep); if (layer == 0 && !sheep->isSheared() && !sheep->isInvisibleTo(Minecraft::GetInstance()->player)) // 4J-JEV: Todo, merge with java fix (for invisible sheep armour) in '1.7.5'. @@ -28,7 +28,7 @@ int SheepRenderer::prepareArmor(std::shared_ptr _sheep, int layer, float a) return -1; } -void SheepRenderer::render(std::shared_ptr mob, double x, double y, double z, float rot, float a) +void SheepRenderer::render(shared_ptr mob, double x, double y, double z, float rot, float a) { MobRenderer::render(mob, x, y, z, rot, a); -} +} diff --git a/Minecraft.Client/SheepRenderer.h b/Minecraft.Client/SheepRenderer.h index 637c53d0..c0dea04f 100644 --- a/Minecraft.Client/SheepRenderer.h +++ b/Minecraft.Client/SheepRenderer.h @@ -7,8 +7,8 @@ public: SheepRenderer(Model *model, Model *armor, float shadow); protected: - virtual int prepareArmor(std::shared_ptr _sheep, int layer, float a); + virtual int prepareArmor(shared_ptr _sheep, int layer, float a); public: - virtual void render(std::shared_ptr mob, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr mob, double x, double y, double z, float rot, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/SignRenderer.cpp b/Minecraft.Client/SignRenderer.cpp index b4457f9b..97eff4bd 100644 --- a/Minecraft.Client/SignRenderer.cpp +++ b/Minecraft.Client/SignRenderer.cpp @@ -13,10 +13,10 @@ SignRenderer::SignRenderer() signModel = new SignModel(); } -void SignRenderer::render(std::shared_ptr _sign, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void SignRenderer::render(shared_ptr _sign, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr sign = dynamic_pointer_cast(_sign); + shared_ptr sign = dynamic_pointer_cast(_sign); Tile *tile = sign->getTile(); @@ -73,10 +73,10 @@ void SignRenderer::render(std::shared_ptr _sign, double x, double y, { switch(dwLanguage) { - case XC_LANGUAGE_KOREAN: + case XC_LANGUAGE_KOREAN: case XC_LANGUAGE_JAPANESE: case XC_LANGUAGE_TCHINESE: - msg = L"Censored";// In-game font, so English only + msg = L"Censored";// In-game font, so English only break; default: msg = app.GetString(IDS_STRINGVERIFY_CENSORED); @@ -92,16 +92,16 @@ void SignRenderer::render(std::shared_ptr _sign, double x, double y, { switch(dwLanguage) { - case XC_LANGUAGE_KOREAN: + case XC_LANGUAGE_KOREAN: case XC_LANGUAGE_JAPANESE: case XC_LANGUAGE_TCHINESE: - msg = L"Awaiting Approval";// In-game font, so English only + msg = L"Awaiting Approval";// In-game font, so English only break; default: msg = app.GetString(IDS_STRINGVERIFY_AWAITING_APPROVAL); break; } - } + } if (i == sign->GetSelectedLine()) { diff --git a/Minecraft.Client/SignRenderer.h b/Minecraft.Client/SignRenderer.h index d7411af4..48d4d954 100644 --- a/Minecraft.Client/SignRenderer.h +++ b/Minecraft.Client/SignRenderer.h @@ -8,5 +8,5 @@ private: SignModel *signModel; public: SignRenderer(); // 4J - added - virtual void render(std::shared_ptr sign, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param + virtual void render(shared_ptr sign, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param }; diff --git a/Minecraft.Client/SilverfishModel.cpp b/Minecraft.Client/SilverfishModel.cpp index a7a14629..128a7e79 100644 --- a/Minecraft.Client/SilverfishModel.cpp +++ b/Minecraft.Client/SilverfishModel.cpp @@ -82,7 +82,7 @@ int SilverfishModel::modelVersion() return 38; } -void SilverfishModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void SilverfishModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/SilverfishModel.h b/Minecraft.Client/SilverfishModel.h index 4ce0e16e..d6be3059 100644 --- a/Minecraft.Client/SilverfishModel.h +++ b/Minecraft.Client/SilverfishModel.h @@ -21,6 +21,6 @@ public: SilverfishModel(); int modelVersion(); - void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); }; \ No newline at end of file diff --git a/Minecraft.Client/SilverfishRenderer.cpp b/Minecraft.Client/SilverfishRenderer.cpp index 714cab8b..9ed194ca 100644 --- a/Minecraft.Client/SilverfishRenderer.cpp +++ b/Minecraft.Client/SilverfishRenderer.cpp @@ -7,17 +7,17 @@ SilverfishRenderer::SilverfishRenderer() : MobRenderer(new SilverfishModel(), 0. { } -float SilverfishRenderer::getFlipDegrees(std::shared_ptr spider) +float SilverfishRenderer::getFlipDegrees(shared_ptr spider) { return 180; } -void SilverfishRenderer::render(std::shared_ptr _mob, double x, double y, double z, float rot, float a) +void SilverfishRenderer::render(shared_ptr _mob, double x, double y, double z, float rot, float a) { MobRenderer::render(_mob, x, y, z, rot, a); } -int SilverfishRenderer::prepareArmor(std::shared_ptr _silverfish, int layer, float a) +int SilverfishRenderer::prepareArmor(shared_ptr _silverfish, int layer, float a) { return -1; } \ No newline at end of file diff --git a/Minecraft.Client/SilverfishRenderer.h b/Minecraft.Client/SilverfishRenderer.h index 91ff2e45..c1df4505 100644 --- a/Minecraft.Client/SilverfishRenderer.h +++ b/Minecraft.Client/SilverfishRenderer.h @@ -13,11 +13,11 @@ public: SilverfishRenderer(); protected: - float getFlipDegrees(std::shared_ptr spider); + float getFlipDegrees(shared_ptr spider); public: - void render(std::shared_ptr _mob, double x, double y, double z, float rot, float a); + void render(shared_ptr _mob, double x, double y, double z, float rot, float a); protected: - int prepareArmor(std::shared_ptr _silverfish, int layer, float a); + int prepareArmor(shared_ptr _silverfish, int layer, float a); }; diff --git a/Minecraft.Client/SkeletonHeadModel.cpp b/Minecraft.Client/SkeletonHeadModel.cpp index 4fb15b31..340047fe 100644 --- a/Minecraft.Client/SkeletonHeadModel.cpp +++ b/Minecraft.Client/SkeletonHeadModel.cpp @@ -27,7 +27,7 @@ SkeletonHeadModel::SkeletonHeadModel(int u, int v, int tw, int th) _init(u,v,tw,th); } -void SkeletonHeadModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void SkeletonHeadModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/SkeletonHeadModel.h b/Minecraft.Client/SkeletonHeadModel.h index aa045571..6f136c46 100644 --- a/Minecraft.Client/SkeletonHeadModel.h +++ b/Minecraft.Client/SkeletonHeadModel.h @@ -14,6 +14,6 @@ public: SkeletonHeadModel(); SkeletonHeadModel(int u, int v, int tw, int th); - void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); }; \ No newline at end of file diff --git a/Minecraft.Client/SkullTileRenderer.cpp b/Minecraft.Client/SkullTileRenderer.cpp index 129e21a5..641a7a02 100644 --- a/Minecraft.Client/SkullTileRenderer.cpp +++ b/Minecraft.Client/SkullTileRenderer.cpp @@ -19,9 +19,9 @@ SkullTileRenderer::~SkullTileRenderer() delete zombieModel; } -void SkullTileRenderer::render(std::shared_ptr _skull, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void SkullTileRenderer::render(shared_ptr _skull, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { - std::shared_ptr skull = dynamic_pointer_cast(_skull); + shared_ptr skull = dynamic_pointer_cast(_skull); renderSkull((float) x, (float) y, (float) z, skull->getData() & SkullTile::PLACEMENT_MASK, skull->getRotation() * 360 / 16.0f, skull->getSkullType(), skull->getExtraType()); } diff --git a/Minecraft.Client/SkullTileRenderer.h b/Minecraft.Client/SkullTileRenderer.h index e9d2bf0f..09c83f9d 100644 --- a/Minecraft.Client/SkullTileRenderer.h +++ b/Minecraft.Client/SkullTileRenderer.h @@ -18,7 +18,7 @@ public: SkullTileRenderer(); ~SkullTileRenderer(); - void render(std::shared_ptr skull, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled = true); + void render(shared_ptr skull, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled = true); void init(TileEntityRenderDispatcher *tileEntityRenderDispatcher); void renderSkull(float x, float y, float z, int face, float rot, int type, const wstring &extra); }; diff --git a/Minecraft.Client/SlimeModel.cpp b/Minecraft.Client/SlimeModel.cpp index df0ae37d..1dafc2fb 100644 --- a/Minecraft.Client/SlimeModel.cpp +++ b/Minecraft.Client/SlimeModel.cpp @@ -34,7 +34,7 @@ SlimeModel::SlimeModel(int vOffs) cube->compile(1.0f/16.0f); } -void SlimeModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void SlimeModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/SlimeModel.h b/Minecraft.Client/SlimeModel.h index fe2a4fc2..9eee5eb1 100644 --- a/Minecraft.Client/SlimeModel.h +++ b/Minecraft.Client/SlimeModel.h @@ -9,5 +9,5 @@ public: SlimeModel(int vOffs); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); }; \ No newline at end of file diff --git a/Minecraft.Client/SlimeRenderer.cpp b/Minecraft.Client/SlimeRenderer.cpp index dbad3d26..23c9c16e 100644 --- a/Minecraft.Client/SlimeRenderer.cpp +++ b/Minecraft.Client/SlimeRenderer.cpp @@ -1,5 +1,5 @@ #include "stdafx.h" -#include "SlimeRenderer.h" +#include "SlimeRenderer.h" #include "..\Minecraft.World\net.minecraft.world.entity.monster.h" SlimeRenderer::SlimeRenderer(Model *model, Model *armor, float shadow) : MobRenderer(model, shadow) @@ -7,10 +7,10 @@ SlimeRenderer::SlimeRenderer(Model *model, Model *armor, float shadow) : MobRend this->armor = armor; } -int SlimeRenderer::prepareArmor(std::shared_ptr _slime, int layer, float a) +int SlimeRenderer::prepareArmor(shared_ptr _slime, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr slime = dynamic_pointer_cast(_slime); + shared_ptr slime = dynamic_pointer_cast(_slime); if (slime->isInvisible()) return 0; @@ -32,10 +32,10 @@ int SlimeRenderer::prepareArmor(std::shared_ptr _slime, int layer, float a) return -1; } -void SlimeRenderer::scale(std::shared_ptr _slime, float a) +void SlimeRenderer::scale(shared_ptr _slime, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr slime = dynamic_pointer_cast(_slime); + shared_ptr slime = dynamic_pointer_cast(_slime); float size = (float) slime->getSize(); float ss = (slime->oSquish + (slime->squish - slime->oSquish) * a) / (size * 0.5f + 1); diff --git a/Minecraft.Client/SlimeRenderer.h b/Minecraft.Client/SlimeRenderer.h index 86de3a76..58f510aa 100644 --- a/Minecraft.Client/SlimeRenderer.h +++ b/Minecraft.Client/SlimeRenderer.h @@ -8,6 +8,6 @@ private: public: SlimeRenderer(Model *model, Model *armor, float shadow); protected: - virtual int prepareArmor(std::shared_ptr _slime, int layer, float a); - virtual void scale(std::shared_ptr _slime, float a); + virtual int prepareArmor(shared_ptr _slime, int layer, float a); + virtual void scale(shared_ptr _slime, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/SnowManModel.cpp b/Minecraft.Client/SnowManModel.cpp index 9380cce0..4344a17a 100644 --- a/Minecraft.Client/SnowManModel.cpp +++ b/Minecraft.Client/SnowManModel.cpp @@ -26,7 +26,7 @@ SnowManModel::SnowManModel() : Model() piece2 = (new ModelPart(this, 0, 36))->setTexSize(64, 64); piece2->addBox(-6, -12, -6, 12, 12, 12, g - 0.5f); // lower body - piece2->setPos(0, 0 + yOffset + 20, 0); + piece2->setPos(0, 0 + yOffset + 20, 0); // 4J added - compile now to avoid random performance hit first time cubes are rendered head->compile(1.0f/16.0f); @@ -53,12 +53,12 @@ void SnowManModel::setupAnim(float time, float r, float bob, float yRot, float x arm1->x = (c) * 5; arm1->z = (-s) * 5; - + arm2->x = (-c) * 5; arm2->z = (s) * 5; } -void SnowManModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void SnowManModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/SnowManModel.h b/Minecraft.Client/SnowManModel.h index 5f2d64c5..eb31e503 100644 --- a/Minecraft.Client/SnowManModel.h +++ b/Minecraft.Client/SnowManModel.h @@ -1,7 +1,7 @@ #pragma once #include "Model.h" -class SnowManModel : public Model +class SnowManModel : public Model { public: ModelPart *piece1, *piece2, *head; @@ -9,5 +9,5 @@ public: SnowManModel() ; virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); - void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); }; diff --git a/Minecraft.Client/SnowManRenderer.cpp b/Minecraft.Client/SnowManRenderer.cpp index cd08e5ce..83edb3f5 100644 --- a/Minecraft.Client/SnowManRenderer.cpp +++ b/Minecraft.Client/SnowManRenderer.cpp @@ -13,14 +13,14 @@ SnowManRenderer::SnowManRenderer() : MobRenderer(new SnowManModel(), 0.5f) this->setArmor(model); } -void SnowManRenderer::additionalRendering(std::shared_ptr _mob, float a) +void SnowManRenderer::additionalRendering(shared_ptr _mob, float a) { - // 4J - original version used generics and thus had an input parameter of type SnowMan rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type SnowMan rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); MobRenderer::additionalRendering(mob, a); - std::shared_ptr headGear = std::shared_ptr( new ItemInstance(Tile::pumpkin, 1) ); + shared_ptr headGear = shared_ptr( new ItemInstance(Tile::pumpkin, 1) ); if (headGear != NULL && headGear->getItem()->id < 256) { glPushMatrix(); diff --git a/Minecraft.Client/SnowManRenderer.h b/Minecraft.Client/SnowManRenderer.h index ab003fe6..9bdecb4d 100644 --- a/Minecraft.Client/SnowManRenderer.h +++ b/Minecraft.Client/SnowManRenderer.h @@ -13,5 +13,5 @@ public: SnowManRenderer(); protected: - virtual void additionalRendering(std::shared_ptr _mob, float a); + virtual void additionalRendering(shared_ptr _mob, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/SpiderModel.cpp b/Minecraft.Client/SpiderModel.cpp index 83ff82a4..35c51d3e 100644 --- a/Minecraft.Client/SpiderModel.cpp +++ b/Minecraft.Client/SpiderModel.cpp @@ -6,7 +6,7 @@ SpiderModel::SpiderModel() : Model() { float g = 0; - + int yo = 18+6-9; head = new ModelPart(this, 32, 4); @@ -68,7 +68,7 @@ SpiderModel::SpiderModel() : Model() leg7->compile(1.0f/16.0f); } -void SpiderModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void SpiderModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); @@ -93,13 +93,13 @@ void SpiderModel::setupAnim(float time, float r, float bob, float yRot, float xR float sr = (float) PI / 4.0f; leg0->zRot = -sr; leg1->zRot = sr; - + leg2->zRot = -sr * 0.74f; leg3->zRot = sr * 0.74f; - + leg4->zRot = -sr * 0.74f; leg5->zRot = sr * 0.74f; - + leg6->zRot = -sr; leg7->zRot = sr; diff --git a/Minecraft.Client/SpiderModel.h b/Minecraft.Client/SpiderModel.h index 2d9d1527..61666983 100644 --- a/Minecraft.Client/SpiderModel.h +++ b/Minecraft.Client/SpiderModel.h @@ -7,6 +7,6 @@ public: ModelPart *head, *body0, *body1, *leg0, *leg1, *leg2, *leg3, *leg4, *leg5, *leg6, *leg7; SpiderModel(); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); }; \ No newline at end of file diff --git a/Minecraft.Client/SpiderRenderer.cpp b/Minecraft.Client/SpiderRenderer.cpp index d19472c5..9c31eb9e 100644 --- a/Minecraft.Client/SpiderRenderer.cpp +++ b/Minecraft.Client/SpiderRenderer.cpp @@ -8,15 +8,15 @@ SpiderRenderer::SpiderRenderer() : MobRenderer(new SpiderModel(), 1.0f) this->setArmor(new SpiderModel()); } -float SpiderRenderer::getFlipDegrees(std::shared_ptr spider) +float SpiderRenderer::getFlipDegrees(shared_ptr spider) { return 180; } -int SpiderRenderer::prepareArmor(std::shared_ptr _spider, int layer, float a) +int SpiderRenderer::prepareArmor(shared_ptr _spider, int layer, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr spider = dynamic_pointer_cast(_spider); + shared_ptr spider = dynamic_pointer_cast(_spider); if (layer!=0) return -1; MemSect(31); @@ -40,7 +40,7 @@ int SpiderRenderer::prepareArmor(std::shared_ptr _spider, int layer, float { // 4J - was 0xf0f0 but that looks like it is a mistake - maybe meant to be 0xf000f0 to enable both sky & block lighting? choosing 0x00f0 here instead // as most likely replicates what the java game does, without breaking our lighting (which doesn't like UVs out of the 0 to 255 range) - int col = 0x00f0; + int col = 0x00f0; int u = col % 65536; int v = col / 65536; @@ -52,10 +52,10 @@ int SpiderRenderer::prepareArmor(std::shared_ptr _spider, int layer, float return 1; } -void SpiderRenderer::scale(std::shared_ptr _mob, float a) +void SpiderRenderer::scale(shared_ptr _mob, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); float scale = mob->getModelScale(); glScalef(scale, scale, scale); } \ No newline at end of file diff --git a/Minecraft.Client/SpiderRenderer.h b/Minecraft.Client/SpiderRenderer.h index 7946ed46..3b937458 100644 --- a/Minecraft.Client/SpiderRenderer.h +++ b/Minecraft.Client/SpiderRenderer.h @@ -6,7 +6,7 @@ class SpiderRenderer : public MobRenderer public: SpiderRenderer(); protected: - virtual float getFlipDegrees(std::shared_ptr spider); - virtual int prepareArmor(std::shared_ptr _spider, int layer, float a); - void scale(std::shared_ptr _mob, float a); + virtual float getFlipDegrees(shared_ptr spider); + virtual int prepareArmor(shared_ptr _spider, int layer, float a); + void scale(shared_ptr _mob, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/SquidModel.cpp b/Minecraft.Client/SquidModel.cpp index 6f87cbde..8ad20f8e 100644 --- a/Minecraft.Client/SquidModel.cpp +++ b/Minecraft.Client/SquidModel.cpp @@ -43,7 +43,7 @@ void SquidModel::setupAnim(float time, float r, float bob, float yRot, float xRo } } -void SquidModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void SquidModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); diff --git a/Minecraft.Client/SquidModel.h b/Minecraft.Client/SquidModel.h index 0b7948a8..8f43950f 100644 --- a/Minecraft.Client/SquidModel.h +++ b/Minecraft.Client/SquidModel.h @@ -10,5 +10,5 @@ public: SquidModel(); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); }; \ No newline at end of file diff --git a/Minecraft.Client/SquidRenderer.cpp b/Minecraft.Client/SquidRenderer.cpp index 3ee79eb1..135f6d9b 100644 --- a/Minecraft.Client/SquidRenderer.cpp +++ b/Minecraft.Client/SquidRenderer.cpp @@ -6,15 +6,15 @@ SquidRenderer::SquidRenderer(Model *model, float shadow) : MobRenderer(model, sh { } -void SquidRenderer::render(std::shared_ptr mob, double x, double y, double z, float rot, float a) +void SquidRenderer::render(shared_ptr mob, double x, double y, double z, float rot, float a) { MobRenderer::render(mob, x, y, z, rot, a); } -void SquidRenderer::setupRotations(std::shared_ptr _mob, float bob, float bodyRot, float a) +void SquidRenderer::setupRotations(shared_ptr _mob, float bob, float bodyRot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); float bodyXRot = (mob->xBodyRotO + (mob->xBodyRot - mob->xBodyRotO) * a); float bodyZRot = (mob->zBodyRotO + (mob->zBodyRot - mob->zBodyRotO) * a); @@ -26,10 +26,10 @@ void SquidRenderer::setupRotations(std::shared_ptr _mob, float bob, float b glTranslatef(0, -1.2f, 0); } -float SquidRenderer::getBob(std::shared_ptr _mob, float a) +float SquidRenderer::getBob(shared_ptr _mob, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); return mob->oldTentacleAngle + (mob->tentacleAngle - mob->oldTentacleAngle) * a; } \ No newline at end of file diff --git a/Minecraft.Client/SquidRenderer.h b/Minecraft.Client/SquidRenderer.h index 13270b5f..ccc81944 100644 --- a/Minecraft.Client/SquidRenderer.h +++ b/Minecraft.Client/SquidRenderer.h @@ -7,9 +7,9 @@ public: SquidRenderer(Model *model, float shadow); public: - virtual void render(std::shared_ptr mob, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr mob, double x, double y, double z, float rot, float a); protected: - virtual void setupRotations(std::shared_ptr _mob, float bob, float bodyRot, float a); - virtual float getBob(std::shared_ptr _mob, float a); + virtual void setupRotations(shared_ptr _mob, float bob, float bodyRot, float a); + virtual float getBob(shared_ptr _mob, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/SurvivalMode.cpp b/Minecraft.Client/SurvivalMode.cpp index b1b727a4..27a992df 100644 --- a/Minecraft.Client/SurvivalMode.cpp +++ b/Minecraft.Client/SurvivalMode.cpp @@ -43,7 +43,7 @@ SurvivalMode::SurvivalMode(SurvivalMode *copy) : GameMode( copy->minecraft ) destroyDelay = copy->destroyDelay; } -void SurvivalMode::initPlayer(std::shared_ptr player) +void SurvivalMode::initPlayer(shared_ptr player) { player->yRot = -180; } @@ -63,7 +63,7 @@ bool SurvivalMode::destroyBlock(int x, int y, int z, int face) int data = minecraft->level->getData(x, y, z); bool changed = GameMode::destroyBlock(x, y, z, face); - std::shared_ptr item = minecraft->player->getSelectedItem(); + shared_ptr item = minecraft->player->getSelectedItem(); bool couldDestroy = minecraft->player->canDestroy(Tile::tiles[t]); if (item != NULL) { @@ -73,7 +73,7 @@ bool SurvivalMode::destroyBlock(int x, int y, int z, int face) minecraft->player->removeSelectedItem(); } } - if (changed && couldDestroy) + if (changed && couldDestroy) { Tile::tiles[t]->playerDestroy(minecraft->level, minecraft->player, x, y, z, data); } @@ -171,9 +171,9 @@ void SurvivalMode::initLevel(Level *level) GameMode::initLevel(level); } -std::shared_ptr SurvivalMode::createPlayer(Level *level) +shared_ptr SurvivalMode::createPlayer(Level *level) { - std::shared_ptr player = GameMode::createPlayer(level); + shared_ptr player = GameMode::createPlayer(level); // player.inventory.add(new ItemInstance(Item.pickAxe_diamond)); // player.inventory.add(new ItemInstance(Item.hatchet_diamond)); // player.inventory.add(new ItemInstance(Tile.torch, 64)); @@ -189,7 +189,7 @@ void SurvivalMode::tick() //minecraft->soundEngine->playMusicTick(); } -bool SurvivalMode::useItemOn(std::shared_ptr player, Level *level, std::shared_ptr item, int x, int y, int z, int face, bool bTestUseOnOnly, bool *pbUsedItem) +bool SurvivalMode::useItemOn(shared_ptr player, Level *level, shared_ptr item, int x, int y, int z, int face, bool bTestUseOnOnly, bool *pbUsedItem) { int t = level->getTile(x, y, z); if (t > 0) diff --git a/Minecraft.Client/SurvivalMode.h b/Minecraft.Client/SurvivalMode.h index 643e50d1..b4ce5e6d 100644 --- a/Minecraft.Client/SurvivalMode.h +++ b/Minecraft.Client/SurvivalMode.h @@ -15,7 +15,7 @@ private: public: SurvivalMode(Minecraft *minecraft); SurvivalMode(SurvivalMode *copy); - virtual void initPlayer(std::shared_ptr player); + virtual void initPlayer(shared_ptr player); virtual void init(); virtual bool canHurtPlayer(); virtual bool destroyBlock(int x, int y, int z, int face); @@ -25,8 +25,8 @@ public: virtual void render(float a); virtual float getPickRange(); virtual void initLevel(Level *level); - virtual std::shared_ptr createPlayer(Level *level); + virtual shared_ptr createPlayer(Level *level); virtual void tick(); - virtual bool useItemOn(std::shared_ptr player, Level *level, std::shared_ptr item, int x, int y, int z, int face, bool bTestUseOnOnly=false, bool *pbUsedItem=NULL); + virtual bool useItemOn(shared_ptr player, Level *level, shared_ptr item, int x, int y, int z, int face, bool bTestUseOnOnly=false, bool *pbUsedItem=NULL); virtual bool hasExperience(); }; \ No newline at end of file diff --git a/Minecraft.Client/TakeAnimationParticle.cpp b/Minecraft.Client/TakeAnimationParticle.cpp index 3f00c004..c9530b0a 100644 --- a/Minecraft.Client/TakeAnimationParticle.cpp +++ b/Minecraft.Client/TakeAnimationParticle.cpp @@ -5,7 +5,7 @@ #include "..\Minecraft.World\net.minecraft.world.level.h" #include "..\Minecraft.World\Mth.h" -TakeAnimationParticle::TakeAnimationParticle(Level *level, std::shared_ptr item, std::shared_ptr target, float yOffs) : Particle(level, item->x, item->y, item->z, item->xd, item->yd, item->zd) +TakeAnimationParticle::TakeAnimationParticle(Level *level, shared_ptr item, shared_ptr target, float yOffs) : Particle(level, item->x, item->y, item->z, item->xd, item->yd, item->zd) { // 4J - added initialisers life = 0; @@ -39,7 +39,7 @@ void TakeAnimationParticle::render(Tesselator *t, float a, float xa, float ya, f double xx = xo + (xt - xo) * time; double yy = yo + (yt - yo) * time; double zz = zo + (zt - zo) * time; - + int xTile = Mth::floor(xx); int yTile = Mth::floor(yy + heightOffset / 2.0f); int zTile = Mth::floor(zz); @@ -58,12 +58,12 @@ void TakeAnimationParticle::render(Tesselator *t, float a, float xa, float ya, f float br = level->getBrightness(xTile, yTile, zTile); glColor4f(br, br, br, 1); } - + xx-=xOff; yy-=yOff; zz-=zOff; - - + + EntityRenderDispatcher::instance->render(item, (float)xx, (float)yy, (float)zz, item->yRot, a); } diff --git a/Minecraft.Client/TakeAnimationParticle.h b/Minecraft.Client/TakeAnimationParticle.h index 33c4535f..10026fda 100644 --- a/Minecraft.Client/TakeAnimationParticle.h +++ b/Minecraft.Client/TakeAnimationParticle.h @@ -7,14 +7,14 @@ class TakeAnimationParticle : public Particle public: virtual eINSTANCEOF GetType() { return eType_TAKEANIMATIONPARTICLE; } private: - std::shared_ptr item; - std::shared_ptr target; + shared_ptr item; + shared_ptr target; int life; int lifeTime; float yOffs; public: - TakeAnimationParticle(Level *level, std::shared_ptr item, std::shared_ptr target, float yOffs); + TakeAnimationParticle(Level *level, shared_ptr item, shared_ptr target, float yOffs); ~TakeAnimationParticle(); virtual void render(Tesselator *t, float a, float xa, float ya, float za, float xa2, float za2); virtual void tick(); diff --git a/Minecraft.Client/TeleportCommand.cpp b/Minecraft.Client/TeleportCommand.cpp index d80baca9..2132cfd4 100644 --- a/Minecraft.Client/TeleportCommand.cpp +++ b/Minecraft.Client/TeleportCommand.cpp @@ -14,20 +14,20 @@ EGameCommand TeleportCommand::getId() return eGameCommand_Teleport; } -void TeleportCommand::execute(std::shared_ptr source, byteArray commandData) +void TeleportCommand::execute(shared_ptr source, byteArray commandData) { ByteArrayInputStream bais(commandData); DataInputStream dis(&bais); PlayerUID subjectID = dis.readPlayerUID(); PlayerUID destinationID = dis.readPlayerUID(); - + bais.reset(); PlayerList *players = MinecraftServer::getInstance()->getPlayerList(); - std::shared_ptr subject = players->getPlayer(subjectID); - std::shared_ptr destination = players->getPlayer(destinationID); + shared_ptr subject = players->getPlayer(subjectID); + shared_ptr destination = players->getPlayer(destinationID); if(subject != NULL && destination != NULL && subject->level->dimension->id == destination->level->dimension->id && subject->isAlive() ) { @@ -78,7 +78,7 @@ void TeleportCommand::execute(std::shared_ptr source, byteArray c //} } -std::shared_ptr TeleportCommand::preparePacket(PlayerUID subject, PlayerUID destination) +shared_ptr TeleportCommand::preparePacket(PlayerUID subject, PlayerUID destination) { ByteArrayOutputStream baos; DataOutputStream dos(&baos); @@ -86,5 +86,5 @@ std::shared_ptr TeleportCommand::preparePacket(PlayerUID subj dos.writePlayerUID(subject); dos.writePlayerUID(destination); - return std::shared_ptr( new GameCommandPacket(eGameCommand_Teleport, baos.toByteArray() )); + return shared_ptr( new GameCommandPacket(eGameCommand_Teleport, baos.toByteArray() )); } \ No newline at end of file diff --git a/Minecraft.Client/TeleportCommand.h b/Minecraft.Client/TeleportCommand.h index b6f3b742..9015a52d 100644 --- a/Minecraft.Client/TeleportCommand.h +++ b/Minecraft.Client/TeleportCommand.h @@ -6,7 +6,7 @@ class TeleportCommand : public Command { public: virtual EGameCommand getId(); - virtual void execute(std::shared_ptr source, byteArray commandData); + virtual void execute(shared_ptr source, byteArray commandData); - static std::shared_ptr preparePacket(PlayerUID subject, PlayerUID destination); + static shared_ptr preparePacket(PlayerUID subject, PlayerUID destination); }; \ No newline at end of file diff --git a/Minecraft.Client/TerrainParticle.cpp b/Minecraft.Client/TerrainParticle.cpp index 5d2efbdc..811ba840 100644 --- a/Minecraft.Client/TerrainParticle.cpp +++ b/Minecraft.Client/TerrainParticle.cpp @@ -14,7 +14,7 @@ TerrainParticle::TerrainParticle(Level *level, double x, double y, double z, dou size /= 2; } -std::shared_ptr TerrainParticle::init(int x, int y, int z, int data) // 4J - added data parameter +shared_ptr TerrainParticle::init(int x, int y, int z, int data) // 4J - added data parameter { if (tile == Tile::grass) return dynamic_pointer_cast( shared_from_this() ); int col = tile->getColor(level, x, y, z, data); // 4J - added data parameter @@ -24,7 +24,7 @@ std::shared_ptr TerrainParticle::init(int x, int y, int z, int return dynamic_pointer_cast( shared_from_this() ); } -std::shared_ptr TerrainParticle::init(int data) +shared_ptr TerrainParticle::init(int data) { if (tile == Tile::grass) return dynamic_pointer_cast( shared_from_this() ); int col = tile->getColor(data); @@ -59,7 +59,7 @@ void TerrainParticle::render(Tesselator *t, float a, float xa, float ya, float z float y = (float) (yo + (this->y - yo) * a - yOff); float z = (float) (zo + (this->z - zo) * a - zOff); - // 4J - don't render terrain particles that are less than a metre away, to try and avoid large particles that are causing us problems with + // 4J - don't render terrain particles that are less than a metre away, to try and avoid large particles that are causing us problems with // photosensitivity testing float distSq = (x*x + y*y + z*z); if( distSq < 1.0f ) return; diff --git a/Minecraft.Client/TerrainParticle.h b/Minecraft.Client/TerrainParticle.h index df9ca42f..5d4a743f 100644 --- a/Minecraft.Client/TerrainParticle.h +++ b/Minecraft.Client/TerrainParticle.h @@ -11,8 +11,8 @@ private: public: TerrainParticle(Level *level, double x, double y, double z, double xa, double ya, double za, Tile *tile, int face, int data, Textures *textures); - std::shared_ptr init(int x, int y, int z, int data); // 4J - added data parameter - std::shared_ptr init(int data); + shared_ptr init(int x, int y, int z, int data); // 4J - added data parameter + shared_ptr init(int data); virtual int getParticleTexture(); virtual void render(Tesselator *t, float a, float xa, float ya, float za, float xa2, float za2); }; \ No newline at end of file diff --git a/Minecraft.Client/TextEditScreen.cpp b/Minecraft.Client/TextEditScreen.cpp index 24f86a4a..9537b969 100644 --- a/Minecraft.Client/TextEditScreen.cpp +++ b/Minecraft.Client/TextEditScreen.cpp @@ -1,5 +1,5 @@ #include "stdafx.h" -#include "TextEditScreen.h" +#include "TextEditScreen.h" #include "Button.h" #include "TileEntityRenderDispatcher.h" #include "ClientConnection.h" @@ -13,7 +13,7 @@ const wstring TextEditScreen::allowedChars = SharedConstants::acceptableLetters;; -TextEditScreen::TextEditScreen(std::shared_ptr sign) +TextEditScreen::TextEditScreen(shared_ptr sign) { // 4J - added initialisers line = 0; @@ -35,7 +35,7 @@ void TextEditScreen::removed() Keyboard::enableRepeatEvents(false); if (minecraft->level->isClientSide) { - minecraft->getConnection(0)->send( std::shared_ptr( new SignUpdatePacket(sign->x, sign->y, sign->z, sign->IsVerified(), sign->IsCensored(), sign->GetMessages()) ) ); + minecraft->getConnection(0)->send( shared_ptr( new SignUpdatePacket(sign->x, sign->y, sign->z, sign->IsVerified(), sign->IsCensored(), sign->GetMessages()) ) ); } } diff --git a/Minecraft.Client/TextEditScreen.h b/Minecraft.Client/TextEditScreen.h index b089f998..aad6ebc8 100644 --- a/Minecraft.Client/TextEditScreen.h +++ b/Minecraft.Client/TextEditScreen.h @@ -8,12 +8,12 @@ class TextEditScreen : public Screen protected: wstring title; private: - std::shared_ptr sign; + shared_ptr sign; int frame; int line; public: - TextEditScreen(std::shared_ptr sign); + TextEditScreen(shared_ptr sign); virtual void init(); virtual void removed(); virtual void tick(); diff --git a/Minecraft.Client/TheEndPortalRenderer.cpp b/Minecraft.Client/TheEndPortalRenderer.cpp index 7837a4fa..52581579 100644 --- a/Minecraft.Client/TheEndPortalRenderer.cpp +++ b/Minecraft.Client/TheEndPortalRenderer.cpp @@ -7,10 +7,10 @@ #include "..\Minecraft.World\FloatBuffer.h" #include "TheEndPortalRenderer.h" -void TheEndPortalRenderer::render(std::shared_ptr _table, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) +void TheEndPortalRenderer::render(shared_ptr _table, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) { // 4J Convert as we aren't using a templated class - std::shared_ptr table = dynamic_pointer_cast(_table); + shared_ptr table = dynamic_pointer_cast(_table); float xx = (float) (tileEntityRenderDispatcher->xPlayer); float yy = (float) (tileEntityRenderDispatcher->yPlayer); float zz = (float) (tileEntityRenderDispatcher->zPlayer); diff --git a/Minecraft.Client/TheEndPortalRenderer.h b/Minecraft.Client/TheEndPortalRenderer.h index fe489275..1e4ca546 100644 --- a/Minecraft.Client/TheEndPortalRenderer.h +++ b/Minecraft.Client/TheEndPortalRenderer.h @@ -5,7 +5,7 @@ class TheEndPortalRenderer : public TileEntityRenderer { public: - virtual void render(std::shared_ptr _table, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); + virtual void render(shared_ptr _table, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); FloatBuffer *lb; diff --git a/Minecraft.Client/TileEntityRenderDispatcher.cpp b/Minecraft.Client/TileEntityRenderDispatcher.cpp index 43111e6e..1708d215 100644 --- a/Minecraft.Client/TileEntityRenderDispatcher.cpp +++ b/Minecraft.Client/TileEntityRenderDispatcher.cpp @@ -80,18 +80,18 @@ TileEntityRenderer *TileEntityRenderDispatcher::getRenderer(eINSTANCEOF e) return it->second; } -bool TileEntityRenderDispatcher::hasRenderer(std::shared_ptr e) +bool TileEntityRenderDispatcher::hasRenderer(shared_ptr e) { return getRenderer(e) != NULL; } -TileEntityRenderer *TileEntityRenderDispatcher::getRenderer(std::shared_ptr e) +TileEntityRenderer *TileEntityRenderDispatcher::getRenderer(shared_ptr e) { if (e == NULL) return NULL; return getRenderer(e->GetType()); } -void TileEntityRenderDispatcher::prepare(Level *level, Textures *textures, Font *font, std::shared_ptr player, float a) +void TileEntityRenderDispatcher::prepare(Level *level, Textures *textures, Font *font, shared_ptr player, float a) { if( this->level != level ) { @@ -109,7 +109,7 @@ void TileEntityRenderDispatcher::prepare(Level *level, Textures *textures, Font zPlayer = player->zOld + (player->z - player->zOld) * a; } -void TileEntityRenderDispatcher::render(std::shared_ptr e, float a, bool setColor/*=true*/) +void TileEntityRenderDispatcher::render(shared_ptr e, float a, bool setColor/*=true*/) { if (e->distanceToSqr(xPlayer, yPlayer, zPlayer) < 64 * 64) { @@ -131,7 +131,7 @@ void TileEntityRenderDispatcher::render(std::shared_ptr e, float a, } } -void TileEntityRenderDispatcher::render(std::shared_ptr entity, double x, double y, double z, float a, bool setColor/*=true*/, float alpha, bool useCompiled) +void TileEntityRenderDispatcher::render(shared_ptr entity, double x, double y, double z, float a, bool setColor/*=true*/, float alpha, bool useCompiled) { TileEntityRenderer *renderer = getRenderer(entity); if (renderer != NULL) diff --git a/Minecraft.Client/TileEntityRenderDispatcher.h b/Minecraft.Client/TileEntityRenderDispatcher.h index de006bcf..d86ddb01 100644 --- a/Minecraft.Client/TileEntityRenderDispatcher.h +++ b/Minecraft.Client/TileEntityRenderDispatcher.h @@ -25,7 +25,7 @@ public: Textures *textures; Level *level; - std::shared_ptr cameraEntity; + shared_ptr cameraEntity; float playerRotY; float playerRotX; double xPlayer, yPlayer, zPlayer; @@ -35,11 +35,11 @@ private: public: TileEntityRenderer *getRenderer(eINSTANCEOF e); - bool hasRenderer(std::shared_ptr e); - TileEntityRenderer * getRenderer(std::shared_ptr e); - void prepare(Level *level, Textures *textures, Font *font, std::shared_ptr player, float a); - void render(std::shared_ptr e, float a, bool setColor = true); - void render(std::shared_ptr entity, double x, double y, double z, float a, bool setColor = true, float alpha=1.0f, bool useCompiled = true); // 4J Added useCompiled + bool hasRenderer(shared_ptr e); + TileEntityRenderer * getRenderer(shared_ptr e); + void prepare(Level *level, Textures *textures, Font *font, shared_ptr player, float a); + void render(shared_ptr e, float a, bool setColor = true); + void render(shared_ptr entity, double x, double y, double z, float a, bool setColor = true, float alpha=1.0f, bool useCompiled = true); // 4J Added useCompiled void setLevel(Level *level); double distanceToSqr(double x, double y, double z); Font *getFont(); diff --git a/Minecraft.Client/TileEntityRenderer.h b/Minecraft.Client/TileEntityRenderer.h index 292e1d00..b7d08b86 100644 --- a/Minecraft.Client/TileEntityRenderer.h +++ b/Minecraft.Client/TileEntityRenderer.h @@ -10,7 +10,7 @@ class TileEntityRenderer protected: TileEntityRenderDispatcher *tileEntityRenderDispatcher; public: - virtual void render(std::shared_ptr entity, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) = 0; // 4J added setColor param and alpha and useCompiled + virtual void render(shared_ptr entity, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled) = 0; // 4J added setColor param and alpha and useCompiled virtual void onNewLevel(Level *level) {} protected: void bindTexture(int resourceName); // 4J - changed from wstring to int diff --git a/Minecraft.Client/TileRenderer.cpp b/Minecraft.Client/TileRenderer.cpp index cb9b02f6..3962cc71 100644 --- a/Minecraft.Client/TileRenderer.cpp +++ b/Minecraft.Client/TileRenderer.cpp @@ -244,7 +244,7 @@ void TileRenderer::tesselateInWorldFixedTexture( Tile* tile, int x, int y, int z } void TileRenderer::tesselateInWorldNoCulling( Tile* tile, int x, int y, int z, int forceData, - std::shared_ptr< TileEntity > forceEntity ) // 4J added forceData, forceEntity param + shared_ptr< TileEntity > forceEntity ) // 4J added forceData, forceEntity param { noCulling = true; tesselateInWorld( tile, x, y, z, forceData ); @@ -252,7 +252,7 @@ void TileRenderer::tesselateInWorldNoCulling( Tile* tile, int x, int y, int z, i } bool TileRenderer::tesselateInWorld( Tile* tt, int x, int y, int z, int forceData, - std::shared_ptr< TileEntity > forceEntity ) // 4J added forceData, forceEntity param + shared_ptr< TileEntity > forceEntity ) // 4J added forceData, forceEntity param { Tesselator* t = Tesselator::getInstance(); int shape = tt->getRenderShape(); diff --git a/Minecraft.Client/TileRenderer.h b/Minecraft.Client/TileRenderer.h index ec369939..4045ece2 100644 --- a/Minecraft.Client/TileRenderer.h +++ b/Minecraft.Client/TileRenderer.h @@ -79,9 +79,9 @@ public: void tesselateInWorldFixedTexture( Tile* tile, int x, int y, int z, Icon *fixedTexture ); // 4J renamed to differentiate from tesselateInWorld void tesselateInWorldNoCulling( Tile* tile, int x, int y, int z, int forceData = -1, - std::shared_ptr< TileEntity > forceEntity = std::shared_ptr< TileEntity >() ); // 4J added forceData, forceEntity param - bool tesselateInWorld( Tile* tt, int x, int y, int z, int forceData = -1, std::shared_ptr< TileEntity > forceEntity = - std::shared_ptr< TileEntity >() ); // 4J added forceData, forceEntity param + shared_ptr< TileEntity > forceEntity = shared_ptr< TileEntity >() ); // 4J added forceData, forceEntity param + bool tesselateInWorld( Tile* tt, int x, int y, int z, int forceData = -1, shared_ptr< TileEntity > forceEntity = + shared_ptr< TileEntity >() ); // 4J added forceData, forceEntity param private: bool tesselateAirPortalFrameInWorld(TheEndPortalFrameTile *tt, int x, int y, int z); diff --git a/Minecraft.Client/TntRenderer.cpp b/Minecraft.Client/TntRenderer.cpp index 755abea4..3bb7484f 100644 --- a/Minecraft.Client/TntRenderer.cpp +++ b/Minecraft.Client/TntRenderer.cpp @@ -10,10 +10,10 @@ TntRenderer::TntRenderer() this->shadowRadius = 0.5f; } -void TntRenderer::render(std::shared_ptr _tnt, double x, double y, double z, float rot, float a) +void TntRenderer::render(shared_ptr _tnt, double x, double y, double z, float rot, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr tnt = dynamic_pointer_cast(_tnt); + shared_ptr tnt = dynamic_pointer_cast(_tnt); glPushMatrix(); glTranslatef((float) x, (float) y, (float) z); diff --git a/Minecraft.Client/TntRenderer.h b/Minecraft.Client/TntRenderer.h index 1f70c8da..4d9c029c 100644 --- a/Minecraft.Client/TntRenderer.h +++ b/Minecraft.Client/TntRenderer.h @@ -8,5 +8,5 @@ private: public: TntRenderer(); - virtual void render(std::shared_ptr _tnt, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr _tnt, double x, double y, double z, float rot, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/TrackedEntity.cpp b/Minecraft.Client/TrackedEntity.cpp index c372bdaf..70f25c93 100644 --- a/Minecraft.Client/TrackedEntity.cpp +++ b/Minecraft.Client/TrackedEntity.cpp @@ -20,7 +20,7 @@ #include "PlayerChunkMap.h" #include -TrackedEntity::TrackedEntity(std::shared_ptr e, int range, int updateInterval, bool trackDelta) +TrackedEntity::TrackedEntity(shared_ptr e, int range, int updateInterval, bool trackDelta) { // 4J added initialisers xap = yap = zap = 0; @@ -29,7 +29,7 @@ TrackedEntity::TrackedEntity(std::shared_ptr e, int range, int updateInt updatedPlayerVisibility = false; teleportDelay = 0; moved = false; - + this->e = e; this->range = range; this->updateInterval = updateInterval; @@ -46,7 +46,7 @@ TrackedEntity::TrackedEntity(std::shared_ptr e, int range, int updateInt int c0a = 0, c0b = 0, c1a = 0, c1b = 0, c1c = 0, c2a = 0, c2b = 0; -void TrackedEntity::tick(EntityTracker *tracker, vector > *players) +void TrackedEntity::tick(EntityTracker *tracker, vector > *players) { moved = false; if (!updatedPlayerVisibility || e->distanceToSqr(xpu, ypu, zpu) > 4 * 4) @@ -62,35 +62,35 @@ void TrackedEntity::tick(EntityTracker *tracker, vector if (wasRiding != e->riding) { wasRiding = e->riding; - broadcast(std::shared_ptr(new SetRidingPacket(e, e->riding))); + broadcast(shared_ptr(new SetRidingPacket(e, e->riding))); } // Moving forward special case for item frames - if (e->GetType()== eTYPE_ITEM_FRAME && tickCount % 10 == 0) + if (e->GetType()== eTYPE_ITEM_FRAME && tickCount % 10 == 0) { - std::shared_ptr frame = dynamic_pointer_cast (e); - std::shared_ptr item = frame->getItem(); + shared_ptr frame = dynamic_pointer_cast (e); + shared_ptr item = frame->getItem(); - if (item != NULL && item->getItem()->id == Item::map_Id && !e->removed) + if (item != NULL && item->getItem()->id == Item::map_Id && !e->removed) { - std::shared_ptr data = Item::map->getSavedData(item, e->level); + shared_ptr data = Item::map->getSavedData(item, e->level); for (AUTO_VAR(it,players->begin() ); it != players->end(); ++it) { - std::shared_ptr player = dynamic_pointer_cast(*it); + shared_ptr player = dynamic_pointer_cast(*it); data->tickCarriedBy(player, item); - - if (!player->removed && player->connection && player->connection->countDelayedPackets() <= 5) + + if (!player->removed && player->connection && player->connection->countDelayedPackets() <= 5) { - std::shared_ptr packet = Item::map->getUpdatePacket(item, e->level, player); + shared_ptr packet = Item::map->getUpdatePacket(item, e->level, player); if (packet != NULL) player->connection->send(packet); } } } - std::shared_ptr entityData = e->getEntityData(); - if (entityData->isDirty()) + shared_ptr entityData = e->getEntityData(); + if (entityData->isDirty()) { - broadcastAndSend( std::shared_ptr( new SetEntityDataPacket(e->entityId, entityData, false) ) ); + broadcastAndSend( shared_ptr( new SetEntityDataPacket(e->entityId, entityData, false) ) ); } } else @@ -111,14 +111,14 @@ void TrackedEntity::tick(EntityTracker *tracker, vector int ya = yn - yp; int za = zn - zp; - std::shared_ptr packet = nullptr; + shared_ptr packet = nullptr; // 4J - this pos flag used to be set based on abs(xn) etc. but that just seems wrong bool pos = abs(xa) >= TOLERANCE_LEVEL || abs(ya) >= TOLERANCE_LEVEL || abs(za) >= TOLERANCE_LEVEL; // 4J - changed rotation to be generally sent as a delta as well as position int yRota = yRotn - yRotp; int xRota = xRotn - xRotp; - // Keep rotation deltas in +/- 180 degree range + // Keep rotation deltas in +/- 180 degree range while( yRota > 127 ) yRota -= 256; while( yRota < -128 ) yRota += 256; while( xRota > 127 ) xRota -= 256; @@ -134,7 +134,7 @@ void TrackedEntity::tick(EntityTracker *tracker, vector ) { teleportDelay = 0; - packet = std::shared_ptr( new TeleportEntityPacket(e->entityId, xn, yn, zn, (byte) yRotn, (byte) xRotn) ); + packet = shared_ptr( new TeleportEntityPacket(e->entityId, xn, yn, zn, (byte) yRotn, (byte) xRotn) ); // printf("%d: New teleport rot %d\n",e->entityId,yRotn); yRotp = yRotn; xRotp = xRotn; @@ -161,12 +161,12 @@ void TrackedEntity::tick(EntityTracker *tracker, vector yRotn = yRotp + yRota; } // 5 bits each for x & z, and 6 for y - packet = std::shared_ptr( new MoveEntityPacketSmall::PosRot(e->entityId, (char) xa, (char) ya, (char) za, (char) yRota, 0 ) ); + packet = shared_ptr( new MoveEntityPacketSmall::PosRot(e->entityId, (char) xa, (char) ya, (char) za, (char) yRota, 0 ) ); c0a++; } else { - packet = std::shared_ptr( new MoveEntityPacket::PosRot(e->entityId, (char) xa, (char) ya, (char) za, (char) yRota, (char) xRota) ); + packet = shared_ptr( new MoveEntityPacket::PosRot(e->entityId, (char) xa, (char) ya, (char) za, (char) yRota, (char) xRota) ); // printf("%d: New posrot %d + %d = %d\n",e->entityId,yRotp,yRota,yRotn); c0b++; } @@ -179,7 +179,7 @@ void TrackedEntity::tick(EntityTracker *tracker, vector ( ya >= -16 ) && ( ya <= 15 ) ) { // 4 bits each for x & z, and 5 for y - packet = std::shared_ptr( new MoveEntityPacketSmall::Pos(e->entityId, (char) xa, (char) ya, (char) za) ); + packet = shared_ptr( new MoveEntityPacketSmall::Pos(e->entityId, (char) xa, (char) ya, (char) za) ); c1a++; } @@ -188,12 +188,12 @@ void TrackedEntity::tick(EntityTracker *tracker, vector ( ya >= -32 ) && ( ya <= 31 ) ) { // use the packet with small packet with rotation if we can - 5 bits each for x & z, and 6 for y - still a byte less than the alternative - packet = std::shared_ptr( new MoveEntityPacketSmall::PosRot(e->entityId, (char) xa, (char) ya, (char) za, 0, 0 )); + packet = shared_ptr( new MoveEntityPacketSmall::PosRot(e->entityId, (char) xa, (char) ya, (char) za, 0, 0 )); c1b++; } else { - packet = std::shared_ptr( new MoveEntityPacket::Pos(e->entityId, (char) xa, (char) ya, (char) za) ); + packet = shared_ptr( new MoveEntityPacket::Pos(e->entityId, (char) xa, (char) ya, (char) za) ); c1c++; } } @@ -213,13 +213,13 @@ void TrackedEntity::tick(EntityTracker *tracker, vector yRota = 15; yRotn = yRotp + yRota; } - packet = std::shared_ptr( new MoveEntityPacketSmall::Rot(e->entityId, (char) yRota, 0) ); + packet = shared_ptr( new MoveEntityPacketSmall::Rot(e->entityId, (char) yRota, 0) ); c2a++; } else { // printf("%d: New rot %d + %d = %d\n",e->entityId,yRotp,yRota,yRotn); - packet = std::shared_ptr( new MoveEntityPacket::Rot(e->entityId, (char) yRota, (char) xRota) ); + packet = shared_ptr( new MoveEntityPacket::Rot(e->entityId, (char) yRota, (char) xRota) ); c2b++; } } @@ -240,7 +240,7 @@ void TrackedEntity::tick(EntityTracker *tracker, vector xap = e->xd; yap = e->yd; zap = e->zd; - broadcast( std::shared_ptr( new SetEntityMotionPacket(e->entityId, xap, yap, zap) ) ); + broadcast( shared_ptr( new SetEntityMotionPacket(e->entityId, xap, yap, zap) ) ); } } @@ -250,17 +250,17 @@ void TrackedEntity::tick(EntityTracker *tracker, vector broadcast(packet); } - std::shared_ptr entityData = e->getEntityData(); + shared_ptr entityData = e->getEntityData(); if (entityData->isDirty()) { - broadcastAndSend( std::shared_ptr( new SetEntityDataPacket(e->entityId, entityData, false) ) ); + broadcastAndSend( shared_ptr( new SetEntityDataPacket(e->entityId, entityData, false) ) ); } int yHeadRot = Mth::floor(e->getYHeadRot() * 256 / 360); if (abs(yHeadRot - yHeadRotp) >= TOLERANCE_LEVEL) { - broadcast(std::shared_ptr(new RotateHeadPacket(e->entityId, (byte) yHeadRot))); + broadcast(shared_ptr(new RotateHeadPacket(e->entityId, (byte) yHeadRot))); yHeadRotp = yHeadRot; } @@ -281,13 +281,13 @@ void TrackedEntity::tick(EntityTracker *tracker, vector // printf("%d: %d + %d = %d (%f)\n",e->entityId,xRotp,xRota,xRotn,e->xRot); // } } - + } else // 4J-JEV: Added: Mobs in minecarts weren't synching their invisibility. { - std::shared_ptr entityData = e->getEntityData(); + shared_ptr entityData = e->getEntityData(); if (entityData->isDirty()) - broadcastAndSend( std::shared_ptr( new SetEntityDataPacket(e->entityId, entityData, false) ) ); + broadcastAndSend( shared_ptr( new SetEntityDataPacket(e->entityId, entityData, false) ) ); } e->hasImpulse = false; } @@ -295,20 +295,20 @@ void TrackedEntity::tick(EntityTracker *tracker, vector if (e->hurtMarked) { // broadcast(new AnimatePacket(e, AnimatePacket.HURT)); - broadcastAndSend( std::shared_ptr( new SetEntityMotionPacket(e) ) ); + broadcastAndSend( shared_ptr( new SetEntityMotionPacket(e) ) ); e->hurtMarked = false; } } -void TrackedEntity::broadcast(std::shared_ptr packet) +void TrackedEntity::broadcast(shared_ptr packet) { if( Packet::canSendToAnyClient( packet ) ) { // 4J-PB - due to the knockback on a player being hit, we need to send to all players, but limit the network traffic here to players that have not already had it sent to their system - vector< std::shared_ptr > sentTo; + vector< shared_ptr > sentTo; - // 4J - don't send to a player we've already sent this data to that shares the same machine. + // 4J - don't send to a player we've already sent this data to that shares the same machine. // EntityMotionPacket used to limit themselves to sending once to each machine // by only sending to the primary player on each machine. This was causing trouble for split screen // as only the primary player would get a knockback velocity. Now these packets can be sent to any @@ -316,7 +316,7 @@ void TrackedEntity::broadcast(std::shared_ptr packet) for( AUTO_VAR(it, seenBy.begin()); it != seenBy.end(); it++ ) { - std::shared_ptr player = *it; + shared_ptr player = *it; bool dontSend = false; if( sentTo.size() ) { @@ -327,15 +327,15 @@ void TrackedEntity::broadcast(std::shared_ptr packet) } else { - for(unsigned int j = 0; j < sentTo.size(); j++ ) + for(unsigned int j = 0; j < sentTo.size(); j++ ) { - std::shared_ptr player2 = sentTo[j]; + shared_ptr player2 = sentTo[j]; INetworkPlayer *otherPlayer = player2->connection->getNetworkPlayer(); if( otherPlayer != NULL && thisPlayer->IsSameSystem(otherPlayer) ) { dontSend = true; // #ifdef _DEBUG - // std::shared_ptr emp= dynamic_pointer_cast (packet); + // shared_ptr emp= dynamic_pointer_cast (packet); // if(emp!=NULL) // { // app.DebugPrintf("Not sending this SetEntityMotionPacket to player - it's already been sent to a player on their console\n"); @@ -366,11 +366,11 @@ void TrackedEntity::broadcast(std::shared_ptr packet) } } -void TrackedEntity::broadcastAndSend(std::shared_ptr packet) +void TrackedEntity::broadcastAndSend(shared_ptr packet) { - vector< std::shared_ptr > sentTo; + vector< shared_ptr > sentTo; broadcast(packet); - std::shared_ptr sp = dynamic_pointer_cast(e); + shared_ptr sp = dynamic_pointer_cast(e); if (sp != NULL && sp->connection) { sp->connection->send(packet); @@ -385,7 +385,7 @@ void TrackedEntity::broadcastRemoved() } } -void TrackedEntity::removePlayer(std::shared_ptr sp) +void TrackedEntity::removePlayer(shared_ptr sp) { AUTO_VAR(it, seenBy.find( sp )); if( it != seenBy.end() ) @@ -395,7 +395,7 @@ void TrackedEntity::removePlayer(std::shared_ptr sp) } // 4J-JEV: Added for code reuse. -TrackedEntity::eVisibility TrackedEntity::isVisible(EntityTracker *tracker, std::shared_ptr sp, bool forRider) +TrackedEntity::eVisibility TrackedEntity::isVisible(EntityTracker *tracker, shared_ptr sp, bool forRider) { // 4J Stu - We call update players when the entity has moved more than a certain amount at the start of it's tick // Before this call we set xpu, ypu and zpu to the entities new position, but xp,yp and zp are the old position until later in the tick. @@ -424,7 +424,7 @@ TrackedEntity::eVisibility TrackedEntity::isVisible(EntityTracker *tracker, std: for( unsigned int i = 0; i < server->getPlayers()->players.size(); i++ ) { // Consider extra players, but not if they are the entity we are tracking, or the player we've been passed as input, or in another dimension - std::shared_ptr ep = server->getPlayers()->players[i]; + shared_ptr ep = server->getPlayers()->players[i]; if( ep == sp ) continue; if( ep == e ) continue; if( ep->dimension != sp->dimension ) continue; @@ -461,24 +461,24 @@ TrackedEntity::eVisibility TrackedEntity::isVisible(EntityTracker *tracker, std: else return eVisibility_NotVisible; } -void TrackedEntity::updatePlayer(EntityTracker *tracker, std::shared_ptr sp) +void TrackedEntity::updatePlayer(EntityTracker *tracker, shared_ptr sp) { if (sp == e) return; eVisibility visibility = this->isVisible(tracker, sp); - + if ( visibility == eVisibility_SeenAndVisible && seenBy.find(sp) == seenBy.end() ) { seenBy.insert(sp); - std::shared_ptr packet = getAddEntityPacket(); + shared_ptr packet = getAddEntityPacket(); sp->connection->send(packet); xap = e->xd; yap = e->yd; zap = e->zd; - std::shared_ptr plr = dynamic_pointer_cast(e); + shared_ptr plr = dynamic_pointer_cast(e); if (plr != NULL) { app.DebugPrintf( "TrackedEntity:: Player '%ls' is now visible to player '%ls', %s.\n", @@ -490,17 +490,17 @@ void TrackedEntity::updatePlayer(EntityTracker *tracker, std::shared_ptrgetEntityData()->isEmpty() && !(dynamic_pointer_cast(packet))) { - sp->connection->send(std::shared_ptr( new SetEntityDataPacket(e->entityId, e->getEntityData(), true))); + sp->connection->send(shared_ptr( new SetEntityDataPacket(e->entityId, e->getEntityData(), true))); } if (this->trackDelta) { - sp->connection->send( std::shared_ptr( new SetEntityMotionPacket(e->entityId, e->xd, e->yd, e->zd) ) ); + sp->connection->send( shared_ptr( new SetEntityMotionPacket(e->entityId, e->xd, e->yd, e->zd) ) ); } if (e->riding != NULL) { - sp->connection->send(std::shared_ptr(new SetRidingPacket(e, e->riding))); + sp->connection->send(shared_ptr(new SetRidingPacket(e, e->riding))); } ItemInstanceArray equipped = e->getEquipmentSlots(); @@ -508,28 +508,28 @@ void TrackedEntity::updatePlayer(EntityTracker *tracker, std::shared_ptrconnection->send( std::shared_ptr( new SetEquippedItemPacket(e->entityId, i, equipped[i]) ) ); + sp->connection->send( shared_ptr( new SetEquippedItemPacket(e->entityId, i, equipped[i]) ) ); } } if (dynamic_pointer_cast(e) != NULL) { - std::shared_ptr spe = dynamic_pointer_cast(e); + shared_ptr spe = dynamic_pointer_cast(e); if (spe->isSleeping()) { - sp->connection->send( std::shared_ptr( new EntityActionAtPositionPacket(e, EntityActionAtPositionPacket::START_SLEEP, Mth::floor(e->x), Mth::floor(e->y), Mth::floor(e->z)) ) ); + sp->connection->send( shared_ptr( new EntityActionAtPositionPacket(e, EntityActionAtPositionPacket::START_SLEEP, Mth::floor(e->x), Mth::floor(e->y), Mth::floor(e->z)) ) ); } } if (dynamic_pointer_cast(e) != NULL) { - std::shared_ptr mob = dynamic_pointer_cast(e); + shared_ptr mob = dynamic_pointer_cast(e); vector *activeEffects = mob->getActiveEffects(); for(AUTO_VAR(it, activeEffects->begin()); it != activeEffects->end(); ++it) { MobEffectInstance *effect = *it; - sp->connection->send(std::shared_ptr( new UpdateMobEffectPacket(e->entityId, effect) ) ); + sp->connection->send(shared_ptr( new UpdateMobEffectPacket(e->entityId, effect) ) ); } delete activeEffects; } @@ -546,7 +546,7 @@ void TrackedEntity::updatePlayer(EntityTracker *tracker, std::shared_ptr player) +bool TrackedEntity::canBySeenBy(shared_ptr player) { // 4J - for some reason this isn't currently working, and is causing players to not appear until we are really close to them. Not sure // what the conflict is between the java & our version, but removing for now as it is causing issues and we shouldn't *really* need it @@ -556,7 +556,7 @@ bool TrackedEntity::canBySeenBy(std::shared_ptr player) // return player->getLevel()->getChunkMap()->isPlayerIn(player, e->xChunk, e->zChunk); } -void TrackedEntity::updatePlayers(EntityTracker *tracker, vector > *players) +void TrackedEntity::updatePlayers(EntityTracker *tracker, vector > *players) { for (unsigned int i = 0; i < players->size(); i++) { @@ -564,7 +564,7 @@ void TrackedEntity::updatePlayers(EntityTracker *tracker, vector TrackedEntity::getAddEntityPacket() +shared_ptr TrackedEntity::getAddEntityPacket() { if (e->removed) { @@ -575,20 +575,20 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() if (dynamic_pointer_cast(e) != NULL) { yHeadRotp = Mth::floor(e->getYHeadRot() * 256 / 360); - return std::shared_ptr( new AddMobPacket(dynamic_pointer_cast(e), yRotp, xRotp, xp, yp, zp, yHeadRotp) ); + return shared_ptr( new AddMobPacket(dynamic_pointer_cast(e), yRotp, xRotp, xp, yp, zp, yHeadRotp) ); } switch(e->GetType()) { case eTYPE_ITEMENTITY: { - std::shared_ptr packet = std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::ITEM, 1, yRotp, xRotp, xp, yp, zp) ); + shared_ptr packet = shared_ptr( new AddEntityPacket(e, AddEntityPacket::ITEM, 1, yRotp, xRotp, xp, yp, zp) ); return packet; } break; case eTYPE_SERVERPLAYER: { - std::shared_ptr player = dynamic_pointer_cast(e); + shared_ptr player = dynamic_pointer_cast(e); PlayerUID xuid = INVALID_XUID; PlayerUID OnlineXuid = INVALID_XUID; if( player != NULL ) @@ -597,76 +597,76 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() OnlineXuid = player->getOnlineXuid(); } // 4J Added yHeadRotp param to fix #102563 - TU12: Content: Gameplay: When one of the Players is idle for a few minutes his head turns 180 degrees. - return std::shared_ptr( new AddPlayerPacket(dynamic_pointer_cast(e), xuid, OnlineXuid, xp, yp, zp, yRotp, xRotp, yHeadRotp ) ); + return shared_ptr( new AddPlayerPacket(dynamic_pointer_cast(e), xuid, OnlineXuid, xp, yp, zp, yRotp, xRotp, yHeadRotp ) ); } break; case eTYPE_MINECART: { - std::shared_ptr minecart = dynamic_pointer_cast(e); - if (minecart->type == Minecart::RIDEABLE) return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::MINECART_RIDEABLE, yRotp, xRotp, xp, yp, zp) ); - if (minecart->type == Minecart::CHEST) return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::MINECART_CHEST, yRotp, xRotp, xp, yp, zp) ); - if (minecart->type == Minecart::FURNACE) return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::MINECART_FURNACE, yRotp, xRotp, xp, yp, zp) ); + shared_ptr minecart = dynamic_pointer_cast(e); + if (minecart->type == Minecart::RIDEABLE) return shared_ptr( new AddEntityPacket(e, AddEntityPacket::MINECART_RIDEABLE, yRotp, xRotp, xp, yp, zp) ); + if (minecart->type == Minecart::CHEST) return shared_ptr( new AddEntityPacket(e, AddEntityPacket::MINECART_CHEST, yRotp, xRotp, xp, yp, zp) ); + if (minecart->type == Minecart::FURNACE) return shared_ptr( new AddEntityPacket(e, AddEntityPacket::MINECART_FURNACE, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_BOAT: { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::BOAT, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::BOAT, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_ENDERDRAGON: { yHeadRotp = Mth::floor(e->getYHeadRot() * 256 / 360); - return std::shared_ptr( new AddMobPacket(dynamic_pointer_cast(e), yRotp, xRotp, xp, yp, zp, yHeadRotp ) ); + return shared_ptr( new AddMobPacket(dynamic_pointer_cast(e), yRotp, xRotp, xp, yp, zp, yHeadRotp ) ); } break; case eTYPE_FISHINGHOOK: { - std::shared_ptr owner = dynamic_pointer_cast(e)->owner; - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::FISH_HOOK, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); + shared_ptr owner = dynamic_pointer_cast(e)->owner; + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::FISH_HOOK, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_ARROW: { - std::shared_ptr owner = (dynamic_pointer_cast(e))->owner; - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::ARROW, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); + shared_ptr owner = (dynamic_pointer_cast(e))->owner; + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::ARROW, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_SNOWBALL: { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::SNOWBALL, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::SNOWBALL, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_THROWNPOTION: { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::THROWN_POTION, ((dynamic_pointer_cast(e))->getPotionValue()), yRotp, xRotp, xp, yp, zp)); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::THROWN_POTION, ((dynamic_pointer_cast(e))->getPotionValue()), yRotp, xRotp, xp, yp, zp)); } break; case eTYPE_THROWNEXPBOTTLE: { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::THROWN_EXPBOTTLE, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::THROWN_EXPBOTTLE, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_THROWNENDERPEARL: { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::THROWN_ENDERPEARL, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::THROWN_ENDERPEARL, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_EYEOFENDERSIGNAL: { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::EYEOFENDERSIGNAL, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::EYEOFENDERSIGNAL, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_SMALL_FIREBALL: { - std::shared_ptr fb = dynamic_pointer_cast(e); - std::shared_ptr aep = nullptr; + shared_ptr fb = dynamic_pointer_cast(e); + shared_ptr aep = nullptr; if (fb->owner != NULL) { - aep = std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); + aep = shared_ptr( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); } else { - aep = std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); + aep = shared_ptr( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); } aep->xa = (int) (fb->xPower * 8000); aep->ya = (int) (fb->yPower * 8000); @@ -676,15 +676,15 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() break; case eTYPE_DRAGON_FIREBALL: { - std::shared_ptr fb = dynamic_pointer_cast(e); - std::shared_ptr aep = nullptr; + shared_ptr fb = dynamic_pointer_cast(e); + shared_ptr aep = nullptr; if (fb->owner != NULL) { - aep = std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::DRAGON_FIRE_BALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); + aep = shared_ptr( new AddEntityPacket(e, AddEntityPacket::DRAGON_FIRE_BALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); } else { - aep = std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::DRAGON_FIRE_BALL, 0, yRotp, xRotp, xp, yp, zp) ); + aep = shared_ptr( new AddEntityPacket(e, AddEntityPacket::DRAGON_FIRE_BALL, 0, yRotp, xRotp, xp, yp, zp) ); } aep->xa = (int) (fb->xPower * 8000); aep->ya = (int) (fb->yPower * 8000); @@ -694,15 +694,15 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() break; case eTYPE_FIREBALL: { - std::shared_ptr fb = dynamic_pointer_cast(e); - std::shared_ptr aep = nullptr; + shared_ptr fb = dynamic_pointer_cast(e); + shared_ptr aep = nullptr; if (fb->owner != NULL) { - aep = std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); + aep = shared_ptr( new AddEntityPacket(e, AddEntityPacket::FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); } else { - aep = std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); + aep = shared_ptr( new AddEntityPacket(e, AddEntityPacket::FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); } aep->xa = (int) (fb->xPower * 8000); aep->ya = (int) (fb->yPower * 8000); @@ -712,33 +712,33 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() break; case eTYPE_THROWNEGG: { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::EGG, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::EGG, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_PRIMEDTNT: { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::PRIMED_TNT, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::PRIMED_TNT, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_ENDER_CRYSTAL: { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::ENDER_CRYSTAL, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::ENDER_CRYSTAL, yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_FALLINGTILE: { - std::shared_ptr ft = dynamic_pointer_cast(e); - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::FALLING, ft->tile | (ft->data << 16), yRotp, xRotp, xp, yp, zp) ); + shared_ptr ft = dynamic_pointer_cast(e); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::FALLING, ft->tile | (ft->data << 16), yRotp, xRotp, xp, yp, zp) ); } break; case eTYPE_PAINTING: { - return std::shared_ptr( new AddPaintingPacket(dynamic_pointer_cast(e)) ); + return shared_ptr( new AddPaintingPacket(dynamic_pointer_cast(e)) ); } break; case eTYPE_ITEM_FRAME: { - std::shared_ptr frame = dynamic_pointer_cast(e); + shared_ptr frame = dynamic_pointer_cast(e); { int ix= (int)frame->xTile; @@ -747,7 +747,7 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() app.DebugPrintf("eTYPE_ITEM_FRAME xyz %d,%d,%d\n",ix,iy,iz); } - std::shared_ptr packet = std::shared_ptr(new AddEntityPacket(e, AddEntityPacket::ITEM_FRAME, frame->dir, yRotp, xRotp, xp, yp, zp)); + shared_ptr packet = shared_ptr(new AddEntityPacket(e, AddEntityPacket::ITEM_FRAME, frame->dir, yRotp, xRotp, xp, yp, zp)); packet->x = Mth::floor(frame->xTile * 32.0f); packet->y = Mth::floor(frame->yTile * 32.0f); packet->z = Mth::floor(frame->zTile * 32.0f); @@ -756,18 +756,18 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() break; case eTYPE_EXPERIENCEORB: { - return std::shared_ptr( new AddExperienceOrbPacket(dynamic_pointer_cast(e)) ); + return shared_ptr( new AddExperienceOrbPacket(dynamic_pointer_cast(e)) ); } break; default: assert(false); - break; + break; } /* if (e->GetType() == eTYPE_ITEMENTITY) { - std::shared_ptr itemEntity = dynamic_pointer_cast(e); - std::shared_ptr packet = std::shared_ptr( new AddItemEntityPacket(itemEntity, xp, yp, zp) ); + shared_ptr itemEntity = dynamic_pointer_cast(e); + shared_ptr packet = shared_ptr( new AddItemEntityPacket(itemEntity, xp, yp, zp) ); itemEntity->x = packet->x / 32.0; itemEntity->y = packet->y / 32.0; itemEntity->z = packet->z / 32.0; @@ -776,7 +776,7 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() if (e->GetType() == eTYPE_SERVERPLAYER ) { - std::shared_ptr player = dynamic_pointer_cast(e); + shared_ptr player = dynamic_pointer_cast(e); XUID xuid = INVALID_XUID; XUID OnlineXuid = INVALID_XUID; if( player != NULL ) @@ -784,68 +784,68 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() xuid = player->getXuid(); OnlineXuid = player->getOnlineXuid(); } - return std::shared_ptr( new AddPlayerPacket(dynamic_pointer_cast(e), xuid, OnlineXuid, xp, yp, zp, yRotp, xRotp ) ); + return shared_ptr( new AddPlayerPacket(dynamic_pointer_cast(e), xuid, OnlineXuid, xp, yp, zp, yRotp, xRotp ) ); } if (e->GetType() == eTYPE_MINECART) { - std::shared_ptr minecart = dynamic_pointer_cast(e); - if (minecart->type == Minecart::RIDEABLE) return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::MINECART_RIDEABLE, yRotp, xRotp, xp, yp, zp) ); - if (minecart->type == Minecart::CHEST) return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::MINECART_CHEST, yRotp, xRotp, xp, yp, zp) ); - if (minecart->type == Minecart::FURNACE) return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::MINECART_FURNACE, yRotp, xRotp, xp, yp, zp) ); + shared_ptr minecart = dynamic_pointer_cast(e); + if (minecart->type == Minecart::RIDEABLE) return shared_ptr( new AddEntityPacket(e, AddEntityPacket::MINECART_RIDEABLE, yRotp, xRotp, xp, yp, zp) ); + if (minecart->type == Minecart::CHEST) return shared_ptr( new AddEntityPacket(e, AddEntityPacket::MINECART_CHEST, yRotp, xRotp, xp, yp, zp) ); + if (minecart->type == Minecart::FURNACE) return shared_ptr( new AddEntityPacket(e, AddEntityPacket::MINECART_FURNACE, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_BOAT) { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::BOAT, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::BOAT, yRotp, xRotp, xp, yp, zp) ); } if (dynamic_pointer_cast(e) != NULL) { - return std::shared_ptr( new AddMobPacket(dynamic_pointer_cast(e), yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddMobPacket(dynamic_pointer_cast(e), yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_ENDERDRAGON) { - return std::shared_ptr( new AddMobPacket(dynamic_pointer_cast(e), yRotp, xRotp, xp, yp, zp ) ); + return shared_ptr( new AddMobPacket(dynamic_pointer_cast(e), yRotp, xRotp, xp, yp, zp ) ); } if (e->GetType() == eTYPE_FISHINGHOOK) { - std::shared_ptr owner = dynamic_pointer_cast(e)->owner; - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::FISH_HOOK, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); + shared_ptr owner = dynamic_pointer_cast(e)->owner; + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::FISH_HOOK, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_ARROW) { - std::shared_ptr owner = (dynamic_pointer_cast(e))->owner; - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::ARROW, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); + shared_ptr owner = (dynamic_pointer_cast(e))->owner; + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::ARROW, owner != NULL ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_SNOWBALL) { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::SNOWBALL, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::SNOWBALL, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_THROWNPOTION) { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::THROWN_POTION, ((dynamic_pointer_cast(e))->getPotionValue()), yRotp, xRotp, xp, yp, zp)); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::THROWN_POTION, ((dynamic_pointer_cast(e))->getPotionValue()), yRotp, xRotp, xp, yp, zp)); } if (e->GetType() == eTYPE_THROWNEXPBOTTLE) { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::THROWN_EXPBOTTLE, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::THROWN_EXPBOTTLE, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_THROWNENDERPEARL) { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::THROWN_ENDERPEARL, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::THROWN_ENDERPEARL, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_EYEOFENDERSIGNAL) { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::EYEOFENDERSIGNAL, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::EYEOFENDERSIGNAL, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_SMALL_FIREBALL) { - std::shared_ptr fb = dynamic_pointer_cast(e); - std::shared_ptr aep = NULL; + shared_ptr fb = dynamic_pointer_cast(e); + shared_ptr aep = NULL; if (fb->owner != NULL) { - aep = std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); + aep = shared_ptr( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); } else { - aep = std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); + aep = shared_ptr( new AddEntityPacket(e, AddEntityPacket::SMALL_FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); } aep->xa = (int) (fb->xPower * 8000); aep->ya = (int) (fb->yPower * 8000); @@ -854,15 +854,15 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() } if (e->GetType() == eTYPE_FIREBALL) { - std::shared_ptr fb = dynamic_pointer_cast(e); - std::shared_ptr aep = NULL; + shared_ptr fb = dynamic_pointer_cast(e); + shared_ptr aep = NULL; if (fb->owner != NULL) { - aep = std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); + aep = shared_ptr( new AddEntityPacket(e, AddEntityPacket::FIREBALL, fb->owner->entityId, yRotp, xRotp, xp, yp, zp) ); } else { - aep = std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); + aep = shared_ptr( new AddEntityPacket(e, AddEntityPacket::FIREBALL, 0, yRotp, xRotp, xp, yp, zp) ); } aep->xa = (int) (fb->xPower * 8000); aep->ya = (int) (fb->yPower * 8000); @@ -871,30 +871,30 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() } if (e->GetType() == eTYPE_THROWNEGG) { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::EGG, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::EGG, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_PRIMEDTNT) { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::PRIMED_TNT, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::PRIMED_TNT, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_ENDER_CRYSTAL) { - return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::ENDER_CRYSTAL, yRotp, xRotp, xp, yp, zp) ); + return shared_ptr( new AddEntityPacket(e, AddEntityPacket::ENDER_CRYSTAL, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_FALLINGTILE) { - std::shared_ptr ft = dynamic_pointer_cast(e); - if (ft->tile == Tile::sand_Id) return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::FALLING_SAND, yRotp, xRotp, xp, yp, zp) ); - if (ft->tile == Tile::gravel_Id) return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::FALLING_GRAVEL, yRotp, xRotp, xp, yp, zp) ); - if (ft->tile == Tile::dragonEgg_Id) return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::FALLING_EGG, yRotp, xRotp, xp, yp, zp) ); + shared_ptr ft = dynamic_pointer_cast(e); + if (ft->tile == Tile::sand_Id) return shared_ptr( new AddEntityPacket(e, AddEntityPacket::FALLING_SAND, yRotp, xRotp, xp, yp, zp) ); + if (ft->tile == Tile::gravel_Id) return shared_ptr( new AddEntityPacket(e, AddEntityPacket::FALLING_GRAVEL, yRotp, xRotp, xp, yp, zp) ); + if (ft->tile == Tile::dragonEgg_Id) return shared_ptr( new AddEntityPacket(e, AddEntityPacket::FALLING_EGG, yRotp, xRotp, xp, yp, zp) ); } if (e->GetType() == eTYPE_PAINTING) { - return std::shared_ptr( new AddPaintingPacket(dynamic_pointer_cast(e)) ); + return shared_ptr( new AddPaintingPacket(dynamic_pointer_cast(e)) ); } - if (e->GetType() == eTYPE_ITEM_FRAME) + if (e->GetType() == eTYPE_ITEM_FRAME) { - std::shared_ptr frame = dynamic_pointer_cast(e); + shared_ptr frame = dynamic_pointer_cast(e); { int ix= (int)frame->xTile; @@ -903,7 +903,7 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() app.DebugPrintf("eTYPE_ITEM_FRAME xyz %d,%d,%d\n",ix,iy,iz); } - std::shared_ptr packet = std::shared_ptr(new AddEntityPacket(e, AddEntityPacket::ITEM_FRAME, frame->dir, yRotp, xRotp, xp, yp, zp)); + shared_ptr packet = shared_ptr(new AddEntityPacket(e, AddEntityPacket::ITEM_FRAME, frame->dir, yRotp, xRotp, xp, yp, zp)); packet->x = Mth::floor(frame->xTile * 32.0f); packet->y = Mth::floor(frame->yTile * 32.0f); packet->z = Mth::floor(frame->zTile * 32.0f); @@ -911,14 +911,14 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() } if (e->GetType() == eTYPE_EXPERIENCEORB) { - return std::shared_ptr( new AddExperienceOrbPacket(dynamic_pointer_cast(e)) ); + return shared_ptr( new AddExperienceOrbPacket(dynamic_pointer_cast(e)) ); } assert(false); */ return nullptr; } -void TrackedEntity::clear(std::shared_ptr sp) +void TrackedEntity::clear(shared_ptr sp) { AUTO_VAR(it, seenBy.find(sp)); if (it != seenBy.end()) diff --git a/Minecraft.Client/TrackedEntity.h b/Minecraft.Client/TrackedEntity.h index 1efd169b..9fb564a4 100644 --- a/Minecraft.Client/TrackedEntity.h +++ b/Minecraft.Client/TrackedEntity.h @@ -15,7 +15,7 @@ private: static const int TOLERANCE_LEVEL = 4; public: - std::shared_ptr e; + shared_ptr e; int range, updateInterval; int xp, yp, zp, yRotp, xRotp, yHeadRotp; @@ -27,23 +27,23 @@ private: bool updatedPlayerVisibility; bool trackDelta; int teleportDelay; - std::shared_ptr wasRiding; + shared_ptr wasRiding; public: bool moved; - unordered_set , PlayerKeyHash, PlayerKeyEq > seenBy; + unordered_set , PlayerKeyHash, PlayerKeyEq > seenBy; - TrackedEntity(std::shared_ptr e, int range, int updateInterval, bool trackDelta); + TrackedEntity(shared_ptr e, int range, int updateInterval, bool trackDelta); - void tick(EntityTracker *tracker, vector > *players); - void broadcast(std::shared_ptr packet); - void broadcastAndSend(std::shared_ptr packet); + void tick(EntityTracker *tracker, vector > *players); + void broadcast(shared_ptr packet); + void broadcastAndSend(shared_ptr packet); void broadcastRemoved(); - void removePlayer(std::shared_ptr sp); + void removePlayer(shared_ptr sp); private: - bool canBySeenBy(std::shared_ptr player); + bool canBySeenBy(shared_ptr player); enum eVisibility { @@ -52,14 +52,14 @@ private: eVisibility_SeenAndVisible = 2, }; - eVisibility isVisible(EntityTracker *tracker, std::shared_ptr sp, bool forRider = false); // 4J Added forRider - + eVisibility isVisible(EntityTracker *tracker, shared_ptr sp, bool forRider = false); // 4J Added forRider + public: - void updatePlayer(EntityTracker *tracker, std::shared_ptr sp); - void updatePlayers(EntityTracker *tracker, vector > *players); + void updatePlayer(EntityTracker *tracker, shared_ptr sp); + void updatePlayers(EntityTracker *tracker, vector > *players); private: - void sendEntityData(std::shared_ptr conn); - std::shared_ptr getAddEntityPacket(); + void sendEntityData(shared_ptr conn); + shared_ptr getAddEntityPacket(); public: - void clear(std::shared_ptr sp); + void clear(shared_ptr sp); }; diff --git a/Minecraft.Client/TrapScreen.cpp b/Minecraft.Client/TrapScreen.cpp index 6a199d0e..c7eb1472 100644 --- a/Minecraft.Client/TrapScreen.cpp +++ b/Minecraft.Client/TrapScreen.cpp @@ -6,7 +6,7 @@ #include "..\Minecraft.World\DispenserTileEntity.h" #include "..\Minecraft.World\net.minecraft.world.h" -TrapScreen::TrapScreen(std::shared_ptr inventory, std::shared_ptr trap) : AbstractContainerScreen(new TrapMenu(inventory, trap)) +TrapScreen::TrapScreen(shared_ptr inventory, shared_ptr trap) : AbstractContainerScreen(new TrapMenu(inventory, trap)) { } diff --git a/Minecraft.Client/TrapScreen.h b/Minecraft.Client/TrapScreen.h index a993805d..bda3158f 100644 --- a/Minecraft.Client/TrapScreen.h +++ b/Minecraft.Client/TrapScreen.h @@ -6,7 +6,7 @@ class Inventory; class TrapScreen : public AbstractContainerScreen { public: - TrapScreen(std::shared_ptr inventory, std::shared_ptr trap); + TrapScreen(shared_ptr inventory, shared_ptr trap); protected: virtual void renderLabels(); virtual void renderBg(float a); diff --git a/Minecraft.Client/ViewportCuller.cpp b/Minecraft.Client/ViewportCuller.cpp index a6d3c87e..bc22faa6 100644 --- a/Minecraft.Client/ViewportCuller.cpp +++ b/Minecraft.Client/ViewportCuller.cpp @@ -7,17 +7,17 @@ ViewportCuller::Face::Face(double x, double y, double z, float yRot, float xRot) this->xc = x; this->yc = y; this->zc = z; - + xd = Mth::sin(yRot / 180 * PI) * Mth::cos(xRot / 180 * PI); zd = -Mth::cos(yRot / 180 * PI) * Mth::cos(xRot / 180 * PI); yd = -Mth::sin(xRot / 180 * PI); - - cullOffs = xc*xd+yc*yd+zc*zd; + + cullOffs = xc*xd+yc*yd+zc*zd; } - + bool ViewportCuller::Face::inFront(double x, double y, double z, double r) { - return x*xd+y*yd+z*zd>cullOffs-r; + return x*xd+y*yd+z*zd>cullOffs-r; } bool ViewportCuller::Face::inFront(double x0, double y0, double z0, double x1, double y1, double z1) @@ -30,7 +30,7 @@ bool ViewportCuller::Face::inFront(double x0, double y0, double z0, double x1, d x0*xd+y0*yd+z1*zd>cullOffs || x1*xd+y0*yd+z1*zd>cullOffs || x0*xd+y1*yd+z1*zd>cullOffs || - x1*xd+y1*yd+z1*zd>cullOffs + x1*xd+y1*yd+z1*zd>cullOffs ) return true; return false; } @@ -44,18 +44,18 @@ bool ViewportCuller::Face::fullyInFront(double x0, double y0, double z0, double x0*xd+y0*yd+z1*zd mob, double fogDistance, float a) +ViewportCuller::ViewportCuller(shared_ptr mob, double fogDistance, float a) { float yRot = mob->yRotO+(mob->yRot-mob->yRotO)*a; float xRot = mob->xRotO+(mob->xRot-mob->xRotO)*a; - - double x = mob->xOld+(mob->x-mob->xOld)*a; - double y = mob->yOld+(mob->y-mob->yOld)*a; + + double x = mob->xOld+(mob->x-mob->xOld)*a; + double y = mob->yOld+(mob->y-mob->yOld)*a; double z = mob->zOld+(mob->z-mob->zOld)*a; double xd = Mth::sin(yRot / 180 * PI) * Mth::cos(xRot / 180 * PI); @@ -69,7 +69,7 @@ ViewportCuller::ViewportCuller(std::shared_ptr mob, double fogDistance, flo faces[2] = Face(x, y, z, yRot-xFov, xRot); faces[3] = Face(x, y, z, yRot, xRot+yFov); faces[4] = Face(x, y, z, yRot, xRot-yFov); - faces[5] = Face(x+xd*fogDistance, y+yd*fogDistance, z+zd*fogDistance, yRot+180, -xRot); + faces[5] = Face(x+xd*fogDistance, y+yd*fogDistance, z+zd*fogDistance, yRot+180, -xRot); } bool ViewportCuller::isVisible(AABB bb) @@ -88,12 +88,12 @@ bool ViewportCuller::cubeInFrustum(double x0, double y0, double z0, double x1, d double xd = (x1-x0)/2.0f; double yd = (y1-y0)/2.0f; double zd = (z1-z0)/2.0f; - + double xc = x0+xd; double yc = y0+yd; double zc = z0+zd; double r = _max(xd, yd, zd)*1.5f; - + if (!faces[0].inFront(xc, yc, zc, r)) return false; if (!faces[1].inFront(xc, yc, zc, r)) return false; if (!faces[2].inFront(xc, yc, zc, r)) return false; @@ -123,7 +123,7 @@ bool ViewportCuller::cubeFullyInFrustum(double x0, double y0, double z0, double double xd = (x1-x0)/2.0f; double yd = (y1-y0)/2.0f; double zd = (z1-z0)/2.0f; - + double xc = x0+xd; double yc = y0+yd; double zc = z0+zd; @@ -135,8 +135,8 @@ bool ViewportCuller::cubeFullyInFrustum(double x0, double y0, double z0, double if (!faces[3].inFront(xc, yc, zc, r)) return false; if (!faces[4].inFront(xc, yc, zc, r)) return false; if (!faces[5].inFront(xc, yc, zc, r)) return false; - - + + if (!faces[0].fullyInFront(x0, y0, z0, x1, y1, z1)) return false; if (!faces[1].fullyInFront(x0, y0, z0, x1, y1, z1)) return false; if (!faces[2].fullyInFront(x0, y0, z0, x1, y1, z1)) return false; diff --git a/Minecraft.Client/ViewportCuller.h b/Minecraft.Client/ViewportCuller.h index 31739cb6..2a975de9 100644 --- a/Minecraft.Client/ViewportCuller.h +++ b/Minecraft.Client/ViewportCuller.h @@ -14,17 +14,17 @@ private: double cullOffs; public: Face() {} // 4J - added so we can declare an array of these (unitialised) in the class - Face(double x, double y, double z, float yRot, float xRot); + Face(double x, double y, double z, float yRot, float xRot); bool inFront(double x, double y, double z, double r); bool inFront(double x0, double y0, double z0, double x1, double y1, double z1); - bool fullyInFront(double x0, double y0, double z0, double x1, double y1, double z1); + bool fullyInFront(double x0, double y0, double z0, double x1, double y1, double z1); }; private: Face faces[6]; double xOff, yOff, zOff; public: - ViewportCuller(std::shared_ptr mob, double fogDistance, float a); + ViewportCuller(shared_ptr mob, double fogDistance, float a); virtual bool isVisible(AABB bb); virtual bool cubeInFrustum(double x0, double y0, double z0, double x1, double y1, double z1); virtual bool cubeFullyInFrustum(double x0, double y0, double z0, double x1, double y1, double z1); diff --git a/Minecraft.Client/VillagerGolemModel.cpp b/Minecraft.Client/VillagerGolemModel.cpp index 5e3b4730..aaeabd53 100644 --- a/Minecraft.Client/VillagerGolemModel.cpp +++ b/Minecraft.Client/VillagerGolemModel.cpp @@ -36,7 +36,7 @@ VillagerGolemModel::VillagerGolemModel(float g, float yOffset) leg1->addBox(-3.5f, -3, -3, 6, 16, 5, g); } -void VillagerGolemModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void VillagerGolemModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); @@ -59,9 +59,9 @@ void VillagerGolemModel::setupAnim(float time, float r, float bob, float yRot, f leg1->yRot = 0; } -void VillagerGolemModel::prepareMobModel(std::shared_ptr mob, float time, float r, float a) +void VillagerGolemModel::prepareMobModel(shared_ptr mob, float time, float r, float a) { - std::shared_ptr vg = dynamic_pointer_cast(mob); + shared_ptr vg = dynamic_pointer_cast(mob); int attackTick = vg->getAttackAnimationTick(); if (attackTick > 0) { diff --git a/Minecraft.Client/VillagerGolemModel.h b/Minecraft.Client/VillagerGolemModel.h index 80c822d5..83e73616 100644 --- a/Minecraft.Client/VillagerGolemModel.h +++ b/Minecraft.Client/VillagerGolemModel.h @@ -21,9 +21,9 @@ public: VillagerGolemModel(float g = 0.0f, float yOffset = -7.0f); - void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); - void prepareMobModel(std::shared_ptr mob, float time, float r, float a); + void prepareMobModel(shared_ptr mob, float time, float r, float a); private: float triangleWave(float bob, float period); diff --git a/Minecraft.Client/VillagerGolemRenderer.cpp b/Minecraft.Client/VillagerGolemRenderer.cpp index dd7396e6..f03cea4c 100644 --- a/Minecraft.Client/VillagerGolemRenderer.cpp +++ b/Minecraft.Client/VillagerGolemRenderer.cpp @@ -15,16 +15,16 @@ int VillagerGolemRenderer::prepareArmor(VillagerGolemModel *villagerGolem, int l return -1; } -void VillagerGolemRenderer::render(std::shared_ptr mob, double x, double y, double z, float rot, float a) +void VillagerGolemRenderer::render(shared_ptr mob, double x, double y, double z, float rot, float a) { MobRenderer::render(mob, x, y, z, rot, a); } -void VillagerGolemRenderer::setupRotations(std::shared_ptr _mob, float bob, float bodyRot, float a) +void VillagerGolemRenderer::setupRotations(shared_ptr _mob, float bob, float bodyRot, float a) { - // 4J - original version used generics and thus had an input parameter of type Blaze rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type Blaze rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); MobRenderer::setupRotations(mob, bob, bodyRot, a); if (mob->walkAnimSpeed < 0.01) return; @@ -34,11 +34,11 @@ void VillagerGolemRenderer::setupRotations(std::shared_ptr _mob, float bob, glRotatef(6.5f * triangleWave, 0, 0, 1); } -void VillagerGolemRenderer::additionalRendering(std::shared_ptr _mob, float a) +void VillagerGolemRenderer::additionalRendering(shared_ptr _mob, float a) { - // 4J - original version used generics and thus had an input parameter of type Blaze rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type Blaze rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); MobRenderer::additionalRendering(mob, a); if (mob->getOfferFlowerTick() == 0) return; diff --git a/Minecraft.Client/VillagerGolemRenderer.h b/Minecraft.Client/VillagerGolemRenderer.h index 185e38d4..4bc3fd9c 100644 --- a/Minecraft.Client/VillagerGolemRenderer.h +++ b/Minecraft.Client/VillagerGolemRenderer.h @@ -16,9 +16,9 @@ protected: int prepareArmor(VillagerGolemModel *villagerGolem, int layer, float a); public: - void render(std::shared_ptr mob, double x, double y, double z, float rot, float a); + void render(shared_ptr mob, double x, double y, double z, float rot, float a); protected: - void setupRotations(std::shared_ptr _mob, float bob, float bodyRot, float a); - void additionalRendering(std::shared_ptr mob, float a); + void setupRotations(shared_ptr _mob, float bob, float bodyRot, float a); + void additionalRendering(shared_ptr mob, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/VillagerModel.cpp b/Minecraft.Client/VillagerModel.cpp index 72e6ea3a..8885484d 100644 --- a/Minecraft.Client/VillagerModel.cpp +++ b/Minecraft.Client/VillagerModel.cpp @@ -55,7 +55,7 @@ VillagerModel::VillagerModel(float g, float yOffset) : Model() _init(g,yOffset); } -void VillagerModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void VillagerModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { setupAnim(time, r, bob, yRot, xRot, scale); @@ -70,11 +70,11 @@ void VillagerModel::setupAnim(float time, float r, float bob, float yRot, float { head->yRot = yRot / (float) (180 / PI); head->xRot = xRot / (float) (180 / PI); - + arms->y = 3; arms->z = -1; arms->xRot = -0.75f; - + leg0->xRot = ((float) Mth::cos(time * 0.6662f) * 1.4f) * r * 0.5f; leg1->xRot = ((float) Mth::cos(time * 0.6662f + PI) * 1.4f) * r * 0.5f; leg0->yRot = 0; diff --git a/Minecraft.Client/VillagerModel.h b/Minecraft.Client/VillagerModel.h index 07a301c4..24c8b858 100644 --- a/Minecraft.Client/VillagerModel.h +++ b/Minecraft.Client/VillagerModel.h @@ -2,7 +2,7 @@ #pragma once #include "Model.h" -class VillagerModel : public Model +class VillagerModel : public Model { public: ModelPart *head, *body, *arms, *leg0, *leg1; @@ -10,6 +10,6 @@ public: void _init(float g, float yOffset); // 4J added VillagerModel(float g, float yOffset); VillagerModel(float g); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) ; + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) ; virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); }; diff --git a/Minecraft.Client/VillagerRenderer.cpp b/Minecraft.Client/VillagerRenderer.cpp index bb31caa5..b4c88173 100644 --- a/Minecraft.Client/VillagerRenderer.cpp +++ b/Minecraft.Client/VillagerRenderer.cpp @@ -8,30 +8,30 @@ VillagerRenderer::VillagerRenderer() : MobRenderer(new VillagerModel(0), 0.5f) villagerModel = (VillagerModel *) model; } -int VillagerRenderer::prepareArmor(std::shared_ptr villager, int layer, float a) +int VillagerRenderer::prepareArmor(shared_ptr villager, int layer, float a) { return -1; } -void VillagerRenderer::render(std::shared_ptr mob, double x, double y, double z, float rot, float a) +void VillagerRenderer::render(shared_ptr mob, double x, double y, double z, float rot, float a) { MobRenderer::render(mob, x, y, z, rot, a); } -void VillagerRenderer::renderName(std::shared_ptr mob, double x, double y, double z) +void VillagerRenderer::renderName(shared_ptr mob, double x, double y, double z) { } -void VillagerRenderer::additionalRendering(std::shared_ptr mob, float a) +void VillagerRenderer::additionalRendering(shared_ptr mob, float a) { MobRenderer::additionalRendering(mob, a); } -void VillagerRenderer::scale(std::shared_ptr _mob, float a) +void VillagerRenderer::scale(shared_ptr _mob, float a) { - // 4J - original version used generics and thus had an input parameter of type Blaze rather than std::shared_ptr we have here - + // 4J - original version used generics and thus had an input parameter of type Blaze rather than shared_ptr we have here - // do some casting around instead - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); float s = 15 / 16.0f; if (mob->getAge() < 0) { diff --git a/Minecraft.Client/VillagerRenderer.h b/Minecraft.Client/VillagerRenderer.h index 1263f485..21c2a631 100644 --- a/Minecraft.Client/VillagerRenderer.h +++ b/Minecraft.Client/VillagerRenderer.h @@ -13,13 +13,13 @@ public: VillagerRenderer(); protected: - virtual int prepareArmor(std::shared_ptr villager, int layer, float a); + virtual int prepareArmor(shared_ptr villager, int layer, float a); public: - virtual void render(std::shared_ptr mob, double x, double y, double z, float rot, float a); + virtual void render(shared_ptr mob, double x, double y, double z, float rot, float a); protected: - virtual void renderName(std::shared_ptr mob, double x, double y, double z); - virtual void additionalRendering(std::shared_ptr mob, float a); - virtual void scale(std::shared_ptr player, float a); + virtual void renderName(shared_ptr mob, double x, double y, double z); + virtual void additionalRendering(shared_ptr mob, float a); + virtual void scale(shared_ptr player, float a); }; \ No newline at end of file diff --git a/Minecraft.Client/WolfModel.cpp b/Minecraft.Client/WolfModel.cpp index 18dd96cf..f4835ec3 100644 --- a/Minecraft.Client/WolfModel.cpp +++ b/Minecraft.Client/WolfModel.cpp @@ -57,12 +57,12 @@ WolfModel::WolfModel() tail->compile(1.0f/16.0f); } -void WolfModel::render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) +void WolfModel::render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled) { Model::render(entity, time, r, bob, yRot, xRot, scale, usecompiled); setupAnim(time, r, bob, yRot, xRot, scale); - if (young) + if (young) { float ss = 2; glPushMatrix(); @@ -80,8 +80,8 @@ void WolfModel::render(std::shared_ptr entity, float time, float r, floa tail->renderRollable(scale, usecompiled); upperBody->render(scale, usecompiled); glPopMatrix(); - } - else + } + else { head->renderRollable(scale, usecompiled); body->render(scale, usecompiled); @@ -94,9 +94,9 @@ void WolfModel::render(std::shared_ptr entity, float time, float r, floa } } -void WolfModel::prepareMobModel(std::shared_ptr mob, float time, float r, float a) +void WolfModel::prepareMobModel(shared_ptr mob, float time, float r, float a) { - std::shared_ptr wolf = dynamic_pointer_cast(mob); + shared_ptr wolf = dynamic_pointer_cast(mob); if (wolf->isAngry()) { diff --git a/Minecraft.Client/WolfModel.h b/Minecraft.Client/WolfModel.h index 6fb5fb6f..ab26a9e8 100644 --- a/Minecraft.Client/WolfModel.h +++ b/Minecraft.Client/WolfModel.h @@ -15,7 +15,7 @@ private: static const int legSize = 8; public: WolfModel(); - virtual void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); - void prepareMobModel(std::shared_ptr mob, float time, float r, float a); + virtual void render(shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); + void prepareMobModel(shared_ptr mob, float time, float r, float a); virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0); }; \ No newline at end of file diff --git a/Minecraft.Client/WolfRenderer.cpp b/Minecraft.Client/WolfRenderer.cpp index 96b3ee7e..a21affa2 100644 --- a/Minecraft.Client/WolfRenderer.cpp +++ b/Minecraft.Client/WolfRenderer.cpp @@ -8,19 +8,19 @@ WolfRenderer::WolfRenderer(Model *model, Model *armor, float shadow) : MobRender setArmor(armor); } -float WolfRenderer::getBob(std::shared_ptr _mob, float a) +float WolfRenderer::getBob(shared_ptr _mob, float a) { // 4J - dynamic cast required because we aren't using templates/generics in our version - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); return mob->getTailAngle(); } -int WolfRenderer::prepareArmor(std::shared_ptr mob, int layer, float a) +int WolfRenderer::prepareArmor(shared_ptr mob, int layer, float a) { if (mob->isInvisibleTo(Minecraft::GetInstance()->player)) return -1; // 4J-JEV: Todo, merge with java fix in '1.7.5'. - std::shared_ptr wolf = dynamic_pointer_cast(mob); + shared_ptr wolf = dynamic_pointer_cast(mob); if (layer == 0 && wolf->isWet()) { float brightness = wolf->getBrightness(a) * wolf->getWetShade(a); diff --git a/Minecraft.Client/WolfRenderer.h b/Minecraft.Client/WolfRenderer.h index 218951c9..9cdf8caa 100644 --- a/Minecraft.Client/WolfRenderer.h +++ b/Minecraft.Client/WolfRenderer.h @@ -6,6 +6,6 @@ class WolfRenderer : public MobRenderer public: WolfRenderer(Model *model, Model *armor, float shadow); protected: - virtual float getBob(std::shared_ptr _mob, float a); - virtual int prepareArmor(std::shared_ptr mob, int layer, float a); + virtual float getBob(shared_ptr _mob, float a); + virtual int prepareArmor(shared_ptr mob, int layer, float a); }; diff --git a/Minecraft.Client/Xbox/Audio/SoundEngine.cpp b/Minecraft.Client/Xbox/Audio/SoundEngine.cpp index e7e2dded..b088150c 100644 --- a/Minecraft.Client/Xbox/Audio/SoundEngine.cpp +++ b/Minecraft.Client/Xbox/Audio/SoundEngine.cpp @@ -327,7 +327,7 @@ void SoundEngine::CreateStreamingWavebank(const char *pchName, IXACT3WaveBank ** HANDLE file = CreateFile(pchName, GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING, NULL); if( file == INVALID_HANDLE_VALUE ) - { + { app.FatalLoadError(); assert(false); return; @@ -638,7 +638,7 @@ void SoundEngine::playUI(int iSound, float, float) void SoundEngine::playStreaming(const wstring& name, float x, float y, float z, float vol, float pitch, bool bMusicDelay) { IXACT3SoundBank *pSoundBank=NULL; - + bool bSoundBank2=false; MemSect(34); if(m_MusicInfo.pCue!=NULL) @@ -747,7 +747,7 @@ void SoundEngine::playStreaming(const wstring& name, float x, float y, float z, MemSect(0); return; } - + if(GetIsPlayingStreamingCDMusic()) { @@ -984,7 +984,7 @@ void SoundEngine::update3DPosition(SoundEngine::soundInfo *pInfo, bool bPlaceEmi XACT3DApply( &m_DSPSettings, pInfo->pCue); } -void SoundEngine::tick(std::shared_ptr *players, float a) +void SoundEngine::tick(shared_ptr *players, float a) { if( m_pXACT3Engine == NULL ) return; diff --git a/Minecraft.Client/Xbox/Audio/SoundEngine.h b/Minecraft.Client/Xbox/Audio/SoundEngine.h index 4dc398b5..e2f22869 100644 --- a/Minecraft.Client/Xbox/Audio/SoundEngine.h +++ b/Minecraft.Client/Xbox/Audio/SoundEngine.h @@ -86,7 +86,7 @@ public: virtual void updateSystemMusicPlaying(bool isPlaying); virtual void updateSoundEffectVolume(float fVal); virtual void init(Options *); - virtual void tick(std::shared_ptr *players, float a); // 4J - updated to take array of local players rather than single one + 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); @@ -107,4 +107,4 @@ private: #ifndef __PS3__ static void XACTNotificationCallback( const XACT_NOTIFICATION* pNotification ); #endif // __PS3__ -}; \ No newline at end of file +}; \ No newline at end of file diff --git a/Minecraft.Client/ZombieRenderer.cpp b/Minecraft.Client/ZombieRenderer.cpp index b2125701..5408736d 100644 --- a/Minecraft.Client/ZombieRenderer.cpp +++ b/Minecraft.Client/ZombieRenderer.cpp @@ -34,28 +34,28 @@ void ZombieRenderer::createArmorParts() villagerArmorParts2 = new VillagerZombieModel(0.5f, 0, true); } -int ZombieRenderer::prepareArmor(std::shared_ptr _mob, int layer, float a) +int ZombieRenderer::prepareArmor(shared_ptr _mob, int layer, float a) { - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); swapArmor(mob); return HumanoidMobRenderer::prepareArmor(_mob, layer, a); } -void ZombieRenderer::render(std::shared_ptr _mob, double x, double y, double z, float rot, float a) +void ZombieRenderer::render(shared_ptr _mob, double x, double y, double z, float rot, float a) { - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); swapArmor(mob); HumanoidMobRenderer::render(_mob, x, y, z, rot, a); } -void ZombieRenderer::additionalRendering(std::shared_ptr _mob, float a) +void ZombieRenderer::additionalRendering(shared_ptr _mob, float a) { - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); swapArmor(mob); HumanoidMobRenderer::additionalRendering(_mob, a); } -void ZombieRenderer::swapArmor(std::shared_ptr mob) +void ZombieRenderer::swapArmor(shared_ptr mob) { if (mob->isVillager()) { @@ -80,9 +80,9 @@ void ZombieRenderer::swapArmor(std::shared_ptr mob) humanoidModel = (HumanoidModel *) model; } -void ZombieRenderer::setupRotations(std::shared_ptr _mob, float bob, float bodyRot, float a) +void ZombieRenderer::setupRotations(shared_ptr _mob, float bob, float bodyRot, float a) { - std::shared_ptr mob = dynamic_pointer_cast(_mob); + shared_ptr mob = dynamic_pointer_cast(_mob); if (mob->isConverting()) { bodyRot += (float) (cos(mob->tickCount * 3.25) * PI * .25f); diff --git a/Minecraft.Client/ZombieRenderer.h b/Minecraft.Client/ZombieRenderer.h index b727659a..e070cc7b 100644 --- a/Minecraft.Client/ZombieRenderer.h +++ b/Minecraft.Client/ZombieRenderer.h @@ -25,17 +25,17 @@ public: protected: void createArmorParts(); - int prepareArmor(std::shared_ptr _mob, int layer, float a); + int prepareArmor(shared_ptr _mob, int layer, float a); public: - void render(std::shared_ptr _mob, double x, double y, double z, float rot, float a); + void render(shared_ptr _mob, double x, double y, double z, float rot, float a); protected: - void additionalRendering(std::shared_ptr _mob, float a); + void additionalRendering(shared_ptr _mob, float a); private: - void swapArmor(std::shared_ptr mob); + void swapArmor(shared_ptr mob); protected: - void setupRotations(std::shared_ptr _mob, float bob, float bodyRot, float a); + void setupRotations(shared_ptr _mob, float bob, float bodyRot, float a); }; \ No newline at end of file -- cgit v1.2.3