From 347265c3622800075478edcd7be0aa21a66d0013 Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Fri, 10 Apr 2026 00:22:58 -0500 Subject: [PATCH] chore: format repo, add format script --- scripts/find_dead_app_includes.py | 182 ------------ scripts/format.py | 183 ++++++++++++ scripts/sweep_linuxgame_includes.py | 108 ------- scripts/sweep_winapi_stubs_includes.py | 126 -------- targets/app/common/App_structs.h | 4 +- targets/app/common/Audio/SoundEngine.cpp | 5 +- targets/app/common/Audio/SoundEngine.h | 2 +- targets/app/common/DLC/DLCGameRulesHeader.cpp | 2 +- targets/app/common/DLC/DLCManager.cpp | 4 +- targets/app/common/Game.cpp | 94 +++--- targets/app/common/Game.h | 6 +- .../app/common/GameRules/GameRuleManager.cpp | 4 +- .../ApplySchematicRuleDefinition.cpp | 2 +- .../ApplySchematicRuleDefinition.h | 2 +- .../ConsoleGenerateStructure.cpp | 2 +- .../LevelGenerationOptions.cpp | 4 +- .../XboxStructureActionGenerateBox.cpp | 2 +- .../XboxStructureActionPlaceBlock.cpp | 2 +- .../XboxStructureActionPlaceContainer.cpp | 2 +- .../CompleteAllRuleDefinition.cpp | 2 +- .../RuleDefinitions/GameRuleDefinition.cpp | 2 +- .../UpdatePlayerRuleDefinition.cpp | 2 +- targets/app/common/GameSettingsManager.cpp | 1 - targets/app/common/Game_XuiActions.cpp | 25 +- targets/app/common/Iggy/gdraw/gdraw.c | 2 +- targets/app/common/Iggy/gdraw/gdraw.h | 2 +- targets/app/common/Iggy/iggy_stubs.h | 3 +- targets/app/common/Iggy/include/iggy.h | 13 +- targets/app/common/LocalizationManager.cpp | 2 +- targets/app/common/MenuController.cpp | 3 +- .../app/common/Network/GameNetworkManager.cpp | 23 +- .../app/common/Network/GameNetworkManager.h | 5 +- targets/app/common/NetworkController.cpp | 1 - targets/app/common/NetworkController.h | 2 +- targets/app/common/SaveManager.cpp | 1 - .../Constraints/ChangeStateConstraint.cpp | 4 +- .../Constraints/ChangeStateConstraint.h | 2 +- targets/app/common/Tutorial/FullTutorial.cpp | 2 +- .../app/common/Tutorial/Hints/AreaHint.cpp | 2 +- targets/app/common/Tutorial/Hints/AreaHint.h | 2 +- .../common/Tutorial/Hints/DiggerItemHint.cpp | 2 +- .../common/Tutorial/Hints/LookAtEntityHint.h | 4 +- .../common/Tutorial/Hints/LookAtTileHint.cpp | 2 +- .../common/Tutorial/Hints/LookAtTileHint.h | 2 +- .../common/Tutorial/Hints/TakeItemHint.cpp | 2 +- .../app/common/Tutorial/Hints/TakeItemHint.h | 2 +- .../common/Tutorial/Hints/TutorialHint.cpp | 2 +- .../app/common/Tutorial/Hints/TutorialHint.h | 2 +- .../app/common/Tutorial/Tasks/ChoiceTask.cpp | 2 +- .../common/Tutorial/Tasks/ControllerTask.cpp | 2 +- .../common/Tutorial/Tasks/HorseChoiceTask.cpp | 4 +- .../common/Tutorial/Tasks/RideEntityTask.cpp | 2 +- targets/app/common/Tutorial/Tutorial.cpp | 6 +- .../IUIScene_AbstractContainerMenu.cpp | 8 +- .../IUIScene_AbstractContainerMenu.h | 2 +- .../UI/All Platforms/IUIScene_AnvilMenu.cpp | 2 +- .../UI/All Platforms/IUIScene_BeaconMenu.cpp | 4 +- .../All Platforms/IUIScene_CraftingMenu.cpp | 4 +- .../UI/All Platforms/IUIScene_CraftingMenu.h | 2 +- .../All Platforms/IUIScene_CreativeMenu.cpp | 4 +- .../common/UI/All Platforms/IUIScene_HUD.cpp | 13 +- .../UI/All Platforms/IUIScene_PauseMenu.cpp | 4 +- .../UI/All Platforms/IUIScene_TradingMenu.cpp | 4 +- .../UI/All Platforms/IUIScene_TradingMenu.h | 2 +- .../app/common/UI/All Platforms/UIStructs.h | 2 +- .../common/UI/Components/UIComponent_Chat.cpp | 2 +- .../common/UI/Components/UIComponent_Chat.h | 2 +- .../UIComponent_DebugUIMarketingGuide.cpp | 2 +- .../UIComponent_DebugUIMarketingGuide.h | 2 +- .../Components/UIComponent_MenuBackground.cpp | 2 +- .../Components/UIComponent_MenuBackground.h | 2 +- .../UI/Components/UIComponent_Panorama.cpp | 2 +- .../UI/Components/UIComponent_Panorama.h | 2 +- .../UIComponent_PressStartToPlay.cpp | 4 +- .../Components/UIComponent_PressStartToPlay.h | 2 +- .../UI/Components/UIComponent_Tooltips.cpp | 4 +- .../UI/Components/UIComponent_Tooltips.h | 2 +- .../Components/UIComponent_TutorialPopup.cpp | 6 +- .../UI/Components/UIComponent_TutorialPopup.h | 2 +- .../app/common/UI/Components/UIScene_HUD.cpp | 4 +- .../app/common/UI/Components/UIScene_HUD.h | 2 +- targets/app/common/UI/ConsoleUIController.cpp | 9 +- targets/app/common/UI/ConsoleUIController.h | 4 +- targets/app/common/UI/Controls/UIControl.cpp | 4 +- .../app/common/UI/Controls/UIControl_Base.cpp | 2 +- .../app/common/UI/Controls/UIControl_Base.h | 2 +- .../Controls/UIControl_BeaconEffectButton.cpp | 2 +- .../Controls/UIControl_BeaconEffectButton.h | 2 +- .../UI/Controls/UIControl_BitmapIcon.cpp | 2 +- .../common/UI/Controls/UIControl_BitmapIcon.h | 2 +- .../common/UI/Controls/UIControl_Button.cpp | 2 +- .../app/common/UI/Controls/UIControl_Button.h | 2 +- .../UI/Controls/UIControl_ButtonList.cpp | 2 +- .../common/UI/Controls/UIControl_ButtonList.h | 2 +- .../common/UI/Controls/UIControl_CheckBox.cpp | 2 +- .../common/UI/Controls/UIControl_CheckBox.h | 2 +- .../common/UI/Controls/UIControl_Cursor.cpp | 2 +- .../app/common/UI/Controls/UIControl_Cursor.h | 2 +- .../common/UI/Controls/UIControl_DLCList.cpp | 2 +- .../common/UI/Controls/UIControl_DLCList.h | 2 +- .../UI/Controls/UIControl_DynamicLabel.cpp | 2 +- .../UI/Controls/UIControl_DynamicLabel.h | 2 +- .../UI/Controls/UIControl_EnchantmentBook.cpp | 2 +- .../UI/Controls/UIControl_EnchantmentBook.h | 2 +- .../Controls/UIControl_EnchantmentButton.cpp | 2 +- .../UI/Controls/UIControl_EnchantmentButton.h | 2 +- .../UI/Controls/UIControl_HTMLLabel.cpp | 2 +- .../common/UI/Controls/UIControl_HTMLLabel.h | 2 +- .../common/UI/Controls/UIControl_Label.cpp | 2 +- .../app/common/UI/Controls/UIControl_Label.h | 2 +- .../UI/Controls/UIControl_LeaderboardList.cpp | 2 +- .../UI/Controls/UIControl_LeaderboardList.h | 2 +- .../UI/Controls/UIControl_MinecraftHorse.cpp | 2 +- .../UI/Controls/UIControl_MinecraftHorse.h | 2 +- .../UI/Controls/UIControl_MinecraftPlayer.cpp | 2 +- .../UI/Controls/UIControl_MinecraftPlayer.h | 2 +- .../UI/Controls/UIControl_PlayerList.cpp | 2 +- .../common/UI/Controls/UIControl_PlayerList.h | 2 +- .../Controls/UIControl_PlayerSkinPreview.cpp | 2 +- .../UI/Controls/UIControl_PlayerSkinPreview.h | 2 +- .../common/UI/Controls/UIControl_Progress.cpp | 2 +- .../common/UI/Controls/UIControl_Progress.h | 2 +- .../common/UI/Controls/UIControl_SaveList.cpp | 2 +- .../common/UI/Controls/UIControl_SaveList.h | 2 +- .../common/UI/Controls/UIControl_Slider.cpp | 4 +- .../app/common/UI/Controls/UIControl_Slider.h | 2 +- .../common/UI/Controls/UIControl_SlotList.cpp | 2 +- .../common/UI/Controls/UIControl_SlotList.h | 2 +- .../Controls/UIControl_SpaceIndicatorBar.cpp | 2 +- .../UI/Controls/UIControl_SpaceIndicatorBar.h | 2 +- .../UI/Controls/UIControl_TextInput.cpp | 2 +- .../common/UI/Controls/UIControl_TextInput.h | 2 +- .../UI/Controls/UIControl_TexturePackList.cpp | 2 +- .../UI/Controls/UIControl_TexturePackList.h | 2 +- .../common/UI/Controls/UIControl_Touch.cpp | 2 +- .../app/common/UI/Controls/UIControl_Touch.h | 2 +- .../Debug/UIScene_DebugCreateSchematic.cpp | 6 +- .../Debug/UIScene_DebugCreateSchematic.h | 2 +- .../UI/Scenes/Debug/UIScene_DebugOptions.cpp | 2 +- .../UI/Scenes/Debug/UIScene_DebugOverlay.cpp | 4 +- .../UI/Scenes/Debug/UIScene_DebugOverlay.h | 2 +- .../Scenes/Debug/UIScene_DebugSetCamera.cpp | 6 +- .../UI/Scenes/Debug/UIScene_DebugSetCamera.h | 2 +- .../IUIScene_StartGame.cpp | 4 +- .../IUIScene_StartGame.h | 2 +- .../UIScene_CreateWorldMenu.cpp | 8 +- .../UIScene_CreateWorldMenu.h | 2 +- .../UIScene_DLCMainMenu.cpp | 4 +- .../UIScene_DLCMainMenu.h | 2 +- .../UIScene_DLCOffersMenu.cpp | 4 +- .../UIScene_DLCOffersMenu.h | 2 +- .../Frontend Menu screens/UIScene_EULA.cpp | 6 +- .../Frontend Menu screens/UIScene_EULA.h | 2 +- .../Frontend Menu screens/UIScene_Intro.cpp | 4 +- .../Frontend Menu screens/UIScene_Intro.h | 2 +- .../UIScene_JoinMenu.cpp | 8 +- .../Frontend Menu screens/UIScene_JoinMenu.h | 2 +- .../UIScene_LaunchMoreOptionsMenu.cpp | 6 +- .../UIScene_LaunchMoreOptionsMenu.h | 2 +- .../UIScene_LeaderboardsMenu.cpp | 22 +- .../UIScene_LeaderboardsMenu.h | 4 +- .../UIScene_LoadMenu.cpp | 8 +- .../Frontend Menu screens/UIScene_LoadMenu.h | 2 +- .../UIScene_LoadOrJoinMenu.cpp | 10 +- .../UIScene_LoadOrJoinMenu.h | 2 +- .../UIScene_MainMenu.cpp | 10 +- .../Frontend Menu screens/UIScene_MainMenu.h | 2 +- .../UIScene_NewUpdateMessage.cpp | 6 +- .../UIScene_NewUpdateMessage.h | 2 +- .../UIScene_SaveMessage.cpp | 6 +- .../UIScene_SaveMessage.h | 2 +- .../UIScene_TrialExitUpsell.cpp | 4 +- .../Help & Options/UIScene_ControlsMenu.cpp | 14 +- .../Help & Options/UIScene_ControlsMenu.h | 2 +- .../Scenes/Help & Options/UIScene_Credits.cpp | 4 +- .../Scenes/Help & Options/UIScene_Credits.h | 2 +- .../UIScene_HelpAndOptionsMenu.cpp | 6 +- .../UIScene_HelpAndOptionsMenu.h | 2 +- .../Help & Options/UIScene_HowToPlay.cpp | 6 +- .../Scenes/Help & Options/UIScene_HowToPlay.h | 2 +- .../Help & Options/UIScene_HowToPlayMenu.cpp | 10 +- .../Help & Options/UIScene_HowToPlayMenu.h | 2 +- .../UIScene_LanguageSelector.cpp | 6 +- .../Help & Options/UIScene_LanguageSelector.h | 4 +- .../Help & Options/UIScene_ReinstallMenu.cpp | 4 +- .../Help & Options/UIScene_ReinstallMenu.h | 2 +- .../UIScene_SettingsAudioMenu.cpp | 4 +- .../UIScene_SettingsAudioMenu.h | 2 +- .../UIScene_SettingsControlMenu.cpp | 4 +- .../UIScene_SettingsControlMenu.h | 2 +- .../UIScene_SettingsGraphicsMenu.cpp | 4 +- .../UIScene_SettingsGraphicsMenu.h | 2 +- .../Help & Options/UIScene_SettingsMenu.cpp | 6 +- .../Help & Options/UIScene_SettingsMenu.h | 2 +- .../UIScene_SettingsOptionsMenu.cpp | 6 +- .../UIScene_SettingsOptionsMenu.h | 2 +- .../Help & Options/UIScene_SettingsUIMenu.cpp | 4 +- .../Help & Options/UIScene_SettingsUIMenu.h | 2 +- .../Help & Options/UIScene_SkinSelectMenu.cpp | 6 +- .../Help & Options/UIScene_SkinSelectMenu.h | 2 +- .../UIScene_AbstractContainerMenu.cpp | 4 +- .../UIScene_AbstractContainerMenu.h | 2 +- .../Containers/UIScene_AnvilMenu.cpp | 6 +- .../Containers/UIScene_AnvilMenu.h | 2 +- .../Containers/UIScene_BeaconMenu.cpp | 6 +- .../Containers/UIScene_BeaconMenu.h | 2 +- .../Containers/UIScene_BrewingStandMenu.cpp | 6 +- .../Containers/UIScene_ContainerMenu.cpp | 4 +- .../Containers/UIScene_CreativeMenu.cpp | 8 +- .../Containers/UIScene_CreativeMenu.h | 2 +- .../Containers/UIScene_DispenserMenu.cpp | 4 +- .../Containers/UIScene_EnchantingMenu.cpp | 8 +- .../Containers/UIScene_EnchantingMenu.h | 2 +- .../Containers/UIScene_FireworksMenu.cpp | 4 +- .../Containers/UIScene_FireworksMenu.h | 2 +- .../Containers/UIScene_FurnaceMenu.cpp | 6 +- .../Containers/UIScene_HopperMenu.cpp | 4 +- .../Containers/UIScene_HorseInventoryMenu.cpp | 6 +- .../Containers/UIScene_HorseInventoryMenu.h | 2 +- .../Containers/UIScene_InventoryMenu.cpp | 6 +- .../Containers/UIScene_InventoryMenu.h | 2 +- .../Containers/UIScene_TradingMenu.cpp | 8 +- .../Containers/UIScene_TradingMenu.h | 2 +- .../UIScene_CraftingMenu.cpp | 8 +- .../UIScene_CraftingMenu.h | 2 +- .../UIScene_DeathMenu.cpp | 4 +- .../In-Game Menu Screens/UIScene_DeathMenu.h | 2 +- .../In-Game Menu Screens/UIScene_EndPoem.cpp | 4 +- .../In-Game Menu Screens/UIScene_EndPoem.h | 2 +- .../UIScene_InGameHostOptionsMenu.cpp | 6 +- .../UIScene_InGameHostOptionsMenu.h | 2 +- .../UIScene_InGameInfoMenu.cpp | 8 +- .../UIScene_InGameInfoMenu.h | 2 +- .../UIScene_InGamePlayerOptionsMenu.cpp | 6 +- .../UIScene_InGamePlayerOptionsMenu.h | 2 +- .../UIScene_PauseMenu.cpp | 6 +- .../In-Game Menu Screens/UIScene_PauseMenu.h | 2 +- .../UIScene_SignEntryMenu.cpp | 6 +- .../UIScene_SignEntryMenu.h | 2 +- .../UIScene_TeleportMenu.cpp | 8 +- .../UIScene_TeleportMenu.h | 2 +- .../UI/Scenes/UIScene_ConnectingProgress.cpp | 4 +- .../UI/Scenes/UIScene_ConnectingProgress.h | 2 +- .../UI/Scenes/UIScene_FullscreenProgress.cpp | 6 +- .../UI/Scenes/UIScene_FullscreenProgress.h | 2 +- .../app/common/UI/Scenes/UIScene_Keyboard.cpp | 4 +- .../app/common/UI/Scenes/UIScene_Keyboard.h | 2 +- .../common/UI/Scenes/UIScene_MessageBox.cpp | 4 +- .../app/common/UI/Scenes/UIScene_MessageBox.h | 2 +- .../UI/Scenes/UIScene_QuadrantSignin.cpp | 12 +- .../common/UI/Scenes/UIScene_QuadrantSignin.h | 2 +- targets/app/common/UI/UIBitmapFont.cpp | 2 +- targets/app/common/UI/UIController.cpp | 5 +- targets/app/common/UI/UIController.h | 7 +- targets/app/common/UI/UIGroup.cpp | 6 +- targets/app/common/UI/UIGroup.h | 2 +- targets/app/common/UI/UILayer.cpp | 6 +- targets/app/common/UI/UILayer.h | 2 +- targets/app/common/UI/UIScene.cpp | 6 +- targets/app/common/UI/UIScene.h | 8 +- targets/app/common/UI/UITTFFont.cpp | 2 +- targets/app/linux/main.cpp | 268 +++++++++--------- .../java/InputOutputStream/GZIPInputStream.h | 2 +- .../java/InputOutputStream/GZIPOutputStream.h | 2 +- targets/java/src/File.cpp | 13 +- targets/minecraft/BuildVer.h | 2 +- targets/minecraft/client/BufferedImage.h | 2 +- targets/minecraft/client/Minecraft.cpp | 24 +- targets/minecraft/client/Minecraft.h | 4 +- targets/minecraft/client/gui/Screen.cpp | 2 +- .../client/gui/achievement/StatsScreen.cpp | 3 +- targets/minecraft/client/model/BookModel.h | 2 +- targets/minecraft/client/model/OcelotModel.h | 2 +- .../client/multiplayer/ClientConnection.cpp | 49 ++-- .../multiplayer/MultiPlayerChunkCache.cpp | 4 +- .../multiplayer/MultiPlayerGameMode.cpp | 3 +- .../multiplayer/MultiPlayerLocalPlayer.cpp | 17 +- .../client/particle/FireworksParticles.cpp | 2 +- .../client/particle/ParticleEngine.cpp | 4 +- .../minecraft/client/player/LocalPlayer.cpp | 18 +- .../client/renderer/GameRenderer.cpp | 30 +- .../client/renderer/ItemInHandRenderer.cpp | 4 +- .../client/renderer/LevelRenderer.cpp | 16 +- .../minecraft/client/renderer/LevelRenderer.h | 2 +- .../minecraft/client/renderer/Textures.cpp | 8 +- .../client/renderer/entity/EntityRenderer.cpp | 6 +- .../renderer/entity/LivingEntityRenderer.cpp | 9 +- .../client/renderer/entity/MobRenderer.cpp | 2 +- .../client/renderer/entity/PlayerRenderer.cpp | 2 +- .../client/renderer/entity/ZombieRenderer.cpp | 2 +- .../renderer/tileentity/SkullTileRenderer.cpp | 4 +- .../minecraft/client/skins/DLCTexturePack.cpp | 4 +- .../core/DefaultDispenseItemBehavior.h | 4 +- .../minecraft/core/ItemDispenseBehaviors.cpp | 2 +- targets/minecraft/locale/StringTable.cpp | 3 +- targets/minecraft/network/Connection.cpp | 2 +- targets/minecraft/network/Connection.h | 2 +- targets/minecraft/network/Socket.cpp | 2 +- targets/minecraft/network/Socket.h | 2 +- .../network/packet/AddGlobalEntityPacket.cpp | 2 +- targets/minecraft/network/packet/Packet.cpp | 8 +- .../network/packet/PlayerInfoPacket.cpp | 5 +- targets/minecraft/server/MinecraftServer.cpp | 14 +- targets/minecraft/server/PlayerList.cpp | 4 +- .../minecraft/server/level/EntityTracker.cpp | 54 ++-- .../minecraft/server/level/PlayerChunkMap.cpp | 2 +- .../server/level/ServerChunkCache.cpp | 4 +- .../minecraft/server/level/ServerLevel.cpp | 58 ++-- .../minecraft/server/level/ServerPlayer.cpp | 19 +- .../minecraft/server/level/TrackedEntity.cpp | 75 +++-- .../server/network/PendingConnection.cpp | 4 +- .../server/network/PlayerConnection.cpp | 10 +- targets/minecraft/stats/NumberFormatters.h | 2 +- targets/minecraft/stats/StatsCounter.cpp | 2 +- .../world/damageSource/CombatEntry.cpp | 4 +- .../world/damageSource/CombatTracker.cpp | 21 +- .../world/damageSource/EntityDamageSource.cpp | 11 +- .../IndirectEntityDamageSource.cpp | 4 +- targets/minecraft/world/effect/MobEffect.cpp | 4 +- targets/minecraft/world/entity/Entity.cpp | 13 +- targets/minecraft/world/entity/Entity.h | 4 +- .../minecraft/world/entity/EntitySelector.cpp | 6 +- .../minecraft/world/entity/ExperienceOrb.cpp | 2 +- .../minecraft/world/entity/HangingEntity.cpp | 15 +- targets/minecraft/world/entity/ItemFrame.cpp | 2 +- .../minecraft/world/entity/LivingEntity.cpp | 39 ++- targets/minecraft/world/entity/Mob.cpp | 22 +- targets/minecraft/world/entity/Painting.cpp | 2 +- targets/minecraft/world/entity/Painting.h | 2 +- .../minecraft/world/entity/PathfinderMob.cpp | 3 +- .../world/entity/ai/control/LookControl.cpp | 2 +- .../entity/ai/goal/ControlledByPlayerGoal.cpp | 4 +- .../world/entity/ai/goal/MeleeAttackGoal.cpp | 2 +- .../entity/ai/goal/RunAroundLikeCrazyGoal.cpp | 2 +- .../target/NearestAttackableTargetGoal.cpp | 2 +- .../entity/ai/goal/target/TargetGoal.cpp | 2 +- .../minecraft/world/entity/ambient/Bat.cpp | 2 +- .../minecraft/world/entity/animal/Animal.cpp | 22 +- .../minecraft/world/entity/animal/Chicken.cpp | 2 +- targets/minecraft/world/entity/animal/Cow.cpp | 2 +- .../world/entity/animal/EntityHorse.cpp | 11 +- .../minecraft/world/entity/animal/Ocelot.cpp | 2 +- targets/minecraft/world/entity/animal/Pig.cpp | 6 +- .../minecraft/world/entity/animal/Sheep.cpp | 2 +- .../minecraft/world/entity/animal/SnowMan.cpp | 2 +- .../world/entity/animal/VillagerGolem.cpp | 6 +- .../minecraft/world/entity/animal/Wolf.cpp | 18 +- .../entity/boss/enderdragon/EnderCrystal.cpp | 4 +- .../entity/boss/enderdragon/EnderDragon.cpp | 21 +- .../world/entity/boss/wither/WitherBoss.cpp | 30 +- .../world/entity/global/GlobalEntity.h | 2 +- .../world/entity/global/LightningBolt.cpp | 2 +- targets/minecraft/world/entity/item/Boat.cpp | 21 +- .../world/entity/item/ItemEntity.cpp | 2 +- .../minecraft/world/entity/item/Minecart.cpp | 30 +- .../world/entity/item/MinecartRideable.cpp | 4 +- .../world/entity/item/MinecartTNT.cpp | 2 +- .../minecraft/world/entity/monster/Blaze.cpp | 2 +- .../world/entity/monster/CaveSpider.cpp | 2 +- .../world/entity/monster/Creeper.cpp | 13 +- .../world/entity/monster/EnderMan.cpp | 12 +- .../minecraft/world/entity/monster/Enemy.cpp | 2 +- .../minecraft/world/entity/monster/Ghast.cpp | 6 +- .../world/entity/monster/LavaSlime.cpp | 2 +- .../world/entity/monster/Monster.cpp | 4 +- .../world/entity/monster/PigZombie.cpp | 6 +- .../world/entity/monster/Silverfish.cpp | 2 +- .../world/entity/monster/Skeleton.cpp | 15 +- .../minecraft/world/entity/monster/Slime.cpp | 2 +- .../minecraft/world/entity/monster/Spider.cpp | 2 +- .../minecraft/world/entity/monster/Witch.cpp | 2 +- .../minecraft/world/entity/monster/Zombie.cpp | 8 +- .../minecraft/world/entity/npc/Villager.cpp | 8 +- .../minecraft/world/entity/player/Player.cpp | 45 ++- .../world/entity/projectile/Arrow.cpp | 29 +- .../world/entity/projectile/Fireball.cpp | 2 +- .../projectile/FireworksRocketEntity.cpp | 2 +- .../world/entity/projectile/FishingHook.cpp | 2 +- .../world/entity/projectile/Snowball.cpp | 2 +- .../world/entity/projectile/Throwable.cpp | 4 +- .../entity/projectile/ThrownEnderpearl.cpp | 4 +- .../world/entity/projectile/WitherSkull.cpp | 2 +- targets/minecraft/world/item/ArmorItem.cpp | 4 +- targets/minecraft/world/item/BowItem.cpp | 2 +- targets/minecraft/world/item/BucketItem.cpp | 2 +- targets/minecraft/world/item/EggItem.cpp | 2 +- targets/minecraft/world/item/EnderEyeItem.cpp | 2 +- .../minecraft/world/item/EnderpearlItem.cpp | 2 +- .../minecraft/world/item/ExperienceItem.cpp | 2 +- .../minecraft/world/item/FireChargeItem.cpp | 2 +- .../minecraft/world/item/FishingRodItem.cpp | 2 +- .../world/item/FlintAndSteelItem.cpp | 2 +- targets/minecraft/world/item/FoodItem.cpp | 2 +- targets/minecraft/world/item/MapItem.cpp | 6 +- targets/minecraft/world/item/NameTagItem.cpp | 2 +- targets/minecraft/world/item/PotionItem.cpp | 2 +- targets/minecraft/world/item/SaddleItem.cpp | 2 +- targets/minecraft/world/item/SkullItem.cpp | 4 +- targets/minecraft/world/item/SnowballItem.cpp | 2 +- targets/minecraft/world/item/SpawnEggItem.cpp | 12 +- .../minecraft/world/item/crafting/Recipes.h | 2 +- .../item/enchantment/ThornsEnchantment.cpp | 2 +- .../minecraft/world/level/BaseMobSpawner.cpp | 10 +- targets/minecraft/world/level/Coord.h | 2 +- targets/minecraft/world/level/Explosion.cpp | 8 +- targets/minecraft/world/level/Level.cpp | 24 +- targets/minecraft/world/level/Level.h | 2 +- .../minecraft/world/level/biome/IceBiome.cpp | 2 +- .../world/level/chunk/LevelChunk.cpp | 16 +- .../world/level/chunk/SparseDataStorage.cpp | 8 +- .../world/level/chunk/SparseLightStorage.cpp | 8 +- .../chunk/storage/McRegionChunkStorage.cpp | 2 +- .../level/chunk/storage/OldChunkStorage.cpp | 2 +- .../level/levelgen/ConsoleSchematicFile.cpp | 24 +- .../level/levelgen/CustomLevelSource.cpp | 10 +- .../world/level/levelgen/feature/Feature.h | 2 +- .../newbiome/layer/BiomeOverrideLayer.cpp | 2 +- .../minecraft/world/level/pathfinder/Path.cpp | 3 +- .../ConsoleSaveFileIO/ConsoleSaveFile.h | 2 +- .../level/tile/BasePressurePlateTile.cpp | 2 +- .../minecraft/world/level/tile/ButtonTile.cpp | 2 +- .../world/level/tile/CauldronTile.cpp | 2 +- .../world/level/tile/ComparatorTile.cpp | 2 +- .../minecraft/world/level/tile/FarmTile.cpp | 2 +- .../minecraft/world/level/tile/FireTile.cpp | 2 +- .../minecraft/world/level/tile/LeverTile.cpp | 2 +- .../minecraft/world/level/tile/LiquidTile.cpp | 2 +- .../world/level/tile/NotGateTile.cpp | 2 +- .../world/level/tile/NoteBlockTile.cpp | 2 +- .../minecraft/world/level/tile/PortalTile.cpp | 2 +- targets/minecraft/world/level/tile/Tile.cpp | 2 +- .../minecraft/world/level/tile/TntTile.cpp | 6 +- .../world/level/tile/TripWireSourceTile.cpp | 2 +- .../world/level/tile/WaterLilyTile.cpp | 2 +- .../level/tile/entity/ChestTileEntity.cpp | 2 +- .../tile/entity/EnderChestTileEntity.cpp | 2 +- .../level/tile/entity/TheEndPortalTile.cpp | 2 +- .../level/tile/piston/PistonBaseTile.cpp | 2 +- targets/platform/network/IPlatformNetwork.h | 2 +- targets/platform/network/network.h | 2 +- .../network/stub/StubNetworkPlayer.cpp | 2 +- .../platform/network/stub/StubNetworkPlayer.h | 2 +- .../network/stub/StubPlatformNetwork.cpp | 2 +- .../network/stub/StubPlatformNetwork.h | 2 +- targets/platform/thread/C4JThread.cpp | 3 +- targets/platform/thread/C4JThread.h | 3 +- 446 files changed, 1491 insertions(+), 1710 deletions(-) delete mode 100644 scripts/find_dead_app_includes.py create mode 100644 scripts/format.py delete mode 100644 scripts/sweep_linuxgame_includes.py delete mode 100644 scripts/sweep_winapi_stubs_includes.py diff --git a/scripts/find_dead_app_includes.py b/scripts/find_dead_app_includes.py deleted file mode 100644 index 649cc518c..000000000 --- a/scripts/find_dead_app_includes.py +++ /dev/null @@ -1,182 +0,0 @@ -#!/usr/bin/env python3 -"""Heuristic dead-include detector for app/ includes in minecraft/. - -For each minecraft/ source file that includes a header from app/, check -whether the file references any of the top-level identifiers that header -defines. If zero references, the include is a candidate for removal. - -Usage: - python3 scripts/find_dead_app_includes.py [--apply] [DIR ...] - -Without --apply, prints candidates only. With --apply, removes them. -DIR is one or more subdirectories of targets/minecraft/ to scope the -sweep (e.g. world/entity, server). Defaults to all of targets/minecraft/. - -Caveats: -- The "identifiers a header defines" heuristic catches type names, - function names, struct/class/enum names, and macros. It can miss - constants used through unusual paths and is fooled by includes that - are needed only for transitive type completion. Always build clean - after applying. -- Comments and strings are not stripped from the consumer scan, so a - file that mentions an app symbol only in a comment will look "live" - and the include is conservatively kept. -""" - -from __future__ import annotations - -import argparse -import os -import re -import sys -from pathlib import Path - -REPO_ROOT = Path(__file__).resolve().parent.parent -MINECRAFT_ROOT = REPO_ROOT / "targets" / "minecraft" -APP_ROOT = REPO_ROOT / "targets" / "app" - -INCLUDE_RE = re.compile(r'^\s*#\s*include\s*"(app/[^"]+)"\s*$', re.MULTILINE) - -# Identifier-extracting regexes for header analysis. Best-effort. -IDENT_RES = [ - # class/struct/union/enum tag definitions - re.compile(r'\b(?:class|struct|union|enum(?:\s+class)?)\s+([A-Za-z_]\w*)'), - # typedef NAME or typedef ... NAME; - re.compile(r'\btypedef\b[^;]*?\b([A-Za-z_]\w*)\s*(?:\[|;)'), - # using NAME = ... - re.compile(r'\busing\s+([A-Za-z_]\w*)\s*='), - # function declarations: WORD WORD ( where second WORD is identifier - # this is too loose; skip in favour of usage by name - # #define MACRO - re.compile(r'^\s*#\s*define\s+([A-Za-z_]\w*)', re.MULTILINE), - # extern variable declarations - re.compile(r'\bextern\b[^;]*?\b([A-Za-z_]\w*)\s*[;\[(]'), -] - -CXX_KEYWORDS = { - "if", "else", "while", "for", "do", "switch", "case", "default", - "break", "continue", "return", "void", "int", "char", "short", "long", - "float", "double", "bool", "true", "false", "nullptr", "class", "struct", - "union", "enum", "namespace", "using", "typedef", "template", "typename", - "const", "constexpr", "static", "extern", "inline", "virtual", "override", - "final", "public", "private", "protected", "friend", "this", "new", - "delete", "sizeof", "auto", "decltype", "operator", "throw", "try", - "catch", "noexcept", "mutable", "volatile", "register", "explicit", - "signed", "unsigned", "wchar_t", "char8_t", "char16_t", "char32_t", - "size_t", "ptrdiff_t", "nullptr_t", "ifndef", "ifdef", "endif", "define", - "include", "pragma", "elif", "error", "warning", "line", "undef", - "alignas", "alignof", "concept", "requires", "co_await", "co_yield", - "co_return", "consteval", "constinit", "static_cast", "dynamic_cast", - "reinterpret_cast", "const_cast", -} - - -def extract_header_identifiers(header_path: Path) -> set[str]: - """Best-effort extraction of identifiers a header defines.""" - if not header_path.exists(): - return set() - try: - text = header_path.read_text(encoding="utf-8", errors="surrogateescape") - except OSError: - return set() - idents: set[str] = set() - for regex in IDENT_RES: - for match in regex.finditer(text): - name = match.group(1) - if name and name not in CXX_KEYWORDS and not name.startswith("_"): - idents.add(name) - return idents - - -def file_references_any(file_text: str, idents: set[str]) -> bool: - """Check if any identifier appears as a whole-word match in the file.""" - if not idents: - return False - # Build one big alternation - pattern = r'\b(?:' + '|'.join(re.escape(i) for i in idents) + r')\b' - return re.search(pattern, file_text) is not None - - -def collect_minecraft_files(roots: list[Path]) -> list[Path]: - files: list[Path] = [] - for root in roots: - for dirpath, _dirnames, filenames in os.walk(root): - for name in filenames: - if name.endswith((".cpp", ".c", ".h", ".hpp")): - files.append(Path(dirpath) / name) - files.sort() - return files - - -def analyse(roots: list[Path], apply: bool) -> int: - files = collect_minecraft_files(roots) - header_cache: dict[str, set[str]] = {} - candidate_count = 0 - - for path in files: - try: - text = path.read_text(encoding="utf-8", errors="surrogateescape") - except OSError: - continue - includes = INCLUDE_RE.findall(text) - if not includes: - continue - # Strip the include lines from the text we scan for symbols, so we - # don't false-positive on the include path itself mentioning the - # symbol name (e.g. ColourTable.h). - scan_text = INCLUDE_RE.sub("", text) - dead_includes: list[str] = [] - for include_path in includes: - cache_key = include_path - if cache_key not in header_cache: - header_path = REPO_ROOT / "targets" / include_path - header_cache[cache_key] = extract_header_identifiers(header_path) - idents = header_cache[cache_key] - if not idents: - # Header has no extractable identifiers (or doesn't exist). - # Conservatively skip - don't claim it's dead. - continue - if not file_references_any(scan_text, idents): - dead_includes.append(include_path) - if dead_includes: - candidate_count += len(dead_includes) - rel = path.relative_to(REPO_ROOT) - for inc in dead_includes: - print(f"{rel}: {inc}") - if apply: - new_text = text - for inc in dead_includes: - pattern = re.compile( - r'^\s*#\s*include\s*"' + re.escape(inc) + r'"\s*\n', - re.MULTILINE, - ) - new_text = pattern.sub("", new_text) - path.write_text(new_text, encoding="utf-8", errors="surrogateescape") - - print(f"\n{candidate_count} candidate dead include lines" - f" {'removed' if apply else 'identified'}") - return 0 - - -def main() -> int: - parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("--apply", action="store_true", - help="Actually remove the candidate includes") - parser.add_argument("dirs", nargs="*", - help="Subdirectories of targets/minecraft/ to scan") - args = parser.parse_args() - - if args.dirs: - roots = [MINECRAFT_ROOT / d for d in args.dirs] - for r in roots: - if not r.exists(): - print(f"error: {r} does not exist", file=sys.stderr) - return 1 - else: - roots = [MINECRAFT_ROOT] - - return analyse(roots, args.apply) - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/scripts/format.py b/scripts/format.py new file mode 100644 index 000000000..6819e4dad --- /dev/null +++ b/scripts/format.py @@ -0,0 +1,183 @@ +#!/usr/bin/env python3 +import argparse +import os +import subprocess +import sys +from concurrent.futures import ThreadPoolExecutor, as_completed +from pathlib import Path + +DEFAULT_EXTENSIONS = { + ".c", + ".cc", + ".cpp", + ".cxx", + ".h", + ".hh", + ".hpp", + ".hxx", + ".inl", + ".ipp", +} +DEFAULT_JOBS = os.cpu_count() or 4 +DEFAULT_TIMEOUT = 10 + +# ansi escapes +RESET = "\033[0m" if sys.stdout.isatty() else "" +GREEN = "\033[32m" if sys.stdout.isatty() else "" +YELLOW = "\033[33m" if sys.stdout.isatty() else "" +RED = "\033[31m" if sys.stdout.isatty() else "" +BOLD = "\033[1m" if sys.stdout.isatty() else "" + +def format_file(path, clang_format, extra_args, timeout): + cmd = [clang_format, "-i"] + cmd += extra_args + cmd.append(str(path)) + + try: + result = subprocess.run( + cmd, + capture_output=True, + text=True, + timeout=timeout, + ) + if result.returncode != 0: + msg = (result.stderr or result.stdout or "non-zero exit code").strip() + return ("error", str(path), msg) + return ("ok", str(path), None) + + except subprocess.TimeoutExpired: + return ("timeout", str(path), f"exceeded {timeout}s timeout") + + except FileNotFoundError: + return ("error", str(path), f"'{clang_format}' not found — is it installed?") + + except Exception as exc: + return ("error", str(path), str(exc)) + +def find_files(root, extensions, exclude_dirs): + found = [] + for dirpath, dirnames, filenames in os.walk(root): + dirnames[:] = [d for d in dirnames if d not in exclude_dirs] + for fname in filenames: + if Path(fname).suffix.lower() in extensions: + found.append(Path(dirpath) / fname) + return sorted(found) + +def main(): + p = argparse.ArgumentParser( + description="Recursively runs clang-format on C/C++ files.", + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + p.add_argument("directory", nargs="?", default=".", type=Path) + p.add_argument( + "--clang-format", + default="clang-format", + metavar="BIN", + help="Path to the clang-format executable. (default: clang-format)", + ) + p.add_argument( + "-j", + "--jobs", + type=int, + default=DEFAULT_JOBS, + metavar="N", + help=f"Number of parallel workers. (default: {DEFAULT_JOBS})", + ) + p.add_argument( + "--timeout", + type=int, + default=DEFAULT_TIMEOUT, + metavar="SECS", + help=f"Per-file timeout in seconds. (default: {DEFAULT_TIMEOUT})", + ) + p.add_argument( + "--extensions", + nargs="+", + metavar="EXT", + help="File extensions to process (including the dot)." + f"(default: {' '.join(sorted(DEFAULT_EXTENSIONS))})", + ) + p.add_argument( + "--exclude", + nargs="*", + default=[], + metavar="DIR", + help="Directory names to skip during traversal (e.g. build third_party).", + ) + p.add_argument( + "--clang-format-args", + nargs=argparse.REMAINDER, + default=[], + metavar="...", + ) + args = p.parse_args() + + root = args.directory.resolve() + if not root.is_dir(): + print(f"{RED}Error:{RESET} '{root}' is not a directory.", file=sys.stderr) + return 1 + + extensions = ( + {e if e.startswith(".") else f".{e}" for e in args.extensions} + if args.extensions + else DEFAULT_EXTENSIONS + ) + + exclude_dirs = set(args.exclude) + + files = find_files(root, extensions, exclude_dirs) + if not files: + print(f"{YELLOW}No source files found.{RESET}") + return 0 + + total = len(files) + print(f"Found {BOLD}{total}{RESET} file(s).") + + counters = {"ok": 0, "timeout": 0, "error": 0} + completed = 0 + + with ThreadPoolExecutor(max_workers=args.jobs) as pool: + futures = { + pool.submit( + format_file, + f, + args.clang_format, + args.clang_format_args, + args.timeout, + ): f + for f in files + } + + for future in as_completed(futures): + status, path_str, error = future.result() + counters[status] += 1 + completed += 1 + rel = os.path.relpath(path_str, root) + + if status == "ok": + tag = f"{GREEN}[ OK ]{RESET}" + elif status == "timeout": + tag = f"{YELLOW}[ TIMEOUT ]{RESET}" + else: + tag = f"{RED}[ ERROR ]{RESET}" + + progress = f"[{completed:>{len(str(total))}}/{total}]" + line = f"{progress} {tag} {rel}" + if error: + line += f"\n {RED}{error}{RESET}" + print(line) + + print() + print(f"{BOLD}Summary{RESET}") + print(f"Total: {total}") + print(f"{GREEN}OK: {counters['ok']}{RESET}") + + if counters["timeout"]: + print(f"{YELLOW}Timeout: {counters['timeout']}{RESET}") + if counters["error"]: + print(f"{RED}Error: {counters['error']}{RESET}") + + return 1 if (counters["timeout"] or counters["error"]) else 0 + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/sweep_linuxgame_includes.py b/scripts/sweep_linuxgame_includes.py deleted file mode 100644 index dcd693d67..000000000 --- a/scripts/sweep_linuxgame_includes.py +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env python3 -"""Conservative sweep: remove dead app/linux/LinuxGame.h includes from minecraft/. - -LinuxGame.h is included by 155 files in targets/minecraft/ but most of -those are leftover from before the IGameServices refactor. The only real -reasons to include it are: - - to use the global `LinuxGame app;` extern - - to use the LinuxGame class type by name - - to use C4JStringTable (forward-declared in the header) - -For each minecraft/ file that includes LinuxGame.h, this script checks -whether the file references any of: LinuxGame, C4JStringTable, or -contains `app.`/`app::`. If none of those appear, the include is dead -and removed. - -Usage: - python3 scripts/sweep_linuxgame_includes.py [--apply] -""" - -from __future__ import annotations - -import argparse -import os -import re -import sys -from pathlib import Path - -REPO_ROOT = Path(__file__).resolve().parent.parent -MINECRAFT_ROOT = REPO_ROOT / "targets" / "minecraft" - -INCLUDE_RE = re.compile( - r'^[ \t]*#[ \t]*include[ \t]*"app/linux/LinuxGame\.h"[ \t]*\n', - re.MULTILINE, -) - -# Patterns that mean the include is genuinely needed. -# LinuxGame.h transitively pulls in Game.h (LinuxGame : public Game), so any -# reference to the Game class also keeps the include alive. -USAGE_PATTERNS = [ - re.compile(r'\bLinuxGame\b'), - re.compile(r'\bC4JStringTable\b'), - re.compile(r'\bapp\s*\.'), - re.compile(r'\bapp\s*::'), - re.compile(r'\bGame\s*::'), - re.compile(r'\bGame\s*\*'), - re.compile(r'\bGame\s*&'), - re.compile(r'class\s+\w+\s*:\s*(?:public|private|protected)?\s*Game\b'), -] - - -def strip_comments(text: str) -> str: - text = re.sub(r'/\*.*?\*/', '', text, flags=re.DOTALL) - text = re.sub(r'//[^\n]*', '', text) - return text - - -def file_needs_linuxgame(text: str) -> bool: - # Strip the LinuxGame.h include line itself before checking, to avoid - # the include path matching `LinuxGame`. Also strip comments so - # references in commented-out code don't keep the include alive. - scan = INCLUDE_RE.sub("", text) - scan = strip_comments(scan) - for pat in USAGE_PATTERNS: - if pat.search(scan): - return True - return False - - -def main() -> int: - parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("--apply", action="store_true", - help="Actually remove the dead includes") - args = parser.parse_args() - - candidates: list[Path] = [] - for dirpath, _dirnames, filenames in os.walk(MINECRAFT_ROOT): - for name in filenames: - if not name.endswith((".cpp", ".c", ".h", ".hpp")): - continue - path = Path(dirpath) / name - try: - text = path.read_text(encoding="utf-8", errors="surrogateescape") - except OSError: - continue - if not INCLUDE_RE.search(text): - continue - if file_needs_linuxgame(text): - continue - candidates.append(path) - - candidates.sort() - for path in candidates: - print(path.relative_to(REPO_ROOT)) - - print(f"\n{len(candidates)} files have a dead LinuxGame.h include") - - if args.apply: - for path in candidates: - text = path.read_text(encoding="utf-8", errors="surrogateescape") - new_text = INCLUDE_RE.sub("", text) - path.write_text(new_text, encoding="utf-8", errors="surrogateescape") - print(f"Removed from {len(candidates)} files") - - return 0 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/scripts/sweep_winapi_stubs_includes.py b/scripts/sweep_winapi_stubs_includes.py deleted file mode 100644 index 5b966c4c1..000000000 --- a/scripts/sweep_winapi_stubs_includes.py +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env python3 -"""Conservative sweep: remove dead app/linux/Stubs/winapi_stubs.h includes. - -winapi_stubs.h provides Windows API typedefs and constants for Linux -(LARGE_INTEGER, FILETIME, ERROR_*, etc.). Many minecraft/ files include -it as transitive leftovers and never actually reference any of those -symbols. - -Usage: - python3 scripts/sweep_winapi_stubs_includes.py [--apply] -""" - -from __future__ import annotations - -import argparse -import os -import re -import sys -from pathlib import Path - -REPO_ROOT = Path(__file__).resolve().parent.parent -MINECRAFT_ROOT = REPO_ROOT / "targets" / "minecraft" - -INCLUDE_RE = re.compile( - r'^[ \t]*#[ \t]*include[ \t]*"app/linux/Stubs/winapi_stubs\.h"[ \t]*\n', - re.MULTILINE, -) - -# Symbols defined by winapi_stubs.h. If any appear in the consumer, the -# include is needed. -USAGE_PATTERNS = [ - re.compile(r'\bLARGE_INTEGER\b'), - re.compile(r'\bULARGE_INTEGER\b'), - re.compile(r'\bFILETIME\b'), - re.compile(r'\bSYSTEMTIME\b'), - re.compile(r'\bERROR_SUCCESS\b'), - re.compile(r'\bERROR_IO_PENDING\b'), - re.compile(r'\bERROR_CANCELLED\b'), - re.compile(r'\bMEM_COMMIT\b'), - re.compile(r'\bMEM_RESERVE\b'), - re.compile(r'\bMEM_DECOMMIT\b'), - re.compile(r'\bPAGE_READWRITE\b'), - re.compile(r'\bDWORD\b'), - re.compile(r'\bBYTE\b'), - re.compile(r'\bWORD\b'), - re.compile(r'\bHANDLE\b'), - re.compile(r'\bHRESULT\b'), - re.compile(r'\bGetLastError\b'), - re.compile(r'\bGetFileSize\b'), - re.compile(r'\bGetSystemTime\b'), - re.compile(r'\bSystemTimeToFileTime\b'), - re.compile(r'\bMakeAbsoluteSD\b'), - re.compile(r'\bSetFilePointer\b'), - re.compile(r'\bReadFile\b'), - re.compile(r'\bWriteFile\b'), - re.compile(r'\bCloseHandle\b'), - re.compile(r'\bCreateFile\b'), - re.compile(r'\bVirtualAlloc\b'), - re.compile(r'\bVirtualFree\b'), - re.compile(r'\bSleep\s*\('), - re.compile(r'\bWaitForSingleObject\b'), - re.compile(r'\bSetEvent\b'), - re.compile(r'\bResetEvent\b'), - re.compile(r'\bInterlocked'), - re.compile(r'\bOutputDebugString\b'), - re.compile(r'\bMessageBox\b'), -] - - -def strip_comments(text: str) -> str: - """Strip C++ // and /* */ comments. Approximate but good enough for - detecting whether a symbol appears in real code vs commented-out - code.""" - # Strip /* ... */ comments (multiline) - text = re.sub(r'/\*.*?\*/', '', text, flags=re.DOTALL) - # Strip // ... comments (single line) - text = re.sub(r'//[^\n]*', '', text) - return text - - -def needs_winapi(text: str) -> bool: - scan = INCLUDE_RE.sub("", text) - scan = strip_comments(scan) - return any(p.search(scan) for p in USAGE_PATTERNS) - - -def main() -> int: - parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("--apply", action="store_true", - help="Actually remove the dead includes") - args = parser.parse_args() - - candidates: list[Path] = [] - for dirpath, _dirnames, filenames in os.walk(MINECRAFT_ROOT): - for name in filenames: - if not name.endswith((".cpp", ".c", ".h", ".hpp")): - continue - path = Path(dirpath) / name - try: - text = path.read_text(encoding="utf-8", errors="surrogateescape") - except OSError: - continue - if not INCLUDE_RE.search(text): - continue - if needs_winapi(text): - continue - candidates.append(path) - - candidates.sort() - for path in candidates: - print(path.relative_to(REPO_ROOT)) - - print(f"\n{len(candidates)} files have a dead winapi_stubs.h include") - - if args.apply: - for path in candidates: - text = path.read_text(encoding="utf-8", errors="surrogateescape") - new_text = INCLUDE_RE.sub("", text) - path.write_text(new_text, encoding="utf-8", errors="surrogateescape") - print(f"Removed from {len(candidates)} files") - - return 0 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/targets/app/common/App_structs.h b/targets/app/common/App_structs.h index 2888d32a9..e138baded 100644 --- a/targets/app/common/App_structs.h +++ b/targets/app/common/App_structs.h @@ -2,13 +2,13 @@ #include -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "minecraft/GameEnums.h" #include "minecraft/GameTypes.h" #include "minecraft/client/model/SkinBox.h" -#include "platform/network/NetTypes.h" +#include "minecraft/world/tutorial/TutorialEnum.h" #include "platform/XboxStubs.h" +#include "platform/network/NetTypes.h" #include "platform/profile/ProfileConstants.h" #include "platform/storage/storage.h" diff --git a/targets/app/common/Audio/SoundEngine.cpp b/targets/app/common/Audio/SoundEngine.cpp index 86e20e4d5..298124cc4 100644 --- a/targets/app/common/Audio/SoundEngine.cpp +++ b/targets/app/common/Audio/SoundEngine.cpp @@ -11,8 +11,8 @@ #include #include "app/common/Audio/ConsoleSoundEngine.h" -#include "app/common/Iggy/include/rrCore.h" #include "app/common/Game.h" +#include "app/common/Iggy/include/rrCore.h" #include "java/Random.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" @@ -20,9 +20,9 @@ #include "minecraft/util/Mth.h" #include "minecraft/world/entity/Mob.h" #include "minecraft/world/level/storage/LevelData.h" -#include "platform/thread/C4JThread.h" #include "platform/PlatformTypes.h" #include "platform/fs/fs.h" +#include "platform/thread/C4JThread.h" #define STB_VORBIS_HEADER_ONLY #include "stb_vorbis.c" @@ -880,4 +880,3 @@ char* SoundEngine::ConvertSoundPathToName(const std::string& name, bool bConvertSpaces) { return nullptr; } - diff --git a/targets/app/common/Audio/SoundEngine.h b/targets/app/common/Audio/SoundEngine.h index 8642b6ad4..701a92d36 100644 --- a/targets/app/common/Audio/SoundEngine.h +++ b/targets/app/common/Audio/SoundEngine.h @@ -8,8 +8,8 @@ class Random; #include #include "app/common/Audio/ConsoleSoundEngine.h" -#include "app/common/Iggy/include/rrCore.h" #include "app/common/Audio/SoundTypes.h" +#include "app/common/Iggy/include/rrCore.h" #include "platform/PlatformTypes.h" // Forward-declare the miniaudio backing state. The full struct lives in diff --git a/targets/app/common/DLC/DLCGameRulesHeader.cpp b/targets/app/common/DLC/DLCGameRulesHeader.cpp index 16beb8b57..12a7e19f0 100644 --- a/targets/app/common/DLC/DLCGameRulesHeader.cpp +++ b/targets/app/common/DLC/DLCGameRulesHeader.cpp @@ -4,8 +4,8 @@ #include "DLCManager.h" #include "app/common/DLC/DLCGameRules.h" -#include "app/common/GameRules/GameRuleManager.h" #include "app/common/Game.h" +#include "app/common/GameRules/GameRuleManager.h" class StringTable; diff --git a/targets/app/common/DLC/DLCManager.cpp b/targets/app/common/DLC/DLCManager.cpp index efedd845c..db04bcf38 100644 --- a/targets/app/common/DLC/DLCManager.cpp +++ b/targets/app/common/DLC/DLCManager.cpp @@ -15,8 +15,8 @@ #include "DLCFile.h" #include "DLCPack.h" -#include "app/common/GameRules/GameRuleManager.h" #include "app/common/Game.h" +#include "app/common/GameRules/GameRuleManager.h" #include "app/common/UI/ConsoleUIController.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/skins/TexturePackRepository.h" @@ -482,7 +482,7 @@ bool DLCManager::processDLCDataFile(unsigned int& dwFilesProcessed, std::uint8_t* pbTemp = &pbData [dwTemp]; //+ - //sizeof(IPlatformStorage::DLC_FILE_DETAILS)*ulFileCount; + // sizeof(IPlatformStorage::DLC_FILE_DETAILS)*ulFileCount; DLC_READ_DETAIL(&fileBuf, pbData, uiCurrentByte); for (unsigned int i = 0; i < uiFileCount; i++) { diff --git a/targets/app/common/Game.cpp b/targets/app/common/Game.cpp index 111b91a64..dd251d5ab 100644 --- a/targets/app/common/Game.cpp +++ b/targets/app/common/Game.cpp @@ -1,52 +1,5 @@ #include "app/common/Game.h" -#include "app/common/App_structs.h" -#include "app/common/DLC/DLCManager.h" -#include "app/common/DLC/DLCSkinFile.h" -#include "app/common/GameRules/GameRuleManager.h" -#include "app/common/Network/GameNetworkManager.h" -#include "app/common/Tutorial/Tutorial.h" -#include "app/common/UI/All Platforms/UIEnums.h" -#include "app/common/UI/All Platforms/UIStructs.h" -#include "app/common/UI/Scenes/UIScene_FullscreenProgress.h" -#include "app/common/UI/ConsoleUIController.h" -#include "java/Class.h" -#include "java/File.h" -#include "java/Random.h" -#include "minecraft/Console_Debug_enum.h" -#include "minecraft/GameEnums.h" -#include "minecraft/GameHostOptions.h" -#include "minecraft/GameTypes.h" -#include "minecraft/client/Minecraft.h" -#include "minecraft/client/Options.h" -#include "minecraft/client/ProgressRenderer.h" -#include "minecraft/client/model/SkinBox.h" -#include "minecraft/client/model/geom/Model.h" -#include "minecraft/client/multiplayer/ClientConnection.h" -#include "minecraft/client/multiplayer/MultiPlayerGameMode.h" -#include "minecraft/client/multiplayer/MultiPlayerLevel.h" -#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "minecraft/client/renderer/GameRenderer.h" -#include "minecraft/client/renderer/Textures.h" -#include "minecraft/client/renderer/entity/EntityRenderer.h" -#include "minecraft/client/skins/TexturePack.h" -#include "minecraft/network/packet/DisconnectPacket.h" -#include "minecraft/server/MinecraftServer.h" -#include "minecraft/stats/StatsCounter.h" -#include "minecraft/world/Container.h" -#include "minecraft/world/entity/item/MinecartHopper.h" -#include "minecraft/world/entity/player/Player.h" -#include "minecraft/world/item/crafting/Recipy.h" -#include "minecraft/world/level/tile/Tile.h" -#include "minecraft/world/level/tile/entity/HopperTileEntity.h" -#include "platform/PlatformTypes.h" -#include "platform/XboxStubs.h" -#include "platform/network/NetTypes.h" -#include "platform/network/network.h" -#include "platform/profile/profile.h" -#include "platform/renderer/renderer.h" -#include "platform/storage/storage.h" -#include "strings.h" #include #include #include @@ -66,22 +19,69 @@ #include #include +#include "app/common/App_structs.h" #include "app/common/Audio/SoundEngine.h" +#include "app/common/DLC/DLCManager.h" #include "app/common/DLC/DLCPack.h" +#include "app/common/DLC/DLCSkinFile.h" +#include "app/common/GameRules/GameRuleManager.h" +#include "app/common/Network/GameNetworkManager.h" +#include "app/common/Tutorial/Tutorial.h" #include "app/common/UI/All Platforms/ArchiveFile.h" +#include "app/common/UI/All Platforms/UIEnums.h" +#include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h" +#include "app/common/UI/Scenes/UIScene_FullscreenProgress.h" +#include "java/Class.h" +#include "java/File.h" +#include "java/Random.h" +#include "minecraft/Console_Debug_enum.h" +#include "minecraft/GameEnums.h" +#include "minecraft/GameHostOptions.h" +#include "minecraft/GameTypes.h" #include "minecraft/Minecraft_Macros.h" +#include "minecraft/client/Minecraft.h" +#include "minecraft/client/Options.h" +#include "minecraft/client/ProgressRenderer.h" #include "minecraft/client/User.h" #include "minecraft/client/gui/Gui.h" +#include "minecraft/client/model/SkinBox.h" +#include "minecraft/client/model/geom/Model.h" +#include "minecraft/client/multiplayer/ClientConnection.h" +#include "minecraft/client/multiplayer/MultiPlayerGameMode.h" +#include "minecraft/client/multiplayer/MultiPlayerLevel.h" +#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" +#include "minecraft/client/renderer/GameRenderer.h" +#include "minecraft/client/renderer/Textures.h" #include "minecraft/client/renderer/entity/EntityRenderDispatcher.h" +#include "minecraft/client/renderer/entity/EntityRenderer.h" #include "minecraft/client/resources/Colours/ColourTable.h" #include "minecraft/client/skins/DLCTexturePack.h" +#include "minecraft/client/skins/TexturePack.h" #include "minecraft/client/skins/TexturePackRepository.h" #include "minecraft/locale/StringTable.h" +#include "minecraft/network/packet/DisconnectPacket.h" +#include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/level/ServerPlayer.h" +#include "minecraft/stats/StatsCounter.h" +#include "minecraft/world/Container.h" +#include "minecraft/world/entity/item/MinecartHopper.h" +#include "minecraft/world/entity/player/Player.h" +#include "minecraft/world/item/crafting/Recipy.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h" +#include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/level/tile/entity/HopperTileEntity.h" +#include "platform/PlatformTypes.h" +#include "platform/XboxStubs.h" #include "platform/input/input.h" +#include "platform/network/NetTypes.h" +#include "platform/network/network.h" +#include "platform/profile/profile.h" +#include "platform/renderer/renderer.h" +#include "platform/storage/storage.h" +#include "strings.h" #include "util/StringHelpers.h" #include "util/Timer.h" diff --git a/targets/app/common/Game.h b/targets/app/common/Game.h index c8e08930d..0653257a4 100644 --- a/targets/app/common/Game.h +++ b/targets/app/common/Game.h @@ -4,8 +4,8 @@ #include #include "platform/profile/profile.h" -#include "platform/storage/storage.h" #include "platform/renderer/renderer.h" +#include "platform/storage/storage.h" #include "util/Timer.h" // using namespace std; @@ -25,7 +25,6 @@ #include "app/common/SaveManager.h" #include "app/common/SkinManager.h" #include "app/common/TerrainFeatureManager.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/UI/All Platforms/ArchiveFile.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "minecraft/client/model/SkinBox.h" @@ -33,8 +32,9 @@ #include "minecraft/network/packet/DisconnectPacket.h" #include "minecraft/world/entity/item/MinecartHopper.h" #include "minecraft/world/level/ConsoleGameRulesConstants.h" -#include "platform/network/NetTypes.h" +#include "minecraft/world/tutorial/TutorialEnum.h" #include "platform/XboxStubs.h" +#include "platform/network/NetTypes.h" // JoinFromInviteData moved to NetworkController.h diff --git a/targets/app/common/GameRules/GameRuleManager.cpp b/targets/app/common/GameRules/GameRuleManager.cpp index 0faab72ad..be4ca8b70 100644 --- a/targets/app/common/GameRules/GameRuleManager.cpp +++ b/targets/app/common/GameRules/GameRuleManager.cpp @@ -12,11 +12,10 @@ #include "app/common/DLC/DLCLocalisationFile.h" #include "app/common/DLC/DLCManager.h" #include "app/common/DLC/DLCPack.h" -#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" +#include "app/common/Game.h" #include "app/common/GameRules/LevelGeneration/LevelGenerators.h" #include "app/common/GameRules/LevelRules/LevelRules.h" #include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h" -#include "app/common/Game.h" #include "java/File.h" #include "java/InputOutputStream/ByteArrayInputStream.h" #include "java/InputOutputStream/ByteArrayOutputStream.h" @@ -25,6 +24,7 @@ #include "minecraft/locale/StringTable.h" #include "minecraft/world/level/GameRules/GameRuleDefinition.h" #include "minecraft/world/level/GameRules/LevelGenerationOptions.h" +#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h" #include "strings.h" diff --git a/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.cpp b/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.cpp index 8200ddb49..6a4d1c8fb 100644 --- a/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.cpp +++ b/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.cpp @@ -4,7 +4,6 @@ #include #include "app/common/Game.h" -#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/world/level/ConsoleGameRulesConstants.h" #include "minecraft/world/level/GameRules/GameRuleDefinition.h" @@ -12,6 +11,7 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/dimension/Dimension.h" +#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" #include "minecraft/world/phys/AABB.h" #include "util/StringHelpers.h" diff --git a/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h b/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h index cc5073a35..3a0eaafae 100644 --- a/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h +++ b/targets/app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h @@ -5,8 +5,8 @@ #include #include "minecraft/world/level/ConsoleGameRulesConstants.h" -#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" #include "minecraft/world/level/GameRules/GameRuleDefinition.h" +#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/Vec3.h" diff --git a/targets/app/common/GameRules/LevelGeneration/ConsoleGenerateStructure.cpp b/targets/app/common/GameRules/LevelGeneration/ConsoleGenerateStructure.cpp index 714c77637..122dd1222 100644 --- a/targets/app/common/GameRules/LevelGeneration/ConsoleGenerateStructure.cpp +++ b/targets/app/common/GameRules/LevelGeneration/ConsoleGenerateStructure.cpp @@ -4,12 +4,12 @@ #include +#include "app/common/Game.h" #include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h" #include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.h" #include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h" #include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceContainer.h" #include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceSpawner.h" -#include "app/common/Game.h" #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/Direction.h" #include "minecraft/world/level/ConsoleGameRulesConstants.h" diff --git a/targets/app/common/GameRules/LevelGeneration/LevelGenerationOptions.cpp b/targets/app/common/GameRules/LevelGeneration/LevelGenerationOptions.cpp index b2e2479f3..4dd8d39a0 100644 --- a/targets/app/common/GameRules/LevelGeneration/LevelGenerationOptions.cpp +++ b/targets/app/common/GameRules/LevelGeneration/LevelGenerationOptions.cpp @@ -9,13 +9,12 @@ #include "app/common/DLC/DLCGameRulesHeader.h" #include "app/common/DLC/DLCManager.h" #include "app/common/DLC/DLCPack.h" +#include "app/common/Game.h" #include "app/common/GameRules/GameRuleManager.h" #include "app/common/GameRules/LevelGeneration/ApplySchematicRuleDefinition.h" #include "app/common/GameRules/LevelGeneration/BiomeOverride.h" #include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructure.h" -#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" #include "app/common/GameRules/LevelGeneration/StartFeature.h" -#include "app/common/Game.h" #include "java/File.h" #include "java/InputOutputStream/ByteArrayInputStream.h" #include "java/InputOutputStream/DataInputStream.h" @@ -27,6 +26,7 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/dimension/Dimension.h" +#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" #include "minecraft/world/level/levelgen/structure/BoundingBox.h" #include "minecraft/world/phys/AABB.h" #include "platform/fs/fs.h" diff --git a/targets/app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.cpp b/targets/app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.cpp index e3254aab9..9651a4011 100644 --- a/targets/app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.cpp +++ b/targets/app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionGenerateBox.cpp @@ -1,7 +1,7 @@ #include "XboxStructureActionGenerateBox.h" -#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h" #include "app/common/Game.h" +#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h" #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/world/level/ConsoleGameRulesConstants.h" #include "minecraft/world/level/GameRules/GameRuleDefinition.h" diff --git a/targets/app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.cpp b/targets/app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.cpp index b0690c711..5c8f82bde 100644 --- a/targets/app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.cpp +++ b/targets/app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.cpp @@ -1,7 +1,7 @@ #include "XboxStructureActionPlaceBlock.h" -#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h" #include "app/common/Game.h" +#include "app/common/GameRules/LevelGeneration/ConsoleGenerateStructureAction.h" #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/world/level/ConsoleGameRulesConstants.h" #include "minecraft/world/level/GameRules/GameRuleDefinition.h" diff --git a/targets/app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceContainer.cpp b/targets/app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceContainer.cpp index 494fb30a7..a14a46bce 100644 --- a/targets/app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceContainer.cpp +++ b/targets/app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceContainer.cpp @@ -4,9 +4,9 @@ #include +#include "app/common/Game.h" #include "app/common/GameRules/LevelGeneration/StructureActions/XboxStructureActionPlaceBlock.h" #include "app/common/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.h" -#include "app/common/Game.h" #include "minecraft/world/Container.h" #include "minecraft/world/level/ConsoleGameRulesConstants.h" #include "minecraft/world/level/Level.h" diff --git a/targets/app/common/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.cpp b/targets/app/common/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.cpp index 9b48fc742..ed9107916 100644 --- a/targets/app/common/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.cpp +++ b/targets/app/common/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.cpp @@ -4,8 +4,8 @@ #include #include -#include "app/common/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h" #include "app/common/Game.h" +#include "app/common/GameRules/LevelRules/RuleDefinitions/CompoundGameRuleDefinition.h" #include "minecraft/network/Connection.h" #include "minecraft/network/packet/UpdateGameRuleProgressPacket.h" #include "minecraft/world/level/GameRules/GameRule.h" diff --git a/targets/app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.cpp b/targets/app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.cpp index 9149bc99e..d759f5304 100644 --- a/targets/app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.cpp +++ b/targets/app/common/GameRules/LevelRules/RuleDefinitions/GameRuleDefinition.cpp @@ -8,9 +8,9 @@ #include #include +#include "app/common/Game.h" #include "app/common/GameRules/LevelRules/RuleDefinitions/CompleteAllRuleDefinition.h" #include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h" -#include "app/common/Game.h" #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/world/level/ConsoleGameRulesConstants.h" #include "minecraft/world/level/GameRules/GameRule.h" diff --git a/targets/app/common/GameRules/LevelRules/RuleDefinitions/UpdatePlayerRuleDefinition.cpp b/targets/app/common/GameRules/LevelRules/RuleDefinitions/UpdatePlayerRuleDefinition.cpp index b95f6600e..508b22a58 100644 --- a/targets/app/common/GameRules/LevelRules/RuleDefinitions/UpdatePlayerRuleDefinition.cpp +++ b/targets/app/common/GameRules/LevelRules/RuleDefinitions/UpdatePlayerRuleDefinition.cpp @@ -4,8 +4,8 @@ #include -#include "app/common/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.h" #include "app/common/Game.h" +#include "app/common/GameRules/LevelRules/RuleDefinitions/AddItemRuleDefinition.h" #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/Pos.h" #include "minecraft/world/entity/player/Inventory.h" diff --git a/targets/app/common/GameSettingsManager.cpp b/targets/app/common/GameSettingsManager.cpp index 1b7c87741..8eee1fedf 100644 --- a/targets/app/common/GameSettingsManager.cpp +++ b/targets/app/common/GameSettingsManager.cpp @@ -5,7 +5,6 @@ #include "app/common/Audio/SoundEngine.h" #include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" -#include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" #include "minecraft/Console_Debug_enum.h" #include "minecraft/GameEnums.h" diff --git a/targets/app/common/Game_XuiActions.cpp b/targets/app/common/Game_XuiActions.cpp index 34c5a8c9b..2e244ea1b 100644 --- a/targets/app/common/Game_XuiActions.cpp +++ b/targets/app/common/Game_XuiActions.cpp @@ -1,5 +1,4 @@ #include "app/common/Audio/SoundEngine.h" -#include "platform/game/game.h" #include "app/common/DLC/DLCManager.h" #include "app/common/Game.h" #include "app/common/GameRules/GameRuleManager.h" @@ -7,9 +6,8 @@ #include "app/common/Tutorial/Tutorial.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" -#include "app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h" -#include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" +#include "app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h" #include "minecraft/GameEnums.h" #include "minecraft/GameTypes.h" #include "minecraft/client/Minecraft.h" @@ -26,10 +24,11 @@ #include "minecraft/client/skins/DLCTexturePack.h" #include "minecraft/client/skins/TexturePack.h" #include "minecraft/client/skins/TexturePackRepository.h" -#include "platform/network/network.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/stats/StatsCounter.h" #include "platform/PlatformTypes.h" +#include "platform/game/game.h" +#include "platform/network/network.h" #include "platform/profile/profile.h" #include "platform/storage/storage.h" #include "util/StringHelpers.h" @@ -469,7 +468,8 @@ void Game::HandleXuiActions(void) { } } } else { - PlatformGame.SetRichPresenceContext(i, CONTEXT_GAME_STATE_BLANK); + PlatformGame.SetRichPresenceContext( + i, CONTEXT_GAME_STATE_BLANK); if (g_NetworkManager.IsLocalGame()) { PlatformProfile.SetCurrentGameActivity( i, CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE, @@ -994,12 +994,11 @@ void Game::HandleXuiActions(void) { // streaming audio from the default texture pack now // reset the streaming sounds back to the normal ones static_cast(pMinecraft->soundEngine) - ->SetStreamingSounds(eStream_Overworld_Calm1, - eStream_Overworld_piano3, - eStream_Nether1, - eStream_Nether4, - eStream_end_dragon, - eStream_end_end, eStream_CD_1); + ->SetStreamingSounds( + eStream_Overworld_Calm1, + eStream_Overworld_piano3, eStream_Nether1, + eStream_Nether4, eStream_end_dragon, + eStream_end_end, eStream_CD_1); pMinecraft->soundEngine->playStreaming("", 0, 0, 0, 1, 1); @@ -1288,7 +1287,9 @@ void Game::HandleXuiActions(void) { } break; case eAppAction_DebugText: // launch the xui for text entry - { SetAction(i, eAppAction_Idle); } + { + SetAction(i, eAppAction_Idle); + } break; case eAppAction_ReloadTexturePack: { diff --git a/targets/app/common/Iggy/gdraw/gdraw.c b/targets/app/common/Iggy/gdraw/gdraw.c index 9a1ea981d..71c17cf81 100644 --- a/targets/app/common/Iggy/gdraw/gdraw.c +++ b/targets/app/common/Iggy/gdraw/gdraw.c @@ -10,8 +10,8 @@ #include #include -#include "app/common/Iggy/include/iggy.h" #include "SDL_video.h" +#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY void* IggyGDrawMallocAnnotated(SINTa size, const char* file, int line) { diff --git a/targets/app/common/Iggy/gdraw/gdraw.h b/targets/app/common/Iggy/gdraw/gdraw.h index b88da0756..cc6a0d02a 100644 --- a/targets/app/common/Iggy/gdraw/gdraw.h +++ b/targets/app/common/Iggy/gdraw/gdraw.h @@ -1,9 +1,9 @@ #ifndef __LINUX_IGGY_GDRAW_H__ #define __LINUX_IGGY_GDRAW_H__ -#include "app/common/Iggy/include/rrCore.h" #include "app/common/Iggy/include/gdraw.h" #include "app/common/Iggy/include/iggy.h" +#include "app/common/Iggy/include/rrCore.h" #ifdef __cplusplus extern "C" { diff --git a/targets/app/common/Iggy/iggy_stubs.h b/targets/app/common/Iggy/iggy_stubs.h index 5df1121e1..509f5ffd0 100644 --- a/targets/app/common/Iggy/iggy_stubs.h +++ b/targets/app/common/Iggy/iggy_stubs.h @@ -9,7 +9,8 @@ #include "app/common/Iggy/include/iggy.h" #define STUBBED \ - {} + { \ + } RADEXPFUNC inline IggyValuePath* RADEXPLINK IggyPlayerRootPath(Iggy* f) { STUBBED; diff --git a/targets/app/common/Iggy/include/iggy.h b/targets/app/common/Iggy/include/iggy.h index 21f839c8f..5d4d43027 100644 --- a/targets/app/common/Iggy/include/iggy.h +++ b/targets/app/common/Iggy/include/iggy.h @@ -489,16 +489,15 @@ IDOCN typedef struct { rrbool(RADLINK* connection_valid)( Iggy* swf, HIGGYEXP iggyexp); // Iggy queries this to check if Iggy // Explorer is still connected - S32(RADLINK* poll_command) - (Iggy* swf, HIGGYEXP iggyexp, - U8** buffer); // stores command in *buffer, returns number of bytes + S32(RADLINK* poll_command)( + Iggy* swf, HIGGYEXP iggyexp, + U8** buffer); // stores command in *buffer, returns number of bytes void(RADLINK* send_command)( Iggy* swf, HIGGYEXP iggyexp, U8 command, void* buffer, S32 len); // writes a command with a payload of buffer:len - S32(RADLINK* get_storage) - (Iggy* swf, HIGGYEXP iggyexp, - U8** buffer); // returns temporary storage Iggy - // can use for assembling commands + S32(RADLINK* get_storage)(Iggy* swf, HIGGYEXP iggyexp, + U8** buffer); // returns temporary storage Iggy + // can use for assembling commands rrbool(RADLINK* attach)( Iggy* swf, HIGGYEXP iggyexp, iggyexp_detach_callback* cb, void* cbdata, IggyForPerfmonFunctions* diff --git a/targets/app/common/LocalizationManager.cpp b/targets/app/common/LocalizationManager.cpp index 037b134d5..c84713ef4 100644 --- a/targets/app/common/LocalizationManager.cpp +++ b/targets/app/common/LocalizationManager.cpp @@ -7,8 +7,8 @@ #include #include "app/common/App_structs.h" -#include "app/common/UI/All Platforms/ArchiveFile.h" #include "app/common/Game.h" +#include "app/common/UI/All Platforms/ArchiveFile.h" #include "java/Random.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" diff --git a/targets/app/common/MenuController.cpp b/targets/app/common/MenuController.cpp index 865d138c8..5b1257e7e 100644 --- a/targets/app/common/MenuController.cpp +++ b/targets/app/common/MenuController.cpp @@ -8,9 +8,8 @@ #include "app/common/Game.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" -#include "app/common/UI/Scenes/UIScene_FullscreenProgress.h" -#include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" +#include "app/common/UI/Scenes/UIScene_FullscreenProgress.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/ProgressRenderer.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" diff --git a/targets/app/common/Network/GameNetworkManager.cpp b/targets/app/common/Network/GameNetworkManager.cpp index 2206784c6..5c8bc0144 100644 --- a/targets/app/common/Network/GameNetworkManager.cpp +++ b/targets/app/common/Network/GameNetworkManager.cpp @@ -1,5 +1,4 @@ #include "GameNetworkManager.h" -#include "platform/game/game.h" #include @@ -10,14 +9,12 @@ #include #include -#include "minecraft/network/Socket.h" #include "app/common/Game.h" #include "app/common/GameRules/GameRuleManager.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" -#include "app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h" -#include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" +#include "app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h" #include "java/File.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" @@ -30,9 +27,9 @@ #include "minecraft/client/skins/TexturePack.h" #include "minecraft/client/skins/TexturePackRepository.h" #include "minecraft/network/Connection.h" +#include "minecraft/network/Socket.h" #include "minecraft/network/packet/DisconnectPacket.h" #include "minecraft/network/packet/PreLoginPacket.h" -#include "platform/network/network.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/ServerAction.h" @@ -47,13 +44,14 @@ #include "minecraft/world/level/tile/Tile.h" #include "platform/XboxStubs.h" #include "platform/fs/fs.h" +#include "platform/game/game.h" #include "platform/input/input.h" +#include "platform/network/network.h" #include "platform/profile/profile.h" #include "platform/renderer/renderer.h" #include "platform/storage/storage.h" #include "strings.h" #include "util/StringHelpers.h" -#include "platform/network/network.h" class FriendSessionInfo; class INVITE_INFO; @@ -350,7 +348,8 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft, createdConnections.push_back(connection); int primaryPad = PlatformProfile.GetPrimaryPad(); - PlatformGame.SetRichPresenceContext(primaryPad, CONTEXT_GAME_STATE_BLANK); + PlatformGame.SetRichPresenceContext(primaryPad, + CONTEXT_GAME_STATE_BLANK); if (GetPlayerCount() > 1) // Are we offline or online, and how many players are there { @@ -381,7 +380,8 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft, Socket* socket = pNetworkPlayer->GetSocket(); app.DebugPrintf( "Closing socket due to player %d not being signed in any " - "more\n", idx); + "more\n", + idx); if (!socket->close(false)) socket->close(true); continue; @@ -452,7 +452,8 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft, if (g_NetworkManager.IsLeavingGame() || !IsInSession()) break; if (PlatformProfile.IsSignedIn(idx) && !connection->isClosed()) { - PlatformGame.SetRichPresenceContext(idx, CONTEXT_GAME_STATE_BLANK); + PlatformGame.SetRichPresenceContext(idx, + CONTEXT_GAME_STATE_BLANK); if (IsLocalGame()) PlatformProfile.SetCurrentGameActivity( idx, CONTEXT_PRESENCE_MULTIPLAYEROFFLINE, false); @@ -1328,7 +1329,9 @@ void CGameNetworkManager::GameInviteReceived(int userIndex, // pInviteInfo; // tell the app to process this - { app.ProcessInvite(userIndex, localUsersMask, pInviteInfo); } + { + app.ProcessInvite(userIndex, localUsersMask, pInviteInfo); + } } } } diff --git a/targets/app/common/Network/GameNetworkManager.h b/targets/app/common/Network/GameNetworkManager.h index 622d44112..84ee1078b 100644 --- a/targets/app/common/Network/GameNetworkManager.h +++ b/targets/app/common/Network/GameNetworkManager.h @@ -4,12 +4,13 @@ #include #include #include + #include "minecraft/network/INetworkService.h" -#include "platform/thread/C4JThread.h" -#include "platform/network/NetTypes.h" #include "platform/PlatformTypes.h" #include "platform/network/IPlatformNetwork.h" +#include "platform/network/NetTypes.h" #include "platform/network/network.h" +#include "platform/thread/C4JThread.h" class ClientConnection; class Minecraft; diff --git a/targets/app/common/NetworkController.cpp b/targets/app/common/NetworkController.cpp index d4b4618f0..e7e309a03 100644 --- a/targets/app/common/NetworkController.cpp +++ b/targets/app/common/NetworkController.cpp @@ -7,7 +7,6 @@ #include "app/common/DLC/DLCPack.h" #include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" -#include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/ProgressRenderer.h" diff --git a/targets/app/common/NetworkController.h b/targets/app/common/NetworkController.h index 29ebaa0e0..82a1e0032 100644 --- a/targets/app/common/NetworkController.h +++ b/targets/app/common/NetworkController.h @@ -4,8 +4,8 @@ #include "app/common/App_structs.h" #include "minecraft/network/packet/DisconnectPacket.h" -#include "platform/network/NetTypes.h" #include "platform/XboxStubs.h" +#include "platform/network/NetTypes.h" #include "platform/storage/storage.h" struct INVITE_INFO; diff --git a/targets/app/common/SaveManager.cpp b/targets/app/common/SaveManager.cpp index 3b10dbe4a..9919d6021 100644 --- a/targets/app/common/SaveManager.cpp +++ b/targets/app/common/SaveManager.cpp @@ -4,7 +4,6 @@ #include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" -#include "app/common/Game.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/ServerAction.h" #include "platform/profile/profile.h" diff --git a/targets/app/common/Tutorial/Constraints/ChangeStateConstraint.cpp b/targets/app/common/Tutorial/Constraints/ChangeStateConstraint.cpp index 58c08a47d..e77054799 100644 --- a/targets/app/common/Tutorial/Constraints/ChangeStateConstraint.cpp +++ b/targets/app/common/Tutorial/Constraints/ChangeStateConstraint.cpp @@ -4,17 +4,17 @@ #include "app/common/Tutorial/Constraints/TutorialConstraint.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/ClientConnection.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/network/packet/PlayerInfoPacket.h" -#include "platform/network/network.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/level/LevelSettings.h" #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/Vec3.h" +#include "minecraft/world/tutorial/TutorialEnum.h" +#include "platform/network/network.h" ChangeStateConstraint::ChangeStateConstraint( Tutorial* tutorial, eTutorial_State targetState, diff --git a/targets/app/common/Tutorial/Constraints/ChangeStateConstraint.h b/targets/app/common/Tutorial/Constraints/ChangeStateConstraint.h index c6df3a7a6..22a99e4f1 100644 --- a/targets/app/common/Tutorial/Constraints/ChangeStateConstraint.h +++ b/targets/app/common/Tutorial/Constraints/ChangeStateConstraint.h @@ -3,8 +3,8 @@ #include #include "TutorialConstraint.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "minecraft/world/phys/AABB.h" +#include "minecraft/world/tutorial/TutorialEnum.h" class AABB; class Tutorial; diff --git a/targets/app/common/Tutorial/FullTutorial.cpp b/targets/app/common/Tutorial/FullTutorial.cpp index c5213a11c..81ee5e570 100644 --- a/targets/app/common/Tutorial/FullTutorial.cpp +++ b/targets/app/common/Tutorial/FullTutorial.cpp @@ -3,6 +3,7 @@ #include #include +#include "app/common/Game.h" #include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h" #include "app/common/Tutorial/Constraints/AreaConstraint.h" #include "app/common/Tutorial/Constraints/ChangeStateConstraint.h" @@ -23,7 +24,6 @@ #include "app/common/Tutorial/Tasks/UseTileTask.h" #include "app/common/Tutorial/Tasks/XuiCraftingTask.h" #include "app/common/Tutorial/Tutorial.h" -#include "app/common/Game.h" #include "minecraft/world/effect/MobEffect.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/alchemy/PotionMacros.h" diff --git a/targets/app/common/Tutorial/Hints/AreaHint.cpp b/targets/app/common/Tutorial/Hints/AreaHint.cpp index 90531693a..34fe58eb4 100644 --- a/targets/app/common/Tutorial/Hints/AreaHint.cpp +++ b/targets/app/common/Tutorial/Hints/AreaHint.cpp @@ -4,11 +4,11 @@ #include "app/common/Tutorial/Hints/TutorialHint.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/Vec3.h" +#include "minecraft/world/tutorial/TutorialEnum.h" AreaHint::AreaHint(eTutorial_Hint id, Tutorial* tutorial, eTutorial_State displayState, eTutorial_State completeState, diff --git a/targets/app/common/Tutorial/Hints/AreaHint.h b/targets/app/common/Tutorial/Hints/AreaHint.h index c94c6039f..26887218c 100644 --- a/targets/app/common/Tutorial/Hints/AreaHint.h +++ b/targets/app/common/Tutorial/Hints/AreaHint.h @@ -1,8 +1,8 @@ #pragma once #include "TutorialHint.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "minecraft/world/phys/AABB.h" +#include "minecraft/world/tutorial/TutorialEnum.h" class AABB; class Tutorial; diff --git a/targets/app/common/Tutorial/Hints/DiggerItemHint.cpp b/targets/app/common/Tutorial/Hints/DiggerItemHint.cpp index 573f8bedb..dfea1d621 100644 --- a/targets/app/common/Tutorial/Hints/DiggerItemHint.cpp +++ b/targets/app/common/Tutorial/Hints/DiggerItemHint.cpp @@ -57,7 +57,7 @@ int DiggerItemHint::attack(std::shared_ptr item, if (itemFound) { // It's also possible that we could hit TileEntities (eg falling // sand) so don't want to give this hint then - if (entity->instanceof (eTYPE_MOB)) { + if (entity->instanceof(eTYPE_MOB)) { return IDS_TUTORIAL_HINT_ATTACK_WITH_TOOL; } else { return -1; diff --git a/targets/app/common/Tutorial/Hints/LookAtEntityHint.h b/targets/app/common/Tutorial/Hints/LookAtEntityHint.h index 863a61720..533edffeb 100644 --- a/targets/app/common/Tutorial/Hints/LookAtEntityHint.h +++ b/targets/app/common/Tutorial/Hints/LookAtEntityHint.h @@ -2,8 +2,8 @@ // using namespace std; #include "TutorialHint.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "java/Class.h" +#include "minecraft/world/tutorial/TutorialEnum.h" class ItemInstance; class Tutorial; @@ -17,7 +17,7 @@ public: LookAtEntityHint(eTutorial_Hint id, Tutorial* tutorial, int descriptionId, int titleId, eINSTANCEOF type); // TODO: 4jcraft added, this was not implemented - ~LookAtEntityHint(){}; + ~LookAtEntityHint() {}; virtual bool onLookAtEntity(eINSTANCEOF type); }; diff --git a/targets/app/common/Tutorial/Hints/LookAtTileHint.cpp b/targets/app/common/Tutorial/Hints/LookAtTileHint.cpp index 96fd5abc9..07e028a8a 100644 --- a/targets/app/common/Tutorial/Hints/LookAtTileHint.cpp +++ b/targets/app/common/Tutorial/Hints/LookAtTileHint.cpp @@ -4,8 +4,8 @@ #include "app/common/Tutorial/Hints/TutorialHint.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "minecraft/world/item/Item.h" +#include "minecraft/world/tutorial/TutorialEnum.h" LookAtTileHint::LookAtTileHint(eTutorial_Hint id, Tutorial* tutorial, int tiles[], unsigned int tilesLength, diff --git a/targets/app/common/Tutorial/Hints/LookAtTileHint.h b/targets/app/common/Tutorial/Hints/LookAtTileHint.h index 548ba652e..c0eff2458 100644 --- a/targets/app/common/Tutorial/Hints/LookAtTileHint.h +++ b/targets/app/common/Tutorial/Hints/LookAtTileHint.h @@ -20,7 +20,7 @@ public: unsigned int tilesLength, int iconOverride = -1, int iData = -1, int iDataOverride = -1); // TODO: 4jcraft, added, destructor was never implemented - ~LookAtTileHint(){}; + ~LookAtTileHint() {}; virtual bool onLookAt(int id, int iData = 0); }; diff --git a/targets/app/common/Tutorial/Hints/TakeItemHint.cpp b/targets/app/common/Tutorial/Hints/TakeItemHint.cpp index 65641d141..934442fb2 100644 --- a/targets/app/common/Tutorial/Hints/TakeItemHint.cpp +++ b/targets/app/common/Tutorial/Hints/TakeItemHint.cpp @@ -4,8 +4,8 @@ #include "app/common/Tutorial/Hints/TutorialHint.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "minecraft/world/item/ItemInstance.h" +#include "minecraft/world/tutorial/TutorialEnum.h" TakeItemHint::TakeItemHint(eTutorial_Hint id, Tutorial* tutorial, int items[], unsigned int itemsLength) diff --git a/targets/app/common/Tutorial/Hints/TakeItemHint.h b/targets/app/common/Tutorial/Hints/TakeItemHint.h index d5e06f1ed..4826b2bfc 100644 --- a/targets/app/common/Tutorial/Hints/TakeItemHint.h +++ b/targets/app/common/Tutorial/Hints/TakeItemHint.h @@ -16,7 +16,7 @@ public: TakeItemHint(eTutorial_Hint id, Tutorial* tutorial, int items[], unsigned int itemsLength); // TODO: 4jcraft, added, it was never implemented - virtual ~TakeItemHint(){}; + virtual ~TakeItemHint() {}; virtual bool onTake(std::shared_ptr item); }; diff --git a/targets/app/common/Tutorial/Hints/TutorialHint.cpp b/targets/app/common/Tutorial/Hints/TutorialHint.cpp index eb4b5435e..c5482e446 100644 --- a/targets/app/common/Tutorial/Hints/TutorialHint.cpp +++ b/targets/app/common/Tutorial/Hints/TutorialHint.cpp @@ -1,10 +1,10 @@ #include "TutorialHint.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/world/level/material/Material.h" +#include "minecraft/world/tutorial/TutorialEnum.h" class Entity; class ItemInstance; diff --git a/targets/app/common/Tutorial/Hints/TutorialHint.h b/targets/app/common/Tutorial/Hints/TutorialHint.h index 3efca9d42..c1d247a64 100644 --- a/targets/app/common/Tutorial/Hints/TutorialHint.h +++ b/targets/app/common/Tutorial/Hints/TutorialHint.h @@ -3,8 +3,8 @@ #include -#include "minecraft/world/tutorial/TutorialEnum.h" #include "java/Class.h" +#include "minecraft/world/tutorial/TutorialEnum.h" class Entity; class ItemInstance; diff --git a/targets/app/common/Tutorial/Tasks/ChoiceTask.cpp b/targets/app/common/Tutorial/Tasks/ChoiceTask.cpp index 0c178167a..377299499 100644 --- a/targets/app/common/Tutorial/Tasks/ChoiceTask.cpp +++ b/targets/app/common/Tutorial/Tasks/ChoiceTask.cpp @@ -6,11 +6,11 @@ #include "app/common/Tutorial/Constraints/InputConstraint.h" #include "app/common/Tutorial/Tasks/TutorialTask.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/UI/ConsoleUIController.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/world/level/material/Material.h" +#include "minecraft/world/tutorial/TutorialEnum.h" #include "platform/input/input.h" ChoiceTask::ChoiceTask( diff --git a/targets/app/common/Tutorial/Tasks/ControllerTask.cpp b/targets/app/common/Tutorial/Tasks/ControllerTask.cpp index 7add2ad70..835d3cefc 100644 --- a/targets/app/common/Tutorial/Tasks/ControllerTask.cpp +++ b/targets/app/common/Tutorial/Tasks/ControllerTask.cpp @@ -6,9 +6,9 @@ #include #include +#include "app/common/Game.h" #include "app/common/Tutorial/Constraints/InputConstraint.h" #include "app/common/Tutorial/Tasks/TutorialTask.h" -#include "app/common/Game.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" diff --git a/targets/app/common/Tutorial/Tasks/HorseChoiceTask.cpp b/targets/app/common/Tutorial/Tasks/HorseChoiceTask.cpp index 775a35f23..1eb60cc15 100644 --- a/targets/app/common/Tutorial/Tasks/HorseChoiceTask.cpp +++ b/targets/app/common/Tutorial/Tasks/HorseChoiceTask.cpp @@ -3,10 +3,10 @@ #include #include "app/common/Tutorial/Tasks/ChoiceTask.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "java/Class.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/animal/EntityHorse.h" +#include "minecraft/world/tutorial/TutorialEnum.h" class Tutorial; @@ -39,7 +39,7 @@ int HorseChoiceTask::getDescriptionId() { } void HorseChoiceTask::onLookAtEntity(std::shared_ptr entity) { - if ((m_eHorseType < 0) && entity->instanceof (eTYPE_HORSE)) { + if ((m_eHorseType < 0) && entity->instanceof(eTYPE_HORSE)) { std::shared_ptr horse = std::dynamic_pointer_cast(entity); if (horse->isAdult()) m_eHorseType = horse->getType(); diff --git a/targets/app/common/Tutorial/Tasks/RideEntityTask.cpp b/targets/app/common/Tutorial/Tasks/RideEntityTask.cpp index b36f9de03..af7a61733 100644 --- a/targets/app/common/Tutorial/Tasks/RideEntityTask.cpp +++ b/targets/app/common/Tutorial/Tasks/RideEntityTask.cpp @@ -21,7 +21,7 @@ RideEntityTask::RideEntityTask(const int eType, Tutorial* tutorial, bool RideEntityTask::isCompleted() { return bIsCompleted; } void RideEntityTask::onRideEntity(std::shared_ptr entity) { - if (entity->instanceof ((eINSTANCEOF)m_eType)) { + if (entity->instanceof((eINSTANCEOF)m_eType)) { bIsCompleted = true; } } \ No newline at end of file diff --git a/targets/app/common/Tutorial/Tutorial.cpp b/targets/app/common/Tutorial/Tutorial.cpp index 957520108..0be4a2e96 100644 --- a/targets/app/common/Tutorial/Tutorial.cpp +++ b/targets/app/common/Tutorial/Tutorial.cpp @@ -8,6 +8,7 @@ #include "TutorialMessage.h" #include "app/common/App_structs.h" +#include "app/common/Game.h" #include "app/common/Tutorial/Constraints/TutorialConstraint.h" #include "app/common/Tutorial/Hints/DiggerItemHint.h" #include "app/common/Tutorial/Hints/LookAtEntityHint.h" @@ -20,7 +21,6 @@ #include "app/common/Tutorial/Tasks/RideEntityTask.h" #include "app/common/Tutorial/Tasks/TutorialTask.h" #include "app/common/UI/All Platforms/UIStructs.h" -#include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" #include "java/Class.h" #include "minecraft/GameEnums.h" @@ -2802,8 +2802,8 @@ void Tutorial::onLookAtEntity(std::shared_ptr entity) { } } - if ((m_CurrentState == e_Tutorial_State_Gameplay) && entity->instanceof - (eTYPE_HORSE)) { + if ((m_CurrentState == e_Tutorial_State_Gameplay) && + entity->instanceof(eTYPE_HORSE)) { changeTutorialState(e_Tutorial_State_Horse); } diff --git a/targets/app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.cpp b/targets/app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.cpp index 3bfbb9ba9..285d02a63 100644 --- a/targets/app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.cpp +++ b/targets/app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.cpp @@ -7,17 +7,17 @@ #include #include +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/All Platforms/UIStructs.h" -#include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/client/player/LocalPlayer.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/HtmlString.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/inventory/AbstractContainerMenu.h" @@ -782,7 +782,9 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { buttonX = eToolTipPickUpHalf; } - { buttonRT = eToolTipWhatIsThis; } + { + buttonRT = eToolTipWhatIsThis; + } } else { // Nothing in slot and nothing in hand. } diff --git a/targets/app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h b/targets/app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h index f7742227f..56850199d 100644 --- a/targets/app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h +++ b/targets/app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h @@ -4,8 +4,8 @@ #include #include "UIStructs.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/UI/All Platforms/UIEnums.h" +#include "minecraft/world/tutorial/TutorialEnum.h" class HtmlString; class ItemInstance; diff --git a/targets/app/common/UI/All Platforms/IUIScene_AnvilMenu.cpp b/targets/app/common/UI/All Platforms/IUIScene_AnvilMenu.cpp index effa9750f..cde45a9ec 100644 --- a/targets/app/common/UI/All Platforms/IUIScene_AnvilMenu.cpp +++ b/targets/app/common/UI/All Platforms/IUIScene_AnvilMenu.cpp @@ -3,8 +3,8 @@ #include #include -#include "app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h" #include "app/common/Game.h" +#include "app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h" #include "java/InputOutputStream/ByteArrayOutputStream.h" #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/client/Minecraft.h" diff --git a/targets/app/common/UI/All Platforms/IUIScene_BeaconMenu.cpp b/targets/app/common/UI/All Platforms/IUIScene_BeaconMenu.cpp index b470964d3..a8ff44b9d 100644 --- a/targets/app/common/UI/All Platforms/IUIScene_BeaconMenu.cpp +++ b/targets/app/common/UI/All Platforms/IUIScene_BeaconMenu.cpp @@ -5,11 +5,11 @@ #include #include -#include "minecraft/GameEnums.h" -#include "app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h" #include "app/common/Game.h" +#include "app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h" #include "java/InputOutputStream/ByteArrayOutputStream.h" #include "java/InputOutputStream/DataOutputStream.h" +#include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/ClientConnection.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" diff --git a/targets/app/common/UI/All Platforms/IUIScene_CraftingMenu.cpp b/targets/app/common/UI/All Platforms/IUIScene_CraftingMenu.cpp index 99afc9955..b62eb32e3 100644 --- a/targets/app/common/UI/All Platforms/IUIScene_CraftingMenu.cpp +++ b/targets/app/common/UI/All Platforms/IUIScene_CraftingMenu.cpp @@ -7,16 +7,16 @@ #include #include +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" #include "app/common/UI/All Platforms/UIEnums.h" -#include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" #include "minecraft/Console_Debug_enum.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" #include "minecraft/client/player/LocalPlayer.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/entity/player/Player.h" diff --git a/targets/app/common/UI/All Platforms/IUIScene_CraftingMenu.h b/targets/app/common/UI/All Platforms/IUIScene_CraftingMenu.h index 0d1189b82..da6fe24a8 100644 --- a/targets/app/common/UI/All Platforms/IUIScene_CraftingMenu.h +++ b/targets/app/common/UI/All Platforms/IUIScene_CraftingMenu.h @@ -2,10 +2,10 @@ #include #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/crafting/Recipy.h" +#include "minecraft/world/tutorial/TutorialEnum.h" class LocalPlayer; class ItemInstance; diff --git a/targets/app/common/UI/All Platforms/IUIScene_CreativeMenu.cpp b/targets/app/common/UI/All Platforms/IUIScene_CreativeMenu.cpp index 66a5348e4..97de9e63f 100644 --- a/targets/app/common/UI/All Platforms/IUIScene_CreativeMenu.cpp +++ b/targets/app/common/UI/All Platforms/IUIScene_CreativeMenu.cpp @@ -6,14 +6,14 @@ #include #include -#include "app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h" +#include "app/common/Audio/SoundTypes.h" #include "app/common/Game.h" +#include "app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h" #include "app/common/UI/ConsoleUIController.h" #include "java/JavaMath.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/SimpleContainer.h" #include "minecraft/world/entity/Painting.h" #include "minecraft/world/entity/animal/EntityHorse.h" diff --git a/targets/app/common/UI/All Platforms/IUIScene_HUD.cpp b/targets/app/common/UI/All Platforms/IUIScene_HUD.cpp index f8b3d944d..71b48b145 100644 --- a/targets/app/common/UI/All Platforms/IUIScene_HUD.cpp +++ b/targets/app/common/UI/All Platforms/IUIScene_HUD.cpp @@ -3,12 +3,10 @@ #include #include -#include "platform/profile/profile.h" -#include "platform/renderer/renderer.h" -#include "minecraft/GameEnums.h" #include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" #include "java/Class.h" +#include "minecraft/GameEnums.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" @@ -22,6 +20,8 @@ #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/food/FoodData.h" #include "minecraft/world/level/material/Material.h" +#include "platform/profile/profile.h" +#include "platform/renderer/renderer.h" IUIScene_HUD::IUIScene_HUD() { m_lastActiveSlot = -1; @@ -79,9 +79,10 @@ void IUIScene_HUD::updateFrameTick() { SetDisplayName(PlatformProfile.GetDisplayName(iPad)); - SetTooltipsEnabled(((ui.GetMenuDisplayed(PlatformProfile.GetPrimaryPad())) || - (app.GetGameSettings(PlatformProfile.GetPrimaryPad(), - eGameSetting_Tooltips) != 0))); + SetTooltipsEnabled( + ((ui.GetMenuDisplayed(PlatformProfile.GetPrimaryPad())) || + (app.GetGameSettings(PlatformProfile.GetPrimaryPad(), + eGameSetting_Tooltips) != 0))); SetActiveSlot(pMinecraft->localplayers[iPad]->inventory->selected); diff --git a/targets/app/common/UI/All Platforms/IUIScene_PauseMenu.cpp b/targets/app/common/UI/All Platforms/IUIScene_PauseMenu.cpp index 015a83b6b..7b782bf40 100644 --- a/targets/app/common/UI/All Platforms/IUIScene_PauseMenu.cpp +++ b/targets/app/common/UI/All Platforms/IUIScene_PauseMenu.cpp @@ -11,11 +11,11 @@ #include "app/common/DLC/DLCManager.h" #include "app/common/DLC/DLCPack.h" +#include "app/common/Game.h" #include "app/common/GameRules/GameRuleManager.h" #include "app/common/Network/GameNetworkManager.h" -#include "app/common/UI/UIScene.h" -#include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" +#include "app/common/UI/UIScene.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/ProgressRenderer.h" diff --git a/targets/app/common/UI/All Platforms/IUIScene_TradingMenu.cpp b/targets/app/common/UI/All Platforms/IUIScene_TradingMenu.cpp index f01c72940..38ae75cd9 100644 --- a/targets/app/common/UI/All Platforms/IUIScene_TradingMenu.cpp +++ b/targets/app/common/UI/All Platforms/IUIScene_TradingMenu.cpp @@ -4,11 +4,10 @@ #include +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" #include "app/common/UI/All Platforms/UIEnums.h" -#include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" -#include "util/StringHelpers.h" #include "java/InputOutputStream/ByteArrayOutputStream.h" #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/client/Minecraft.h" @@ -24,6 +23,7 @@ #include "minecraft/world/item/trading/MerchantRecipe.h" #include "minecraft/world/item/trading/MerchantRecipeList.h" #include "strings.h" +#include "util/StringHelpers.h" IUIScene_TradingMenu::IUIScene_TradingMenu() { m_validOffersCount = 0; diff --git a/targets/app/common/UI/All Platforms/IUIScene_TradingMenu.h b/targets/app/common/UI/All Platforms/IUIScene_TradingMenu.h index 7e269a451..79df467b7 100644 --- a/targets/app/common/UI/All Platforms/IUIScene_TradingMenu.h +++ b/targets/app/common/UI/All Platforms/IUIScene_TradingMenu.h @@ -6,11 +6,11 @@ #include #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "minecraft/util/HtmlString.h" #include "minecraft/world/inventory/MerchantMenu.h" #include "minecraft/world/item/Rarity.h" #include "minecraft/world/item/trading/Merchant.h" +#include "minecraft/world/tutorial/TutorialEnum.h" class MerchantRecipe; class HtmlString; diff --git a/targets/app/common/UI/All Platforms/UIStructs.h b/targets/app/common/UI/All Platforms/UIStructs.h index 1f303e75c..65f527bfc 100644 --- a/targets/app/common/UI/All Platforms/UIStructs.h +++ b/targets/app/common/UI/All Platforms/UIStructs.h @@ -8,8 +8,8 @@ #include "UIEnums.h" #include "minecraft/GameHostOptions.h" -#include "platform/thread/C4JThread.h" #include "platform/storage/storage.h" +#include "platform/thread/C4JThread.h" class Container; class Inventory; diff --git a/targets/app/common/UI/Components/UIComponent_Chat.cpp b/targets/app/common/UI/Components/UIComponent_Chat.cpp index 2dbc61780..1a967e72e 100644 --- a/targets/app/common/UI/Components/UIComponent_Chat.cpp +++ b/targets/app/common/UI/Components/UIComponent_Chat.cpp @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/renderer/renderer.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Components/UIComponent_Chat.h b/targets/app/common/UI/Components/UIComponent_Chat.h index 68333ce51..3283c2a0a 100644 --- a/targets/app/common/UI/Components/UIComponent_Chat.h +++ b/targets/app/common/UI/Components/UIComponent_Chat.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" #include "platform/renderer/renderer.h" class UILayer; diff --git a/targets/app/common/UI/Components/UIComponent_DebugUIMarketingGuide.cpp b/targets/app/common/UI/Components/UIComponent_DebugUIMarketingGuide.cpp index d57d95314..11ffd7495 100644 --- a/targets/app/common/UI/Components/UIComponent_DebugUIMarketingGuide.cpp +++ b/targets/app/common/UI/Components/UIComponent_DebugUIMarketingGuide.cpp @@ -1,7 +1,7 @@ #include "UIComponent_DebugUIMarketingGuide.h" -#include "app/common/UI/UIScene.h" #include "app/common/Iggy/include/iggy.h" +#include "app/common/UI/UIScene.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Components/UIComponent_DebugUIMarketingGuide.h b/targets/app/common/UI/Components/UIComponent_DebugUIMarketingGuide.h index 88681a955..3735cdaa8 100644 --- a/targets/app/common/UI/Components/UIComponent_DebugUIMarketingGuide.h +++ b/targets/app/common/UI/Components/UIComponent_DebugUIMarketingGuide.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Components/UIComponent_MenuBackground.cpp b/targets/app/common/UI/Components/UIComponent_MenuBackground.cpp index 8f8e1a866..d230bb1d6 100644 --- a/targets/app/common/UI/Components/UIComponent_MenuBackground.cpp +++ b/targets/app/common/UI/Components/UIComponent_MenuBackground.cpp @@ -1,8 +1,8 @@ #include "UIComponent_MenuBackground.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/renderer/renderer.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Components/UIComponent_MenuBackground.h b/targets/app/common/UI/Components/UIComponent_MenuBackground.h index 02beeb6b6..2999fde7d 100644 --- a/targets/app/common/UI/Components/UIComponent_MenuBackground.h +++ b/targets/app/common/UI/Components/UIComponent_MenuBackground.h @@ -2,9 +2,9 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" #include "platform/renderer/renderer.h" class UILayer; diff --git a/targets/app/common/UI/Components/UIComponent_Panorama.cpp b/targets/app/common/UI/Components/UIComponent_Panorama.cpp index c22ec72c8..e663598b0 100644 --- a/targets/app/common/UI/Components/UIComponent_Panorama.cpp +++ b/targets/app/common/UI/Components/UIComponent_Panorama.cpp @@ -4,9 +4,9 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/renderer/renderer.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Components/UIComponent_Panorama.h b/targets/app/common/UI/Components/UIComponent_Panorama.h index fcf16038c..73e85f686 100644 --- a/targets/app/common/UI/Components/UIComponent_Panorama.h +++ b/targets/app/common/UI/Components/UIComponent_Panorama.h @@ -2,9 +2,9 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/renderer/renderer.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Components/UIComponent_PressStartToPlay.cpp b/targets/app/common/UI/Components/UIComponent_PressStartToPlay.cpp index ba45d5cac..4ec77d637 100644 --- a/targets/app/common/UI/Components/UIComponent_PressStartToPlay.cpp +++ b/targets/app/common/UI/Components/UIComponent_PressStartToPlay.cpp @@ -1,9 +1,9 @@ #include "UIComponent_PressStartToPlay.h" -#include "app/common/UI/Controls/UIControl_Label.h" -#include "app/common/UI/UIScene.h" #include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" +#include "app/common/UI/Controls/UIControl_Label.h" +#include "app/common/UI/UIScene.h" #include "strings.h" class UILayer; diff --git a/targets/app/common/UI/Components/UIComponent_PressStartToPlay.h b/targets/app/common/UI/Components/UIComponent_PressStartToPlay.h index 020c887ef..bcff89963 100644 --- a/targets/app/common/UI/Components/UIComponent_PressStartToPlay.h +++ b/targets/app/common/UI/Components/UIComponent_PressStartToPlay.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/PlatformTypes.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Components/UIComponent_Tooltips.cpp b/targets/app/common/UI/Components/UIComponent_Tooltips.cpp index 1ebda0182..7b734b56c 100644 --- a/targets/app/common/UI/Components/UIComponent_Tooltips.cpp +++ b/targets/app/common/UI/Components/UIComponent_Tooltips.cpp @@ -1,18 +1,18 @@ #include "UIComponent_Tooltips.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #include "minecraft/GameEnums.h" #include "platform/profile/profile.h" #include "platform/renderer/renderer.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif -#include "app/common/Iggy/include/rrCore.h" #include "app/common/Game.h" +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/ConsoleUIController.h" #include "util/StringHelpers.h" diff --git a/targets/app/common/UI/Components/UIComponent_Tooltips.h b/targets/app/common/UI/Components/UIComponent_Tooltips.h index 33cb096dc..4c1b4930b 100644 --- a/targets/app/common/UI/Components/UIComponent_Tooltips.h +++ b/targets/app/common/UI/Components/UIComponent_Tooltips.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #include "minecraft/GameEnums.h" #include "platform/PlatformTypes.h" #include "platform/renderer/renderer.h" diff --git a/targets/app/common/UI/Components/UIComponent_TutorialPopup.cpp b/targets/app/common/UI/Components/UIComponent_TutorialPopup.cpp index 15d352d61..2c6956927 100644 --- a/targets/app/common/UI/Components/UIComponent_TutorialPopup.cpp +++ b/targets/app/common/UI/Components/UIComponent_TutorialPopup.cpp @@ -4,19 +4,19 @@ #include +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/Tile.h" +#include "minecraft/world/tutorial/TutorialEnum.h" #include "platform/profile/profile.h" #include "strings.h" #include "util/StringHelpers.h" diff --git a/targets/app/common/UI/Components/UIComponent_TutorialPopup.h b/targets/app/common/UI/Components/UIComponent_TutorialPopup.h index 70362f144..b168f1fbf 100644 --- a/targets/app/common/UI/Components/UIComponent_TutorialPopup.h +++ b/targets/app/common/UI/Components/UIComponent_TutorialPopup.h @@ -3,12 +3,12 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/renderer/renderer.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Components/UIScene_HUD.cpp b/targets/app/common/UI/Components/UIScene_HUD.cpp index e1f77974c..6340bf06c 100644 --- a/targets/app/common/UI/Components/UIScene_HUD.cpp +++ b/targets/app/common/UI/Components/UIScene_HUD.cpp @@ -4,12 +4,12 @@ #include #include +#include "app/common/Game.h" #include "app/common/UI/Components/UIComponent_Chat.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/Minecraft.h" diff --git a/targets/app/common/UI/Components/UIScene_HUD.h b/targets/app/common/UI/Components/UIScene_HUD.h index 464a6c0af..ea016b888 100644 --- a/targets/app/common/UI/Components/UIScene_HUD.h +++ b/targets/app/common/UI/Components/UIScene_HUD.h @@ -2,12 +2,12 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/IUIScene_HUD.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/renderer/renderer.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/ConsoleUIController.cpp b/targets/app/common/UI/ConsoleUIController.cpp index a72817a6c..8614b6e68 100644 --- a/targets/app/common/UI/ConsoleUIController.cpp +++ b/targets/app/common/UI/ConsoleUIController.cpp @@ -1,18 +1,19 @@ // GDraw GL backend for Linux -#include "platform/renderer/renderer.h" -#include "renderer/gl/gl_compat.h" #include "ConsoleUIController.h" -#include "app/common/UI/All Platforms/UIStructs.h" + #include "app/common/Iggy/gdraw/gdraw.h" #include "app/common/Iggy/include/iggy.h" +#include "app/common/UI/All Platforms/UIStructs.h" +#include "platform/renderer/renderer.h" +#include "renderer/gl/gl_compat.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif -#include "app/common/Iggy/include/rrCore.h" #include "app/common/Game.h" #include "app/common/Iggy/include/gdraw.h" +#include "app/common/Iggy/include/rrCore.h" ConsoleUIController ui; diff --git a/targets/app/common/UI/ConsoleUIController.h b/targets/app/common/UI/ConsoleUIController.h index 624a2c501..24a951c0a 100644 --- a/targets/app/common/UI/ConsoleUIController.h +++ b/targets/app/common/UI/ConsoleUIController.h @@ -1,9 +1,9 @@ #pragma once -#include "app/common/UI/All Platforms/UIStructs.h" -#include "app/common/UI/UIController.h" #include "app/common/Iggy/include/iggy.h" #include "app/common/Iggy/include/rrCore.h" +#include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/UIController.h" #include "platform/profile/profile.h" class ConsoleUIController : public UIController { diff --git a/targets/app/common/UI/Controls/UIControl.cpp b/targets/app/common/UI/Controls/UIControl.cpp index 66e38ee68..5087b3ebe 100644 --- a/targets/app/common/UI/Controls/UIControl.cpp +++ b/targets/app/common/UI/Controls/UIControl.cpp @@ -1,12 +1,12 @@ #include "UIControl.h" -#include "app/common/UI/UIScene.h" #include "app/common/Iggy/include/iggy.h" +#include "app/common/UI/UIScene.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif -#include "app/common/Iggy/include/rrCore.h" #include "app/common/Game.h" +#include "app/common/Iggy/include/rrCore.h" #include "java/JavaMath.h" UIControl::UIControl() { diff --git a/targets/app/common/UI/Controls/UIControl_Base.cpp b/targets/app/common/UI/Controls/UIControl_Base.cpp index 8efd3d9a5..157ec0487 100644 --- a/targets/app/common/UI/Controls/UIControl_Base.cpp +++ b/targets/app/common/UI/Controls/UIControl_Base.cpp @@ -3,10 +3,10 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_Base.h b/targets/app/common/UI/Controls/UIControl_Base.h index 0f4c75e54..ae473c079 100644 --- a/targets/app/common/UI/Controls/UIControl_Base.h +++ b/targets/app/common/UI/Controls/UIControl_Base.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_BeaconEffectButton.cpp b/targets/app/common/UI/Controls/UIControl_BeaconEffectButton.cpp index c950d6e59..e4c065e86 100644 --- a/targets/app/common/UI/Controls/UIControl_BeaconEffectButton.cpp +++ b/targets/app/common/UI/Controls/UIControl_BeaconEffectButton.cpp @@ -1,8 +1,8 @@ #include "UIControl_BeaconEffectButton.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_BeaconEffectButton.h b/targets/app/common/UI/Controls/UIControl_BeaconEffectButton.h index ddaf7166a..9deb12b08 100644 --- a/targets/app/common/UI/Controls/UIControl_BeaconEffectButton.h +++ b/targets/app/common/UI/Controls/UIControl_BeaconEffectButton.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_BeaconEffectButton.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_BitmapIcon.cpp b/targets/app/common/UI/Controls/UIControl_BitmapIcon.cpp index df0bf0200..719241704 100644 --- a/targets/app/common/UI/Controls/UIControl_BitmapIcon.cpp +++ b/targets/app/common/UI/Controls/UIControl_BitmapIcon.cpp @@ -1,8 +1,8 @@ #include "UIControl_BitmapIcon.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_BitmapIcon.h b/targets/app/common/UI/Controls/UIControl_BitmapIcon.h index f114dc331..a92f5f5c4 100644 --- a/targets/app/common/UI/Controls/UIControl_BitmapIcon.h +++ b/targets/app/common/UI/Controls/UIControl_BitmapIcon.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_BitmapIcon.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_Button.cpp b/targets/app/common/UI/Controls/UIControl_Button.cpp index 9ff0647c3..e28738511 100644 --- a/targets/app/common/UI/Controls/UIControl_Button.cpp +++ b/targets/app/common/UI/Controls/UIControl_Button.cpp @@ -1,10 +1,10 @@ #include "UIControl_Button.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_Button.h b/targets/app/common/UI/Controls/UIControl_Button.h index f20bdd6eb..a20be07b7 100644 --- a/targets/app/common/UI/Controls/UIControl_Button.h +++ b/targets/app/common/UI/Controls/UIControl_Button.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_ButtonList.cpp b/targets/app/common/UI/Controls/UIControl_ButtonList.cpp index 94cf3950b..b382fc939 100644 --- a/targets/app/common/UI/Controls/UIControl_ButtonList.cpp +++ b/targets/app/common/UI/Controls/UIControl_ButtonList.cpp @@ -1,10 +1,10 @@ #include "UIControl_ButtonList.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_ButtonList.h b/targets/app/common/UI/Controls/UIControl_ButtonList.h index f46ea438b..8598a56b7 100644 --- a/targets/app/common/UI/Controls/UIControl_ButtonList.h +++ b/targets/app/common/UI/Controls/UIControl_ButtonList.h @@ -3,11 +3,11 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_CheckBox.cpp b/targets/app/common/UI/Controls/UIControl_CheckBox.cpp index c3d382d1e..8c61e80c0 100644 --- a/targets/app/common/UI/Controls/UIControl_CheckBox.cpp +++ b/targets/app/common/UI/Controls/UIControl_CheckBox.cpp @@ -1,10 +1,10 @@ #include "UIControl_CheckBox.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_CheckBox.h b/targets/app/common/UI/Controls/UIControl_CheckBox.h index f349efb40..c5b4b8100 100644 --- a/targets/app/common/UI/Controls/UIControl_CheckBox.h +++ b/targets/app/common/UI/Controls/UIControl_CheckBox.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_Cursor.cpp b/targets/app/common/UI/Controls/UIControl_Cursor.cpp index c0a9bc31a..c36aa0fea 100644 --- a/targets/app/common/UI/Controls/UIControl_Cursor.cpp +++ b/targets/app/common/UI/Controls/UIControl_Cursor.cpp @@ -1,8 +1,8 @@ #include "UIControl_Cursor.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_Cursor.h b/targets/app/common/UI/Controls/UIControl_Cursor.h index 52397d65d..7a517999b 100644 --- a/targets/app/common/UI/Controls/UIControl_Cursor.h +++ b/targets/app/common/UI/Controls/UIControl_Cursor.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_Cursor.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_DLCList.cpp b/targets/app/common/UI/Controls/UIControl_DLCList.cpp index 3bc119b9e..c8dd98724 100644 --- a/targets/app/common/UI/Controls/UIControl_DLCList.cpp +++ b/targets/app/common/UI/Controls/UIControl_DLCList.cpp @@ -1,9 +1,9 @@ #include "UIControl_DLCList.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_DLCList.h b/targets/app/common/UI/Controls/UIControl_DLCList.h index 8a63aa730..40b5e85ce 100644 --- a/targets/app/common/UI/Controls/UIControl_DLCList.h +++ b/targets/app/common/UI/Controls/UIControl_DLCList.h @@ -2,9 +2,9 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_DLCList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_DynamicLabel.cpp b/targets/app/common/UI/Controls/UIControl_DynamicLabel.cpp index 93250ad5a..29974fb3a 100644 --- a/targets/app/common/UI/Controls/UIControl_DynamicLabel.cpp +++ b/targets/app/common/UI/Controls/UIControl_DynamicLabel.cpp @@ -1,9 +1,9 @@ #include "UIControl_DynamicLabel.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_DynamicLabel.h b/targets/app/common/UI/Controls/UIControl_DynamicLabel.h index 622ef07e2..e2b897ff2 100644 --- a/targets/app/common/UI/Controls/UIControl_DynamicLabel.h +++ b/targets/app/common/UI/Controls/UIControl_DynamicLabel.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_DynamicLabel.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_EnchantmentBook.cpp b/targets/app/common/UI/Controls/UIControl_EnchantmentBook.cpp index 6e30bc79c..bdc3aabe1 100644 --- a/targets/app/common/UI/Controls/UIControl_EnchantmentBook.cpp +++ b/targets/app/common/UI/Controls/UIControl_EnchantmentBook.cpp @@ -2,9 +2,9 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/renderer/renderer.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Controls/UIControl_EnchantmentBook.h b/targets/app/common/UI/Controls/UIControl_EnchantmentBook.h index 1820d27dd..ef672a20f 100644 --- a/targets/app/common/UI/Controls/UIControl_EnchantmentBook.h +++ b/targets/app/common/UI/Controls/UIControl_EnchantmentBook.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_EnchantmentBook.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_EnchantmentButton.cpp b/targets/app/common/UI/Controls/UIControl_EnchantmentButton.cpp index ec1ceaf30..b5fa3c325 100644 --- a/targets/app/common/UI/Controls/UIControl_EnchantmentButton.cpp +++ b/targets/app/common/UI/Controls/UIControl_EnchantmentButton.cpp @@ -5,11 +5,11 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "minecraft/GameEnums.h" #include "platform/renderer/renderer.h" #ifndef _ENABLEIGGY diff --git a/targets/app/common/UI/Controls/UIControl_EnchantmentButton.h b/targets/app/common/UI/Controls/UIControl_EnchantmentButton.h index 2bfd154b3..5fc294883 100644 --- a/targets/app/common/UI/Controls/UIControl_EnchantmentButton.h +++ b/targets/app/common/UI/Controls/UIControl_EnchantmentButton.h @@ -3,9 +3,9 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_EnchantmentButton.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_HTMLLabel.cpp b/targets/app/common/UI/Controls/UIControl_HTMLLabel.cpp index 9b37206ed..8cdd394f2 100644 --- a/targets/app/common/UI/Controls/UIControl_HTMLLabel.cpp +++ b/targets/app/common/UI/Controls/UIControl_HTMLLabel.cpp @@ -1,9 +1,9 @@ #include "UIControl_HTMLLabel.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_HTMLLabel.h b/targets/app/common/UI/Controls/UIControl_HTMLLabel.h index 7f82d9902..520ca3df9 100644 --- a/targets/app/common/UI/Controls/UIControl_HTMLLabel.h +++ b/targets/app/common/UI/Controls/UIControl_HTMLLabel.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_HTMLLabel.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_Label.cpp b/targets/app/common/UI/Controls/UIControl_Label.cpp index d05165c4d..6c46af9de 100644 --- a/targets/app/common/UI/Controls/UIControl_Label.cpp +++ b/targets/app/common/UI/Controls/UIControl_Label.cpp @@ -1,10 +1,10 @@ #include "UIControl_Label.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_Label.h b/targets/app/common/UI/Controls/UIControl_Label.h index a91daeb63..09b61dcd8 100644 --- a/targets/app/common/UI/Controls/UIControl_Label.h +++ b/targets/app/common/UI/Controls/UIControl_Label.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_LeaderboardList.cpp b/targets/app/common/UI/Controls/UIControl_LeaderboardList.cpp index be5a218c6..c16fa9f8b 100644 --- a/targets/app/common/UI/Controls/UIControl_LeaderboardList.cpp +++ b/targets/app/common/UI/Controls/UIControl_LeaderboardList.cpp @@ -1,9 +1,9 @@ #include "UIControl_LeaderboardList.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_LeaderboardList.h b/targets/app/common/UI/Controls/UIControl_LeaderboardList.h index 0843c9ef8..b173d4280 100644 --- a/targets/app/common/UI/Controls/UIControl_LeaderboardList.h +++ b/targets/app/common/UI/Controls/UIControl_LeaderboardList.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_LeaderboardList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_MinecraftHorse.cpp b/targets/app/common/UI/Controls/UIControl_MinecraftHorse.cpp index 8b6c42a35..a1640bdf5 100644 --- a/targets/app/common/UI/Controls/UIControl_MinecraftHorse.cpp +++ b/targets/app/common/UI/Controls/UIControl_MinecraftHorse.cpp @@ -3,9 +3,9 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HorseInventoryMenu.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/renderer/renderer.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Controls/UIControl_MinecraftHorse.h b/targets/app/common/UI/Controls/UIControl_MinecraftHorse.h index e353401e8..ef44ad127 100644 --- a/targets/app/common/UI/Controls/UIControl_MinecraftHorse.h +++ b/targets/app/common/UI/Controls/UIControl_MinecraftHorse.h @@ -1,7 +1,7 @@ #pragma once -#include "app/common/UI/Controls/UIControl_MinecraftHorse.h" #include "app/common/Iggy/include/iggy.h" +#include "app/common/UI/Controls/UIControl_MinecraftHorse.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_MinecraftPlayer.cpp b/targets/app/common/UI/Controls/UIControl_MinecraftPlayer.cpp index d60571d4b..95e3b4fa0 100644 --- a/targets/app/common/UI/Controls/UIControl_MinecraftPlayer.cpp +++ b/targets/app/common/UI/Controls/UIControl_MinecraftPlayer.cpp @@ -3,9 +3,9 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/renderer/renderer.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Controls/UIControl_MinecraftPlayer.h b/targets/app/common/UI/Controls/UIControl_MinecraftPlayer.h index 3bb87792a..04b5558b7 100644 --- a/targets/app/common/UI/Controls/UIControl_MinecraftPlayer.h +++ b/targets/app/common/UI/Controls/UIControl_MinecraftPlayer.h @@ -1,7 +1,7 @@ #pragma once -#include "app/common/UI/Controls/UIControl_MinecraftPlayer.h" #include "app/common/Iggy/include/iggy.h" +#include "app/common/UI/Controls/UIControl_MinecraftPlayer.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_PlayerList.cpp b/targets/app/common/UI/Controls/UIControl_PlayerList.cpp index 49094c335..b097b7226 100644 --- a/targets/app/common/UI/Controls/UIControl_PlayerList.cpp +++ b/targets/app/common/UI/Controls/UIControl_PlayerList.cpp @@ -1,9 +1,9 @@ #include "UIControl_PlayerList.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_PlayerList.h b/targets/app/common/UI/Controls/UIControl_PlayerList.h index 277a298cf..ca4439562 100644 --- a/targets/app/common/UI/Controls/UIControl_PlayerList.h +++ b/targets/app/common/UI/Controls/UIControl_PlayerList.h @@ -2,9 +2,9 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_PlayerList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_PlayerSkinPreview.cpp b/targets/app/common/UI/Controls/UIControl_PlayerSkinPreview.cpp index 7d5ab5f02..a27d21c71 100644 --- a/targets/app/common/UI/Controls/UIControl_PlayerSkinPreview.cpp +++ b/targets/app/common/UI/Controls/UIControl_PlayerSkinPreview.cpp @@ -6,8 +6,8 @@ #include #include -#include "app/common/UI/Controls/UIControl.h" #include "app/common/Iggy/include/iggy.h" +#include "app/common/UI/Controls/UIControl.h" #include "minecraft/GameEnums.h" #include "platform/renderer/renderer.h" #ifndef _ENABLEIGGY diff --git a/targets/app/common/UI/Controls/UIControl_PlayerSkinPreview.h b/targets/app/common/UI/Controls/UIControl_PlayerSkinPreview.h index e32732b85..fb4a23171 100644 --- a/targets/app/common/UI/Controls/UIControl_PlayerSkinPreview.h +++ b/targets/app/common/UI/Controls/UIControl_PlayerSkinPreview.h @@ -5,8 +5,8 @@ #include #include -#include "app/common/UI/Controls/UIControl_PlayerSkinPreview.h" #include "app/common/Iggy/include/iggy.h" +#include "app/common/UI/Controls/UIControl_PlayerSkinPreview.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_Progress.cpp b/targets/app/common/UI/Controls/UIControl_Progress.cpp index 466922f69..d1d1b352e 100644 --- a/targets/app/common/UI/Controls/UIControl_Progress.cpp +++ b/targets/app/common/UI/Controls/UIControl_Progress.cpp @@ -1,10 +1,10 @@ #include "UIControl_Progress.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_Progress.h b/targets/app/common/UI/Controls/UIControl_Progress.h index d4d715585..dc7518d9e 100644 --- a/targets/app/common/UI/Controls/UIControl_Progress.h +++ b/targets/app/common/UI/Controls/UIControl_Progress.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_Progress.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_SaveList.cpp b/targets/app/common/UI/Controls/UIControl_SaveList.cpp index f92ad5467..c2688b39c 100644 --- a/targets/app/common/UI/Controls/UIControl_SaveList.cpp +++ b/targets/app/common/UI/Controls/UIControl_SaveList.cpp @@ -1,9 +1,9 @@ #include "UIControl_SaveList.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_SaveList.h b/targets/app/common/UI/Controls/UIControl_SaveList.h index fef3b7fca..a50ca548b 100644 --- a/targets/app/common/UI/Controls/UIControl_SaveList.h +++ b/targets/app/common/UI/Controls/UIControl_SaveList.h @@ -2,9 +2,9 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_SaveList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_Slider.cpp b/targets/app/common/UI/Controls/UIControl_Slider.cpp index b5272faff..fa56baaeb 100644 --- a/targets/app/common/UI/Controls/UIControl_Slider.cpp +++ b/targets/app/common/UI/Controls/UIControl_Slider.cpp @@ -1,16 +1,16 @@ #include "UIControl_Slider.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif +#include "app/common/Audio/SoundTypes.h" #include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/ConsoleUIController.h" -#include "app/common/Audio/SoundTypes.h" #include "util/StringHelpers.h" UIControl_Slider::UIControl_Slider() { diff --git a/targets/app/common/UI/Controls/UIControl_Slider.h b/targets/app/common/UI/Controls/UIControl_Slider.h index 830028174..67e7bae17 100644 --- a/targets/app/common/UI/Controls/UIControl_Slider.h +++ b/targets/app/common/UI/Controls/UIControl_Slider.h @@ -3,11 +3,11 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_SlotList.cpp b/targets/app/common/UI/Controls/UIControl_SlotList.cpp index dcedc81e6..b92f9e02c 100644 --- a/targets/app/common/UI/Controls/UIControl_SlotList.cpp +++ b/targets/app/common/UI/Controls/UIControl_SlotList.cpp @@ -1,9 +1,9 @@ #include "UIControl_SlotList.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_SlotList.h b/targets/app/common/UI/Controls/UIControl_SlotList.h index 85f9cccba..bb0004669 100644 --- a/targets/app/common/UI/Controls/UIControl_SlotList.h +++ b/targets/app/common/UI/Controls/UIControl_SlotList.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_SpaceIndicatorBar.cpp b/targets/app/common/UI/Controls/UIControl_SpaceIndicatorBar.cpp index 7361929d5..d7f581f4f 100644 --- a/targets/app/common/UI/Controls/UIControl_SpaceIndicatorBar.cpp +++ b/targets/app/common/UI/Controls/UIControl_SpaceIndicatorBar.cpp @@ -1,10 +1,10 @@ #include "UIControl_SpaceIndicatorBar.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_SpaceIndicatorBar.h b/targets/app/common/UI/Controls/UIControl_SpaceIndicatorBar.h index 4604e411e..3103a0dec 100644 --- a/targets/app/common/UI/Controls/UIControl_SpaceIndicatorBar.h +++ b/targets/app/common/UI/Controls/UIControl_SpaceIndicatorBar.h @@ -7,11 +7,11 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_SpaceIndicatorBar.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_TextInput.cpp b/targets/app/common/UI/Controls/UIControl_TextInput.cpp index 94c093a10..275f574ff 100644 --- a/targets/app/common/UI/Controls/UIControl_TextInput.cpp +++ b/targets/app/common/UI/Controls/UIControl_TextInput.cpp @@ -1,10 +1,10 @@ #include "UIControl_TextInput.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_TextInput.h b/targets/app/common/UI/Controls/UIControl_TextInput.h index 81cce8103..8804e1816 100644 --- a/targets/app/common/UI/Controls/UIControl_TextInput.h +++ b/targets/app/common/UI/Controls/UIControl_TextInput.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_TextInput.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_TexturePackList.cpp b/targets/app/common/UI/Controls/UIControl_TexturePackList.cpp index 5fa272f0d..623f92f36 100644 --- a/targets/app/common/UI/Controls/UIControl_TexturePackList.cpp +++ b/targets/app/common/UI/Controls/UIControl_TexturePackList.cpp @@ -1,10 +1,10 @@ #include "UIControl_TexturePackList.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_TexturePackList.h b/targets/app/common/UI/Controls/UIControl_TexturePackList.h index 564ffa6fd..61afb1c93 100644 --- a/targets/app/common/UI/Controls/UIControl_TexturePackList.h +++ b/targets/app/common/UI/Controls/UIControl_TexturePackList.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_TexturePackList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_Touch.cpp b/targets/app/common/UI/Controls/UIControl_Touch.cpp index 27ac76b77..2e35b3ef1 100644 --- a/targets/app/common/UI/Controls/UIControl_Touch.cpp +++ b/targets/app/common/UI/Controls/UIControl_Touch.cpp @@ -1,9 +1,9 @@ #include "UIControl_Touch.h" #include "app/common/Iggy/include/iggy.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" -#include "app/common/UI/ConsoleUIController.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Controls/UIControl_Touch.h b/targets/app/common/UI/Controls/UIControl_Touch.h index 7002d3832..2fc78791b 100644 --- a/targets/app/common/UI/Controls/UIControl_Touch.h +++ b/targets/app/common/UI/Controls/UIControl_Touch.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_Touch.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/Debug/UIScene_DebugCreateSchematic.cpp b/targets/app/common/UI/Scenes/Debug/UIScene_DebugCreateSchematic.cpp index a20f7146f..b5e2938a6 100644 --- a/targets/app/common/UI/Scenes/Debug/UIScene_DebugCreateSchematic.cpp +++ b/targets/app/common/UI/Scenes/Debug/UIScene_DebugCreateSchematic.cpp @@ -3,14 +3,14 @@ #include +#include "app/common/Game.h" +#include "app/common/Iggy/include/rrCore.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_TextInput.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/ServerAction.h" diff --git a/targets/app/common/UI/Scenes/Debug/UIScene_DebugCreateSchematic.h b/targets/app/common/UI/Scenes/Debug/UIScene_DebugCreateSchematic.h index 827070346..b864f1c0e 100644 --- a/targets/app/common/UI/Scenes/Debug/UIScene_DebugCreateSchematic.h +++ b/targets/app/common/UI/Scenes/Debug/UIScene_DebugCreateSchematic.h @@ -2,13 +2,13 @@ #ifdef _DEBUG_MENUS_ENABLED #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_TextInput.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" #include "minecraft/server/ServerAction.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Debug/UIScene_DebugOptions.cpp b/targets/app/common/UI/Scenes/Debug/UIScene_DebugOptions.cpp index 48fe9c309..455f36fda 100644 --- a/targets/app/common/UI/Scenes/Debug/UIScene_DebugOptions.cpp +++ b/targets/app/common/UI/Scenes/Debug/UIScene_DebugOptions.cpp @@ -1,7 +1,7 @@ #include "UIScene_DebugOptions.h" -#include "app/common/UI/UIScene.h" #include "app/common/Iggy/include/iggy.h" +#include "app/common/UI/UIScene.h" #include "minecraft/Console_Debug_enum.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Scenes/Debug/UIScene_DebugOverlay.cpp b/targets/app/common/UI/Scenes/Debug/UIScene_DebugOverlay.cpp index 5866dfb34..03e96e2d3 100644 --- a/targets/app/common/UI/Scenes/Debug/UIScene_DebugOverlay.cpp +++ b/targets/app/common/UI/Scenes/Debug/UIScene_DebugOverlay.cpp @@ -5,20 +5,20 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/Tutorial/Tutorial.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "minecraft/GameEnums.h" #include "platform/profile/profile.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif -#include "app/common/Iggy/include/rrCore.h" #include "app/common/Game.h" +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/ConsoleUIController.h" #include "minecraft/commands/common/EnchantItemCommand.h" #include "minecraft/commands/common/GiveItemCommand.h" diff --git a/targets/app/common/UI/Scenes/Debug/UIScene_DebugOverlay.h b/targets/app/common/UI/Scenes/Debug/UIScene_DebugOverlay.h index b5c71b8d8..a7a6921e5 100644 --- a/targets/app/common/UI/Scenes/Debug/UIScene_DebugOverlay.h +++ b/targets/app/common/UI/Scenes/Debug/UIScene_DebugOverlay.h @@ -5,12 +5,12 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/Debug/UIScene_DebugSetCamera.cpp b/targets/app/common/UI/Scenes/Debug/UIScene_DebugSetCamera.cpp index d8c0e299c..2e5a8222c 100644 --- a/targets/app/common/UI/Scenes/Debug/UIScene_DebugSetCamera.cpp +++ b/targets/app/common/UI/Scenes/Debug/UIScene_DebugSetCamera.cpp @@ -5,14 +5,14 @@ #include +#include "app/common/Game.h" +#include "app/common/Iggy/include/rrCore.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_TextInput.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/world/phys/Vec3.h" #include "platform/input/input.h" diff --git a/targets/app/common/UI/Scenes/Debug/UIScene_DebugSetCamera.h b/targets/app/common/UI/Scenes/Debug/UIScene_DebugSetCamera.h index 9c43f482c..59e4b1d4f 100644 --- a/targets/app/common/UI/Scenes/Debug/UIScene_DebugSetCamera.h +++ b/targets/app/common/UI/Scenes/Debug/UIScene_DebugSetCamera.h @@ -2,13 +2,13 @@ #ifdef _DEBUG_MENUS_ENABLED #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_TextInput.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/IUIScene_StartGame.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/IUIScene_StartGame.cpp index cbe183937..e03066933 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/IUIScene_StartGame.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/IUIScene_StartGame.cpp @@ -6,12 +6,12 @@ #include "app/common/App_structs.h" #include "app/common/DLC/DLCManager.h" +#include "app/common/Game.h" +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/Controls/UIControl_BitmapIcon.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_TexturePackList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" -#include "app/common/Game.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/skins/TexturePack.h" #include "minecraft/client/skins/TexturePackRepository.h" diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/IUIScene_StartGame.h b/targets/app/common/UI/Scenes/Frontend Menu screens/IUIScene_StartGame.h index 67e4c1729..d4a8730ac 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/IUIScene_StartGame.h +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/IUIScene_StartGame.h @@ -2,13 +2,13 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_BitmapIcon.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_TexturePackList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" #include "platform/storage/storage.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.cpp index 7da5d9084..6fb96d952 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.cpp @@ -6,10 +6,13 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "app/common/DLC/DLCManager.h" #include "app/common/DLC/DLCPack.h" +#include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_Label.h" @@ -17,8 +20,6 @@ #include "app/common/UI/Controls/UIControl_TextInput.h" #include "app/common/UI/Scenes/Frontend Menu screens/IUIScene_StartGame.h" #include "app/common/UI/UILayer.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/GameHostOptions.h" #include "minecraft/GameTypes.h" @@ -28,12 +29,11 @@ #include "minecraft/client/skins/TexturePack.h" #include "minecraft/client/skins/TexturePackRepository.h" #include "minecraft/server/MinecraftServer.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/level/LevelSettings.h" #include "minecraft/world/level/chunk/ChunkSource.h" -#include "platform/network/NetTypes.h" #include "platform/PlatformTypes.h" #include "platform/input/input.h" +#include "platform/network/NetTypes.h" #include "platform/profile/profile.h" #include "strings.h" #include "util/StringHelpers.h" diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.h b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.h index f48be57a3..e7ddeb5b9 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.h +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_CreateWorldMenu.h @@ -6,6 +6,7 @@ #include "IUIScene_StartGame.h" #include "app/common/DLC/DLCPack.h" +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_BitmapIcon.h" @@ -16,7 +17,6 @@ #include "app/common/UI/Controls/UIControl_TextInput.h" #include "app/common/UI/Controls/UIControl_TexturePackList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" #include "platform/storage/storage.h" class DLCPack; diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCMainMenu.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCMainMenu.cpp index 135c020f9..597731396 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCMainMenu.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCMainMenu.cpp @@ -1,12 +1,12 @@ #include "UIScene_DLCMainMenu.h" +#include "app/common/Game.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCMainMenu.h b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCMainMenu.h index e21e4713a..f572e61dc 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCMainMenu.h +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCMainMenu.h @@ -2,12 +2,12 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" #include "platform/storage/storage.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCOffersMenu.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCOffersMenu.cpp index 5857d64fe..e67158bfc 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCOffersMenu.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCOffersMenu.cpp @@ -3,13 +3,13 @@ #include +#include "app/common/Game.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_DLCList.h" #include "app/common/UI/Controls/UIControl_HTMLLabel.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "platform/PlatformTypes.h" #include "platform/renderer/renderer.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCOffersMenu.h b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCOffersMenu.h index e03f4eaa2..5968ea869 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCOffersMenu.h +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_DLCOffersMenu.h @@ -2,6 +2,7 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_BitmapIcon.h" @@ -9,7 +10,6 @@ #include "app/common/UI/Controls/UIControl_HTMLLabel.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" #include "platform/storage/storage.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_EULA.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_EULA.cpp index 296d44c1a..3987c9415 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_EULA.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_EULA.cpp @@ -3,15 +3,15 @@ #include +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_DynamicLabel.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/GameTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "platform/PlatformTypes.h" #include "platform/input/input.h" #include "platform/profile/profile.h" diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_EULA.h b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_EULA.h index c544dcd38..b0d2b7221 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_EULA.h +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_EULA.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_DynamicLabel.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_Intro.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_Intro.cpp index 1f3fbff69..dab36146a 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_Intro.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_Intro.cpp @@ -1,9 +1,9 @@ #include "UIScene_Intro.h" -#include "app/common/UI/All Platforms/UIEnums.h" -#include "app/common/UI/UIScene.h" #include "app/common/Iggy/include/iggy.h" +#include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/ConsoleUIController.h" +#include "app/common/UI/UIScene.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_Intro.h b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_Intro.h index 417b939d2..49a6414d5 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_Intro.h +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_Intro.h @@ -2,9 +2,9 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_JoinMenu.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_JoinMenu.cpp index e78e29497..50ff87332 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_JoinMenu.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_JoinMenu.cpp @@ -4,22 +4,22 @@ #include #include +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/GameTypes.h" -#include "platform/network/network.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/Difficulty.h" #include "minecraft/world/level/LevelSettings.h" #include "platform/PlatformTypes.h" +#include "platform/network/network.h" #include "platform/profile/profile.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_JoinMenu.h b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_JoinMenu.h index 348534ad7..eab94aad9 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_JoinMenu.h +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_JoinMenu.h @@ -2,12 +2,12 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" #include "platform/storage/storage.h" class FriendSessionInfo; diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.cpp index e983ff248..9156eda3d 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.cpp @@ -4,6 +4,9 @@ #include +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_HTMLLabel.h" #include "app/common/UI/Controls/UIControl_Label.h" @@ -11,12 +14,9 @@ #include "app/common/UI/Controls/UIControl_TextInput.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/GameHostOptions.h" #include "minecraft/GameTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "platform/input/input.h" #include "platform/profile/profile.h" #include "platform/renderer/renderer.h" diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.h b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.h index ed9c2d703..4de255444 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.h +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LaunchMoreOptionsMenu.h @@ -2,6 +2,7 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/Controls/UIControl.h" @@ -11,7 +12,6 @@ #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/Controls/UIControl_TextInput.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.cpp index e4177b3a0..1b23301ad 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.cpp @@ -8,18 +8,18 @@ #include -#include "platform/leaderboard/leaderboard.h" +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_LeaderboardList.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/Console_Debug_enum.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/level/tile/Tile.h" +#include "platform/leaderboard/leaderboard.h" #include "platform/profile/profile.h" #include "strings.h" @@ -206,8 +206,7 @@ void UIScene_LeaderboardsMenu::handleInput(int iPad, int key, bool repeat, case ACTION_MENU_RIGHT_SCROLL: { // Do nothing if a stats read is currently in progress, otherwise // the system complains about to many read requests - if (pressed && m_bPopulatedOnce && - PlatformLeaderboard.isIdle()) { + if (pressed && m_bPopulatedOnce && PlatformLeaderboard.isIdle()) { // CD - Added for audio ui.PlayUISFX(eSFX_Scroll); @@ -239,8 +238,7 @@ void UIScene_LeaderboardsMenu::handleInput(int iPad, int key, bool repeat, case ACTION_MENU_RIGHT: { // Do nothing if a stats read is currently in progress, otherwise // the system complains about to many read requests - if (pressed && m_bPopulatedOnce && - PlatformLeaderboard.isIdle()) { + if (pressed && m_bPopulatedOnce && PlatformLeaderboard.isIdle()) { // CD - Added for audio ui.PlayUISFX(eSFX_Scroll); @@ -270,8 +268,7 @@ void UIScene_LeaderboardsMenu::handleInput(int iPad, int key, bool repeat, case ACTION_MENU_PAGEDOWN: { // Do nothing if a stats read is currently in progress, otherwise // the system complains about to many read requests - if (pressed && m_bPopulatedOnce && - PlatformLeaderboard.isIdle()) { + if (pressed && m_bPopulatedOnce && PlatformLeaderboard.isIdle()) { // CD - Added for audio ui.PlayUISFX(eSFX_Scroll); @@ -284,8 +281,7 @@ void UIScene_LeaderboardsMenu::handleInput(int iPad, int key, bool repeat, case ACTION_MENU_X: { // Do nothing if a stats read is currently in progress, otherwise // the system complains about to many read requests - if (pressed && m_bPopulatedOnce && - PlatformLeaderboard.isIdle()) { + if (pressed && m_bPopulatedOnce && PlatformLeaderboard.isIdle()) { // CD - Added for audio ui.PlayUISFX(eSFX_Scroll); @@ -347,7 +343,7 @@ void UIScene_LeaderboardsMenu::ReadStats(int startIndex) { m_newEntryIndex = (unsigned int)startIndex; // m_newReadSize = std::min((int)READ_SIZE, // (int)m_leaderboard.m_totalEntryCount-(startIndex-1)); - } + } // app.DebugPrintf("Requesting stats read %d - %d - %d\n", // m_currentLeaderboard, startIndex == -1 ? m_currentFilter : diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.h b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.h index c3534bb47..41df37f72 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.h +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LeaderboardsMenu.h @@ -3,14 +3,14 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_LeaderboardList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/PlatformTypes.h" -#include "platform/storage/storage.h" #include "platform/leaderboard/leaderboard.h" +#include "platform/storage/storage.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.cpp index 590695afc..a9182a013 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.cpp @@ -4,10 +4,13 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "app/common/DLC/DLCManager.h" #include "app/common/DLC/DLCPack.h" +#include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_BitmapIcon.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" @@ -15,8 +18,6 @@ #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/Scenes/Frontend Menu screens/IUIScene_StartGame.h" #include "app/common/UI/UILayer.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/GameHostOptions.h" #include "minecraft/GameTypes.h" @@ -26,11 +27,10 @@ #include "minecraft/client/skins/TexturePack.h" #include "minecraft/client/skins/TexturePackRepository.h" #include "minecraft/server/MinecraftServer.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/level/GameRules/LevelGenerationOptions.h" #include "minecraft/world/level/LevelSettings.h" -#include "platform/network/NetTypes.h" #include "platform/PlatformTypes.h" +#include "platform/network/NetTypes.h" #include "platform/profile/profile.h" #include "platform/renderer/renderer.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.h b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.h index 1ccabe697..005126ca0 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.h +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadMenu.h @@ -5,6 +5,7 @@ #include "IUIScene_StartGame.h" #include "app/common/DLC/DLCPack.h" +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_BitmapIcon.h" @@ -14,7 +15,6 @@ #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/Controls/UIControl_TexturePackList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" #include "platform/storage/storage.h" class DLCPack; diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.cpp index 9b419a500..6575211f8 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.cpp @@ -6,14 +6,15 @@ #include +#include "app/common/Audio/SoundTypes.h" #include "app/common/DLC/DLCManager.h" +#include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SaveList.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "java/File.h" #include "java/InputOutputStream/FileInputStream.h" #include "minecraft/GameEnums.h" @@ -21,13 +22,12 @@ #include "minecraft/client/Minecraft.h" #include "minecraft/client/skins/TexturePack.h" #include "minecraft/client/skins/TexturePackRepository.h" -#include "platform/network/network.h" #include "minecraft/server/MinecraftServer.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/level/GameRules/LevelGenerationOptions.h" #include "minecraft/world/level/LevelSettings.h" -#include "platform/network/NetTypes.h" #include "platform/input/input.h" +#include "platform/network/NetTypes.h" +#include "platform/network/network.h" #include "platform/profile/profile.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.h b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.h index 3c89fa2e4..104394ca3 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.h +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_LoadOrJoinMenu.h @@ -5,13 +5,13 @@ #include #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SaveList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" #include "java/File.h" #include "minecraft/client/Minecraft.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/FileHeader.h" diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.cpp index 0283787eb..a0ea8582f 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.cpp @@ -1,6 +1,5 @@ #include "UIScene_MainMenu.h" -#include "platform/game/game.h" #include #include @@ -9,14 +8,15 @@ #include #include +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "java/InputOutputStream/BufferedReader.h" #include "java/InputOutputStream/ByteArrayInputStream.h" #include "java/InputOutputStream/InputStreamReader.h" @@ -29,9 +29,9 @@ #include "minecraft/client/gui/Font.h" #include "minecraft/client/gui/ScreenSizeCalculator.h" #include "minecraft/server/MinecraftServer.h" -#include "app/common/Audio/SoundTypes.h" -#include "platform/network/NetTypes.h" #include "platform/PlatformTypes.h" +#include "platform/game/game.h" +#include "platform/network/NetTypes.h" #include "platform/profile/profile.h" #include "platform/renderer/renderer.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.h b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.h index 687e70d31..98712efca 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.h +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_MainMenu.h @@ -5,11 +5,11 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/storage/storage.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.cpp index 805722248..e32a94edc 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.cpp @@ -3,15 +3,15 @@ #include +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_DynamicLabel.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/GameTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "strings.h" UIScene_NewUpdateMessage::UIScene_NewUpdateMessage(int iPad, void* initData, diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.h b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.h index f7490622f..4fff97e1b 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.h +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_NewUpdateMessage.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_DynamicLabel.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_SaveMessage.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_SaveMessage.cpp index aba3cb3e9..b50713a4a 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_SaveMessage.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_SaveMessage.cpp @@ -1,14 +1,14 @@ #include "UIScene_SaveMessage.h" +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "platform/PlatformTypes.h" #include "platform/input/input.h" #include "platform/profile/ProfileConstants.h" diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_SaveMessage.h b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_SaveMessage.h index a62ab5c40..2a512b612 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_SaveMessage.h +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_SaveMessage.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_TrialExitUpsell.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_TrialExitUpsell.cpp index 6d6d771e1..980f65d3e 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_TrialExitUpsell.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_TrialExitUpsell.cpp @@ -1,11 +1,11 @@ #include "UIScene_TrialExitUpsell.h" -#include "app/common/UI/UIScene.h" +#include "app/common/Audio/SoundTypes.h" #include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" +#include "app/common/UI/UIScene.h" #include "minecraft/GameTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "platform/profile/profile.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_ControlsMenu.cpp b/targets/app/common/UI/Scenes/Help & Options/UIScene_ControlsMenu.cpp index 9765e1ea5..8c29b49ba 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_ControlsMenu.cpp +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_ControlsMenu.cpp @@ -4,17 +4,17 @@ #include +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/BuildVer.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/entity/player/Abilities.h" #include "platform/input/input.h" #include "strings.h" @@ -75,7 +75,9 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void* initData, char* layoutString = new char[128]; snprintf(layoutString, 128, "%s : %s", app.GetString(IDS_CURRENT_LAYOUT), app.GetString(m_iSchemeTextA[iSelected])); - { m_labelCurrentLayout.init(layoutString); } + { + m_labelCurrentLayout.init(layoutString); + } m_iCurrentNavigatedControlsLayout = iSelected; @@ -172,7 +174,9 @@ void UIScene_ControlsMenu::handlePress(F64 controlId, F64 childId) { snprintf(layoutString, 128, "%s : %s", app.GetString(IDS_CURRENT_LAYOUT), app.GetString(m_iSchemeTextA[control])); - { m_labelCurrentLayout.setLabel(layoutString); } + { + m_labelCurrentLayout.setLabel(layoutString); + } break; }; diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_ControlsMenu.h b/targets/app/common/UI/Scenes/Help & Options/UIScene_ControlsMenu.h index 8a2f3f97c..cfec284b6 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_ControlsMenu.h +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_ControlsMenu.h @@ -2,13 +2,13 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_Credits.cpp b/targets/app/common/UI/Scenes/Help & Options/UIScene_Credits.cpp index b8a4602df..aa51481b6 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_Credits.cpp +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_Credits.cpp @@ -4,10 +4,10 @@ #include #include -#include "app/common/UI/UILayer.h" -#include "app/common/UI/UIScene.h" #include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" +#include "app/common/UI/UILayer.h" +#include "app/common/UI/UIScene.h" #include "strings.h" #include "util/StringHelpers.h" diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_Credits.h b/targets/app/common/UI/Scenes/Help & Options/UIScene_Credits.h index c70a3724e..f2f77632c 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_Credits.h +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_Credits.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.cpp b/targets/app/common/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.cpp index 897f778b4..28143d744 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.cpp +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.cpp @@ -1,13 +1,13 @@ #include "UIScene_HelpAndOptionsMenu.h" +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/client/Minecraft.h" -#include "app/common/Audio/SoundTypes.h" #include "platform/profile/profile.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.h b/targets/app/common/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.h index 769d0dd88..147566885 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.h +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_HelpAndOptionsMenu.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlay.cpp b/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlay.cpp index 05b239820..d8be9f2ab 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlay.cpp +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlay.cpp @@ -6,12 +6,12 @@ #include -#include "app/common/UI/Controls/UIControl_Label.h" -#include "app/common/UI/UIScene.h" +#include "app/common/Audio/SoundTypes.h" #include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" +#include "app/common/UI/Controls/UIControl_Label.h" +#include "app/common/UI/UIScene.h" #include "minecraft/GameEnums.h" -#include "app/common/Audio/SoundTypes.h" #include "strings.h" #include "util/StringHelpers.h" diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlay.h b/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlay.h index a04b6c215..a29f00e9e 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlay.h +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlay.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_DynamicLabel.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlayMenu.cpp b/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlayMenu.cpp index ac71449da..51c1468e1 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlayMenu.cpp +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlayMenu.cpp @@ -3,13 +3,13 @@ #include +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/client/Minecraft.h" -#include "app/common/Audio/SoundTypes.h" #include "strings.h" // strings for buttons in the list @@ -110,7 +110,9 @@ void UIScene_HowToPlayMenu::updateComponents() { void UIScene_HowToPlayMenu::handleReload() { for (unsigned int i = 0; i < eHTPButton_Max; ++i) { // 4J Stu - Re-add for future platforms - { m_buttonListHowTo.addItem(app.GetString(m_uiHTPButtonNameA[i]), i); } + { + m_buttonListHowTo.addItem(app.GetString(m_uiHTPButtonNameA[i]), i); + } } doHorizontalResizeCheck(); diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlayMenu.h b/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlayMenu.h index e47fa6825..582bcb40d 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlayMenu.h +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_HowToPlayMenu.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_LanguageSelector.cpp b/targets/app/common/UI/Scenes/Help & Options/UIScene_LanguageSelector.cpp index d34d56dac..678631c89 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_LanguageSelector.cpp +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_LanguageSelector.cpp @@ -1,12 +1,12 @@ #include "UIScene_LanguageSelector.h" +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/client/Minecraft.h" -#include "app/common/Audio/SoundTypes.h" #include "strings.h" // strings for buttons in the list diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_LanguageSelector.h b/targets/app/common/UI/Scenes/Help & Options/UIScene_LanguageSelector.h index e7913966a..9d1240b9f 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_LanguageSelector.h +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_LanguageSelector.h @@ -2,14 +2,14 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_ButtonList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" #include "minecraft/client/model/SkinBox.h" -#include "platform/network/NetTypes.h" #include "platform/XboxStubs.h" +#include "platform/network/NetTypes.h" #include "platform/profile/ProfileConstants.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_ReinstallMenu.cpp b/targets/app/common/UI/Scenes/Help & Options/UIScene_ReinstallMenu.cpp index 258808d44..c91307abc 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_ReinstallMenu.cpp +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_ReinstallMenu.cpp @@ -1,10 +1,10 @@ #include "UIScene_ReinstallMenu.h" -#include "app/common/UI/UILayer.h" -#include "app/common/UI/UIScene.h" #include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" +#include "app/common/UI/UILayer.h" +#include "app/common/UI/UIScene.h" #include "minecraft/client/Minecraft.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_ReinstallMenu.h b/targets/app/common/UI/Scenes/Help & Options/UIScene_ReinstallMenu.h index 7ccb555cd..d64ff33e9 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_ReinstallMenu.h +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_ReinstallMenu.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsAudioMenu.cpp b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsAudioMenu.cpp index 15fb016e8..e79cd3599 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsAudioMenu.cpp +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsAudioMenu.cpp @@ -3,11 +3,11 @@ #include +#include "app/common/Game.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsAudioMenu.h b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsAudioMenu.h index b3a5fcaf1..c74f4cf33 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsAudioMenu.h +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsAudioMenu.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.cpp b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.cpp index 6a51d1e9c..7b5a30786 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.cpp +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.cpp @@ -2,11 +2,11 @@ #include +#include "app/common/Game.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.h b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.h index 06752c112..b2d563757 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.h +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsControlMenu.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsGraphicsMenu.cpp b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsGraphicsMenu.cpp index 8a8ae7b89..ef9e7a073 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsGraphicsMenu.cpp +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsGraphicsMenu.cpp @@ -2,13 +2,13 @@ #include +#include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "platform/profile/profile.h" diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsGraphicsMenu.h b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsGraphicsMenu.h index 205dccd66..0e3943fcb 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsGraphicsMenu.h +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsGraphicsMenu.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsMenu.cpp b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsMenu.cpp index 48488c295..d9e13f32b 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsMenu.cpp +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsMenu.cpp @@ -1,13 +1,13 @@ #include "UIScene_SettingsMenu.h" +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/client/Minecraft.h" -#include "app/common/Audio/SoundTypes.h" #include "platform/profile/profile.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsMenu.h b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsMenu.h index 87faa8070..ff2c03e9c 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsMenu.h +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsMenu.h @@ -2,10 +2,10 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" #include "platform/storage/storage.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsOptionsMenu.cpp b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsOptionsMenu.cpp index 98cf633f9..dc3a0fb01 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsOptionsMenu.cpp +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsOptionsMenu.cpp @@ -3,18 +3,18 @@ #include +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" -#include "app/common/Audio/SoundTypes.h" #include "platform/profile/profile.h" #include "platform/renderer/renderer.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsOptionsMenu.h b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsOptionsMenu.h index 71e67acb6..692ed4d2b 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsOptionsMenu.h +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsOptionsMenu.h @@ -2,13 +2,13 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsUIMenu.cpp b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsUIMenu.cpp index ac43c3c69..2eb5912df 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsUIMenu.cpp +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsUIMenu.cpp @@ -3,12 +3,12 @@ #include +#include "app/common/Game.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "platform/profile/profile.h" diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsUIMenu.h b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsUIMenu.h index 26a8a9c19..fc135ff38 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsUIMenu.h +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_SettingsUIMenu.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_Slider.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.cpp b/targets/app/common/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.cpp index 2f241c1fa..cc4de5bff 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.cpp +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.cpp @@ -5,20 +5,20 @@ #include +#include "app/common/Audio/SoundTypes.h" #include "app/common/DLC/DLCManager.h" #include "app/common/DLC/DLCPack.h" #include "app/common/DLC/DLCSkinFile.h" +#include "app/common/Game.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_PlayerSkinPreview.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/Minecraft_Macros.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/model/SkinBox.h" -#include "app/common/Audio/SoundTypes.h" #include "platform/profile/ProfileConstants.h" #include "platform/profile/profile.h" #include "platform/renderer/renderer.h" diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.h b/targets/app/common/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.h index f186e6286..b7e9299bf 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.h +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_SkinSelectMenu.h @@ -4,12 +4,12 @@ #include #include "app/common/DLC/DLCPack.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_PlayerSkinPreview.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/storage/storage.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.cpp index 06f2f0e32..725618e7a 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.cpp @@ -4,16 +4,16 @@ #include #include +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Cursor.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/util/HtmlString.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h index 1791c2a82..62a0ecd1f 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h @@ -2,13 +2,13 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/IUIScene_AbstractContainerMenu.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Cursor.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/renderer/renderer.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.cpp index b313afc82..13d78f813 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.cpp @@ -1,6 +1,5 @@ #include "UIScene_AnvilMenu.h" -#include "platform/game/game.h" #include #include @@ -8,14 +7,13 @@ #include #include +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/Controls/UIControl_TextInput.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" -#include "app/common/Game.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/world/entity/player/Abilities.h" @@ -23,6 +21,8 @@ #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/inventory/AnvilMenu.h" #include "minecraft/world/inventory/Slot.h" +#include "minecraft/world/tutorial/TutorialEnum.h" +#include "platform/game/game.h" #include "platform/input/input.h" #include "platform/profile/profile.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.h index d373e7c36..28b906b24 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AnvilMenu.h @@ -2,6 +2,7 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/All Platforms/IUIScene_AnvilMenu.h" #include "app/common/UI/All Platforms/UIEnums.h" @@ -11,7 +12,6 @@ #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/Controls/UIControl_TextInput.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/input/input.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.cpp index 328b196da..5097afe16 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.cpp @@ -1,24 +1,24 @@ #include "UIScene_BeaconMenu.h" -#include "platform/game/game.h" #include #include +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/Controls/UIControl_BeaconEffectButton.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" -#include "app/common/Game.h" #include "minecraft/client/Minecraft.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/inventory/BeaconMenu.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" +#include "minecraft/world/tutorial/TutorialEnum.h" +#include "platform/game/game.h" #include "strings.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.h index d0f1f53a1..5282a8965 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BeaconMenu.h @@ -2,6 +2,7 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/IUIScene_BeaconMenu.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" @@ -10,7 +11,6 @@ #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BrewingStandMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BrewingStandMenu.cpp index a85be489c..ba2670a51 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BrewingStandMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_BrewingStandMenu.cpp @@ -1,22 +1,22 @@ #include "UIScene_BrewingStandMenu.h" -#include "platform/game/game.h" #include +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_Progress.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" -#include "app/common/Game.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/Minecraft.h" #include "minecraft/world/inventory/BrewingStandMenu.h" #include "minecraft/world/item/alchemy/PotionBrewing.h" #include "minecraft/world/level/tile/entity/BrewingStandTileEntity.h" +#include "minecraft/world/tutorial/TutorialEnum.h" +#include "platform/game/game.h" #include "platform/profile/profile.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_ContainerMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_ContainerMenu.cpp index f57e6b61c..405b31139 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_ContainerMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_ContainerMenu.cpp @@ -4,18 +4,18 @@ #include +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" -#include "app/common/Game.h" #include "minecraft/client/Minecraft.h" #include "minecraft/world/Container.h" #include "minecraft/world/inventory/AbstractContainerMenu.h" #include "minecraft/world/inventory/ContainerMenu.h" +#include "minecraft/world/tutorial/TutorialEnum.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_CreativeMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_CreativeMenu.cpp index 26aaa6096..60fd450ec 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_CreativeMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_CreativeMenu.cpp @@ -4,24 +4,24 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" -#include "app/common/Iggy/include/iggy.h" +#include "minecraft/world/tutorial/TutorialEnum.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif -#include "app/common/Iggy/include/rrCore.h" +#include "app/common/Audio/SoundTypes.h" #include "app/common/Game.h" +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/ConsoleUIController.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/player/LocalPlayer.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/SimpleContainer.h" #include "platform/XboxStubs.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_CreativeMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_CreativeMenu.h index 001372706..92e86282d 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_CreativeMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_CreativeMenu.h @@ -2,6 +2,7 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/IUIScene_CreativeMenu.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" @@ -9,7 +10,6 @@ #include "app/common/UI/Controls/UIControl_Base.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_DispenserMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_DispenserMenu.cpp index 09346d5df..99166d7fc 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_DispenserMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_DispenserMenu.cpp @@ -4,17 +4,17 @@ #include +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" -#include "app/common/Game.h" #include "minecraft/client/Minecraft.h" #include "minecraft/world/inventory/TrapMenu.h" #include "minecraft/world/level/tile/entity/DispenserTileEntity.h" +#include "minecraft/world/tutorial/TutorialEnum.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.cpp index 2f94b1942..06ec9498e 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.cpp @@ -1,23 +1,23 @@ #include "UIScene_EnchantingMenu.h" -#include "platform/game/game.h" #include #include +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialMode.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_EnchantmentBook.h" #include "app/common/UI/Controls/UIControl_EnchantmentButton.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/client/Minecraft.h" #include "minecraft/world/inventory/EnchantmentMenu.h" +#include "minecraft/world/tutorial/TutorialEnum.h" +#include "platform/game/game.h" #include "platform/profile/profile.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.h index ad96ee171..f4de320cb 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_EnchantingMenu.h @@ -3,6 +3,7 @@ #include #include "UIScene_AbstractContainerMenu.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/IUIScene_EnchantingMenu.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" @@ -12,7 +13,6 @@ #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" class InventoryMenu; class UILayer; diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.cpp index 1cce87774..2df9c6a4a 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.cpp @@ -4,16 +4,16 @@ #include +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" -#include "app/common/Game.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/player/LocalPlayer.h" #include "minecraft/world/inventory/FireworksMenu.h" +#include "minecraft/world/tutorial/TutorialEnum.h" #include "strings.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.h index b9f4aeba9..b11207dfb 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FireworksMenu.h @@ -2,6 +2,7 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/IUIScene_FireworksMenu.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" @@ -9,7 +10,6 @@ #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FurnaceMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FurnaceMenu.cpp index 1ae2b33af..fb463ad2b 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FurnaceMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_FurnaceMenu.cpp @@ -1,20 +1,20 @@ #include "UIScene_FurnaceMenu.h" -#include "platform/game/game.h" #include +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_Progress.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" -#include "app/common/Game.h" #include "minecraft/client/Minecraft.h" #include "minecraft/world/inventory/FurnaceMenu.h" #include "minecraft/world/level/tile/entity/FurnaceTileEntity.h" +#include "minecraft/world/tutorial/TutorialEnum.h" +#include "platform/game/game.h" #include "platform/profile/profile.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HopperMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HopperMenu.cpp index 5221755d6..71aa4f94b 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HopperMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HopperMenu.cpp @@ -4,18 +4,18 @@ #include +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" -#include "app/common/Game.h" #include "minecraft/client/Minecraft.h" #include "minecraft/world/Container.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/inventory/HopperMenu.h" +#include "minecraft/world/tutorial/TutorialEnum.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HorseInventoryMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HorseInventoryMenu.cpp index 095bee858..775d1af5c 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HorseInventoryMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HorseInventoryMenu.cpp @@ -1,19 +1,19 @@ #include "UIScene_HorseInventoryMenu.h" -#include "platform/game/game.h" #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_MinecraftHorse.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" -#include "app/common/Iggy/include/iggy.h" +#include "minecraft/world/tutorial/TutorialEnum.h" +#include "platform/game/game.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HorseInventoryMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HorseInventoryMenu.h index c54f491fc..3e624caf4 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HorseInventoryMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_HorseInventoryMenu.h @@ -2,6 +2,7 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/IUIScene_HorseInventoryMenu.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" @@ -10,7 +11,6 @@ #include "app/common/UI/Controls/UIControl_MinecraftHorse.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.cpp index 4e5c4e3fc..9cbc3fdfc 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.cpp @@ -7,14 +7,13 @@ #include #include +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialMode.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_MinecraftPlayer.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_AbstractContainerMenu.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" @@ -22,6 +21,7 @@ #include "minecraft/stats/GenericStats.h" #include "minecraft/world/effect/MobEffectInstance.h" #include "minecraft/world/inventory/InventoryMenu.h" +#include "minecraft/world/tutorial/TutorialEnum.h" #include "strings.h" #include "util/StringHelpers.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.h index d2d0c012c..601d0e95d 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.h @@ -2,6 +2,7 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/IUIScene_InventoryMenu.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" @@ -9,7 +10,6 @@ #include "app/common/UI/Controls/UIControl_MinecraftPlayer.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.cpp index 2a55d0f5a..8f58c8451 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.cpp @@ -1,20 +1,18 @@ #include "UIScene_TradingMenu.h" -#include "platform/game/game.h" #include #include #include +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/util/HtmlString.h" @@ -22,6 +20,8 @@ #include "minecraft/world/inventory/Slot.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/trading/MerchantRecipe.h" +#include "minecraft/world/tutorial/TutorialEnum.h" +#include "platform/game/game.h" #include "platform/profile/profile.h" #include "strings.h" #include "util/StringHelpers.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.h index 172b6c31d..a4161d29c 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.h @@ -2,6 +2,7 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/IUIScene_TradingMenu.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl.h" @@ -9,7 +10,6 @@ #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.cpp index a941f5264..89c9306c0 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.cpp @@ -1,17 +1,15 @@ #include "UIScene_CraftingMenu.h" -#include "platform/game/game.h" +#include "app/common/Game.h" #include "app/common/Tutorial/Tutorial.h" -#include "minecraft/world/tutorial/TutorialEnum.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_HTMLLabel.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/client/player/LocalPlayer.h" @@ -22,6 +20,8 @@ #include "minecraft/world/item/Item.h" #include "minecraft/world/item/ItemInstance.h" #include "minecraft/world/item/crafting/Recipy.h" +#include "minecraft/world/tutorial/TutorialEnum.h" +#include "platform/game/game.h" #include "platform/profile/profile.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.h index 0f0f2fea9..8a6c9124c 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_CraftingMenu.h @@ -3,6 +3,7 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/IUIScene_CraftingMenu.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl.h" @@ -10,7 +11,6 @@ #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_SlotList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.cpp index a06577e42..957a7f8f1 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.cpp @@ -3,15 +3,15 @@ #include +#include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/Tutorial/Tutorial.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/All Platforms/IUIScene_PauseMenu.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.h index 957c007e8..05b284cd5 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_DeathMenu.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.cpp index 5973ec0c5..45fca4abc 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.cpp @@ -6,10 +6,10 @@ #include -#include "app/common/Tutorial/Tutorial.h" -#include "app/common/UI/UIScene.h" #include "app/common/Game.h" +#include "app/common/Tutorial/Tutorial.h" #include "app/common/UI/ConsoleUIController.h" +#include "app/common/UI/UIScene.h" #include "java/Random.h" #include "minecraft/GameEnums.h" #include "minecraft/SharedConstants.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.h index b3e84ac73..bbb4ea473 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_EndPoem.h @@ -3,9 +3,9 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.cpp index 8810fe807..ea3ad81ec 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.cpp @@ -3,20 +3,20 @@ #include +#include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/ClientConnection.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/network/packet/ServerSettingsChangedPacket.h" -#include "platform/network/network.h" #include "minecraft/world/entity/player/Player.h" +#include "platform/network/network.h" #include "strings.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.h index 56cf2932b..236cc1306 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameHostOptionsMenu.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.cpp index 1f593e443..98b654614 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.cpp @@ -2,24 +2,24 @@ #include +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_PlayerList.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/Console_Debug_enum.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/ClientConnection.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/network/packet/KickPlayerPacket.h" -#include "platform/network/network.h" -#include "app/common/Audio/SoundTypes.h" #include "platform/PlatformTypes.h" +#include "platform/network/network.h" #include "platform/profile/profile.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.h index 881c31800..60f75b8fb 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.h @@ -4,13 +4,13 @@ #include #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_PlayerList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" #include "platform/storage/storage.h" class INetworkPlayer; diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.cpp index 0ac04f288..527d23d7c 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.cpp @@ -3,23 +3,23 @@ #include +#include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGameInfoMenu.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/ClientConnection.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/network/packet/KickPlayerPacket.h" #include "minecraft/network/packet/PlayerInfoPacket.h" -#include "platform/network/network.h" #include "minecraft/world/entity/player/Player.h" +#include "platform/network/network.h" #include "strings.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.h index eca332c3a..62d6d4866 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_InGamePlayerOptionsMenu.h @@ -3,13 +3,13 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_CheckBox.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/storage/storage.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.cpp index 2c8c5332c..27f93a7c4 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.cpp @@ -5,17 +5,18 @@ #include +#include "app/common/Audio/SoundTypes.h" #include "app/common/DLC/DLCManager.h" #include "app/common/DLC/DLCPack.h" +#include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/Tutorial/Tutorial.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/All Platforms/IUIScene_PauseMenu.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" @@ -23,7 +24,6 @@ #include "minecraft/client/skins/TexturePackRepository.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/ServerAction.h" -#include "app/common/Audio/SoundTypes.h" #include "platform/profile/profile.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h index 67a5235dc..ce1ea3377 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_PauseMenu.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/IUIScene_PauseMenu.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" #include "platform/storage/storage.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.cpp index 78c10f4f8..c28be48be 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.cpp @@ -1,20 +1,20 @@ #include "UIScene_SignEntryMenu.h" +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_TextInput.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/ClientConnection.h" #include "minecraft/client/multiplayer/MultiPlayerLevel.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" #include "minecraft/network/packet/SignUpdatePacket.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/level/tile/entity/SignTileEntity.h" #include "platform/input/input.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.h index 7c970c6e6..ac41b5f67 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_SignEntryMenu.h @@ -3,12 +3,12 @@ #include #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_TextInput.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class SignTileEntity; class UILayer; diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.cpp b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.cpp index 7001ea596..0166c1c05 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.cpp +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.cpp @@ -3,21 +3,21 @@ #include +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_PlayerList.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/Console_Debug_enum.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/ClientConnection.h" #include "minecraft/network/packet/GameCommandPacket.h" -#include "platform/network/network.h" #include "minecraft/server/commands/TeleportCommand.h" -#include "app/common/Audio/SoundTypes.h" +#include "platform/network/network.h" #include "strings.h" UIScene_TeleportMenu::UIScene_TeleportMenu(int iPad, void* initData, diff --git a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.h b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.h index 6fd744c92..615dba118 100644 --- a/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.h +++ b/targets/app/common/UI/Scenes/In-Game Menu Screens/UIScene_TeleportMenu.h @@ -3,12 +3,12 @@ #include #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_PlayerList.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" #include "platform/network/NetTypes.h" class INetworkPlayer; diff --git a/targets/app/common/UI/Scenes/UIScene_ConnectingProgress.cpp b/targets/app/common/UI/Scenes/UIScene_ConnectingProgress.cpp index 68f002824..4eaaa2ae3 100644 --- a/targets/app/common/UI/Scenes/UIScene_ConnectingProgress.cpp +++ b/targets/app/common/UI/Scenes/UIScene_ConnectingProgress.cpp @@ -1,15 +1,15 @@ #include "UIScene_ConnectingProgress.h" +#include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_Progress.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "java/System.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" diff --git a/targets/app/common/UI/Scenes/UIScene_ConnectingProgress.h b/targets/app/common/UI/Scenes/UIScene_ConnectingProgress.h index 77142221c..084582a83 100644 --- a/targets/app/common/UI/Scenes/UIScene_ConnectingProgress.h +++ b/targets/app/common/UI/Scenes/UIScene_ConnectingProgress.h @@ -2,13 +2,13 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_Progress.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class UILayer; diff --git a/targets/app/common/UI/Scenes/UIScene_FullscreenProgress.cpp b/targets/app/common/UI/Scenes/UIScene_FullscreenProgress.cpp index b7481f470..c56edb1ff 100644 --- a/targets/app/common/UI/Scenes/UIScene_FullscreenProgress.cpp +++ b/targets/app/common/UI/Scenes/UIScene_FullscreenProgress.cpp @@ -4,22 +4,22 @@ #include #include +#include "app/common/Game.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/Tutorial/Tutorial.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_Progress.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameEnums.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/ProgressRenderer.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" -#include "platform/thread/C4JThread.h" #include "platform/PlatformTypes.h" #include "platform/profile/profile.h" +#include "platform/thread/C4JThread.h" #include "strings.h" UIScene_FullscreenProgress::UIScene_FullscreenProgress(int iPad, void* initData, diff --git a/targets/app/common/UI/Scenes/UIScene_FullscreenProgress.h b/targets/app/common/UI/Scenes/UIScene_FullscreenProgress.h index 7fd8730cf..0dcf321ea 100644 --- a/targets/app/common/UI/Scenes/UIScene_FullscreenProgress.h +++ b/targets/app/common/UI/Scenes/UIScene_FullscreenProgress.h @@ -2,6 +2,7 @@ #include +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/Controls/UIControl.h" @@ -9,7 +10,6 @@ #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_Progress.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" class C4JThread; class UILayer; diff --git a/targets/app/common/UI/Scenes/UIScene_Keyboard.cpp b/targets/app/common/UI/Scenes/UIScene_Keyboard.cpp index e81b0e72e..f1b74a608 100644 --- a/targets/app/common/UI/Scenes/UIScene_Keyboard.cpp +++ b/targets/app/common/UI/Scenes/UIScene_Keyboard.cpp @@ -1,12 +1,12 @@ #include "UIScene_Keyboard.h" +#include "app/common/Game.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_TextInput.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "minecraft/GameTypes.h" #include "strings.h" #include "util/StringHelpers.h" diff --git a/targets/app/common/UI/Scenes/UIScene_Keyboard.h b/targets/app/common/UI/Scenes/UIScene_Keyboard.h index 3c1cd0e57..5b7d98d18 100644 --- a/targets/app/common/UI/Scenes/UIScene_Keyboard.h +++ b/targets/app/common/UI/Scenes/UIScene_Keyboard.h @@ -2,12 +2,12 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/Controls/UIControl_TextInput.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/Scenes/UIScene_MessageBox.cpp b/targets/app/common/UI/Scenes/UIScene_MessageBox.cpp index 6d232223f..e3b9516b5 100644 --- a/targets/app/common/UI/Scenes/UIScene_MessageBox.cpp +++ b/targets/app/common/UI/Scenes/UIScene_MessageBox.cpp @@ -1,13 +1,13 @@ #include "UIScene_MessageBox.h" +#include "app/common/Game.h" #include "app/common/UI/All Platforms/UIStructs.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "platform/PlatformTypes.h" #include "platform/profile/profile.h" #include "strings.h" diff --git a/targets/app/common/UI/Scenes/UIScene_MessageBox.h b/targets/app/common/UI/Scenes/UIScene_MessageBox.h index 7f086b4b0..8c2c121f5 100644 --- a/targets/app/common/UI/Scenes/UIScene_MessageBox.h +++ b/targets/app/common/UI/Scenes/UIScene_MessageBox.h @@ -2,11 +2,11 @@ #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Controls/UIControl_Button.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/storage/storage.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" diff --git a/targets/app/common/UI/Scenes/UIScene_QuadrantSignin.cpp b/targets/app/common/UI/Scenes/UIScene_QuadrantSignin.cpp index a3515f42a..a8019e001 100644 --- a/targets/app/common/UI/Scenes/UIScene_QuadrantSignin.cpp +++ b/targets/app/common/UI/Scenes/UIScene_QuadrantSignin.cpp @@ -3,12 +3,12 @@ #include +#include "app/common/Game.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Controls/UIControl_BitmapIcon.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UILayer.h" #include "app/common/UI/UIScene.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "platform/PlatformTypes.h" #include "platform/input/input.h" #include "platform/profile/profile.h" @@ -138,7 +138,9 @@ void UIScene_QuadrantSignin::updateState() { // app.DebugPrintf("Index %d is signed in, display name - '%s'\n", // i, PlatformProfile.GetDisplayName(i).data()); - { setControllerState(i, eControllerStatus_PlayerDetails); } + { + setControllerState(i, eControllerStatus_PlayerDetails); + } m_labelDisplayName[i].setLabel(PlatformProfile.GetDisplayName(i)); // m_buttonControllers[i].setLabel(app.GetString(IDS_TOOLTIPS_CONTINUE),i); @@ -223,7 +225,9 @@ void UIScene_QuadrantSignin::_initQuadrants() { if (PlatformProfile.IsSignedIn(i)) { app.DebugPrintf("Index %d is signed in\n", i); - { setControllerState(i, eControllerStatus_PlayerDetails); } + { + setControllerState(i, eControllerStatus_PlayerDetails); + } m_labelDisplayName[i].init(PlatformProfile.GetDisplayName(i)); } else if (PlatformInput.IsPadConnected(i)) { diff --git a/targets/app/common/UI/Scenes/UIScene_QuadrantSignin.h b/targets/app/common/UI/Scenes/UIScene_QuadrantSignin.h index dc7a4c684..af04d0d32 100644 --- a/targets/app/common/UI/Scenes/UIScene_QuadrantSignin.h +++ b/targets/app/common/UI/Scenes/UIScene_QuadrantSignin.h @@ -3,13 +3,13 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_BitmapIcon.h" #include "app/common/UI/Controls/UIControl_Label.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif diff --git a/targets/app/common/UI/UIBitmapFont.cpp b/targets/app/common/UI/UIBitmapFont.cpp index 2ba16f8d4..50062c000 100644 --- a/targets/app/common/UI/UIBitmapFont.cpp +++ b/targets/app/common/UI/UIBitmapFont.cpp @@ -282,7 +282,7 @@ rrbool UIBitmapFont::GetGlyphBitmap(S32 glyph, F32 pixel_scale, while ((0.5f + glyphScale) * truePixelScale < targetPixelScale) glyphScale++; - // 4J-JEV: Debug code to check which font sizes are being used. + // 4J-JEV: Debug code to check which font sizes are being used. #if (!defined _CONTENT_PACKAGE) && (VERBOSE_FONT_OUTPUT > 0) struct DebugData { diff --git a/targets/app/common/UI/UIController.cpp b/targets/app/common/UI/UIController.cpp index 6a8c6b5b9..21db28c7a 100644 --- a/targets/app/common/UI/UIController.cpp +++ b/targets/app/common/UI/UIController.cpp @@ -12,6 +12,7 @@ #include "app/common/Audio/SoundEngine.h" #include "app/common/DLC/DLCManager.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/Network/GameNetworkManager.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" @@ -26,7 +27,6 @@ #include "app/common/UI/UIScene.h" #include "app/common/UI/UIString.h" #include "app/common/UI/UITTFFont.h" -#include "app/common/Iggy/include/iggy.h" #include "minecraft/GameEnums.h" #include "platform/input/input.h" #include "platform/profile/profile.h" @@ -45,8 +45,8 @@ #include "minecraft/client/skins/TexturePack.h" #include "minecraft/client/skins/TexturePackRepository.h" #include "minecraft/client/title/TitleScreen.h" -#include "platform/thread/C4JThread.h" #include "platform/XboxStubs.h" +#include "platform/thread/C4JThread.h" #include "strings.h" #include "util/StringHelpers.h" #include "util/Timer.h" @@ -962,7 +962,6 @@ void UIController::setupCustomDrawGameState() { m_customRenderingClearRect.top = LONG_MAX; m_customRenderingClearRect.bottom = LONG_MIN; - PlatformRenderer.StartFrame(); PlatformRenderer.Set_matrixDirty(); diff --git a/targets/app/common/UI/UIController.h b/targets/app/common/UI/UIController.h index 3843b63e8..b44e3b873 100644 --- a/targets/app/common/UI/UIController.h +++ b/targets/app/common/UI/UIController.h @@ -8,19 +8,18 @@ #include #include -#include "util/Timer.h" - #include "app/common/Iggy/include/iggy.h" +#include "util/Timer.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif #include "UIGroup.h" +#include "app/common/Audio/SoundTypes.h" +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/IUIController.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/Controls/UIControl.h" -#include "app/common/Iggy/include/rrCore.h" -#include "app/common/Audio/SoundTypes.h" #include "platform/PlatformTypes.h" #include "platform/input/input.h" #include "platform/renderer/renderer.h" diff --git a/targets/app/common/UI/UIGroup.cpp b/targets/app/common/UI/UIGroup.cpp index 9a9b62e7a..f008de7b7 100644 --- a/targets/app/common/UI/UIGroup.cpp +++ b/targets/app/common/UI/UIGroup.cpp @@ -1,12 +1,12 @@ #include "UIGroup.h" +#include "app/common/Game.h" +#include "app/common/Iggy/include/rrCore.h" #include "app/common/Tutorial/Tutorial.h" #include "app/common/Tutorial/TutorialMode.h" #include "app/common/UI/All Platforms/UIEnums.h" -#include "app/common/UI/UILayer.h" -#include "app/common/Iggy/include/rrCore.h" -#include "app/common/Game.h" #include "app/common/UI/ConsoleUIController.h" +#include "app/common/UI/UILayer.h" #include "minecraft/client/MemoryTracker.h" #include "minecraft/client/Minecraft.h" #include "platform/profile/profile.h" diff --git a/targets/app/common/UI/UIGroup.h b/targets/app/common/UI/UIGroup.h index 0cbec519c..5d69416b9 100644 --- a/targets/app/common/UI/UIGroup.h +++ b/targets/app/common/UI/UIGroup.h @@ -2,8 +2,8 @@ #include #include "UILayer.h" -#include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/Iggy/include/rrCore.h" +#include "app/common/UI/All Platforms/UIEnums.h" #include "platform/renderer/renderer.h" class UIComponent_Tooltips; diff --git a/targets/app/common/UI/UILayer.cpp b/targets/app/common/UI/UILayer.cpp index 29d82b0ee..efa8abaf0 100644 --- a/targets/app/common/UI/UILayer.cpp +++ b/targets/app/common/UI/UILayer.cpp @@ -2,6 +2,8 @@ #include +#include "app/common/Game.h" +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/Components/UIComponent_Chat.h" #include "app/common/UI/Components/UIComponent_DebugUIConsole.h" @@ -13,6 +15,7 @@ #include "app/common/UI/Components/UIComponent_Tooltips.h" #include "app/common/UI/Components/UIComponent_TutorialPopup.h" #include "app/common/UI/Components/UIScene_HUD.h" +#include "app/common/UI/ConsoleUIController.h" #include "app/common/UI/Scenes/Debug/UIScene_DebugCreateSchematic.h" #include "app/common/UI/Scenes/Debug/UIScene_DebugOptions.h" #include "app/common/UI/Scenes/Debug/UIScene_DebugOverlay.h" @@ -75,9 +78,6 @@ #include "app/common/UI/Scenes/UIScene_Timer.h" #include "app/common/UI/UIGroup.h" #include "app/common/UI/UIScene.h" -#include "app/common/Iggy/include/rrCore.h" -#include "app/common/Game.h" -#include "app/common/UI/ConsoleUIController.h" #include "platform/renderer/renderer.h" UILayer::UILayer(UIGroup* parent) { diff --git a/targets/app/common/UI/UILayer.h b/targets/app/common/UI/UILayer.h index c5c06cb6e..1d66d8dd4 100644 --- a/targets/app/common/UI/UILayer.h +++ b/targets/app/common/UI/UILayer.h @@ -6,8 +6,8 @@ #include #include -#include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/Iggy/include/rrCore.h" +#include "app/common/UI/All Platforms/UIEnums.h" #include "platform/renderer/renderer.h" // using namespace std; diff --git a/targets/app/common/UI/UIScene.cpp b/targets/app/common/UI/UIScene.cpp index f4434a368..140f73542 100644 --- a/targets/app/common/UI/UIScene.cpp +++ b/targets/app/common/UI/UIScene.cpp @@ -4,6 +4,7 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/Controls/UIControl.h" @@ -11,20 +12,19 @@ #include "app/common/UI/UIController.h" #include "app/common/UI/UIGroup.h" #include "app/common/UI/UILayer.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/PlatformTypes.h" #include "platform/renderer/renderer.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif -#include "app/common/Iggy/include/rrCore.h" +#include "app/common/Audio/SoundTypes.h" #include "app/common/Game.h" +#include "app/common/Iggy/include/rrCore.h" #include "app/common/UI/ConsoleUIController.h" #include "java/System.h" #include "minecraft/client/Lighting.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/renderer/entity/ItemRenderer.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/entity/player/Inventory.h" #include "minecraft/world/item/ItemInstance.h" #include "util/StringHelpers.h" diff --git a/targets/app/common/UI/UIScene.h b/targets/app/common/UI/UIScene.h index 72dad25a9..81664313e 100644 --- a/targets/app/common/UI/UIScene.h +++ b/targets/app/common/UI/UIScene.h @@ -13,10 +13,10 @@ #include #include +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/Controls/UIControl_Base.h" -#include "app/common/Iggy/include/iggy.h" #include "platform/renderer/renderer.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" @@ -55,8 +55,10 @@ class UIControl; currentRoot = lastRoot; \ } -#define UI_MAP_NAME(var, name) \ - { var = registerFastName(name); } +#define UI_MAP_NAME(var, name) \ + { \ + var = registerFastName(name); \ + } class UIScene { friend class UILayer; diff --git a/targets/app/common/UI/UITTFFont.cpp b/targets/app/common/UI/UITTFFont.cpp index aeffffb07..39436fea5 100644 --- a/targets/app/common/UI/UITTFFont.cpp +++ b/targets/app/common/UI/UITTFFont.cpp @@ -6,8 +6,8 @@ #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif -#include "app/common/Iggy/include/rrCore.h" #include "app/common/Game.h" +#include "app/common/Iggy/include/rrCore.h" #include "platform/fs/fs.h" #include "util/StringHelpers.h" diff --git a/targets/app/linux/main.cpp b/targets/app/linux/main.cpp index b51a2c55f..478f68959 100644 --- a/targets/app/linux/main.cpp +++ b/targets/app/linux/main.cpp @@ -48,27 +48,27 @@ static void sigsegv_handler(int sig) { #include #include -#include "platform/leaderboard/leaderboard.h" #include "minecraft/stats/StatsCounter.h" #include "minecraft/world/level/Level.h" +#include "platform/leaderboard/leaderboard.h" // #include "../Common/XUI/XUI_Scene_Container.h" // #include "NetworkManager.h" -#include "platform/PlatformTypes.h" -#include "platform/input/input.h" -#include "platform/profile/profile.h" -#include "platform/renderer/renderer.h" -#include "platform/storage/storage.h" -#include "platform/profile/ProfileConstants.h" #include "app/common/Audio/SoundEngine.h" -#include "app/common/Network/GameNetworkManager.h" #include "app/common/Game.h" +#include "app/common/Network/GameNetworkManager.h" #include "app/common/UI/ConsoleUIController.h" -#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/renderer/Tesselator.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/world/level/chunk/storage/OldChunkStorage.h" +#include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h" #include "minecraft/world/level/tile/Tile.h" +#include "platform/PlatformTypes.h" +#include "platform/input/input.h" +#include "platform/profile/ProfileConstants.h" +#include "platform/profile/profile.h" +#include "platform/renderer/renderer.h" +#include "platform/storage/storage.h" #include "strings.h" #define THEME_NAME "584111F70AAAAAAA" @@ -103,17 +103,17 @@ void DefineActions(void) { // Split into Menu actions, and in-game actions PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_A, - _360_JOY_BUTTON_A); + _360_JOY_BUTTON_A); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_B, - _360_JOY_BUTTON_B); + _360_JOY_BUTTON_B); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_X, - _360_JOY_BUTTON_X); + _360_JOY_BUTTON_X); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_Y, - _360_JOY_BUTTON_Y); + _360_JOY_BUTTON_Y); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OK, - _360_JOY_BUTTON_A); + _360_JOY_BUTTON_A); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_CANCEL, - _360_JOY_BUTTON_B); + _360_JOY_BUTTON_B); PlatformInput.SetGameJoypadMaps( MAP_STYLE_0, ACTION_MENU_UP, _360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP); @@ -127,92 +127,92 @@ void DefineActions(void) { MAP_STYLE_0, ACTION_MENU_RIGHT, _360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAGEUP, - _360_JOY_BUTTON_LT); + _360_JOY_BUTTON_LT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAGEDOWN, - _360_JOY_BUTTON_RT); + _360_JOY_BUTTON_RT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_RIGHT_SCROLL, - _360_JOY_BUTTON_RB); + _360_JOY_BUTTON_RB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_LEFT_SCROLL, - _360_JOY_BUTTON_LB); + _360_JOY_BUTTON_LB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_PAUSEMENU, - _360_JOY_BUTTON_START); + _360_JOY_BUTTON_START); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_STICK_PRESS, - _360_JOY_BUTTON_LTHUMB); + _360_JOY_BUTTON_LTHUMB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_PRESS, - _360_JOY_BUTTON_RTHUMB); + _360_JOY_BUTTON_RTHUMB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_UP, - _360_JOY_BUTTON_RSTICK_UP); + _360_JOY_BUTTON_RSTICK_UP); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_DOWN, - _360_JOY_BUTTON_RSTICK_DOWN); + _360_JOY_BUTTON_RSTICK_DOWN); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_LEFT, - _360_JOY_BUTTON_RSTICK_LEFT); + _360_JOY_BUTTON_RSTICK_LEFT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, ACTION_MENU_OTHER_STICK_RIGHT, - _360_JOY_BUTTON_RSTICK_RIGHT); + _360_JOY_BUTTON_RSTICK_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_JUMP, - _360_JOY_BUTTON_A); + _360_JOY_BUTTON_A); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_FORWARD, - _360_JOY_BUTTON_LSTICK_UP); + _360_JOY_BUTTON_LSTICK_UP); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_BACKWARD, - _360_JOY_BUTTON_LSTICK_DOWN); + _360_JOY_BUTTON_LSTICK_DOWN); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LEFT, - _360_JOY_BUTTON_LSTICK_LEFT); + _360_JOY_BUTTON_LSTICK_LEFT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_RIGHT, - _360_JOY_BUTTON_LSTICK_RIGHT); + _360_JOY_BUTTON_LSTICK_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_LEFT, - _360_JOY_BUTTON_RSTICK_LEFT); + _360_JOY_BUTTON_RSTICK_LEFT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_RIGHT, - _360_JOY_BUTTON_RSTICK_RIGHT); + _360_JOY_BUTTON_RSTICK_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_UP, - _360_JOY_BUTTON_RSTICK_UP); + _360_JOY_BUTTON_RSTICK_UP); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LOOK_DOWN, - _360_JOY_BUTTON_RSTICK_DOWN); + _360_JOY_BUTTON_RSTICK_DOWN); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_USE, - _360_JOY_BUTTON_LT); + _360_JOY_BUTTON_LT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_ACTION, - _360_JOY_BUTTON_RT); + _360_JOY_BUTTON_RT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_RIGHT_SCROLL, - _360_JOY_BUTTON_RB); + _360_JOY_BUTTON_RB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_LEFT_SCROLL, - _360_JOY_BUTTON_LB); + _360_JOY_BUTTON_LB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_INVENTORY, - _360_JOY_BUTTON_Y); + _360_JOY_BUTTON_Y); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_PAUSEMENU, - _360_JOY_BUTTON_START); + _360_JOY_BUTTON_START); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DROP, - _360_JOY_BUTTON_B); + _360_JOY_BUTTON_B); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_SNEAK_TOGGLE, - _360_JOY_BUTTON_RTHUMB); + _360_JOY_BUTTON_RTHUMB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_CRAFTING, - _360_JOY_BUTTON_X); + _360_JOY_BUTTON_X); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, - MINECRAFT_ACTION_RENDER_THIRD_PERSON, - _360_JOY_BUTTON_LTHUMB); + MINECRAFT_ACTION_RENDER_THIRD_PERSON, + _360_JOY_BUTTON_LTHUMB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_GAME_INFO, - _360_JOY_BUTTON_BACK); + _360_JOY_BUTTON_BACK); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_LEFT, - _360_JOY_BUTTON_DPAD_LEFT); + _360_JOY_BUTTON_DPAD_LEFT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_RIGHT, - _360_JOY_BUTTON_DPAD_RIGHT); + _360_JOY_BUTTON_DPAD_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_UP, - _360_JOY_BUTTON_DPAD_UP); + _360_JOY_BUTTON_DPAD_UP); PlatformInput.SetGameJoypadMaps(MAP_STYLE_0, MINECRAFT_ACTION_DPAD_DOWN, - _360_JOY_BUTTON_DPAD_DOWN); + _360_JOY_BUTTON_DPAD_DOWN); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_A, - _360_JOY_BUTTON_A); + _360_JOY_BUTTON_A); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_B, - _360_JOY_BUTTON_B); + _360_JOY_BUTTON_B); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_X, - _360_JOY_BUTTON_X); + _360_JOY_BUTTON_X); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_Y, - _360_JOY_BUTTON_Y); + _360_JOY_BUTTON_Y); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OK, - _360_JOY_BUTTON_A); + _360_JOY_BUTTON_A); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_CANCEL, - _360_JOY_BUTTON_B); + _360_JOY_BUTTON_B); PlatformInput.SetGameJoypadMaps( MAP_STYLE_1, ACTION_MENU_UP, _360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP); @@ -226,92 +226,92 @@ void DefineActions(void) { MAP_STYLE_1, ACTION_MENU_RIGHT, _360_JOY_BUTTON_DPAD_RIGHT | _360_JOY_BUTTON_LSTICK_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAGEUP, - _360_JOY_BUTTON_LB); + _360_JOY_BUTTON_LB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAGEDOWN, - _360_JOY_BUTTON_RT); + _360_JOY_BUTTON_RT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_RIGHT_SCROLL, - _360_JOY_BUTTON_RB); + _360_JOY_BUTTON_RB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_LEFT_SCROLL, - _360_JOY_BUTTON_LB); + _360_JOY_BUTTON_LB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_PAUSEMENU, - _360_JOY_BUTTON_START); + _360_JOY_BUTTON_START); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_STICK_PRESS, - _360_JOY_BUTTON_LTHUMB); + _360_JOY_BUTTON_LTHUMB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_PRESS, - _360_JOY_BUTTON_RTHUMB); + _360_JOY_BUTTON_RTHUMB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_UP, - _360_JOY_BUTTON_RSTICK_UP); + _360_JOY_BUTTON_RSTICK_UP); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_DOWN, - _360_JOY_BUTTON_RSTICK_DOWN); + _360_JOY_BUTTON_RSTICK_DOWN); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_LEFT, - _360_JOY_BUTTON_RSTICK_LEFT); + _360_JOY_BUTTON_RSTICK_LEFT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, ACTION_MENU_OTHER_STICK_RIGHT, - _360_JOY_BUTTON_RSTICK_RIGHT); + _360_JOY_BUTTON_RSTICK_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_JUMP, - _360_JOY_BUTTON_RB); + _360_JOY_BUTTON_RB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_FORWARD, - _360_JOY_BUTTON_LSTICK_UP); + _360_JOY_BUTTON_LSTICK_UP); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_BACKWARD, - _360_JOY_BUTTON_LSTICK_DOWN); + _360_JOY_BUTTON_LSTICK_DOWN); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LEFT, - _360_JOY_BUTTON_LSTICK_LEFT); + _360_JOY_BUTTON_LSTICK_LEFT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_RIGHT, - _360_JOY_BUTTON_LSTICK_RIGHT); + _360_JOY_BUTTON_LSTICK_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_LEFT, - _360_JOY_BUTTON_RSTICK_LEFT); + _360_JOY_BUTTON_RSTICK_LEFT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_RIGHT, - _360_JOY_BUTTON_RSTICK_RIGHT); + _360_JOY_BUTTON_RSTICK_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_UP, - _360_JOY_BUTTON_RSTICK_UP); + _360_JOY_BUTTON_RSTICK_UP); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LOOK_DOWN, - _360_JOY_BUTTON_RSTICK_DOWN); + _360_JOY_BUTTON_RSTICK_DOWN); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_USE, - _360_JOY_BUTTON_RT); + _360_JOY_BUTTON_RT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_ACTION, - _360_JOY_BUTTON_LT); + _360_JOY_BUTTON_LT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_RIGHT_SCROLL, - _360_JOY_BUTTON_DPAD_RIGHT); + _360_JOY_BUTTON_DPAD_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_LEFT_SCROLL, - _360_JOY_BUTTON_DPAD_LEFT); + _360_JOY_BUTTON_DPAD_LEFT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_INVENTORY, - _360_JOY_BUTTON_Y); + _360_JOY_BUTTON_Y); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_PAUSEMENU, - _360_JOY_BUTTON_START); + _360_JOY_BUTTON_START); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DROP, - _360_JOY_BUTTON_B); + _360_JOY_BUTTON_B); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_SNEAK_TOGGLE, - _360_JOY_BUTTON_LTHUMB); + _360_JOY_BUTTON_LTHUMB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_CRAFTING, - _360_JOY_BUTTON_X); + _360_JOY_BUTTON_X); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, - MINECRAFT_ACTION_RENDER_THIRD_PERSON, - _360_JOY_BUTTON_RTHUMB); + MINECRAFT_ACTION_RENDER_THIRD_PERSON, + _360_JOY_BUTTON_RTHUMB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_GAME_INFO, - _360_JOY_BUTTON_BACK); + _360_JOY_BUTTON_BACK); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_LEFT, - _360_JOY_BUTTON_DPAD_LEFT); + _360_JOY_BUTTON_DPAD_LEFT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_RIGHT, - _360_JOY_BUTTON_DPAD_RIGHT); + _360_JOY_BUTTON_DPAD_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_UP, - _360_JOY_BUTTON_DPAD_UP); + _360_JOY_BUTTON_DPAD_UP); PlatformInput.SetGameJoypadMaps(MAP_STYLE_1, MINECRAFT_ACTION_DPAD_DOWN, - _360_JOY_BUTTON_DPAD_DOWN); + _360_JOY_BUTTON_DPAD_DOWN); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_A, - _360_JOY_BUTTON_A); + _360_JOY_BUTTON_A); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_B, - _360_JOY_BUTTON_B); + _360_JOY_BUTTON_B); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_X, - _360_JOY_BUTTON_X); + _360_JOY_BUTTON_X); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_Y, - _360_JOY_BUTTON_Y); + _360_JOY_BUTTON_Y); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OK, - _360_JOY_BUTTON_A); + _360_JOY_BUTTON_A); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_CANCEL, - _360_JOY_BUTTON_B); + _360_JOY_BUTTON_B); PlatformInput.SetGameJoypadMaps( MAP_STYLE_2, ACTION_MENU_UP, _360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LSTICK_UP); @@ -328,77 +328,77 @@ void DefineActions(void) { MAP_STYLE_2, ACTION_MENU_PAGEUP, _360_JOY_BUTTON_DPAD_UP | _360_JOY_BUTTON_LB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_PAGEDOWN, - _360_JOY_BUTTON_RT); + _360_JOY_BUTTON_RT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_RIGHT_SCROLL, - _360_JOY_BUTTON_RB); + _360_JOY_BUTTON_RB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_LEFT_SCROLL, - _360_JOY_BUTTON_LB); + _360_JOY_BUTTON_LB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_JUMP, - _360_JOY_BUTTON_LT); + _360_JOY_BUTTON_LT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_FORWARD, - _360_JOY_BUTTON_LSTICK_UP); + _360_JOY_BUTTON_LSTICK_UP); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_BACKWARD, - _360_JOY_BUTTON_LSTICK_DOWN); + _360_JOY_BUTTON_LSTICK_DOWN); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LEFT, - _360_JOY_BUTTON_LSTICK_LEFT); + _360_JOY_BUTTON_LSTICK_LEFT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_RIGHT, - _360_JOY_BUTTON_LSTICK_RIGHT); + _360_JOY_BUTTON_LSTICK_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_LEFT, - _360_JOY_BUTTON_RSTICK_LEFT); + _360_JOY_BUTTON_RSTICK_LEFT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_RIGHT, - _360_JOY_BUTTON_RSTICK_RIGHT); + _360_JOY_BUTTON_RSTICK_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_UP, - _360_JOY_BUTTON_RSTICK_UP); + _360_JOY_BUTTON_RSTICK_UP); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LOOK_DOWN, - _360_JOY_BUTTON_RSTICK_DOWN); + _360_JOY_BUTTON_RSTICK_DOWN); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_USE, - _360_JOY_BUTTON_RT); + _360_JOY_BUTTON_RT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_ACTION, - _360_JOY_BUTTON_A); + _360_JOY_BUTTON_A); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_RIGHT_SCROLL, - _360_JOY_BUTTON_DPAD_RIGHT); + _360_JOY_BUTTON_DPAD_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_LEFT_SCROLL, - _360_JOY_BUTTON_DPAD_LEFT); + _360_JOY_BUTTON_DPAD_LEFT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_INVENTORY, - _360_JOY_BUTTON_Y); + _360_JOY_BUTTON_Y); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_PAUSEMENU, - _360_JOY_BUTTON_START); + _360_JOY_BUTTON_START); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DROP, - _360_JOY_BUTTON_B); + _360_JOY_BUTTON_B); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_SNEAK_TOGGLE, - _360_JOY_BUTTON_LB); + _360_JOY_BUTTON_LB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_CRAFTING, - _360_JOY_BUTTON_X); + _360_JOY_BUTTON_X); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, - MINECRAFT_ACTION_RENDER_THIRD_PERSON, - _360_JOY_BUTTON_LTHUMB); + MINECRAFT_ACTION_RENDER_THIRD_PERSON, + _360_JOY_BUTTON_LTHUMB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_GAME_INFO, - _360_JOY_BUTTON_BACK); + _360_JOY_BUTTON_BACK); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_PAUSEMENU, - _360_JOY_BUTTON_START); + _360_JOY_BUTTON_START); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_STICK_PRESS, - _360_JOY_BUTTON_LTHUMB); + _360_JOY_BUTTON_LTHUMB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_PRESS, - _360_JOY_BUTTON_RTHUMB); + _360_JOY_BUTTON_RTHUMB); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_UP, - _360_JOY_BUTTON_RSTICK_UP); + _360_JOY_BUTTON_RSTICK_UP); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_DOWN, - _360_JOY_BUTTON_RSTICK_DOWN); + _360_JOY_BUTTON_RSTICK_DOWN); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_LEFT, - _360_JOY_BUTTON_RSTICK_LEFT); + _360_JOY_BUTTON_RSTICK_LEFT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, ACTION_MENU_OTHER_STICK_RIGHT, - _360_JOY_BUTTON_RSTICK_RIGHT); + _360_JOY_BUTTON_RSTICK_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_LEFT, - _360_JOY_BUTTON_DPAD_LEFT); + _360_JOY_BUTTON_DPAD_LEFT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_RIGHT, - _360_JOY_BUTTON_DPAD_RIGHT); + _360_JOY_BUTTON_DPAD_RIGHT); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_UP, - _360_JOY_BUTTON_DPAD_UP); + _360_JOY_BUTTON_DPAD_UP); PlatformInput.SetGameJoypadMaps(MAP_STYLE_2, MINECRAFT_ACTION_DPAD_DOWN, - _360_JOY_BUTTON_DPAD_DOWN); + _360_JOY_BUTTON_DPAD_DOWN); } int main(int argc, const char* argv[]) { diff --git a/targets/java/include/java/InputOutputStream/GZIPInputStream.h b/targets/java/include/java/InputOutputStream/GZIPInputStream.h index 3aa36bcb7..6fa590f70 100644 --- a/targets/java/include/java/InputOutputStream/GZIPInputStream.h +++ b/targets/java/include/java/InputOutputStream/GZIPInputStream.h @@ -11,7 +11,7 @@ private: InputStream* stream; public: - GZIPInputStream(InputStream* out) : stream(out){}; + GZIPInputStream(InputStream* out) : stream(out) {}; virtual int read() { return stream->read(); }; virtual int read(std::vector& b) { return stream->read(b); }; virtual int read(std::vector& b, unsigned int offset, diff --git a/targets/java/include/java/InputOutputStream/GZIPOutputStream.h b/targets/java/include/java/InputOutputStream/GZIPOutputStream.h index d14e47821..b7015ee4f 100644 --- a/targets/java/include/java/InputOutputStream/GZIPOutputStream.h +++ b/targets/java/include/java/InputOutputStream/GZIPOutputStream.h @@ -9,7 +9,7 @@ private: OutputStream* stream; public: - GZIPOutputStream(OutputStream* out) : stream(out){}; + GZIPOutputStream(OutputStream* out) : stream(out) {}; virtual void write(unsigned int b) { stream->write(b); }; virtual void write(const std::vector& b) { stream->write(b); }; virtual void write(const std::vector& b, unsigned int offset, diff --git a/targets/java/src/File.cpp b/targets/java/src/File.cpp index 70b3caf80..1e2ce80b5 100644 --- a/targets/java/src/File.cpp +++ b/targets/java/src/File.cpp @@ -90,12 +90,13 @@ File::File(const std::string& pathname) { return; } } -// #ifdef _WINDOWS64 -// std::string path = std::filesystem::path(m_abstractPathName).string(); -// std::string finalPath = PlatformStorage.GetMountedPath(path.c_str()); -// if (finalPath.size() == 0) finalPath = path; -// m_abstractPathName = finalPath; -// #endif + // #ifdef _WINDOWS64 + // std::string path = + // std::filesystem::path(m_abstractPathName).string(); std::string + // finalPath = PlatformStorage.GetMountedPath(path.c_str()); if + // (finalPath.size() == 0) finalPath = path; m_abstractPathName = + // finalPath; + // #endif /* std::vector path = stringSplit( pathname, pathSeparator ); diff --git a/targets/minecraft/BuildVer.h b/targets/minecraft/BuildVer.h index fcf6eb240..e8481b9d0 100644 --- a/targets/minecraft/BuildVer.h +++ b/targets/minecraft/BuildVer.h @@ -50,7 +50,7 @@ VER_FILEVERSION_STRING "." VER_FILEBPAD #x "." #y #define VER_FILEVERSION_STR2_W(x, y) \ VER_FILEVERSION_STRING_W \ - "." VER_FILEBPAD_W VER_WIDE_PREFIX(#x) "." VER_WIDE_PREFIX(#y) + "." VER_FILEBPAD_W VER_WIDE_PREFIX(#x) "." VER_WIDE_PREFIX(#y) #define VER_FILEVERSION_STR1(x, y) VER_FILEVERSION_STR2(x, y) #define VER_FILEVERSION_STR1_W(x, y) VER_FILEVERSION_STR2_W(x, y) diff --git a/targets/minecraft/client/BufferedImage.h b/targets/minecraft/client/BufferedImage.h index d06d1cd79..c75d933ac 100644 --- a/targets/minecraft/client/BufferedImage.h +++ b/targets/minecraft/client/BufferedImage.h @@ -18,7 +18,7 @@ public: BufferedImage(int width, int height, int type); BufferedImage(const std::string& File, bool filenameHasExtension = false, bool bTitleUpdateTexture = false, - const std::string& drive = ""); // 4J added + const std::string& drive = ""); // 4J added BufferedImage(std::uint8_t* pbData, std::uint32_t dataBytes); // 4J added ~BufferedImage(); diff --git a/targets/minecraft/client/Minecraft.cpp b/targets/minecraft/client/Minecraft.cpp index f4890ddb3..efecfa163 100644 --- a/targets/minecraft/client/Minecraft.cpp +++ b/targets/minecraft/client/Minecraft.cpp @@ -17,7 +17,7 @@ #include "Timer.h" #include "User.h" #include "app/common/Audio/SoundEngine.h" -#include "minecraft/world/tutorial/ITutorial.h" +#include "app/common/Audio/SoundTypes.h" #include "app/common/UI/All Platforms/UIEnums.h" #include "app/common/UI/All Platforms/UIStructs.h" #include "app/common/UI/ConsoleUIController.h" @@ -53,8 +53,6 @@ #include "minecraft/network/INetworkService.h" #include "minecraft/network/packet/DisconnectPacket.h" #include "minecraft/network/packet/Packet.h" -#include "platform/network/network.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/Stats.h" #include "minecraft/stats/StatsCounter.h" #include "minecraft/util/Log.h" @@ -94,7 +92,9 @@ #include "minecraft/world/level/tile/TallGrassPlantTile.h" #include "minecraft/world/level/tile/Tile.h" #include "minecraft/world/phys/HitResult.h" +#include "minecraft/world/tutorial/ITutorial.h" #include "platform/XboxStubs.h" +#include "platform/network/network.h" #include "platform/profile/profile.h" #include "platform/renderer/renderer.h" #include "platform/storage/storage.h" @@ -1683,9 +1683,10 @@ void Minecraft::run_middle() { if (unoccupiedQuadrant > -1) { // render a logo PlatformRenderer.StateSetViewport(( - IPlatformRenderer::eViewportType)( - IPlatformRenderer::VIEWPORT_TYPE_QUADRANT_TOP_LEFT + - unoccupiedQuadrant)); + IPlatformRenderer:: + eViewportType)(IPlatformRenderer:: + VIEWPORT_TYPE_QUADRANT_TOP_LEFT + + unoccupiedQuadrant)); glClearColor(0, 0, 0, 0); glClear(GL_COLOR_BUFFER_BIT); @@ -2163,8 +2164,8 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { if (player->isRiding()) { std::shared_ptr mount = player->riding; - if (mount->instanceof (eTYPE_MINECART) || mount->instanceof - (eTYPE_BOAT)) { + if (mount->instanceof(eTYPE_MINECART) || + mount->instanceof(eTYPE_BOAT)) { *piAlt = IDS_TOOLTIPS_EXIT; } else { *piAlt = IDS_TOOLTIPS_DISMOUNT; @@ -3190,7 +3191,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { break; default: - if (hitResult->entity->instanceof (eTYPE_MOB)) { + if (hitResult->entity->instanceof(eTYPE_MOB)) { std::shared_ptr mob = std::dynamic_pointer_cast( hitResult->entity); @@ -4119,9 +4120,8 @@ void Minecraft::startAndConnectTo(const std::string& name, Minecraft* minecraft; // 4J - was new Minecraft(frame, canvas, nullptr, 854, 480, fullScreen); - minecraft = - new Minecraft(nullptr, nullptr, nullptr, 1280, 720, fullScreen, - leaderboard); + minecraft = new Minecraft(nullptr, nullptr, nullptr, 1280, 720, fullScreen, + leaderboard); /* - 4J - removed { diff --git a/targets/minecraft/client/Minecraft.h b/targets/minecraft/client/Minecraft.h index 3468ae23a..efb538884 100644 --- a/targets/minecraft/client/Minecraft.h +++ b/targets/minecraft/client/Minecraft.h @@ -9,10 +9,10 @@ #include "java/File.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/network/packet/DisconnectPacket.h" -#include "platform/thread/C4JThread.h" #include "platform/PlatformTypes.h" -#include "platform/stubs.h" #include "platform/leaderboard/leaderboard.h" +#include "platform/stubs.h" +#include "platform/thread/C4JThread.h" class Timer; class MultiPlayerLevel; diff --git a/targets/minecraft/client/gui/Screen.cpp b/targets/minecraft/client/gui/Screen.cpp index 4ef01b073..d3f7ba96f 100644 --- a/targets/minecraft/client/gui/Screen.cpp +++ b/targets/minecraft/client/gui/Screen.cpp @@ -2,6 +2,7 @@ #include "Button.h" #include "app/common/Audio/ConsoleSoundEngine.h" +#include "app/common/Audio/SoundTypes.h" #include "minecraft/GameEnums.h" #include "minecraft/IGameServices.h" #include "minecraft/client/Minecraft.h" @@ -12,7 +13,6 @@ #include "minecraft/network/INetworkService.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/ServerAction.h" -#include "app/common/Audio/SoundTypes.h" #include "platform/input/input.h" #include "platform/profile/profile.h" #include "platform/stubs.h" diff --git a/targets/minecraft/client/gui/achievement/StatsScreen.cpp b/targets/minecraft/client/gui/achievement/StatsScreen.cpp index 7ab9ca3f6..8e8f129c2 100644 --- a/targets/minecraft/client/gui/achievement/StatsScreen.cpp +++ b/targets/minecraft/client/gui/achievement/StatsScreen.cpp @@ -1,5 +1,7 @@ #include "StatsScreen.h" + #include "app/common/Audio/ConsoleSoundEngine.h" +#include "app/common/Audio/SoundTypes.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/gui/Button.h" #include "minecraft/client/gui/Font.h" @@ -8,7 +10,6 @@ #include "minecraft/client/renderer/entity/ItemRenderer.h" #include "minecraft/locale/I18n.h" #include "minecraft/locale/Language.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/ItemStat.h" #include "minecraft/stats/Stat.h" #include "minecraft/stats/Stats.h" diff --git a/targets/minecraft/client/model/BookModel.h b/targets/minecraft/client/model/BookModel.h index 940ba85b1..4efb7d06e 100644 --- a/targets/minecraft/client/model/BookModel.h +++ b/targets/minecraft/client/model/BookModel.h @@ -9,7 +9,7 @@ public: ModelPart *leftLid, *rightLid; ModelPart *leftPages, *rightPages; ModelPart *flipPage1, *flipPage2; - ModelPart *seam; + ModelPart* seam; BookModel(); virtual void render(std::shared_ptr entity, float time, float r, diff --git a/targets/minecraft/client/model/OcelotModel.h b/targets/minecraft/client/model/OcelotModel.h index c54154d3e..ee5a4d96e 100644 --- a/targets/minecraft/client/model/OcelotModel.h +++ b/targets/minecraft/client/model/OcelotModel.h @@ -39,7 +39,7 @@ public: void render(std::shared_ptr entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled); - void render(OcelotModel *model, float scale, bool usecompiled); + void render(OcelotModel* model, float scale, bool usecompiled); void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, std::shared_ptr entity, unsigned int uiBitmaskOverrideAnim = 0); diff --git a/targets/minecraft/client/multiplayer/ClientConnection.cpp b/targets/minecraft/client/multiplayer/ClientConnection.cpp index e28f0cee7..fc7039ecf 100644 --- a/targets/minecraft/client/multiplayer/ClientConnection.cpp +++ b/targets/minecraft/client/multiplayer/ClientConnection.cpp @@ -12,14 +12,12 @@ #include "MultiPlayerLevel.h" #include "ReceivingLevelScreen.h" +#include "app/common/Audio/SoundTypes.h" #include "app/common/ConsoleGameMode.h" -#include "minecraft/client/skins/ISkinAssetData.h" -#include "minecraft/network/Socket.h" #include "app/common/Tutorial/FullTutorialMode.h" -#include "minecraft/world/tutorial/ITutorial.h" #include "app/common/UI/All Platforms/UIStructs.h" -#include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.h" #include "app/common/UI/ConsoleUIController.h" +#include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_TradingMenu.h" #include "java/Class.h" #include "java/InputOutputStream/ByteArrayInputStream.h" #include "java/InputOutputStream/DataInputStream.h" @@ -41,10 +39,12 @@ #include "minecraft/client/player/LocalPlayer.h" #include "minecraft/client/player/RemotePlayer.h" #include "minecraft/client/renderer/LevelRenderer.h" +#include "minecraft/client/skins/ISkinAssetData.h" #include "minecraft/client/skins/TexturePack.h" #include "minecraft/client/skins/TexturePackRepository.h" #include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/network/INetworkService.h" +#include "minecraft/network/Socket.h" #include "minecraft/network/packet/AddEntityPacket.h" #include "minecraft/network/packet/AddExperienceOrbPacket.h" #include "minecraft/network/packet/AddGlobalEntityPacket.h" @@ -112,9 +112,7 @@ #include "minecraft/network/packet/UpdateMobEffectPacket.h" #include "minecraft/network/packet/UpdateProgressPacket.h" #include "minecraft/network/packet/XZPacket.h" -#include "platform/network/network.h" #include "minecraft/server/MinecraftServer.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/util/Log.h" #include "minecraft/world/SimpleContainer.h" @@ -190,8 +188,10 @@ #include "minecraft/world/level/tile/entity/SkullTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" #include "minecraft/world/phys/AABB.h" +#include "minecraft/world/tutorial/ITutorial.h" #include "platform/PlatformTypes.h" #include "platform/input/input.h" +#include "platform/network/network.h" #include "platform/profile/profile.h" #include "strings.h" #include "util/StringHelpers.h" @@ -530,7 +530,7 @@ void ClientConnection::handleAddEntity( } } - if (owner->instanceof (eTYPE_PLAYER)) { + if (owner->instanceof(eTYPE_PLAYER)) { std::shared_ptr player = std::dynamic_pointer_cast(owner); std::shared_ptr hook = @@ -784,8 +784,7 @@ void ClientConnection::handleAddEntity( } } - if (owner != nullptr && owner->instanceof - (eTYPE_LIVINGENTITY)) { + if (owner != nullptr && owner->instanceof(eTYPE_LIVINGENTITY)) { std::dynamic_pointer_cast(e)->owner = std::dynamic_pointer_cast(owner); } @@ -1318,7 +1317,6 @@ void ClientConnection::handleTileUpdate( void ClientConnection::handleDisconnect( std::shared_ptr packet) { - connection->close(DisconnectPacket::eDisconnect_Kicked); done = true; @@ -1869,12 +1867,12 @@ void ClientConnection::handleAnimate(std::shared_ptr packet) { std::shared_ptr e = getEntity(packet->id); if (e == nullptr) return; if (packet->action == AnimatePacket::SWING) { - if (e->instanceof (eTYPE_LIVINGENTITY)) + if (e->instanceof(eTYPE_LIVINGENTITY)) std::dynamic_pointer_cast(e)->swing(); } else if (packet->action == AnimatePacket::HURT) { e->animateHurt(); } else if (packet->action == AnimatePacket::WAKE_UP) { - if (e->instanceof (eTYPE_PLAYER)) + if (e->instanceof(eTYPE_PLAYER)) std::dynamic_pointer_cast(e)->stopSleepInBed(false, false, false); } else if (packet->action == AnimatePacket::RESPAWN) { @@ -1890,8 +1888,8 @@ void ClientConnection::handleAnimate(std::shared_ptr packet) { new CritParticle(minecraft->level, e, eParticleType_magicCrit)); critParticle->CritParticlePostConstructor(); minecraft->particleEngine->add(critParticle); - } else if ((packet->action == AnimatePacket::EAT) && e->instanceof - (eTYPE_REMOTEPLAYER)) { + } else if ((packet->action == AnimatePacket::EAT) && + e->instanceof(eTYPE_REMOTEPLAYER)) { } } @@ -2167,13 +2165,13 @@ void ClientConnection::handleEntityLinkPacket( ->entityId) { sourceEntity = Minecraft::GetInstance()->localplayers[m_userIndex]; - if (destEntity != nullptr && destEntity->instanceof (eTYPE_BOAT)) + if (destEntity != nullptr && destEntity->instanceof(eTYPE_BOAT)) (std::dynamic_pointer_cast(destEntity))->setDoLerp(false); displayMountMessage = (sourceEntity->riding == nullptr && destEntity != nullptr); - } else if (destEntity != nullptr && destEntity->instanceof - (eTYPE_BOAT)) { + } else if (destEntity != nullptr && + destEntity->instanceof(eTYPE_BOAT)) { (std::dynamic_pointer_cast(destEntity))->setDoLerp(true); } @@ -2190,7 +2188,7 @@ void ClientConnection::handleEntityLinkPacket( } */ } else if (packet->type == SetEntityLinkPacket::LEASH) { - if ((sourceEntity != nullptr) && sourceEntity->instanceof (eTYPE_MOB)) { + if ((sourceEntity != nullptr) && sourceEntity->instanceof(eTYPE_MOB)) { if (destEntity != nullptr) { (std::dynamic_pointer_cast(sourceEntity)) ->setLeashedTo(destEntity, false); @@ -2303,9 +2301,8 @@ void ClientConnection::handleTextureAndGeometry( if (pSkinAsset) { if (pSkinAsset->getAdditionalBoxesCount() != 0) { send(std::shared_ptr( - new TextureAndGeometryPacket(packet->textureName, - pbData, dwBytes, - pSkinAsset))); + new TextureAndGeometryPacket( + packet->textureName, pbData, dwBytes, pSkinAsset))); } else { send(std::shared_ptr( new TextureAndGeometryPacket(packet->textureName, @@ -2349,7 +2346,7 @@ void ClientConnection::handleTextureAndGeometry( void ClientConnection::handleTextureChange( std::shared_ptr packet) { std::shared_ptr e = getEntity(packet->id); - if ((e == nullptr) || !e->instanceof (eTYPE_PLAYER)) return; + if ((e == nullptr) || !e->instanceof(eTYPE_PLAYER)) return; std::shared_ptr player = std::dynamic_pointer_cast(e); bool isLocalPlayer = false; @@ -3077,7 +3074,7 @@ void ClientConnection::handleAwardStat( void ClientConnection::handleUpdateMobEffect( std::shared_ptr packet) { std::shared_ptr e = getEntity(packet->entityId); - if ((e == nullptr) || !e->instanceof (eTYPE_LIVINGENTITY)) return; + if ((e == nullptr) || !e->instanceof(eTYPE_LIVINGENTITY)) return; //( std::dynamic_pointer_cast(e) )->addEffect(new // MobEffectInstance(packet->effectId, packet->effectDurationTicks, @@ -3092,7 +3089,7 @@ void ClientConnection::handleUpdateMobEffect( void ClientConnection::handleRemoveMobEffect( std::shared_ptr packet) { std::shared_ptr e = getEntity(packet->entityId); - if ((e == nullptr) || !e->instanceof (eTYPE_LIVINGENTITY)) return; + if ((e == nullptr) || !e->instanceof(eTYPE_LIVINGENTITY)) return; (std::dynamic_pointer_cast(e)) ->removeEffectNoUpdate(packet->effectId); @@ -3121,7 +3118,7 @@ void ClientConnection::handlePlayerInfo( packet->m_playerPrivileges); std::shared_ptr entity = getEntity(packet->m_entityId); - if (entity != nullptr && entity->instanceof (eTYPE_PLAYER)) { + if (entity != nullptr && entity->instanceof(eTYPE_PLAYER)) { std::shared_ptr player = std::dynamic_pointer_cast(entity); player->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_All, @@ -3531,7 +3528,7 @@ void ClientConnection::handleUpdateAttributes( std::shared_ptr entity = getEntity(packet->getEntityId()); if (entity == nullptr) return; - if (!entity->instanceof (eTYPE_LIVINGENTITY)) { + if (!entity->instanceof(eTYPE_LIVINGENTITY)) { // Entity is not a living entity! assert(0); } diff --git a/targets/minecraft/client/multiplayer/MultiPlayerChunkCache.cpp b/targets/minecraft/client/multiplayer/MultiPlayerChunkCache.cpp index 7fa6694c6..0b00ebc9b 100644 --- a/targets/minecraft/client/multiplayer/MultiPlayerChunkCache.cpp +++ b/targets/minecraft/client/multiplayer/MultiPlayerChunkCache.cpp @@ -176,8 +176,8 @@ LevelChunk* MultiPlayerChunkCache::create(int x, int z) { if (MinecraftServer::getInstance()->serverHalted()) return nullptr; - // If we're the host, then don't create the chunk, share - // data from the server's copy + // If we're the host, then don't create the chunk, share + // data from the server's copy #ifdef _LARGE_WORLDS LevelChunk* serverChunk = MinecraftServer::getInstance() diff --git a/targets/minecraft/client/multiplayer/MultiPlayerGameMode.cpp b/targets/minecraft/client/multiplayer/MultiPlayerGameMode.cpp index 1c87bad35..c9b3e47f7 100644 --- a/targets/minecraft/client/multiplayer/MultiPlayerGameMode.cpp +++ b/targets/minecraft/client/multiplayer/MultiPlayerGameMode.cpp @@ -513,8 +513,7 @@ bool MultiPlayerGameMode::hasFarPickRange() { // only happens when the player is riding a horse. bool MultiPlayerGameMode::isServerControlledInventory() { return minecraft->player->isRiding() && - minecraft->player->riding->instanceof - (eTYPE_HORSE); + minecraft->player->riding->instanceof(eTYPE_HORSE); } bool MultiPlayerGameMode::handleCraftItem(int recipe, diff --git a/targets/minecraft/client/multiplayer/MultiPlayerLocalPlayer.cpp b/targets/minecraft/client/multiplayer/MultiPlayerLocalPlayer.cpp index 8dd22a999..34e40f06c 100644 --- a/targets/minecraft/client/multiplayer/MultiPlayerLocalPlayer.cpp +++ b/targets/minecraft/client/multiplayer/MultiPlayerLocalPlayer.cpp @@ -6,7 +6,6 @@ #include "ClientConnection.h" #include "minecraft/IGameServices.h" -#include "minecraft/world/tutorial/ITutorial.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerGameMode.h" #include "minecraft/client/player/Input.h" @@ -33,6 +32,7 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/dimension/Dimension.h" #include "minecraft/world/phys/AABB.h" +#include "minecraft/world/tutorial/ITutorial.h" class User; class ItemEntity; @@ -233,8 +233,7 @@ void MultiplayerLocalPlayer::actuallyHurt(DamageSource* source, float dmg) { void MultiplayerLocalPlayer::completeUsingItem() { Minecraft* pMinecraft = Minecraft::GetInstance(); if (useItem != nullptr && pMinecraft->localgameModes[m_iPad] != nullptr) { - ITutorial* tutorial = - pMinecraft->localgameModes[m_iPad]->getTutorial(); + ITutorial* tutorial = pMinecraft->localgameModes[m_iPad]->getTutorial(); if (tutorial != nullptr) { tutorial->completeUsingItem(useItem); } @@ -245,8 +244,7 @@ void MultiplayerLocalPlayer::completeUsingItem() { void MultiplayerLocalPlayer::onEffectAdded(MobEffectInstance* effect) { Minecraft* pMinecraft = Minecraft::GetInstance(); if (pMinecraft->localgameModes[m_iPad] != nullptr) { - ITutorial* tutorial = - pMinecraft->localgameModes[m_iPad]->getTutorial(); + ITutorial* tutorial = pMinecraft->localgameModes[m_iPad]->getTutorial(); if (tutorial != nullptr) { tutorial->onEffectChanged(MobEffect::effects[effect->getId()]); } @@ -258,8 +256,7 @@ void MultiplayerLocalPlayer::onEffectUpdated(MobEffectInstance* effect, bool doRefreshAttributes) { Minecraft* pMinecraft = Minecraft::GetInstance(); if (pMinecraft->localgameModes[m_iPad] != nullptr) { - ITutorial* tutorial = - pMinecraft->localgameModes[m_iPad]->getTutorial(); + ITutorial* tutorial = pMinecraft->localgameModes[m_iPad]->getTutorial(); if (tutorial != nullptr) { tutorial->onEffectChanged(MobEffect::effects[effect->getId()]); } @@ -270,8 +267,7 @@ void MultiplayerLocalPlayer::onEffectUpdated(MobEffectInstance* effect, void MultiplayerLocalPlayer::onEffectRemoved(MobEffectInstance* effect) { Minecraft* pMinecraft = Minecraft::GetInstance(); if (pMinecraft->localgameModes[m_iPad] != nullptr) { - ITutorial* tutorial = - pMinecraft->localgameModes[m_iPad]->getTutorial(); + ITutorial* tutorial = pMinecraft->localgameModes[m_iPad]->getTutorial(); if (tutorial != nullptr) { tutorial->onEffectChanged(MobEffect::effects[effect->getId()], true); @@ -355,8 +351,7 @@ void MultiplayerLocalPlayer::ride(std::shared_ptr e) { Minecraft* pMinecraft = Minecraft::GetInstance(); if (pMinecraft->localgameModes[m_iPad] != nullptr) { - ITutorial* tutorial = - pMinecraft->localgameModes[m_iPad]->getTutorial(); + ITutorial* tutorial = pMinecraft->localgameModes[m_iPad]->getTutorial(); if (tutorial != nullptr) { if (wasRiding && !isRiding) { tutorial->changeTutorialState(e_Tutorial_State_Gameplay); diff --git a/targets/minecraft/client/particle/FireworksParticles.cpp b/targets/minecraft/client/particle/FireworksParticles.cpp index ab8d756d0..a95e5fa8d 100644 --- a/targets/minecraft/client/particle/FireworksParticles.cpp +++ b/targets/minecraft/client/particle/FireworksParticles.cpp @@ -6,13 +6,13 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/particle/Particle.h" #include "minecraft/client/particle/ParticleEngine.h" #include "minecraft/client/renderer/Tesselator.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/item/FireworksItem.h" #include "minecraft/world/level/Level.h" diff --git a/targets/minecraft/client/particle/ParticleEngine.cpp b/targets/minecraft/client/particle/ParticleEngine.cpp index f10fb25c0..969e07fba 100644 --- a/targets/minecraft/client/particle/ParticleEngine.cpp +++ b/targets/minecraft/client/particle/ParticleEngine.cpp @@ -29,7 +29,9 @@ ResourceLocation ParticleEngine::PARTICLES_LOCATION = ParticleEngine::ParticleEngine(Level* level, Textures* textures) { // if (level != nullptr) // 4J - removed - we want level to be // initialised to *something* - { this->level = level; } + { + this->level = level; + } this->textures = textures; this->random = new Random(); diff --git a/targets/minecraft/client/player/LocalPlayer.cpp b/targets/minecraft/client/player/LocalPlayer.cpp index 63173838c..17be12f19 100644 --- a/targets/minecraft/client/player/LocalPlayer.cpp +++ b/targets/minecraft/client/player/LocalPlayer.cpp @@ -31,8 +31,7 @@ #include "PlatformTypes.h" #include "Pos.h" #include "app/common/Audio/ConsoleSoundEngine.h" -#include "platform/profile/ProfileConstants.h" -#include "minecraft/world/tutorial/ITutorial.h" +#include "app/common/Audio/SoundTypes.h" #include "app/common/UI/ConsoleUIController.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/Minecraft.h" @@ -54,7 +53,6 @@ #include "minecraft/commands/CommandsEnum.h" #include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/network/INetworkService.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/Achievement.h" #include "minecraft/stats/CommonStats.h" #include "minecraft/stats/GenericStats.h" @@ -80,7 +78,9 @@ #include "minecraft/world/phys/AABB.h" #include "minecraft/world/phys/HitResult.h" #include "minecraft/world/phys/Vec3.h" +#include "minecraft/world/tutorial/ITutorial.h" #include "platform/input/input.h" +#include "platform/profile/ProfileConstants.h" #include "platform/profile/profile.h" #include "platform/renderer/renderer.h" @@ -1220,8 +1220,7 @@ bool LocalPlayer::hasPermission(EGameCommand command) { void LocalPlayer::onCrafted(std::shared_ptr item) { if (minecraft->localgameModes[m_iPad] != nullptr) { - ITutorial* tutorial = - minecraft->localgameModes[m_iPad]->getTutorial(); + ITutorial* tutorial = minecraft->localgameModes[m_iPad]->getTutorial(); if (tutorial != nullptr) { tutorial->onCrafted(item); } @@ -1589,13 +1588,13 @@ void LocalPlayer::updateRichPresence() { selectedItem->id == Item::map_Id) { gameServices().setRichPresenceContext(m_iPad, CONTEXT_GAME_STATE_MAP); - } else if ((riding != nullptr) && riding->instanceof (eTYPE_MINECART)) { + } else if ((riding != nullptr) && riding->instanceof(eTYPE_MINECART)) { gameServices().setRichPresenceContext( m_iPad, CONTEXT_GAME_STATE_RIDING_MINECART); - } else if ((riding != nullptr) && riding->instanceof (eTYPE_BOAT)) { + } else if ((riding != nullptr) && riding->instanceof(eTYPE_BOAT)) { gameServices().setRichPresenceContext(m_iPad, CONTEXT_GAME_STATE_BOATING); - } else if ((riding != nullptr) && riding->instanceof (eTYPE_PIG)) { + } else if ((riding != nullptr) && riding->instanceof(eTYPE_PIG)) { gameServices().setRichPresenceContext( m_iPad, CONTEXT_GAME_STATE_RIDING_PIG); } else if (this->dimension == -1) { @@ -1647,8 +1646,7 @@ void LocalPlayer::handleCollectItem(std::shared_ptr item) { } } } - ITutorial* tutorial = - minecraft->localgameModes[m_iPad]->getTutorial(); + ITutorial* tutorial = minecraft->localgameModes[m_iPad]->getTutorial(); if (tutorial != nullptr) { tutorial->onTake(item, itemCountAnyAux, itemCountThisAux); } diff --git a/targets/minecraft/client/renderer/GameRenderer.cpp b/targets/minecraft/client/renderer/GameRenderer.cpp index c256a50a4..1081c7bf3 100644 --- a/targets/minecraft/client/renderer/GameRenderer.cpp +++ b/targets/minecraft/client/renderer/GameRenderer.cpp @@ -11,6 +11,7 @@ #include "ItemInHandRenderer.h" #include "LevelRenderer.h" #include "Tesselator.h" +#include "app/common/Audio/SoundTypes.h" #include "java/Class.h" #include "java/FloatBuffer.h" #include "java/JavaMath.h" @@ -47,7 +48,6 @@ #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/client/skins/TexturePack.h" #include "minecraft/client/skins/TexturePackRepository.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Log.h" #include "minecraft/util/SmoothFloat.h" #include "minecraft/world/effect/MobEffect.h" @@ -76,10 +76,10 @@ #include "minecraft/world/phys/HitResult.h" #include "minecraft/world/phys/Vec3.h" #include "platform/PlatformTypes.h" -#include "platform/thread/ShutdownManager.h" #include "platform/input/input.h" #include "platform/renderer/renderer.h" #include "platform/stubs.h" +#include "platform/thread/ShutdownManager.h" #include "util/FrameProfiler.h" bool GameRenderer::anaglyph3d = false; @@ -375,7 +375,7 @@ void GameRenderer::pick(float a) { if (nearest < dist || (mc->hitResult == nullptr)) { if (mc->hitResult != nullptr) delete mc->hitResult; mc->hitResult = new HitResult(hovered); - if (hovered->instanceof (eTYPE_LIVINGENTITY)) { + if (hovered->instanceof(eTYPE_LIVINGENTITY)) { mc->crosshairPickMob = std::dynamic_pointer_cast(hovered); } @@ -448,7 +448,7 @@ void GameRenderer::bobHurt(float a) { } void GameRenderer::bobView(float a) { - if (!mc->cameraTargetPlayer->instanceof (eTYPE_LIVINGENTITY)) return; + if (!mc->cameraTargetPlayer->instanceof(eTYPE_LIVINGENTITY)) return; std::shared_ptr player = std::dynamic_pointer_cast(mc->cameraTargetPlayer); @@ -706,8 +706,7 @@ void GameRenderer::renderItemInHand(float a, int eye) { // 4J-JEV: I'm fairly confident this method would crash if the cameratarget // isnt a local player anyway, but oh well. std::shared_ptr localplayer = - mc->cameraTargetPlayer->instanceof - (eTYPE_LOCALPLAYER) + mc->cameraTargetPlayer->instanceof(eTYPE_LOCALPLAYER) ? std::dynamic_pointer_cast(mc->cameraTargetPlayer) : nullptr; @@ -808,7 +807,8 @@ void GameRenderer::turnOffLightLayer(double alpha) { // 4J - TODO PlatformRenderer.TextureBindVertex(-1); } - // // 4jcraft: manually handle this in order to ensure that the light layer is + // // 4jcraft: manually handle this in order to ensure that the light layer + // is // // turned off correctly // if (SharedConstants::TEXTURE_LIGHTING) { // glClientActiveTexture(GL_TEXTURE1); @@ -1242,7 +1242,9 @@ void GameRenderer::renderLevel(float a, int64_t until) { // if (mc->cameraTargetPlayer == nullptr) // 4J - removed condition as we // want to update this is mc->player changes for different local players - { mc->cameraTargetPlayer = mc->player; } + { + mc->cameraTargetPlayer = mc->player; + } pick(a); std::shared_ptr cameraEntity = mc->cameraTargetPlayer; @@ -1380,9 +1382,9 @@ void GameRenderer::renderLevel(float a, int64_t until) { turnOffLightLayer(a); // 4J - brought forward from 1.8.2 if ((mc->hitResult != nullptr) && - cameraEntity->isUnderLiquid(Material::water) && - cameraEntity->instanceof - (eTYPE_PLAYER)) //&& !mc->options.hideGui) + cameraEntity->isUnderLiquid(Material::water) && + cameraEntity->instanceof( + eTYPE_PLAYER)) //&& !mc->options.hideGui) { std::shared_ptr player = std::dynamic_pointer_cast(cameraEntity); @@ -1458,8 +1460,8 @@ void GameRenderer::renderLevel(float a, int64_t until) { glEnable(GL_CULL_FACE); glDisable(GL_BLEND); - if ((zoom == 1) && cameraEntity->instanceof - (eTYPE_PLAYER)) //&& !mc->options.hideGui) + if ((zoom == 1) && + cameraEntity->instanceof(eTYPE_PLAYER)) //&& !mc->options.hideGui) { if (mc->hitResult != nullptr && !cameraEntity->isUnderLiquid(Material::water)) { @@ -2018,7 +2020,7 @@ void GameRenderer::setupFog(int i, float alpha) { // 4J - check for creative mode brought forward from 1.2.3 bool creative = false; - if (player->instanceof (eTYPE_PLAYER)) { + if (player->instanceof(eTYPE_PLAYER)) { creative = (std::dynamic_pointer_cast(player))->abilities.instabuild; } diff --git a/targets/minecraft/client/renderer/ItemInHandRenderer.cpp b/targets/minecraft/client/renderer/ItemInHandRenderer.cpp index 139b65d61..67dec6abd 100644 --- a/targets/minecraft/client/renderer/ItemInHandRenderer.cpp +++ b/targets/minecraft/client/renderer/ItemInHandRenderer.cpp @@ -465,8 +465,8 @@ void ItemInHandRenderer::render(float a) { static int lightmapLogCount = 0; if (lightmapLogCount < 8) { ++lightmapLogCount; - Log::info("[4jcraft-lightmap] item-hand raw=0x%08x uv=(%d,%d)\n", col, - u, v); + Log::info("[4jcraft-lightmap] item-hand raw=0x%08x uv=(%d,%d)\n", + col, u, v); } glMultiTexCoord2f(GL_TEXTURE1, u / 1.0f, v / 1.0f); diff --git a/targets/minecraft/client/renderer/LevelRenderer.cpp b/targets/minecraft/client/renderer/LevelRenderer.cpp index 7f84ec8d0..9af935f7f 100644 --- a/targets/minecraft/client/renderer/LevelRenderer.cpp +++ b/targets/minecraft/client/renderer/LevelRenderer.cpp @@ -16,6 +16,7 @@ #include "GameRenderer.h" #include "Tesselator.h" #include "app/common/Audio/ConsoleSoundEngine.h" +#include "app/common/Audio/SoundTypes.h" #include "java/Class.h" #include "java/JavaMath.h" #include "java/Random.h" @@ -73,7 +74,6 @@ #include "minecraft/client/resources/Colours/ColourTable.h" #include "minecraft/client/resources/ResourceLocation.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Log.h" #include "minecraft/util/Mth.h" #include "minecraft/world/IconRegister.h" @@ -622,7 +622,7 @@ void LevelRenderer::renderEntities(Vec3* cam, Culler* culler, float a) { (entity->noCulling || culler->isVisible(&entity->bb))); // Render the mob if the mob's leash holder is within the culler - if (!shouldRender && entity->instanceof (eTYPE_MOB)) { + if (!shouldRender && entity->instanceof(eTYPE_MOB)) { std::shared_ptr mob = std::dynamic_pointer_cast(entity); if (mob->isLeashed() && (mob->getLeashHolder() != nullptr)) { std::shared_ptr leashHolder = mob->getLeashHolder(); @@ -636,10 +636,10 @@ void LevelRenderer::renderEntities(Vec3* cam, Culler* culler, float a) { // !mc->options->thirdPersonView && // !mc->cameraTargetPlayer->isSleeping()) continue; std::shared_ptr localplayer = - mc->cameraTargetPlayer->instanceof - (eTYPE_LOCALPLAYER) ? std::dynamic_pointer_cast( - mc->cameraTargetPlayer) - : nullptr; + mc->cameraTargetPlayer->instanceof(eTYPE_LOCALPLAYER) + ? std::dynamic_pointer_cast( + mc->cameraTargetPlayer) + : nullptr; if (localplayer && entity == mc->cameraTargetPlayer && !localplayer->ThirdPersonView() && @@ -3204,7 +3204,7 @@ std::shared_ptr LevelRenderer::addParticleInternal( } void LevelRenderer::entityAdded(std::shared_ptr entity) { - if (entity->instanceof (eTYPE_PLAYER)) { + if (entity->instanceof(eTYPE_PLAYER)) { std::shared_ptr player = std::dynamic_pointer_cast(entity); player->prepareCustomTextures(); @@ -3222,7 +3222,7 @@ void LevelRenderer::entityAdded(std::shared_ptr entity) { } void LevelRenderer::entityRemoved(std::shared_ptr entity) { - if (entity->instanceof (eTYPE_PLAYER)) { + if (entity->instanceof(eTYPE_PLAYER)) { std::shared_ptr player = std::dynamic_pointer_cast(entity); if (player->customTextureUrl != "") { diff --git a/targets/minecraft/client/renderer/LevelRenderer.h b/targets/minecraft/client/renderer/LevelRenderer.h index feee11326..f2b496abb 100644 --- a/targets/minecraft/client/renderer/LevelRenderer.h +++ b/targets/minecraft/client/renderer/LevelRenderer.h @@ -6,8 +6,8 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelListener.h" #include "minecraft/world/phys/AABB.h" -#include "platform/thread/C4JThread.h" #include "platform/network/NetTypes.h" +#include "platform/thread/C4JThread.h" class ClipChunk; class HitResult; diff --git a/targets/minecraft/client/renderer/Textures.cpp b/targets/minecraft/client/renderer/Textures.cpp index c4ef4d783..040b73adc 100644 --- a/targets/minecraft/client/renderer/Textures.cpp +++ b/targets/minecraft/client/renderer/Textures.cpp @@ -414,7 +414,9 @@ int Textures::loadTexture(int idx) { // renderer that map the single 8-bit channel to RGBA differently. void Textures::setTextureFormat(const std::string& resourceName) { // 4J Stu - These texture formats are not currently in the render header - { TEXTURE_FORMAT = IPlatformRenderer::TEXTURE_FORMAT_RxGyBzAw; } + { + TEXTURE_FORMAT = IPlatformRenderer::TEXTURE_FORMAT_RxGyBzAw; + } } void Textures::bindTexture(const std::string& resourceName) { @@ -1225,7 +1227,9 @@ BufferedImage* Textures::readImage( name, false, isTu, drive); // new BufferedImage(name,false,isTu,drive); } else { - { drive = skins->getDefault()->getPath(isTu); } + { + drive = skins->getDefault()->getPath(isTu); + } if (IsOriginalImage(texId, name) || isTu) { img = skins->getDefault()->getImageResource( diff --git a/targets/minecraft/client/renderer/entity/EntityRenderer.cpp b/targets/minecraft/client/renderer/entity/EntityRenderer.cpp index 9dcb82ba5..cac1c5b83 100644 --- a/targets/minecraft/client/renderer/entity/EntityRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/EntityRenderer.cpp @@ -156,11 +156,11 @@ void EntityRenderer::renderShadow(std::shared_ptr e, double x, double y, float r = shadowRadius; float fYLocalPlayerShadowOffset = 0.0f; - if (e->instanceof (eTYPE_MOB)) { + if (e->instanceof(eTYPE_MOB)) { std::shared_ptr mob = std::dynamic_pointer_cast(e); r *= mob->getSizeScale(); - if (mob->instanceof (eTYPE_ANIMAL)) { + if (mob->instanceof(eTYPE_ANIMAL)) { if (std::dynamic_pointer_cast(mob)->isBaby()) { r *= 0.5f; } @@ -173,7 +173,7 @@ void EntityRenderer::renderShadow(std::shared_ptr e, double x, double y, // 4J-PB - local players seem to have a position at their head, and remote // players have a foot position. get the shadow to render by changing the // check here depending on the player type - if (e->instanceof (eTYPE_LOCALPLAYER)) { + if (e->instanceof(eTYPE_LOCALPLAYER)) { ey -= 1.62; fYLocalPlayerShadowOffset = -1.62f; } diff --git a/targets/minecraft/client/renderer/entity/LivingEntityRenderer.cpp b/targets/minecraft/client/renderer/entity/LivingEntityRenderer.cpp index e6fd1a2ff..026b8e61c 100644 --- a/targets/minecraft/client/renderer/entity/LivingEntityRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/LivingEntityRenderer.cpp @@ -66,7 +66,7 @@ void LivingEntityRenderer::render(std::shared_ptr _mob, double x, float bodyRot = rotlerp(mob->yBodyRotO, mob->yBodyRot, a); float headRot = rotlerp(mob->yHeadRotO, mob->yHeadRot, a); - if (mob->isRiding() && mob->riding->instanceof (eTYPE_LIVINGENTITY)) { + if (mob->isRiding() && mob->riding->instanceof(eTYPE_LIVINGENTITY)) { std::shared_ptr riding = std::dynamic_pointer_cast(mob->riding); bodyRot = rotlerp(riding->yBodyRotO, riding->yBodyRot, a); @@ -284,9 +284,8 @@ void LivingEntityRenderer::setupRotations(std::shared_ptr mob, } else { std::string name = mob->getAName(); if (name == "Dinnerbone" || name == "Grumm") { - if (!mob->instanceof - (eTYPE_PLAYER) || - !std::dynamic_pointer_cast(mob)->isCapeHidden()) { + if (!mob->instanceof(eTYPE_PLAYER) || + !std::dynamic_pointer_cast(mob)->isCapeHidden()) { glTranslatef(0, mob->bbHeight + 0.1f, 0); glRotatef(180, 0, 0, 1); } @@ -527,7 +526,7 @@ void LivingEntityRenderer::renderNameTag(std::shared_ptr mob, std::string playerName; char wchName[2]; - if (mob->instanceof (eTYPE_PLAYER)) { + if (mob->instanceof(eTYPE_PLAYER)) { std::shared_ptr player = std::dynamic_pointer_cast(mob); if (gameServices().isXuidDeadmau5(player->getXuid())) offs = -10; diff --git a/targets/minecraft/client/renderer/entity/MobRenderer.cpp b/targets/minecraft/client/renderer/entity/MobRenderer.cpp index aabf17f07..5feeb17e1 100644 --- a/targets/minecraft/client/renderer/entity/MobRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/MobRenderer.cpp @@ -54,7 +54,7 @@ void MobRenderer::renderLeash(std::shared_ptr entity, double x, double y, double rotOffCos = cos(roperYRot); double rotOffSin = sin(roperYRot); double yOff = sin(roperXRot); - if (roper->instanceof (eTYPE_HANGING_ENTITY)) { + if (roper->instanceof(eTYPE_HANGING_ENTITY)) { rotOffCos = 0; rotOffSin = 0; yOff = -1; diff --git a/targets/minecraft/client/renderer/entity/PlayerRenderer.cpp b/targets/minecraft/client/renderer/entity/PlayerRenderer.cpp index 1d2ab8331..0975aee47 100644 --- a/targets/minecraft/client/renderer/entity/PlayerRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/PlayerRenderer.cpp @@ -195,7 +195,7 @@ void PlayerRenderer::render(std::shared_ptr _mob, double x, double y, mob->isSneaking(); double yp = y - mob->heightOffset; - if (mob->isSneaking() && !mob->instanceof (eTYPE_LOCALPLAYER)) { + if (mob->isSneaking() && !mob->instanceof(eTYPE_LOCALPLAYER)) { yp -= 2 / 16.0f; } diff --git a/targets/minecraft/client/renderer/entity/ZombieRenderer.cpp b/targets/minecraft/client/renderer/entity/ZombieRenderer.cpp index 25815c572..b1bb89c51 100644 --- a/targets/minecraft/client/renderer/entity/ZombieRenderer.cpp +++ b/targets/minecraft/client/renderer/entity/ZombieRenderer.cpp @@ -68,7 +68,7 @@ ResourceLocation* ZombieRenderer::getTextureLocation( std::shared_ptr mob = std::dynamic_pointer_cast(entity); // TODO Extract this clusterfck into 3 renderers - if (entity->instanceof (eTYPE_PIGZOMBIE)) { + if (entity->instanceof(eTYPE_PIGZOMBIE)) { return &ZOMBIE_PIGMAN_LOCATION; } diff --git a/targets/minecraft/client/renderer/tileentity/SkullTileRenderer.cpp b/targets/minecraft/client/renderer/tileentity/SkullTileRenderer.cpp index f04a12f4c..845bca4e3 100644 --- a/targets/minecraft/client/renderer/tileentity/SkullTileRenderer.cpp +++ b/targets/minecraft/client/renderer/tileentity/SkullTileRenderer.cpp @@ -82,7 +82,9 @@ void SkullTileRenderer::renderSkull(float x, float y, float z, int face, // bindTexture(url, "/mob/char.png"); //} // else - { bindTexture(&PlayerRenderer::DEFAULT_LOCATION); } + { + bindTexture(&PlayerRenderer::DEFAULT_LOCATION); + } break; case SkullTileEntity::TYPE_CREEPER: bindTexture(&CREEPER_LOCATION); diff --git a/targets/minecraft/client/skins/DLCTexturePack.cpp b/targets/minecraft/client/skins/DLCTexturePack.cpp index da9b38edd..0556f936c 100644 --- a/targets/minecraft/client/skins/DLCTexturePack.cpp +++ b/targets/minecraft/client/skins/DLCTexturePack.cpp @@ -5,6 +5,7 @@ #include #include #include + #include "app/common/Audio/SoundEngine.h" #include "app/common/DLC/DLCAudioFile.h" #include "app/common/DLC/DLCColourTableFile.h" @@ -414,8 +415,7 @@ int DLCTexturePack::onPackMounted(int iPad, std::uint32_t dwErr, iOverworldStart, iOverworldStart + iOverworldC, iNetherStart, iNetherStart + iNetherC, iEndStart, iEndStart + iEndC, - iEndStart + - iEndC); // push the CD start to after + iEndStart + iEndC); // push the CD start to after } } texturePack->loadColourTable(); diff --git a/targets/minecraft/core/DefaultDispenseItemBehavior.h b/targets/minecraft/core/DefaultDispenseItemBehavior.h index 76296aba2..65e221dda 100644 --- a/targets/minecraft/core/DefaultDispenseItemBehavior.h +++ b/targets/minecraft/core/DefaultDispenseItemBehavior.h @@ -23,8 +23,8 @@ protected: }; public: - DefaultDispenseItemBehavior(){}; - virtual ~DefaultDispenseItemBehavior(){}; + DefaultDispenseItemBehavior() {}; + virtual ~DefaultDispenseItemBehavior() {}; virtual std::shared_ptr dispense( BlockSource* source, std::shared_ptr dispensed); diff --git a/targets/minecraft/core/ItemDispenseBehaviors.cpp b/targets/minecraft/core/ItemDispenseBehaviors.cpp index ef22049e6..7776bcfce 100644 --- a/targets/minecraft/core/ItemDispenseBehaviors.cpp +++ b/targets/minecraft/core/ItemDispenseBehaviors.cpp @@ -135,7 +135,7 @@ std::shared_ptr SpawnEggDispenseBehavior::execute( return dispensed; } - if (entity->instanceof (eTYPE_MOB) && dispensed->hasCustomHoverName()) { + if (entity->instanceof(eTYPE_MOB) && dispensed->hasCustomHoverName()) { std::dynamic_pointer_cast(entity)->setCustomName( dispensed->getHoverName()); } diff --git a/targets/minecraft/locale/StringTable.cpp b/targets/minecraft/locale/StringTable.cpp index 427e77ddf..9bfcffda6 100644 --- a/targets/minecraft/locale/StringTable.cpp +++ b/targets/minecraft/locale/StringTable.cpp @@ -26,8 +26,7 @@ void StringTable::ReloadStringTable(std::span locales) { ProcessStringTableData(locales); } -void StringTable::ProcessStringTableData( - std::span locales) { +void StringTable::ProcessStringTableData(std::span locales) { ByteArrayInputStream bais(src); DataInputStream dis(&bais); diff --git a/targets/minecraft/network/Connection.cpp b/targets/minecraft/network/Connection.cpp index 4e290838e..463b1f3aa 100644 --- a/targets/minecraft/network/Connection.cpp +++ b/targets/minecraft/network/Connection.cpp @@ -16,8 +16,8 @@ #include "minecraft/network/packet/KeepAlivePacket.h" #include "minecraft/network/packet/Packet.h" #include "minecraft/network/packet/PacketListener.h" -#include "platform/network/network.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h" +#include "platform/network/network.h" #include "platform/thread/ShutdownManager.h" #include "util/StringHelpers.h" diff --git a/targets/minecraft/network/Connection.h b/targets/minecraft/network/Connection.h index 8d3ccaca6..be2106324 100644 --- a/targets/minecraft/network/Connection.h +++ b/targets/minecraft/network/Connection.h @@ -7,10 +7,10 @@ #include #include -#include "minecraft/network/Socket.h" #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" #include "java/System.h" +#include "minecraft/network/Socket.h" #include "minecraft/network/packet/DisconnectPacket.h" #include "platform/thread/C4JThread.h" diff --git a/targets/minecraft/network/Socket.cpp b/targets/minecraft/network/Socket.cpp index 9ac574e16..99730677c 100644 --- a/targets/minecraft/network/Socket.cpp +++ b/targets/minecraft/network/Socket.cpp @@ -7,9 +7,9 @@ #include #include "app/common/Network/GameNetworkManager.h" -#include "platform/network/network.h" #include "minecraft/server/network/ServerConnection.h" #include "platform/network/NetTypes.h" +#include "platform/network/network.h" #include "platform/thread/ShutdownManager.h" class SocketAddress {}; diff --git a/targets/minecraft/network/Socket.h b/targets/minecraft/network/Socket.h index 7c15f2b89..db16b2716 100644 --- a/targets/minecraft/network/Socket.h +++ b/targets/minecraft/network/Socket.h @@ -2,9 +2,9 @@ #include #include #include -#include #include #include +#include #include "java/InputOutputStream/InputStream.h" #include "java/InputOutputStream/OutputStream.h" diff --git a/targets/minecraft/network/packet/AddGlobalEntityPacket.cpp b/targets/minecraft/network/packet/AddGlobalEntityPacket.cpp index bd885912b..7a2258570 100644 --- a/targets/minecraft/network/packet/AddGlobalEntityPacket.cpp +++ b/targets/minecraft/network/packet/AddGlobalEntityPacket.cpp @@ -24,7 +24,7 @@ AddGlobalEntityPacket::AddGlobalEntityPacket(std::shared_ptr e) { x = Mth::floor(e->x * 32); y = Mth::floor(e->y * 32); z = Mth::floor(e->z * 32); - if (e->instanceof (eTYPE_LIGHTNINGBOLT)) { + if (e->instanceof(eTYPE_LIGHTNINGBOLT)) { type = LIGHTNING; } else { type = 0; diff --git a/targets/minecraft/network/packet/Packet.cpp b/targets/minecraft/network/packet/Packet.cpp index 21256b114..3ef25ece0 100644 --- a/targets/minecraft/network/packet/Packet.cpp +++ b/targets/minecraft/network/packet/Packet.cpp @@ -674,7 +674,9 @@ std::shared_ptr Packet::readItem(DataInputStream* dis) { // 4J Stu - Always read/write the tag // if (Item.items[id].canBeDepleted() || // Item.items[id].shouldOverrideMultiplayerNBT()) - { item->tag = readNbt(dis); } + { + item->tag = readNbt(dis); + } } return item; @@ -691,7 +693,9 @@ void Packet::writeItem(std::shared_ptr item, // 4J Stu - Always read/write the tag // if (item.getItem().canBeDepleted() || // item.getItem().shouldOverrideMultiplayerNBT()) - { writeNbt(item->tag, dos); } + { + writeNbt(item->tag, dos); + } } } diff --git a/targets/minecraft/network/packet/PlayerInfoPacket.cpp b/targets/minecraft/network/packet/PlayerInfoPacket.cpp index eaa94323e..d98f09392 100644 --- a/targets/minecraft/network/packet/PlayerInfoPacket.cpp +++ b/targets/minecraft/network/packet/PlayerInfoPacket.cpp @@ -1,10 +1,11 @@ +#include "PlayerInfoPacket.h" + #include "java/InputOutputStream/DataInputStream.h" #include "java/InputOutputStream/DataOutputStream.h" #include "minecraft/network/packet/PacketListener.h" -#include "platform/network/network.h" #include "minecraft/server/level/ServerPlayer.h" #include "minecraft/server/network/PlayerConnection.h" -#include "PlayerInfoPacket.h" +#include "platform/network/network.h" PlayerInfoPacket::PlayerInfoPacket() { m_networkSmallId = 0; diff --git a/targets/minecraft/server/MinecraftServer.cpp b/targets/minecraft/server/MinecraftServer.cpp index 79622019f..73ce35362 100644 --- a/targets/minecraft/server/MinecraftServer.cpp +++ b/targets/minecraft/server/MinecraftServer.cpp @@ -24,14 +24,12 @@ #include "minecraft/IGameServices.h" #include "minecraft/Pos.h" #include "minecraft/client/Options.h" -#include "minecraft/world/level/ConsoleGameRulesConstants.h" #include "minecraft/commands/Command.h" #include "minecraft/network/INetworkService.h" #include "minecraft/network/packet/GameEventPacket.h" #include "minecraft/network/packet/ServerSettingsChangedPacket.h" #include "minecraft/network/packet/SetTimePacket.h" #include "minecraft/network/packet/UpdateProgressPacket.h" -#include "platform/network/network.h" #include "minecraft/server/level/DerivedServerLevel.h" #include "minecraft/server/level/EntityTracker.h" #include "minecraft/server/level/ServerChunkCache.h" @@ -43,6 +41,7 @@ #include "minecraft/world/entity/Mob.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/ItemInstance.h" +#include "minecraft/world/level/ConsoleGameRulesConstants.h" #include "minecraft/world/level/GameRules.h" #include "minecraft/world/level/GameRules/LevelGenerationOptions.h" #include "minecraft/world/level/LevelSettings.h" @@ -58,6 +57,7 @@ #include "minecraft/world/level/storage/McRegionLevelStorageSource.h" #include "minecraft/world/level/tile/Tile.h" #include "platform/PlatformTypes.h" +#include "platform/network/network.h" #include "platform/profile/profile.h" #include "platform/storage/storage.h" #include "strings.h" @@ -65,12 +65,11 @@ #if defined(SPLIT_SAVES) #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileSplit.h" #endif -#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" -#include "minecraft/network/Socket.h" #include "minecraft/Console_Debug_enum.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/ProgressRenderer.h" #include "minecraft/client/renderer/GameRenderer.h" +#include "minecraft/network/Socket.h" #include "minecraft/server/commands/ServerCommandDispatcher.h" #include "minecraft/server/level/ServerPlayer.h" #include "minecraft/world/level/Level.h" @@ -78,10 +77,11 @@ #include "minecraft/world/level/chunk/CompressedTileStorage.h" #include "minecraft/world/level/chunk/SparseDataStorage.h" #include "minecraft/world/level/chunk/SparseLightStorage.h" +#include "minecraft/world/level/levelgen/ConsoleSchematicFile.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFileOriginal.h" #include "minecraft/world/level/storage/ConsoleSaveFileIO/compression.h" -#include "platform/thread/ShutdownManager.h" #include "platform/input/input.h" +#include "platform/thread/ShutdownManager.h" class ConsoleInputSource; @@ -895,7 +895,9 @@ bool MinecraftServer::IsSuspending() { return m_suspending; } void MinecraftServer::stopServer(bool didInit) { // 4J-PB - need to halt the rendering of the data, since we're about to // remove it - { Minecraft::GetInstance()->gameRenderer->DisableUpdateThread(); } + { + Minecraft::GetInstance()->gameRenderer->DisableUpdateThread(); + } connection->stop(); diff --git a/targets/minecraft/server/PlayerList.cpp b/targets/minecraft/server/PlayerList.cpp index 4dacfd31a..717f9f318 100644 --- a/targets/minecraft/server/PlayerList.cpp +++ b/targets/minecraft/server/PlayerList.cpp @@ -11,7 +11,6 @@ #include "MinecraftServer.h" #include "Settings.h" #include "app/common/GameRules/LevelRules/RuleDefinitions/LevelRuleset.h" -#include "minecraft/world/tutorial/ITutorial.h" #include "java/Class.h" #include "java/JavaMath.h" #include "minecraft/GameEnums.h" @@ -36,7 +35,6 @@ #include "minecraft/network/packet/TexturePacket.h" #include "minecraft/network/packet/UpdateMobEffectPacket.h" #include "minecraft/network/packet/XZPacket.h" -#include "platform/network/network.h" #include "minecraft/server/level/EntityTracker.h" #include "minecraft/server/level/PlayerChunkMap.h" #include "minecraft/server/level/ServerChunkCache.h" @@ -69,8 +67,10 @@ #include "minecraft/world/level/storage/LevelData.h" #include "minecraft/world/level/storage/LevelStorage.h" #include "minecraft/world/level/storage/PlayerIO.h" +#include "minecraft/world/tutorial/ITutorial.h" #include "nbt/CompoundTag.h" #include "platform/network/NetTypes.h" +#include "platform/network/network.h" #include "platform/profile/profile.h" #include "strings.h" diff --git a/targets/minecraft/server/level/EntityTracker.cpp b/targets/minecraft/server/level/EntityTracker.cpp index e5a186478..4241f547b 100644 --- a/targets/minecraft/server/level/EntityTracker.cpp +++ b/targets/minecraft/server/level/EntityTracker.cpp @@ -11,7 +11,6 @@ #include "ServerPlayer.h" #include "TrackedEntity.h" #include "java/Class.h" -#include "platform/network/network.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/network/PlayerConnection.h" @@ -19,6 +18,7 @@ #include "minecraft/world/entity/Entity.h" #include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/dimension/Dimension.h" +#include "platform/network/network.h" EntityTracker::EntityTracker(ServerLevel* level) { this->level = level; @@ -26,7 +26,7 @@ EntityTracker::EntityTracker(ServerLevel* level) { } void EntityTracker::addEntity(std::shared_ptr e) { - if (e->instanceof (eTYPE_SERVERPLAYER)) { + if (e->instanceof(eTYPE_SERVERPLAYER)) { addEntity(e, 32 * 16, 2); std::shared_ptr player = std::dynamic_pointer_cast(e); @@ -35,57 +35,57 @@ void EntityTracker::addEntity(std::shared_ptr e) { (*it)->updatePlayer(this, player); } } - } else if (e->instanceof (eTYPE_FISHINGHOOK)) + } else if (e->instanceof(eTYPE_FISHINGHOOK)) addEntity(e, 16 * 4, 5, true); - else if (e->instanceof (eTYPE_SMALL_FIREBALL)) + else if (e->instanceof(eTYPE_SMALL_FIREBALL)) addEntity(e, 16 * 4, 10, false); - else if (e->instanceof (eTYPE_DRAGON_FIREBALL)) + else if (e->instanceof(eTYPE_DRAGON_FIREBALL)) addEntity(e, 16 * 4, 10, false); // 4J Added TU9 - else if (e->instanceof (eTYPE_ARROW)) + else if (e->instanceof(eTYPE_ARROW)) addEntity(e, 16 * 4, 20, false); - else if (e->instanceof (eTYPE_FIREBALL)) + else if (e->instanceof(eTYPE_FIREBALL)) addEntity(e, 16 * 4, 10, false); - else if (e->instanceof (eTYPE_SNOWBALL)) + else if (e->instanceof(eTYPE_SNOWBALL)) addEntity(e, 16 * 4, 10, true); - else if (e->instanceof (eTYPE_THROWNENDERPEARL)) + else if (e->instanceof(eTYPE_THROWNENDERPEARL)) addEntity(e, 16 * 4, 10, true); - else if (e->instanceof (eTYPE_EYEOFENDERSIGNAL)) + else if (e->instanceof(eTYPE_EYEOFENDERSIGNAL)) addEntity(e, 16 * 4, 4, true); - else if (e->instanceof (eTYPE_THROWNEGG)) + else if (e->instanceof(eTYPE_THROWNEGG)) addEntity(e, 16 * 4, 10, true); - else if (e->instanceof (eTYPE_THROWNPOTION)) + else if (e->instanceof(eTYPE_THROWNPOTION)) addEntity(e, 16 * 4, 10, true); - else if (e->instanceof (eTYPE_THROWNEXPBOTTLE)) + else if (e->instanceof(eTYPE_THROWNEXPBOTTLE)) addEntity(e, 16 * 4, 10, true); - else if (e->instanceof (eTYPE_FIREWORKS_ROCKET)) + else if (e->instanceof(eTYPE_FIREWORKS_ROCKET)) addEntity(e, 16 * 4, 10, true); - else if (e->instanceof (eTYPE_ITEMENTITY)) + else if (e->instanceof(eTYPE_ITEMENTITY)) addEntity(e, 16 * 4, 20, true); - else if (e->instanceof (eTYPE_MINECART)) + else if (e->instanceof(eTYPE_MINECART)) addEntity(e, 16 * 5, 3, true); - else if (e->instanceof (eTYPE_BOAT)) + else if (e->instanceof(eTYPE_BOAT)) addEntity(e, 16 * 5, 3, true); - else if (e->instanceof (eTYPE_SQUID)) + else if (e->instanceof(eTYPE_SQUID)) addEntity(e, 16 * 4, 3, true); - else if (e->instanceof (eTYPE_WITHERBOSS)) + else if (e->instanceof(eTYPE_WITHERBOSS)) addEntity(e, 16 * 5, 3, false); - else if (e->instanceof (eTYPE_BAT)) + else if (e->instanceof(eTYPE_BAT)) addEntity(e, 16 * 5, 3, false); else if (std::dynamic_pointer_cast(e) != nullptr) addEntity(e, 16 * 5, 3, true); - else if (e->instanceof (eTYPE_ENDERDRAGON)) + else if (e->instanceof(eTYPE_ENDERDRAGON)) addEntity(e, 16 * 10, 3, true); - else if (e->instanceof (eTYPE_PRIMEDTNT)) + else if (e->instanceof(eTYPE_PRIMEDTNT)) addEntity(e, 16 * 10, 10, true); - else if (e->instanceof (eTYPE_FALLINGTILE)) + else if (e->instanceof(eTYPE_FALLINGTILE)) addEntity(e, 16 * 10, 20, true); - else if (e->instanceof (eTYPE_HANGING_ENTITY)) + else if (e->instanceof(eTYPE_HANGING_ENTITY)) addEntity(e, 16 * 10, INT_MAX, false); - else if (e->instanceof (eTYPE_EXPERIENCEORB)) + else if (e->instanceof(eTYPE_EXPERIENCEORB)) addEntity(e, 16 * 10, 20, true); - else if (e->instanceof (eTYPE_ENDER_CRYSTAL)) + else if (e->instanceof(eTYPE_ENDER_CRYSTAL)) addEntity(e, 16 * 16, INT_MAX, false); - else if (e->instanceof (eTYPE_ITEM_FRAME)) + else if (e->instanceof(eTYPE_ITEM_FRAME)) addEntity(e, 16 * 10, INT_MAX, false); } diff --git a/targets/minecraft/server/level/PlayerChunkMap.cpp b/targets/minecraft/server/level/PlayerChunkMap.cpp index 58513f308..00240639b 100644 --- a/targets/minecraft/server/level/PlayerChunkMap.cpp +++ b/targets/minecraft/server/level/PlayerChunkMap.cpp @@ -19,7 +19,6 @@ #include "minecraft/network/packet/ChunkVisibilityPacket.h" #include "minecraft/network/packet/Packet.h" #include "minecraft/network/packet/TileUpdatePacket.h" -#include "platform/network/network.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/network/PlayerConnection.h" @@ -28,6 +27,7 @@ #include "minecraft/world/level/Level.h" #include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/tile/entity/TileEntity.h" +#include "platform/network/network.h" PlayerChunkMap::PlayerChunk::PlayerChunk(int x, int z, PlayerChunkMap* pcm) : pos(x, z) { diff --git a/targets/minecraft/server/level/ServerChunkCache.cpp b/targets/minecraft/server/level/ServerChunkCache.cpp index c7e35790a..c1b7e746a 100644 --- a/targets/minecraft/server/level/ServerChunkCache.cpp +++ b/targets/minecraft/server/level/ServerChunkCache.cpp @@ -104,7 +104,9 @@ void ServerChunkCache::drop(int x, int z) { //} // } // else - { canDrop = true; } + { + canDrop = true; + } if (canDrop) { int ix = x + XZOFFSET; int iz = z + XZOFFSET; diff --git a/targets/minecraft/server/level/ServerLevel.cpp b/targets/minecraft/server/level/ServerLevel.cpp index 9b8746b62..754b4b1e0 100644 --- a/targets/minecraft/server/level/ServerLevel.cpp +++ b/targets/minecraft/server/level/ServerLevel.cpp @@ -24,7 +24,6 @@ #include "minecraft/network/packet/GameEventPacket.h" #include "minecraft/network/packet/LevelParticlesPacket.h" #include "minecraft/network/packet/TileEventPacket.h" -#include "platform/network/network.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/ServerScoreboard.h" @@ -60,9 +59,10 @@ #include "minecraft/world/level/tile/entity/ChestTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" #include "minecraft/world/phys/Vec3.h" -#include "platform/thread/ShutdownManager.h" #include "platform/input/input.h" +#include "platform/network/network.h" #include "platform/storage/storage.h" +#include "platform/thread/ShutdownManager.h" #include "strings.h" class ChunkStorage; @@ -225,9 +225,15 @@ ServerLevel::~ServerLevel() { } // Make sure that the update thread isn't actually doing any updating - { std::lock_guard lock(m_updateCS[0]); } - { std::lock_guard lock(m_updateCS[1]); } - { std::lock_guard lock(m_updateCS[2]); } + { + std::lock_guard lock(m_updateCS[0]); + } + { + std::lock_guard lock(m_updateCS[1]); + } + { + std::lock_guard lock(m_updateCS[2]); + } m_updateTrigger->clearAll(); } @@ -754,7 +760,7 @@ std::vector* ServerLevel::fetchTicksInChunk(LevelChunk* chunk, void ServerLevel::tick(std::shared_ptr e, bool actual) { if (!server->isAnimals() && - (e->instanceof (eTYPE_ANIMAL) || e->instanceof (eTYPE_WATERANIMAL))) { + (e->instanceof(eTYPE_ANIMAL) || e->instanceof(eTYPE_WATERANIMAL))) { e->remove(); } if (!server->isNpcsEnabled() && @@ -1235,7 +1241,7 @@ void ServerLevel::runQueuedSendTileUpdates() { // removed and added so we can limit the number of itementities created bool ServerLevel::addEntity(std::shared_ptr e) { // If its an item entity, and we've got to our capacity, delete the oldest - if (e->instanceof (eTYPE_ITEMENTITY)) { + if (e->instanceof(eTYPE_ITEMENTITY)) { // printf("Adding item entity count //%d\n",m_itemEntities.size()); std::lock_guard lock(m_limiterCS); @@ -1246,7 +1252,7 @@ bool ServerLevel::addEntity(std::shared_ptr e) { } // If its an hanging entity, and we've got to our capacity, delete the // oldest - else if (e->instanceof (eTYPE_HANGING_ENTITY)) { + else if (e->instanceof(eTYPE_HANGING_ENTITY)) { // printf("Adding item entity count //%d\n",m_itemEntities.size()); std::lock_guard lock(m_limiterCS); @@ -1261,7 +1267,7 @@ bool ServerLevel::addEntity(std::shared_ptr e) { } } // If its an arrow entity, and we've got to our capacity, delete the oldest - else if (e->instanceof (eTYPE_ARROW)) { + else if (e->instanceof(eTYPE_ARROW)) { // printf("Adding arrow entity count //%d\n",m_arrowEntities.size()); std::lock_guard lock(m_limiterCS); @@ -1272,7 +1278,7 @@ bool ServerLevel::addEntity(std::shared_ptr e) { } // If its an experience orb entity, and we've got to our capacity, delete // the oldest - else if (e->instanceof (eTYPE_EXPERIENCEORB)) { + else if (e->instanceof(eTYPE_EXPERIENCEORB)) { // printf("Adding arrow entity count //%d\n",m_arrowEntities.size()); std::lock_guard lock(m_limiterCS); @@ -1291,16 +1297,16 @@ bool ServerLevel::atEntityLimit(std::shared_ptr e) { bool atLimit = false; - if (e->instanceof (eTYPE_ITEMENTITY)) { + if (e->instanceof(eTYPE_ITEMENTITY)) { std::lock_guard lock(m_limiterCS); atLimit = m_itemEntities.size() >= MAX_ITEM_ENTITIES; - } else if (e->instanceof (eTYPE_HANGING_ENTITY)) { + } else if (e->instanceof(eTYPE_HANGING_ENTITY)) { std::lock_guard lock(m_limiterCS); atLimit = m_hangingEntities.size() >= MAX_HANGING_ENTITIES; - } else if (e->instanceof (eTYPE_ARROW)) { + } else if (e->instanceof(eTYPE_ARROW)) { std::lock_guard lock(m_limiterCS); atLimit = m_arrowEntities.size() >= MAX_ARROW_ENTITIES; - } else if (e->instanceof (eTYPE_EXPERIENCEORB)) { + } else if (e->instanceof(eTYPE_EXPERIENCEORB)) { std::lock_guard lock(m_limiterCS); atLimit = m_experienceOrbEntities.size() >= MAX_EXPERIENCEORB_ENTITIES; } @@ -1310,30 +1316,30 @@ bool ServerLevel::atEntityLimit(std::shared_ptr e) { // Maintain a cound of primed tnt & falling tiles in this level void ServerLevel::entityAddedExtra(std::shared_ptr e) { - if (e->instanceof (eTYPE_ITEMENTITY)) { + if (e->instanceof(eTYPE_ITEMENTITY)) { std::lock_guard lock(m_limiterCS); m_itemEntities.push_back(e); // printf("entity added: item entity count now //%d\n",m_itemEntities.size()); - } else if (e->instanceof (eTYPE_HANGING_ENTITY)) { + } else if (e->instanceof(eTYPE_HANGING_ENTITY)) { std::lock_guard lock(m_limiterCS); m_hangingEntities.push_back(e); // printf("entity added: item entity count now //%d\n",m_itemEntities.size()); - } else if (e->instanceof (eTYPE_ARROW)) { + } else if (e->instanceof(eTYPE_ARROW)) { std::lock_guard lock(m_limiterCS); m_arrowEntities.push_back(e); // printf("entity added: arrow entity count now //%d\n",m_arrowEntities.size()); - } else if (e->instanceof (eTYPE_EXPERIENCEORB)) { + } else if (e->instanceof(eTYPE_EXPERIENCEORB)) { std::lock_guard lock(m_limiterCS); m_experienceOrbEntities.push_back(e); // printf("entity added: experience orb entity count now //%d\n",m_arrowEntities.size()); - } else if (e->instanceof (eTYPE_PRIMEDTNT)) { + } else if (e->instanceof(eTYPE_PRIMEDTNT)) { std::lock_guard lock(m_limiterCS); m_primedTntCount++; - } else if (e->instanceof (eTYPE_FALLINGTILE)) { + } else if (e->instanceof(eTYPE_FALLINGTILE)) { std::lock_guard lock(m_limiterCS); m_fallingTileCount++; } @@ -1342,7 +1348,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) { - if (e->instanceof (eTYPE_ITEMENTITY)) { + if (e->instanceof(eTYPE_ITEMENTITY)) { std::lock_guard lock(m_limiterCS); // printf("entity removed: item entity count //%d\n",m_itemEntities.size()); @@ -1353,7 +1359,7 @@ void ServerLevel::entityRemovedExtra(std::shared_ptr e) { } // printf("entity removed: item entity count now //%d\n",m_itemEntities.size()); - } else if (e->instanceof (eTYPE_HANGING_ENTITY)) { + } else if (e->instanceof(eTYPE_HANGING_ENTITY)) { std::lock_guard lock(m_limiterCS); // printf("entity removed: item entity count //%d\n",m_itemEntities.size()); @@ -1364,7 +1370,7 @@ void ServerLevel::entityRemovedExtra(std::shared_ptr e) { } // printf("entity removed: item entity count now //%d\n",m_itemEntities.size()); - } else if (e->instanceof (eTYPE_ARROW)) { + } else if (e->instanceof(eTYPE_ARROW)) { std::lock_guard lock(m_limiterCS); // printf("entity removed: arrow entity count //%d\n",m_arrowEntities.size()); @@ -1375,7 +1381,7 @@ void ServerLevel::entityRemovedExtra(std::shared_ptr e) { } // printf("entity removed: arrow entity count now //%d\n",m_arrowEntities.size()); - } else if (e->instanceof (eTYPE_EXPERIENCEORB)) { + } else if (e->instanceof(eTYPE_EXPERIENCEORB)) { std::lock_guard lock(m_limiterCS); // printf("entity removed: experience orb entity count //%d\n",m_arrowEntities.size()); @@ -1387,10 +1393,10 @@ void ServerLevel::entityRemovedExtra(std::shared_ptr e) { } // printf("entity removed: experience orb entity count now //%d\n",m_arrowEntities.size()); - } else if (e->instanceof (eTYPE_PRIMEDTNT)) { + } else if (e->instanceof(eTYPE_PRIMEDTNT)) { std::lock_guard lock(m_limiterCS); m_primedTntCount--; - } else if (e->instanceof (eTYPE_FALLINGTILE)) { + } else if (e->instanceof(eTYPE_FALLINGTILE)) { std::lock_guard lock(m_limiterCS); m_fallingTileCount--; } diff --git a/targets/minecraft/server/level/ServerPlayer.cpp b/targets/minecraft/server/level/ServerPlayer.cpp index 290930124..7c616ac53 100644 --- a/targets/minecraft/server/level/ServerPlayer.cpp +++ b/targets/minecraft/server/level/ServerPlayer.cpp @@ -45,7 +45,6 @@ #include "minecraft/network/packet/SetHealthPacket.h" #include "minecraft/network/packet/TileEditorOpenPacket.h" #include "minecraft/network/packet/UpdateMobEffectPacket.h" -#include "platform/network/network.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/network/PlayerConnection.h" @@ -108,6 +107,7 @@ #include "minecraft/world/scores/criteria/ObjectiveCriteria.h" #include "nbt/CompoundTag.h" #include "platform/input/input.h" +#include "platform/network/network.h" #include "strings.h" class Objective; @@ -716,20 +716,19 @@ bool ServerPlayer::hurt(DamageSource* dmgSource, float dmg) { // sometimes nullptr. std::shared_ptr source = dmgSource->getDirectEntity(); - if (source->instanceof - (eTYPE_PLAYER) && - !std::dynamic_pointer_cast(source)->canHarmPlayer( - std::dynamic_pointer_cast(shared_from_this()))) { + if (source->instanceof(eTYPE_PLAYER) && + !std::dynamic_pointer_cast(source)->canHarmPlayer( + std::dynamic_pointer_cast(shared_from_this()))) { return false; } - if ((source != nullptr) && source->instanceof (eTYPE_ARROW)) { + if ((source != nullptr) && source->instanceof(eTYPE_ARROW)) { std::shared_ptr arrow = std::dynamic_pointer_cast(source); - if ((arrow->owner != nullptr) && arrow->owner->instanceof - (eTYPE_PLAYER) && - !canHarmPlayer( - std::dynamic_pointer_cast(arrow->owner))) { + if ((arrow->owner != nullptr) && + arrow->owner->instanceof(eTYPE_PLAYER) && + !canHarmPlayer( + std::dynamic_pointer_cast(arrow->owner))) { return false; } } diff --git a/targets/minecraft/server/level/TrackedEntity.cpp b/targets/minecraft/server/level/TrackedEntity.cpp index f50c34428..ddcb4ee8d 100644 --- a/targets/minecraft/server/level/TrackedEntity.cpp +++ b/targets/minecraft/server/level/TrackedEntity.cpp @@ -29,7 +29,6 @@ #include "minecraft/network/packet/TeleportEntityPacket.h" #include "minecraft/network/packet/UpdateAttributesPacket.h" #include "minecraft/network/packet/UpdateMobEffectPacket.h" -#include "platform/network/network.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/network/PlayerConnection.h" @@ -56,6 +55,7 @@ #include "minecraft/world/item/MapItem.h" #include "minecraft/world/level/saveddata/MapItemSavedData.h" #include "platform/PlatformTypes.h" +#include "platform/network/network.h" class AttributeInstance; class MobEffectInstance; @@ -188,8 +188,8 @@ void TrackedEntity::tick(EntityTracker* tracker, // FallingTile depends on this because it removes its source block // in the first tick() - if (tickCount > 0 || e->instanceof (eTYPE_ARROW) || e->instanceof - (eTYPE_PLAYER)) // 4J: Modifed, see above + if (tickCount > 0 || e->instanceof(eTYPE_ARROW) || + e->instanceof(eTYPE_PLAYER)) // 4J: Modifed, see above { if (xa < -128 || xa >= 128 || ya < -128 || ya >= 128 || za < -128 || za >= 128 || @@ -382,7 +382,7 @@ void TrackedEntity::sendDirtyEntityData() { new SetEntityDataPacket(e->entityId, entityData, false))); } - if (e->instanceof (eTYPE_LIVINGENTITY)) { + if (e->instanceof(eTYPE_LIVINGENTITY)) { std::shared_ptr living = std::dynamic_pointer_cast(e); ServersideAttributeMap* attributeMap = @@ -467,9 +467,10 @@ void TrackedEntity::broadcast(std::shared_ptr packet) { void TrackedEntity::broadcastAndSend(std::shared_ptr packet) { std::vector > sentTo; broadcast(packet); - std::shared_ptr sp = e->instanceof - (eTYPE_SERVERPLAYER) ? std::dynamic_pointer_cast(e) - : nullptr; + std::shared_ptr sp = + e->instanceof(eTYPE_SERVERPLAYER) + ? std::dynamic_pointer_cast(e) + : nullptr; if (sp != nullptr && sp->connection) { sp->connection->send(packet); } @@ -591,7 +592,7 @@ void TrackedEntity::updatePlayer(EntityTracker* tracker, yap = e->yd; zap = e->zd; - if (e->instanceof (eTYPE_PLAYER)) { + if (e->instanceof(eTYPE_PLAYER)) { std::shared_ptr plr = std::dynamic_pointer_cast(e); Log::info( "TrackedEntity:: Player '%s' is now visible to player '%s', " @@ -609,7 +610,7 @@ void TrackedEntity::updatePlayer(EntityTracker* tracker, e->entityId, e->getEntityData(), true)); } - if (e->instanceof (eTYPE_LIVINGENTITY)) { + if (e->instanceof(eTYPE_LIVINGENTITY)) { std::shared_ptr living = std::dynamic_pointer_cast(e); ServersideAttributeMap* attributeMap = @@ -633,16 +634,14 @@ void TrackedEntity::updatePlayer(EntityTracker* tracker, sp->connection->send(std::make_shared( SetEntityLinkPacket::RIDING, e, e->riding)); } - if (e->instanceof - (eTYPE_MOB) && - std::dynamic_pointer_cast(e)->getLeashHolder() != - nullptr) { + if (e->instanceof(eTYPE_MOB) && + std::dynamic_pointer_cast(e)->getLeashHolder() != nullptr) { sp->connection->send(std::make_shared( SetEntityLinkPacket::LEASH, e, std::dynamic_pointer_cast(e)->getLeashHolder())); } - if (e->instanceof (eTYPE_LIVINGENTITY)) { + if (e->instanceof(eTYPE_LIVINGENTITY)) { for (int i = 0; i < 5; i++) { std::shared_ptr item = std::dynamic_pointer_cast(e)->getCarried(i); @@ -652,7 +651,7 @@ void TrackedEntity::updatePlayer(EntityTracker* tracker, } } - if (e->instanceof (eTYPE_PLAYER)) { + if (e->instanceof(eTYPE_PLAYER)) { std::shared_ptr spe = std::dynamic_pointer_cast(e); if (spe->isSleeping()) { sp->connection->send( @@ -664,7 +663,7 @@ void TrackedEntity::updatePlayer(EntityTracker* tracker, } } - if (e->instanceof (eTYPE_LIVINGENTITY)) { + if (e->instanceof(eTYPE_LIVINGENTITY)) { std::shared_ptr mob = std::dynamic_pointer_cast(e); std::vector* activeEffects = @@ -721,12 +720,12 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() { xp, yp, zp, yHeadRotp)); } - if (e->instanceof (eTYPE_ITEMENTITY)) { + if (e->instanceof(eTYPE_ITEMENTITY)) { std::shared_ptr packet = std::make_shared(e, AddEntityPacket::ITEM, 1, yRotp, xRotp, xp, yp, zp); return packet; - } else if (e->instanceof (eTYPE_SERVERPLAYER)) { + } else if (e->instanceof(eTYPE_SERVERPLAYER)) { std::shared_ptr player = std::dynamic_pointer_cast(e); @@ -741,55 +740,55 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() { // degrees. return std::make_shared( player, xuid, OnlineXuid, xp, yp, zp, yRotp, xRotp, yHeadRotp); - } else if (e->instanceof (eTYPE_MINECART)) { + } else if (e->instanceof(eTYPE_MINECART)) { std::shared_ptr minecart = std::dynamic_pointer_cast(e); return std::shared_ptr( new AddEntityPacket(e, AddEntityPacket::MINECART, minecart->getType(), yRotp, xRotp, xp, yp, zp)); - } else if (e->instanceof (eTYPE_BOAT)) { + } else if (e->instanceof(eTYPE_BOAT)) { return std::make_shared(e, AddEntityPacket::BOAT, yRotp, xRotp, xp, yp, zp); - } else if (e->instanceof (eTYPE_ENDERDRAGON)) { + } else if (e->instanceof(eTYPE_ENDERDRAGON)) { yHeadRotp = std::floor(e->getYHeadRot() * 256 / 360); return std::shared_ptr( new AddMobPacket(std::dynamic_pointer_cast(e), yRotp, xRotp, xp, yp, zp, yHeadRotp)); - } else if (e->instanceof (eTYPE_FISHINGHOOK)) { + } else if (e->instanceof(eTYPE_FISHINGHOOK)) { std::shared_ptr owner = std::dynamic_pointer_cast(e)->owner; return std::make_shared( e, AddEntityPacket::FISH_HOOK, owner != nullptr ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp); - } else if (e->instanceof (eTYPE_ARROW)) { + } else if (e->instanceof(eTYPE_ARROW)) { std::shared_ptr owner = (std::dynamic_pointer_cast(e))->owner; return std::make_shared( e, AddEntityPacket::ARROW, owner != nullptr ? owner->entityId : e->entityId, yRotp, xRotp, xp, yp, zp); - } else if (e->instanceof (eTYPE_SNOWBALL)) { + } else if (e->instanceof(eTYPE_SNOWBALL)) { return std::make_shared(e, AddEntityPacket::SNOWBALL, yRotp, xRotp, xp, yp, zp); - } else if (e->instanceof (eTYPE_THROWNPOTION)) { + } else if (e->instanceof(eTYPE_THROWNPOTION)) { return std::make_shared( e, AddEntityPacket::THROWN_POTION, ((std::dynamic_pointer_cast(e))->getPotionValue()), yRotp, xRotp, xp, yp, zp); - } else if (e->instanceof (eTYPE_THROWNEXPBOTTLE)) { + } else if (e->instanceof(eTYPE_THROWNEXPBOTTLE)) { return std::make_shared( e, AddEntityPacket::THROWN_EXPBOTTLE, yRotp, xRotp, xp, yp, zp); - } else if (e->instanceof (eTYPE_THROWNENDERPEARL)) { + } else if (e->instanceof(eTYPE_THROWNENDERPEARL)) { return std::make_shared( e, AddEntityPacket::THROWN_ENDERPEARL, yRotp, xRotp, xp, yp, zp); - } else if (e->instanceof (eTYPE_EYEOFENDERSIGNAL)) { + } else if (e->instanceof(eTYPE_EYEOFENDERSIGNAL)) { return std::make_shared( e, AddEntityPacket::EYEOFENDERSIGNAL, yRotp, xRotp, xp, yp, zp); - } else if (e->instanceof (eTYPE_FIREWORKS_ROCKET)) { + } else if (e->instanceof(eTYPE_FIREWORKS_ROCKET)) { return std::make_shared(e, AddEntityPacket::FIREWORKS, yRotp, xRotp, xp, yp, zp); - } else if (e->instanceof (eTYPE_FIREBALL)) { + } else if (e->instanceof(eTYPE_FIREBALL)) { eINSTANCEOF classType = e->GetType(); int type = AddEntityPacket::FIREBALL; if (classType == eTYPE_SMALL_FIREBALL) { @@ -813,25 +812,25 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() { aep->ya = (int)(fb->yPower * 8000); aep->za = (int)(fb->zPower * 8000); return aep; - } else if (e->instanceof (eTYPE_THROWNEGG)) { + } else if (e->instanceof(eTYPE_THROWNEGG)) { return std::make_shared(e, AddEntityPacket::EGG, yRotp, xRotp, xp, yp, zp); - } else if (e->instanceof (eTYPE_PRIMEDTNT)) { + } else if (e->instanceof(eTYPE_PRIMEDTNT)) { return std::make_shared(e, AddEntityPacket::PRIMED_TNT, yRotp, xRotp, xp, yp, zp); - } else if (e->instanceof (eTYPE_ENDER_CRYSTAL)) { + } else if (e->instanceof(eTYPE_ENDER_CRYSTAL)) { return std::make_shared( e, AddEntityPacket::ENDER_CRYSTAL, yRotp, xRotp, xp, yp, zp); - } else if (e->instanceof (eTYPE_FALLINGTILE)) { + } else if (e->instanceof(eTYPE_FALLINGTILE)) { std::shared_ptr ft = std::dynamic_pointer_cast(e); return std::make_shared(e, AddEntityPacket::FALLING, ft->tile | (ft->data << 16), yRotp, xRotp, xp, yp, zp); - } else if (e->instanceof (eTYPE_PAINTING)) { + } else if (e->instanceof(eTYPE_PAINTING)) { return std::shared_ptr( new AddPaintingPacket(std::dynamic_pointer_cast(e))); - } else if (e->instanceof (eTYPE_ITEM_FRAME)) { + } else if (e->instanceof(eTYPE_ITEM_FRAME)) { std::shared_ptr frame = std::dynamic_pointer_cast(e); @@ -850,7 +849,7 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() { packet->y = std::floor(frame->yTile * 32.0f); packet->z = std::floor(frame->zTile * 32.0f); return packet; - } else if (e->instanceof (eTYPE_LEASHFENCEKNOT)) { + } else if (e->instanceof(eTYPE_LEASHFENCEKNOT)) { std::shared_ptr knot = std::dynamic_pointer_cast(e); std::shared_ptr packet = @@ -860,7 +859,7 @@ std::shared_ptr TrackedEntity::getAddEntityPacket() { packet->y = std::floor((float)knot->yTile * 32); packet->z = std::floor((float)knot->zTile * 32); return packet; - } else if (e->instanceof (eTYPE_EXPERIENCEORB)) { + } else if (e->instanceof(eTYPE_EXPERIENCEORB)) { return std::shared_ptr( new AddExperienceOrbPacket( std::dynamic_pointer_cast(e))); diff --git a/targets/minecraft/server/network/PendingConnection.cpp b/targets/minecraft/server/network/PendingConnection.cpp index 830985e49..9b5a10f5c 100644 --- a/targets/minecraft/server/network/PendingConnection.cpp +++ b/targets/minecraft/server/network/PendingConnection.cpp @@ -16,13 +16,13 @@ #include "minecraft/network/packet/DisconnectPacket.h" #include "minecraft/network/packet/LoginPacket.h" #include "minecraft/network/packet/PreLoginPacket.h" -#include "platform/network/network.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/level/ServerPlayer.h" #include "minecraft/util/Log.h" -#include "platform/network/NetTypes.h" #include "platform/PlatformTypes.h" +#include "platform/network/NetTypes.h" +#include "platform/network/network.h" #include "platform/storage/storage.h" class Packet; diff --git a/targets/minecraft/server/network/PlayerConnection.cpp b/targets/minecraft/server/network/PlayerConnection.cpp index aa9d1132f..e68f39790 100644 --- a/targets/minecraft/server/network/PlayerConnection.cpp +++ b/targets/minecraft/server/network/PlayerConnection.cpp @@ -61,7 +61,6 @@ #include "minecraft/network/packet/TileUpdatePacket.h" #include "minecraft/network/packet/TradeItemPacket.h" #include "minecraft/network/packet/UseItemPacket.h" -#include "platform/network/network.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/level/ServerLevel.h" @@ -102,6 +101,7 @@ #include "minecraft/world/level/tile/entity/SignTileEntity.h" #include "minecraft/world/level/tile/entity/TileEntity.h" #include "minecraft/world/phys/AABB.h" +#include "platform/network/network.h" class SavedData; @@ -720,8 +720,8 @@ void PlayerConnection::handlePlayerCommand( } } else if (packet->action == PlayerCommandPacket::OPEN_INVENTORY) { // also only supported by horses... - if ((player->riding != nullptr) && player->riding->instanceof - (eTYPE_HORSE)) { + if ((player->riding != nullptr) && + player->riding->instanceof(eTYPE_HORSE)) { std::dynamic_pointer_cast(player->riding) ->openInventory(player); } @@ -943,8 +943,8 @@ void PlayerConnection::handleTextureAndGeometryReceived( if (dwTextureBytes != 0) { if (pSkinAsset && (pSkinAsset->getAdditionalBoxesCount() != 0)) { send(std::shared_ptr( - new TextureAndGeometryPacket( - textureName, pbData, dwTextureBytes, pSkinAsset))); + new TextureAndGeometryPacket(textureName, pbData, + dwTextureBytes, pSkinAsset))); } else { // get the data from the app std::uint32_t dwSkinID = diff --git a/targets/minecraft/stats/NumberFormatters.h b/targets/minecraft/stats/NumberFormatters.h index 691bb1105..3547dd13b 100644 --- a/targets/minecraft/stats/NumberFormatters.h +++ b/targets/minecraft/stats/NumberFormatters.h @@ -30,5 +30,5 @@ public: // 4J Stu - The java code took a string format, we take a printf format // string - DecimalFormat(std::string x) : formatString(x){}; + DecimalFormat(std::string x) : formatString(x) {}; }; \ No newline at end of file diff --git a/targets/minecraft/stats/StatsCounter.cpp b/targets/minecraft/stats/StatsCounter.cpp index 17fcd442e..84e291844 100644 --- a/targets/minecraft/stats/StatsCounter.cpp +++ b/targets/minecraft/stats/StatsCounter.cpp @@ -11,7 +11,6 @@ #include "app/common/App_structs.h" #include "app/common/Game.h" -#include "platform/leaderboard/IPlatformLeaderboard.h" #include "minecraft/stats/Achievement.h" #include "minecraft/stats/Achievements.h" #include "minecraft/stats/GenericStats.h" @@ -20,6 +19,7 @@ #include "minecraft/util/Log.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/level/tile/Tile.h" +#include "platform/leaderboard/IPlatformLeaderboard.h" #include "platform/profile/profile.h" Stat** StatsCounter::LARGE_STATS[] = {&Stats::walkOneM, &Stats::swimOneM, diff --git a/targets/minecraft/world/damageSource/CombatEntry.cpp b/targets/minecraft/world/damageSource/CombatEntry.cpp index 68f163edb..ecc3f1f8e 100644 --- a/targets/minecraft/world/damageSource/CombatEntry.cpp +++ b/targets/minecraft/world/damageSource/CombatEntry.cpp @@ -36,8 +36,8 @@ float CombatEntry::getHealthBeforeDamage() { return health; } float CombatEntry::getHealthAfterDamage() { return health - damage; } bool CombatEntry::isCombatRelated() { - return source->getEntity() && source->getEntity()->instanceof - (eTYPE_LIVINGENTITY); + return source->getEntity() && + source->getEntity()->instanceof(eTYPE_LIVINGENTITY); } CombatTracker::eLOCATION CombatEntry::getLocation() { return location; } diff --git a/targets/minecraft/world/damageSource/CombatTracker.cpp b/targets/minecraft/world/damageSource/CombatTracker.cpp index 33cdbdb3e..9970b7c3b 100644 --- a/targets/minecraft/world/damageSource/CombatTracker.cpp +++ b/targets/minecraft/world/damageSource/CombatTracker.cpp @@ -100,8 +100,7 @@ std::shared_ptr CombatTracker::getDeathMessagePacket() { (killingEntity == nullptr || attackerEntity != killingEntity)) { std::shared_ptr attackerItem = - attackerEntity->instanceof - (eTYPE_LIVINGENTITY) + attackerEntity->instanceof(eTYPE_LIVINGENTITY) ? std::dynamic_pointer_cast(attackerEntity) ->getCarriedItem() : nullptr; @@ -119,8 +118,8 @@ std::shared_ptr CombatTracker::getDeathMessagePacket() { attackerEntity->getNetworkName()); } } else if (killingEntity != nullptr) { - std::shared_ptr killerItem = killingEntity->instanceof - (eTYPE_LIVINGENTITY) + std::shared_ptr killerItem = + killingEntity->instanceof(eTYPE_LIVINGENTITY) ? std::dynamic_pointer_cast(killingEntity) ->getCarriedItem() : nullptr; @@ -156,20 +155,18 @@ std::shared_ptr CombatTracker::getKiller() { for (auto it = entries.begin(); it != entries.end(); ++it) { CombatEntry* entry = *it; if (entry->getSource() != nullptr && - entry->getSource()->getEntity() != nullptr && - entry->getSource()->getEntity()->instanceof - (eTYPE_PLAYER) && (bestPlayer == nullptr || - entry->getDamage() > bestPlayerDamage)) { + entry->getSource()->getEntity() != nullptr && + entry->getSource()->getEntity()->instanceof(eTYPE_PLAYER) && + (bestPlayer == nullptr || entry->getDamage() > bestPlayerDamage)) { bestPlayerDamage = entry->getDamage(); bestPlayer = std::dynamic_pointer_cast( entry->getSource()->getEntity()); } if (entry->getSource() != nullptr && - entry->getSource()->getEntity() != nullptr && - entry->getSource()->getEntity()->instanceof - (eTYPE_LIVINGENTITY) && - (bestMob == nullptr || entry->getDamage() > bestMobDamage)) { + entry->getSource()->getEntity() != nullptr && + entry->getSource()->getEntity()->instanceof(eTYPE_LIVINGENTITY) && + (bestMob == nullptr || entry->getDamage() > bestMobDamage)) { bestMobDamage = entry->getDamage(); bestMob = std::dynamic_pointer_cast( entry->getSource()->getEntity()); diff --git a/targets/minecraft/world/damageSource/EntityDamageSource.cpp b/targets/minecraft/world/damageSource/EntityDamageSource.cpp index 8bffcdd24..3c5aab7a5 100644 --- a/targets/minecraft/world/damageSource/EntityDamageSource.cpp +++ b/targets/minecraft/world/damageSource/EntityDamageSource.cpp @@ -35,15 +35,14 @@ std::shared_ptr EntityDamageSource::getEntity() { return entity; } std::shared_ptr EntityDamageSource::getDeathMessagePacket( std::shared_ptr player) { std::shared_ptr held = - (entity != nullptr) && entity->instanceof - (eTYPE_LIVINGENTITY) + (entity != nullptr) && entity->instanceof(eTYPE_LIVINGENTITY) ? std::dynamic_pointer_cast(entity)->getCarriedItem() : nullptr; std::string additional = ""; - if (entity->instanceof (eTYPE_SERVERPLAYER)) { + if (entity->instanceof(eTYPE_SERVERPLAYER)) { additional = std::dynamic_pointer_cast(entity)->name; - } else if (entity->instanceof (eTYPE_MOB)) { + } else if (entity->instanceof(eTYPE_MOB)) { std::shared_ptr mob = std::dynamic_pointer_cast(entity); if (mob->hasCustomName()) { additional = mob->getCustomName(); @@ -61,8 +60,8 @@ std::shared_ptr EntityDamageSource::getDeathMessagePacket( } bool EntityDamageSource::scalesWithDifficulty() { - return (entity != nullptr) && entity->instanceof - (eTYPE_LIVINGENTITY) && !entity->instanceof (eTYPE_PLAYER); + return (entity != nullptr) && entity->instanceof(eTYPE_LIVINGENTITY) && + !entity->instanceof(eTYPE_PLAYER); } // 4J: Copy function diff --git a/targets/minecraft/world/damageSource/IndirectEntityDamageSource.cpp b/targets/minecraft/world/damageSource/IndirectEntityDamageSource.cpp index 32875f28d..fc5040d68 100644 --- a/targets/minecraft/world/damageSource/IndirectEntityDamageSource.cpp +++ b/targets/minecraft/world/damageSource/IndirectEntityDamageSource.cpp @@ -42,8 +42,8 @@ std::shared_ptr IndirectEntityDamageSource::getEntity() { std::shared_ptr IndirectEntityDamageSource::getDeathMessagePacket( std::shared_ptr player) { - std::shared_ptr held = entity->instanceof - (eTYPE_LIVINGENTITY) + std::shared_ptr held = + entity->instanceof(eTYPE_LIVINGENTITY) ? std::dynamic_pointer_cast(entity)->getCarriedItem() : nullptr; std::string additional = ""; diff --git a/targets/minecraft/world/effect/MobEffect.cpp b/targets/minecraft/world/effect/MobEffect.cpp index 9037716fd..755839987 100644 --- a/targets/minecraft/world/effect/MobEffect.cpp +++ b/targets/minecraft/world/effect/MobEffect.cpp @@ -274,12 +274,12 @@ void MobEffect::applyEffectTick(std::shared_ptr mob, } } else if (id == wither->id) { mob->hurt(DamageSource::wither, 1); - } else if ((id == hunger->id) && mob->instanceof (eTYPE_PLAYER)) { + } else if ((id == hunger->id) && mob->instanceof(eTYPE_PLAYER)) { // every tick, cause the same amount of exhaustion as when removing // a block, times amplification std::dynamic_pointer_cast(mob)->causeFoodExhaustion( FoodConstants::EXHAUSTION_MINE * (amplification + 1)); - } else if ((id == saturation->id) && mob->instanceof (eTYPE_PLAYER)) { + } else if ((id == saturation->id) && mob->instanceof(eTYPE_PLAYER)) { if (!mob->level->isClientSide) { std::dynamic_pointer_cast(mob)->getFoodData()->eat( amplification + 1, FoodConstants::FOOD_SATURATION_MAX); diff --git a/targets/minecraft/world/entity/Entity.cpp b/targets/minecraft/world/entity/Entity.cpp index 670e7459d..e97b7fd72 100644 --- a/targets/minecraft/world/entity/Entity.cpp +++ b/targets/minecraft/world/entity/Entity.cpp @@ -15,6 +15,7 @@ #include "EntityIO.h" #include "EntityPos.h" #include "SyncedEntityData.h" +#include "app/common/Audio/SoundTypes.h" #include "java/Class.h" #include "java/Random.h" #include "minecraft/Direction.h" @@ -27,7 +28,6 @@ #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" #include "minecraft/server/level/ServerLevel.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Log.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" @@ -681,8 +681,8 @@ void Entity::move(double xa, double ya, double za, AABB bbOrg = bb; - bool isPlayerSneaking = onGround && isSneaking() && instanceof - (eTYPE_PLAYER); + bool isPlayerSneaking = + onGround && isSneaking() && instanceof(eTYPE_PLAYER); if (isPlayerSneaking) { double d = 0.05; @@ -1784,7 +1784,7 @@ void Entity::changeDimension(int i) { // 4J: Restrictions on what can go through { // 4J: Some things should just be destroyed when they hit a portal - if (instanceof (eTYPE_FALLINGTILE)) { + if (instanceof(eTYPE_FALLINGTILE)) { removed = true; return; } @@ -1794,9 +1794,8 @@ void Entity::changeDimension(int i) { if (newLevel->atEntityLimit(shared_from_this())) return; // 4J: Check level limit on living entities, minecarts and boats - if (! instanceof - (eTYPE_PLAYER) && - !newLevel->canCreateMore(GetType(), Level::eSpawnType_Portal)) + if (!instanceof(eTYPE_PLAYER) && + !newLevel->canCreateMore(GetType(), Level::eSpawnType_Portal)) return; } diff --git a/targets/minecraft/world/entity/Entity.h b/targets/minecraft/world/entity/Entity.h index 0eeb8d12b..726691e50 100644 --- a/targets/minecraft/world/entity/Entity.h +++ b/targets/minecraft/world/entity/Entity.h @@ -53,10 +53,10 @@ public: // 4J-PB - added to replace (e instanceof Type), avoiding dynamic casts virtual eINSTANCEOF GetType() = 0; - inline bool instanceof (eINSTANCEOF super) { + inline bool instanceof(eINSTANCEOF super) { return eTYPE_DERIVED_FROM(super, GetType()); } - inline static bool instanceof (eINSTANCEOF type, eINSTANCEOF super) { + inline static bool instanceof(eINSTANCEOF type, eINSTANCEOF super) { return eTYPE_DERIVED_FROM(super, type); } diff --git a/targets/minecraft/world/entity/EntitySelector.cpp b/targets/minecraft/world/entity/EntitySelector.cpp index 66ce2c890..c25227ad5 100644 --- a/targets/minecraft/world/entity/EntitySelector.cpp +++ b/targets/minecraft/world/entity/EntitySelector.cpp @@ -30,7 +30,7 @@ MobCanWearArmourEntitySelector::MobCanWearArmourEntitySelector( bool MobCanWearArmourEntitySelector::matches( std::shared_ptr entity) const { if (!entity->isAlive()) return false; - if (!entity->instanceof (eTYPE_LIVINGENTITY)) return false; + if (!entity->instanceof(eTYPE_LIVINGENTITY)) return false; std::shared_ptr mob = std::dynamic_pointer_cast(entity); @@ -38,9 +38,9 @@ bool MobCanWearArmourEntitySelector::matches( if (mob->getCarried(Mob::getEquipmentSlotForItem(item)) != nullptr) return false; - if (mob->instanceof (eTYPE_MOB)) { + if (mob->instanceof(eTYPE_MOB)) { return std::dynamic_pointer_cast(mob)->canPickUpLoot(); - } else if (mob->instanceof (eTYPE_PLAYER)) { + } else if (mob->instanceof(eTYPE_PLAYER)) { return true; } diff --git a/targets/minecraft/world/entity/ExperienceOrb.cpp b/targets/minecraft/world/entity/ExperienceOrb.cpp index 02b6ca100..61eb4012c 100644 --- a/targets/minecraft/world/entity/ExperienceOrb.cpp +++ b/targets/minecraft/world/entity/ExperienceOrb.cpp @@ -5,10 +5,10 @@ #include +#include "app/common/Audio/SoundTypes.h" #include "java/JavaMath.h" #include "java/Random.h" #include "minecraft/SharedConstants.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" diff --git a/targets/minecraft/world/entity/HangingEntity.cpp b/targets/minecraft/world/entity/HangingEntity.cpp index 7acc18a15..23a7f5545 100644 --- a/targets/minecraft/world/entity/HangingEntity.cpp +++ b/targets/minecraft/world/entity/HangingEntity.cpp @@ -145,7 +145,7 @@ bool HangingEntity::survives() { auto itEnd = entities->end(); for (auto it = entities->begin(); it != itEnd; it++) { std::shared_ptr e = (*it); - if (e->instanceof (eTYPE_HANGING_ENTITY)) { + if (e->instanceof(eTYPE_HANGING_ENTITY)) { return false; } } @@ -172,10 +172,10 @@ bool HangingEntity::hurt(DamageSource* source, float damage) { if (dynamic_cast(source) != nullptr) { std::shared_ptr sourceEntity = source->getDirectEntity(); - if ((sourceEntity != nullptr) && sourceEntity->instanceof - (eTYPE_PLAYER) && - !std::dynamic_pointer_cast(sourceEntity) - ->isAllowedToHurtEntity(shared_from_this())) { + if ((sourceEntity != nullptr) && + sourceEntity->instanceof(eTYPE_PLAYER) && + !std::dynamic_pointer_cast(sourceEntity) + ->isAllowedToHurtEntity(shared_from_this())) { return false; } } @@ -185,8 +185,9 @@ bool HangingEntity::hurt(DamageSource* source, float damage) { std::shared_ptr player = nullptr; std::shared_ptr e = source->getEntity(); - if ((e != nullptr) && e->instanceof - (eTYPE_PLAYER)) // check if it's serverplayer or player + if ((e != nullptr) && + e->instanceof( + eTYPE_PLAYER)) // check if it's serverplayer or player { player = std::dynamic_pointer_cast(e); } diff --git a/targets/minecraft/world/entity/ItemFrame.cpp b/targets/minecraft/world/entity/ItemFrame.cpp index 2d7ca7222..3fe0086d3 100644 --- a/targets/minecraft/world/entity/ItemFrame.cpp +++ b/targets/minecraft/world/entity/ItemFrame.cpp @@ -49,7 +49,7 @@ bool ItemFrame::shouldRenderAtSqrDistance(double distance) { void ItemFrame::dropItem(std::shared_ptr causedBy) { std::shared_ptr item = getItem(); - if (causedBy != nullptr && causedBy->instanceof (eTYPE_PLAYER)) { + if (causedBy != nullptr && causedBy->instanceof(eTYPE_PLAYER)) { if (std::dynamic_pointer_cast(causedBy)->abilities.instabuild) { removeFramedMap(item); return; diff --git a/targets/minecraft/world/entity/LivingEntity.cpp b/targets/minecraft/world/entity/LivingEntity.cpp index 7547d7883..4bc74cb99 100644 --- a/targets/minecraft/world/entity/LivingEntity.cpp +++ b/targets/minecraft/world/entity/LivingEntity.cpp @@ -13,6 +13,7 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Class.h" #include "java/JavaMath.h" #include "java/Random.h" @@ -23,7 +24,6 @@ #include "minecraft/network/packet/TakeItemEntityPacket.h" #include "minecraft/server/level/EntityTracker.h" #include "minecraft/server/level/ServerLevel.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/util/Log.h" #include "minecraft/util/Mth.h" @@ -244,8 +244,8 @@ void LivingEntity::baseTick() { } clearFire(); - if (!level->isClientSide && isRiding() && riding->instanceof - (eTYPE_LIVINGENTITY)) { + if (!level->isClientSide && isRiding() && + riding->instanceof(eTYPE_LIVINGENTITY)) { ride(nullptr); } } else { @@ -335,7 +335,7 @@ int LivingEntity::decreaseAirSupply(int currentSupply) { return currentSupply; } } - if (instanceof (eTYPE_PLAYER)) { + if (instanceof(eTYPE_PLAYER)) { Log::info("++++++++++ %s: Player decreasing air supply to %d\n", level->isClientSide ? "CLIENT" : "SERVER", currentSupply - 1); } @@ -368,7 +368,7 @@ std::shared_ptr LivingEntity::getLastHurtMob() { int LivingEntity::getLastHurtMobTimestamp() { return lastHurtMobTimestamp; } void LivingEntity::setLastHurtMob(std::shared_ptr target) { - if (target->instanceof (eTYPE_LIVINGENTITY)) { + if (target->instanceof(eTYPE_LIVINGENTITY)) { lastHurtMob = std::dynamic_pointer_cast(target); } else { lastHurtMob = nullptr; @@ -723,10 +723,9 @@ bool LivingEntity::hurt(DamageSource* source, float dmg) { if (source->isFire() && hasEffect(MobEffect::fireResistance)) { // 4J-JEV, for new achievement Stayin'Frosty, TODO merge with Java // version. - if (this->instanceof - (eTYPE_PLAYER) && - (source == DamageSource::lava)) // Only award when in lava (not - // any fire). + if (this->instanceof(eTYPE_PLAYER) && + (source == DamageSource::lava)) // Only award when in lava (not + // any fire). { std::shared_ptr plr = std::dynamic_pointer_cast(shared_from_this()); @@ -765,15 +764,15 @@ bool LivingEntity::hurt(DamageSource* source, float dmg) { std::shared_ptr sourceEntity = source->getEntity(); if (sourceEntity != nullptr) { - if (sourceEntity->instanceof (eTYPE_LIVINGENTITY)) { + if (sourceEntity->instanceof(eTYPE_LIVINGENTITY)) { setLastHurtByMob( std::dynamic_pointer_cast(sourceEntity)); } - if (sourceEntity->instanceof (eTYPE_PLAYER)) { + if (sourceEntity->instanceof(eTYPE_PLAYER)) { lastHurtByPlayerTime = PLAYER_HURT_EXPERIENCE_TIME; lastHurtByPlayer = std::dynamic_pointer_cast(sourceEntity); - } else if (sourceEntity->instanceof (eTYPE_WOLF)) { + } else if (sourceEntity->instanceof(eTYPE_WOLF)) { std::shared_ptr w = std::dynamic_pointer_cast(sourceEntity); if (w->isTame()) { @@ -852,8 +851,8 @@ void LivingEntity::die(DamageSource* source) { int playerBonus = 0; std::shared_ptr player = nullptr; - if ((sourceEntity != nullptr) && sourceEntity->instanceof - (eTYPE_PLAYER)) { + if ((sourceEntity != nullptr) && + sourceEntity->instanceof(eTYPE_PLAYER)) { player = std::dynamic_pointer_cast(sourceEntity); playerBonus = EnchantmentHelper::getKillingLootBonus( std::dynamic_pointer_cast(player)); @@ -1004,7 +1003,7 @@ float LivingEntity::getDamageAfterArmorAbsorb(DamageSource* damageSource, float LivingEntity::getDamageAfterMagicAbsorb(DamageSource* damageSource, float damage) { // [EB]: Stupid hack :( - if (this->instanceof (eTYPE_ZOMBIE)) { + if (this->instanceof(eTYPE_ZOMBIE)) { damage = damage; } if (hasEffect(MobEffect::damageResistance) && @@ -1312,8 +1311,8 @@ void LivingEntity::travel(float xa, float ya) { if (zd > max) zd = max; fallDistance = 0; if (yd < -0.15) yd = -0.15; - bool playerSneaking = isSneaking() && this->instanceof - (eTYPE_PLAYER); + bool playerSneaking = + isSneaking() && this->instanceof(eTYPE_PLAYER); if (playerSneaking && yd < 0) yd = 0; } @@ -1643,15 +1642,15 @@ void LivingEntity::setJumping(bool jump) { jumping = jump; } void LivingEntity::take(std::shared_ptr e, int orgCount) { if (!e->removed && !level->isClientSide) { EntityTracker* entityTracker = ((ServerLevel*)level)->getTracker(); - if (e->instanceof (eTYPE_ITEMENTITY)) { + if (e->instanceof(eTYPE_ITEMENTITY)) { entityTracker->broadcast( e, std::shared_ptr( new TakeItemEntityPacket(e->entityId, entityId))); - } else if (e->instanceof (eTYPE_ARROW)) { + } else if (e->instanceof(eTYPE_ARROW)) { entityTracker->broadcast( e, std::shared_ptr( new TakeItemEntityPacket(e->entityId, entityId))); - } else if (e->instanceof (eTYPE_EXPERIENCEORB)) { + } else if (e->instanceof(eTYPE_EXPERIENCEORB)) { entityTracker->broadcast( e, std::shared_ptr( new TakeItemEntityPacket(e->entityId, entityId))); diff --git a/targets/minecraft/world/entity/Mob.cpp b/targets/minecraft/world/entity/Mob.cpp index 88565b033..aca62e948 100644 --- a/targets/minecraft/world/entity/Mob.cpp +++ b/targets/minecraft/world/entity/Mob.cpp @@ -254,10 +254,10 @@ void Mob::addAdditonalSaveData(CompoundTag* entityTag) { entityTag->putBoolean("Leashed", _isLeashed); if (leashHolder != nullptr) { CompoundTag* leashTag = new CompoundTag("Leash"); - if (leashHolder->instanceof (eTYPE_LIVINGENTITY)) { + if (leashHolder->instanceof(eTYPE_LIVINGENTITY)) { // a walking, talking, leash holder leashTag->putString("UUID", leashHolder->getUUID()); - } else if (leashHolder->instanceof (eTYPE_HANGING_ENTITY)) { + } else if (leashHolder->instanceof(eTYPE_HANGING_ENTITY)) { // a fixed holder (that doesn't save itself) std::shared_ptr hangInThere = std::dynamic_pointer_cast(leashHolder); @@ -493,7 +493,7 @@ void Mob::lookAt(std::shared_ptr e, float yMax, float xMax) { double yd; double zd = e->z - z; - if (e->instanceof (eTYPE_LIVINGENTITY)) { + if (e->instanceof(eTYPE_LIVINGENTITY)) { std::shared_ptr mob = std::dynamic_pointer_cast(e); yd = (mob->y + mob->getHeadHeight()) - (y + getHeadHeight()); @@ -760,14 +760,12 @@ bool Mob::interact(std::shared_ptr player) { if (itemstack->id == Item::lead_Id) { if (canBeLeashed()) { std::shared_ptr tamableAnimal = nullptr; - if (shared_from_this()->instanceof - (eTYPE_TAMABLE_ANIMAL) && - (tamableAnimal = - std::dynamic_pointer_cast( - shared_from_this())) - ->isTame()) // 4J-JEV: excuse the assignment - // operator in here, don't want to - // dyn-cast if it's avoidable. + if (shared_from_this()->instanceof(eTYPE_TAMABLE_ANIMAL) && + (tamableAnimal = std::dynamic_pointer_cast( + shared_from_this())) + ->isTame()) // 4J-JEV: excuse the assignment + // operator in here, don't want to + // dyn-cast if it's avoidable. { if (player->getUUID().compare( tamableAnimal->getOwnerUUID()) == 0) { @@ -826,7 +824,7 @@ void Mob::dropLeash(bool synch, bool createItemDrop) { } bool Mob::canBeLeashed() { - return !isLeashed() && !shared_from_this()->instanceof (eTYPE_ENEMY); + return !isLeashed() && !shared_from_this()->instanceof(eTYPE_ENEMY); } bool Mob::isLeashed() { return _isLeashed; } diff --git a/targets/minecraft/world/entity/Painting.cpp b/targets/minecraft/world/entity/Painting.cpp index 651db9d30..3370caffc 100644 --- a/targets/minecraft/world/entity/Painting.cpp +++ b/targets/minecraft/world/entity/Painting.cpp @@ -138,7 +138,7 @@ int Painting::getWidth() { return motive->w; } int Painting::getHeight() { return motive->h; } void Painting::dropItem(std::shared_ptr causedBy) { - if ((causedBy != nullptr) && causedBy->instanceof (eTYPE_PLAYER)) { + if ((causedBy != nullptr) && causedBy->instanceof(eTYPE_PLAYER)) { std::shared_ptr player = std::dynamic_pointer_cast(causedBy); if (player->abilities.instabuild) { diff --git a/targets/minecraft/world/entity/Painting.h b/targets/minecraft/world/entity/Painting.h index ba201f3b1..1f94ce25e 100644 --- a/targets/minecraft/world/entity/Painting.h +++ b/targets/minecraft/world/entity/Painting.h @@ -69,7 +69,7 @@ public: // private: Motive(std::string name, int w, int h, int uo, int vo) - : name(name), w(w), h(h), uo(uo), vo(vo){}; + : name(name), w(w), h(h), uo(uo), vo(vo) {}; }; public: diff --git a/targets/minecraft/world/entity/PathfinderMob.cpp b/targets/minecraft/world/entity/PathfinderMob.cpp index 7e079ab9c..e77fdea41 100644 --- a/targets/minecraft/world/entity/PathfinderMob.cpp +++ b/targets/minecraft/world/entity/PathfinderMob.cpp @@ -288,8 +288,7 @@ void PathfinderMob::tickLeash() { float _distanceTo = distanceTo(leashHolder); std::shared_ptr tamabaleAnimal = - shared_from_this()->instanceof - (eTYPE_TAMABLE_ANIMAL) + shared_from_this()->instanceof(eTYPE_TAMABLE_ANIMAL) ? std::dynamic_pointer_cast(shared_from_this()) : nullptr; if ((tamabaleAnimal != nullptr) && tamabaleAnimal->isSitting()) { diff --git a/targets/minecraft/world/entity/ai/control/LookControl.cpp b/targets/minecraft/world/entity/ai/control/LookControl.cpp index f25c65280..cd79a000c 100644 --- a/targets/minecraft/world/entity/ai/control/LookControl.cpp +++ b/targets/minecraft/world/entity/ai/control/LookControl.cpp @@ -23,7 +23,7 @@ LookControl::LookControl(Mob* mob) { void LookControl::setLookAt(std::shared_ptr target, float yMax, float xMax) { wantedX = target->x; - if (target->instanceof (eTYPE_LIVINGENTITY)) + if (target->instanceof(eTYPE_LIVINGENTITY)) wantedY = target->y + std::dynamic_pointer_cast(target)->getHeadHeight(); diff --git a/targets/minecraft/world/entity/ai/goal/ControlledByPlayerGoal.cpp b/targets/minecraft/world/entity/ai/goal/ControlledByPlayerGoal.cpp index 690890dc6..14bbec987 100644 --- a/targets/minecraft/world/entity/ai/goal/ControlledByPlayerGoal.cpp +++ b/targets/minecraft/world/entity/ai/goal/ControlledByPlayerGoal.cpp @@ -56,8 +56,8 @@ void ControlledByPlayerGoal::stop() { bool ControlledByPlayerGoal::canUse() { return mob->isAlive() && mob->rider.lock() != nullptr && - mob->rider.lock()->instanceof - (eTYPE_PLAYER) && (boosting || mob->canBeControlledByRider()); + mob->rider.lock()->instanceof(eTYPE_PLAYER) && + (boosting || mob->canBeControlledByRider()); } void ControlledByPlayerGoal::tick() { diff --git a/targets/minecraft/world/entity/ai/goal/MeleeAttackGoal.cpp b/targets/minecraft/world/entity/ai/goal/MeleeAttackGoal.cpp index 210b60fc7..983edc1fe 100644 --- a/targets/minecraft/world/entity/ai/goal/MeleeAttackGoal.cpp +++ b/targets/minecraft/world/entity/ai/goal/MeleeAttackGoal.cpp @@ -45,7 +45,7 @@ bool MeleeAttackGoal::canUse() { std::shared_ptr target = mob->getTarget(); if (target == nullptr) return false; if (!target->isAlive()) return false; - if (attackType != eTYPE_NOTSET && !target->instanceof (attackType)) + if (attackType != eTYPE_NOTSET && !target->instanceof(attackType)) return false; path.reset(mob->getNavigation()->createPath(target)); return path != nullptr; diff --git a/targets/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.cpp b/targets/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.cpp index 3546061ba..17ec10374 100644 --- a/targets/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.cpp +++ b/targets/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.cpp @@ -46,7 +46,7 @@ bool RunAroundLikeCrazyGoal::canContinueToUse() { void RunAroundLikeCrazyGoal::tick() { if (horse->getRandom()->nextInt(50) == 0) { - if (horse->rider.lock()->instanceof (eTYPE_PLAYER)) { + if (horse->rider.lock()->instanceof(eTYPE_PLAYER)) { int temper = horse->getTemper(); int maxTemper = horse->getMaxTemper(); if (maxTemper > 0 && diff --git a/targets/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.cpp b/targets/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.cpp index f99285bdf..a608824b8 100644 --- a/targets/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.cpp +++ b/targets/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.cpp @@ -22,7 +22,7 @@ SubselectEntitySelector::SubselectEntitySelector( SubselectEntitySelector::~SubselectEntitySelector() { delete m_subselector; } bool SubselectEntitySelector::matches(std::shared_ptr entity) const { - if (!entity->instanceof (eTYPE_LIVINGENTITY)) return false; + if (!entity->instanceof(eTYPE_LIVINGENTITY)) return false; if (m_subselector != nullptr && !m_subselector->matches(entity)) return false; return m_parent->canAttack(std::dynamic_pointer_cast(entity), diff --git a/targets/minecraft/world/entity/ai/goal/target/TargetGoal.cpp b/targets/minecraft/world/entity/ai/goal/target/TargetGoal.cpp index 4327a9759..006d06428 100644 --- a/targets/minecraft/world/entity/ai/goal/target/TargetGoal.cpp +++ b/targets/minecraft/world/entity/ai/goal/target/TargetGoal.cpp @@ -88,7 +88,7 @@ bool TargetGoal::canAttack(std::shared_ptr target, // We're attacking our owner return false; } - } else if (target->instanceof (eTYPE_PLAYER)) { + } else if (target->instanceof(eTYPE_PLAYER)) { if (!allowInvulnerable && (std::dynamic_pointer_cast(target))->abilities.invulnerable) return false; diff --git a/targets/minecraft/world/entity/ambient/Bat.cpp b/targets/minecraft/world/entity/ambient/Bat.cpp index 9c88f578f..d25f52646 100644 --- a/targets/minecraft/world/entity/ambient/Bat.cpp +++ b/targets/minecraft/world/entity/ambient/Bat.cpp @@ -6,9 +6,9 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/Pos.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/entity/SyncedEntityData.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" diff --git a/targets/minecraft/world/entity/animal/Animal.cpp b/targets/minecraft/world/entity/animal/Animal.cpp index 646bde3f8..8b2626a11 100644 --- a/targets/minecraft/world/entity/animal/Animal.cpp +++ b/targets/minecraft/world/entity/animal/Animal.cpp @@ -77,7 +77,7 @@ void Animal::aiStep() { void Animal::checkHurtTarget(std::shared_ptr target, float d) { // 4J-JEV: Changed from dynamic cast to use eINSTANCEOF - if (target->instanceof (eTYPE_PLAYER)) { + if (target->instanceof(eTYPE_PLAYER)) { if (d < 3) { double xd = target->x - x; double zd = target->z - z; @@ -93,7 +93,7 @@ void Animal::checkHurtTarget(std::shared_ptr target, float d) { } // 4J-JEV: Changed from dynamic cast to use eINSTANCEOF - else if (target->instanceof (eTYPE_ANIMAL)) { + else if (target->instanceof(eTYPE_ANIMAL)) { std::shared_ptr a = std::dynamic_pointer_cast(target); if (getAge() > 0 && a->getAge() < 0) { if (d < 2.5) { @@ -179,22 +179,22 @@ bool Animal::hurt(DamageSource* dmgSource, float dmg) { std::shared_ptr source = dmgSource->getDirectEntity(); // 4J-JEV: Changed from dynamic cast to use eINSTANCEOF - if (source->instanceof - (eTYPE_PLAYER) && !std::dynamic_pointer_cast(source) - ->isAllowedToAttackAnimals()) { + if (source->instanceof(eTYPE_PLAYER) && + !std::dynamic_pointer_cast(source) + ->isAllowedToAttackAnimals()) { return false; } - if ((source != nullptr) && source->instanceof (eTYPE_ARROW)) { + if ((source != nullptr) && source->instanceof(eTYPE_ARROW)) { std::shared_ptr arrow = std::dynamic_pointer_cast(source); // 4J: Check that the arrow's owner can attack animals (dispenser // arrows are not owned) - if (arrow->owner != nullptr && arrow->owner->instanceof - (eTYPE_PLAYER) && - !std::dynamic_pointer_cast(arrow->owner) - ->isAllowedToAttackAnimals()) { + if (arrow->owner != nullptr && + arrow->owner->instanceof(eTYPE_PLAYER) && + !std::dynamic_pointer_cast(arrow->owner) + ->isAllowedToAttackAnimals()) { return false; } } @@ -352,7 +352,7 @@ bool Animal::mobInteract(std::shared_ptr player) { return false; } - } else if (instanceof (eTYPE_MONSTER)) { + } else if (instanceof(eTYPE_MONSTER)) { } break; } diff --git a/targets/minecraft/world/entity/animal/Chicken.cpp b/targets/minecraft/world/entity/animal/Chicken.cpp index 8e40b8fdb..b35aa70ab 100644 --- a/targets/minecraft/world/entity/animal/Chicken.cpp +++ b/targets/minecraft/world/entity/animal/Chicken.cpp @@ -2,8 +2,8 @@ #include -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" #include "minecraft/world/entity/ai/goal/BreedGoal.h" #include "minecraft/world/entity/ai/goal/FloatGoal.h" diff --git a/targets/minecraft/world/entity/animal/Cow.cpp b/targets/minecraft/world/entity/animal/Cow.cpp index 681f75c6a..b41aadb83 100644 --- a/targets/minecraft/world/entity/animal/Cow.cpp +++ b/targets/minecraft/world/entity/animal/Cow.cpp @@ -2,8 +2,8 @@ #include -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" #include "minecraft/world/entity/ai/goal/BreedGoal.h" diff --git a/targets/minecraft/world/entity/animal/EntityHorse.cpp b/targets/minecraft/world/entity/animal/EntityHorse.cpp index 2c7545b65..959475cb6 100644 --- a/targets/minecraft/world/entity/animal/EntityHorse.cpp +++ b/targets/minecraft/world/entity/animal/EntityHorse.cpp @@ -6,10 +6,10 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/client/renderer/Textures.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Log.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" @@ -96,9 +96,8 @@ std::string EntityHorse::MARKING_HASHES[EntityHorse::MARKINGS] = { "", "wo_", "wmo", "wdo", "bdo"}; bool HorseEntitySelector::matches(std::shared_ptr entity) const { - return entity->instanceof - (eTYPE_HORSE) && - std::dynamic_pointer_cast(entity)->isBred(); + return entity->instanceof(eTYPE_HORSE) && + std::dynamic_pointer_cast(entity)->isBred(); } EntityHorse::EntityHorse(Level* level) : Animal(level) { @@ -312,7 +311,7 @@ bool EntityHorse::hurt(DamageSource* damagesource, float dmg) { // 4J: Protect owned horses from untrusted players if (isTamed()) { std::shared_ptr entity = damagesource->getDirectEntity(); - if (entity != nullptr && entity->instanceof (eTYPE_PLAYER)) { + if (entity != nullptr && entity->instanceof(eTYPE_PLAYER)) { std::shared_ptr attacker = std::dynamic_pointer_cast(entity); attacker->canHarmPlayer(getOwnerName()); @@ -1508,7 +1507,7 @@ void EntityHorse::positionRider() { y + getRideHeight() + rider.lock()->getRidingHeight() + height, z - dist * cos); - if (rider.lock()->instanceof (eTYPE_LIVINGENTITY)) { + if (rider.lock()->instanceof(eTYPE_LIVINGENTITY)) { std::shared_ptr livingRider = std::dynamic_pointer_cast(rider.lock()); livingRider->yBodyRot = yBodyRot; diff --git a/targets/minecraft/world/entity/animal/Ocelot.cpp b/targets/minecraft/world/entity/animal/Ocelot.cpp index c7e42f54b..4be10a765 100644 --- a/targets/minecraft/world/entity/animal/Ocelot.cpp +++ b/targets/minecraft/world/entity/animal/Ocelot.cpp @@ -5,12 +5,12 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/IGameServices.h" #include "minecraft/SharedConstants.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" diff --git a/targets/minecraft/world/entity/animal/Pig.cpp b/targets/minecraft/world/entity/animal/Pig.cpp index 609b6750b..697e0d17f 100644 --- a/targets/minecraft/world/entity/animal/Pig.cpp +++ b/targets/minecraft/world/entity/animal/Pig.cpp @@ -5,8 +5,8 @@ #include #include -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/SyncedEntityData.h" @@ -150,8 +150,8 @@ void Pig::thunderHit(const LightningBolt* lightningBolt) { void Pig::causeFallDamage(float distance) { Animal::causeFallDamage(distance); - if ((distance > 5) && rider.lock() != nullptr && rider.lock()->instanceof - (eTYPE_PLAYER)) { + if ((distance > 5) && rider.lock() != nullptr && + rider.lock()->instanceof(eTYPE_PLAYER)) { (std::dynamic_pointer_cast(rider.lock())) ->awardStat(GenericStats::flyPig(), GenericStats::param_flyPig()); } diff --git a/targets/minecraft/world/entity/animal/Sheep.cpp b/targets/minecraft/world/entity/animal/Sheep.cpp index e55db0f65..c9504bc9c 100644 --- a/targets/minecraft/world/entity/animal/Sheep.cpp +++ b/targets/minecraft/world/entity/animal/Sheep.cpp @@ -6,8 +6,8 @@ #include #include -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/world/entity/AgeableMob.h" #include "minecraft/world/entity/EntityEvent.h" diff --git a/targets/minecraft/world/entity/animal/SnowMan.cpp b/targets/minecraft/world/entity/animal/SnowMan.cpp index 08ffbdb68..43d9b38ca 100644 --- a/targets/minecraft/world/entity/animal/SnowMan.cpp +++ b/targets/minecraft/world/entity/animal/SnowMan.cpp @@ -2,9 +2,9 @@ #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/SharedConstants.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/LivingEntity.h" diff --git a/targets/minecraft/world/entity/animal/VillagerGolem.cpp b/targets/minecraft/world/entity/animal/VillagerGolem.cpp index 622264846..95e5d3420 100644 --- a/targets/minecraft/world/entity/animal/VillagerGolem.cpp +++ b/targets/minecraft/world/entity/animal/VillagerGolem.cpp @@ -2,10 +2,10 @@ #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/Pos.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" @@ -110,7 +110,7 @@ int VillagerGolem::decreaseAirSupply(int currentSupply) { } void VillagerGolem::doPush(std::shared_ptr e) { - if (e->instanceof (eTYPE_ENEMY)) { + if (e->instanceof(eTYPE_ENEMY)) { if (getRandom()->nextInt(20) == 0) { setTarget(std::dynamic_pointer_cast(e)); } @@ -239,7 +239,7 @@ bool VillagerGolem::hurt(DamageSource* source, float dmg) { // 4J: Protect owned golem from untrusted players if (isPlayerCreated()) { std::shared_ptr entity = source->getDirectEntity(); - if (entity != nullptr && entity->instanceof (eTYPE_PLAYER)) { + if (entity != nullptr && entity->instanceof(eTYPE_PLAYER)) { std::shared_ptr player = std::dynamic_pointer_cast(entity); if (!player->isAllowedToAttackPlayers()) return false; diff --git a/targets/minecraft/world/entity/animal/Wolf.cpp b/targets/minecraft/world/entity/animal/Wolf.cpp index 4f032a715..0ed85be47 100644 --- a/targets/minecraft/world/entity/animal/Wolf.cpp +++ b/targets/minecraft/world/entity/animal/Wolf.cpp @@ -6,10 +6,10 @@ #include #include "Sheep.h" +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/SharedConstants.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" @@ -262,7 +262,7 @@ bool Wolf::hurt(DamageSource* source, float dmg) { // 4J: Protect owned wolves from untrusted players if (isTame()) { std::shared_ptr entity = source->getDirectEntity(); - if (entity != nullptr && entity->instanceof (eTYPE_PLAYER)) { + if (entity != nullptr && entity->instanceof(eTYPE_PLAYER)) { std::shared_ptr attacker = std::dynamic_pointer_cast(entity); attacker->canHarmPlayer(getOwnerUUID()); @@ -272,9 +272,8 @@ bool Wolf::hurt(DamageSource* source, float dmg) { if (isInvulnerable()) return false; std::shared_ptr sourceEntity = source->getEntity(); sitGoal->wantToSit(false); - if (sourceEntity != nullptr && - !(sourceEntity->instanceof (eTYPE_PLAYER) || sourceEntity->instanceof - (eTYPE_ARROW))) { + if (sourceEntity != nullptr && !(sourceEntity->instanceof(eTYPE_PLAYER) || + sourceEntity->instanceof(eTYPE_ARROW))) { // Take half damage from non-players and arrows dmg = (dmg + 1) / 2; } @@ -488,7 +487,7 @@ bool Wolf::canMate(std::shared_ptr animal) { if (animal == shared_from_this()) return false; if (!isTame()) return false; - if (!animal->instanceof (eTYPE_WOLF)) return false; + if (!animal->instanceof(eTYPE_WOLF)) return false; std::shared_ptr partner = std::dynamic_pointer_cast(animal); if (partner == nullptr) return false; @@ -521,10 +520,9 @@ bool Wolf::wantsToAttack(std::shared_ptr target, return false; } } - if (target->instanceof (eTYPE_PLAYER) && owner->instanceof - (eTYPE_PLAYER) && - !std::dynamic_pointer_cast(owner)->canHarmPlayer( - std::dynamic_pointer_cast(target))) { + if (target->instanceof(eTYPE_PLAYER) && owner->instanceof(eTYPE_PLAYER) && + !std::dynamic_pointer_cast(owner)->canHarmPlayer( + std::dynamic_pointer_cast(target))) { // pvp is off return false; } diff --git a/targets/minecraft/world/entity/boss/enderdragon/EnderCrystal.cpp b/targets/minecraft/world/entity/boss/enderdragon/EnderCrystal.cpp index 9b8b9874f..5fb271662 100644 --- a/targets/minecraft/world/entity/boss/enderdragon/EnderCrystal.cpp +++ b/targets/minecraft/world/entity/boss/enderdragon/EnderCrystal.cpp @@ -74,8 +74,8 @@ bool EnderCrystal::hurt(DamageSource* source, float damage) { // 4J-PB - if the owner of the source is the enderdragon, then ignore it // (where the dragon's fireball hits an endercrystal) - if (source->getEntity() != nullptr && source->getEntity()->instanceof - (eTYPE_ENDERDRAGON)) { + if (source->getEntity() != nullptr && + source->getEntity()->instanceof(eTYPE_ENDERDRAGON)) { return false; } diff --git a/targets/minecraft/world/entity/boss/enderdragon/EnderDragon.cpp b/targets/minecraft/world/entity/boss/enderdragon/EnderDragon.cpp index 89c060c67..d95771a89 100644 --- a/targets/minecraft/world/entity/boss/enderdragon/EnderDragon.cpp +++ b/targets/minecraft/world/entity/boss/enderdragon/EnderDragon.cpp @@ -5,10 +5,10 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/SharedConstants.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Log.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" @@ -482,7 +482,7 @@ void EnderDragon::aiStep() { level->getEntities(shared_from_this(), &m_acidArea); for (auto it = targets->begin(); it != targets->end(); ++it) { - if ((*it)->instanceof (eTYPE_LIVINGENTITY)) { + if ((*it)->instanceof(eTYPE_LIVINGENTITY)) { // Log::info("Attacking entity with acid\n"); std::shared_ptr e = std::dynamic_pointer_cast(*it); @@ -878,7 +878,7 @@ void EnderDragon::knockBack(std::vector >* entities) { // for (Entity e : entities) for (auto it = entities->begin(); it != entities->end(); ++it) { - if ((*it)->instanceof (eTYPE_LIVINGENTITY)) //(e instanceof Mob) + if ((*it)->instanceof(eTYPE_LIVINGENTITY)) //(e instanceof Mob) { std::shared_ptr e = std::dynamic_pointer_cast(*it); @@ -893,7 +893,7 @@ void EnderDragon::knockBack(std::vector >* entities) { void EnderDragon::hurt(std::vector >* entities) { // for (int i = 0; i < entities->size(); i++) for (auto it = entities->begin(); it != entities->end(); ++it) { - if ((*it)->instanceof (eTYPE_LIVINGENTITY)) //(e instanceof Mob) + if ((*it)->instanceof(eTYPE_LIVINGENTITY)) //(e instanceof Mob) { std::shared_ptr e = std::dynamic_pointer_cast( @@ -1147,8 +1147,9 @@ bool EnderDragon::hurt(std::shared_ptr MultiEntityMobPart, // zTarget = z - cc1 * 5 + (random->nextFloat() - 0.5f) * 2; // attackTarget = nullptr; - if (source->getEntity() != nullptr && source->getEntity()->instanceof - (eTYPE_PLAYER) || source->isExplosion()) { + if (source->getEntity() != nullptr && + source->getEntity()->instanceof(eTYPE_PLAYER) || + source->isExplosion()) { int healthBefore = getHealth(); reallyHurt(source, damage); @@ -1468,8 +1469,8 @@ void EnderDragon::handleCrystalDestroyed(DamageSource* source) { Log::info("Dragon action is now: LandingApproach\n"); #endif } - } else if (source->getEntity() != nullptr && source->getEntity()->instanceof - (eTYPE_PLAYER)) { + } else if (source->getEntity() != nullptr && + source->getEntity()->instanceof(eTYPE_PLAYER)) { if (setSynchedAction(e_EnderdragonAction_StrafePlayer)) { attackTarget = std::dynamic_pointer_cast(source->getEntity()); @@ -1871,7 +1872,9 @@ double EnderDragon::getHeadPartYRotDiff(int partIndex, // result = m_headYRot / (7 - partIndex); // } // else - { result = partPos[0] - bodyPos[0]; } + { + result = partPos[0] - bodyPos[0]; + } // Log::info("Part %d is at %f\n", partIndex, result); return result; } diff --git a/targets/minecraft/world/entity/boss/wither/WitherBoss.cpp b/targets/minecraft/world/entity/boss/wither/WitherBoss.cpp index 142249f77..83f12546d 100644 --- a/targets/minecraft/world/entity/boss/wither/WitherBoss.cpp +++ b/targets/minecraft/world/entity/boss/wither/WitherBoss.cpp @@ -8,9 +8,9 @@ #include #include "SharedConstants.h" +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/Difficulty.h" #include "minecraft/world/damageSource/DamageSource.h" @@ -43,7 +43,7 @@ #include "nbt/CompoundTag.h" bool LivingEntitySelector::matches(std::shared_ptr entity) const { - if (entity->instanceof (eTYPE_LIVINGENTITY)) { + if (entity->instanceof(eTYPE_LIVINGENTITY)) { return std::dynamic_pointer_cast(entity)->getMobType() != UNDEAD; } else { @@ -261,9 +261,10 @@ void WitherBoss::newServerAiStep() { // 4J: Added check for instance of living entity, had a problem // with IDs being recycled to other entities - if (current == nullptr || !current->instanceof - (eTYPE_LIVINGENTITY) || !current->isAlive() || - distanceToSqr(current) > 30 * 30 || !canSee(current)) { + if (current == nullptr || + !current->instanceof(eTYPE_LIVINGENTITY) || + !current->isAlive() || distanceToSqr(current) > 30 * 30 || + !canSee(current)) { setAlternativeTarget(i, 0); } else { performRangedAttack( @@ -289,16 +290,16 @@ void WitherBoss::newServerAiStep() { if (selected != shared_from_this() && selected->isAlive() && canSee(selected)) { - if (selected->instanceof (eTYPE_PLAYER)) { + if (selected->instanceof(eTYPE_PLAYER)) { if (!std::dynamic_pointer_cast(selected) ->abilities.invulnerable) { - assert(selected->instanceof - (eTYPE_LIVINGENTITY)); + assert( + selected->instanceof(eTYPE_LIVINGENTITY)); setAlternativeTarget(i, selected->entityId); } break; } else { - assert(selected->instanceof (eTYPE_LIVINGENTITY)); + assert(selected->instanceof(eTYPE_LIVINGENTITY)); setAlternativeTarget(i, selected->entityId); break; } @@ -311,7 +312,7 @@ void WitherBoss::newServerAiStep() { } } if (getTarget() != nullptr) { - assert(getTarget()->instanceof (eTYPE_LIVINGENTITY)); + assert(getTarget()->instanceof(eTYPE_LIVINGENTITY)); setAlternativeTarget(0, getTarget()->entityId); } else { setAlternativeTarget(0, 0); @@ -457,11 +458,10 @@ bool WitherBoss::hurt(DamageSource* source, float dmg) { std::shared_ptr sourceEntity = source->getEntity(); if (sourceEntity != nullptr) { - if (sourceEntity->instanceof (eTYPE_PLAYER)) { - } else if (sourceEntity->instanceof - (eTYPE_LIVINGENTITY) && - std::dynamic_pointer_cast(sourceEntity) - ->getMobType() == getMobType()) { + if (sourceEntity->instanceof(eTYPE_PLAYER)) { + } else if (sourceEntity->instanceof(eTYPE_LIVINGENTITY) && + std::dynamic_pointer_cast(sourceEntity) + ->getMobType() == getMobType()) { // can't be harmed by other undead return false; } diff --git a/targets/minecraft/world/entity/global/GlobalEntity.h b/targets/minecraft/world/entity/global/GlobalEntity.h index b7c5ae576..2247ce7f6 100644 --- a/targets/minecraft/world/entity/global/GlobalEntity.h +++ b/targets/minecraft/world/entity/global/GlobalEntity.h @@ -6,5 +6,5 @@ class Level; // class GlobalEntity : public Entity class GlobalEntity : public Entity { public: - GlobalEntity(Level* level) : Entity(level){}; + GlobalEntity(Level* level) : Entity(level) {}; }; \ No newline at end of file diff --git a/targets/minecraft/world/entity/global/LightningBolt.cpp b/targets/minecraft/world/entity/global/LightningBolt.cpp index 46f2d7285..2012f473c 100644 --- a/targets/minecraft/world/entity/global/LightningBolt.cpp +++ b/targets/minecraft/world/entity/global/LightningBolt.cpp @@ -5,10 +5,10 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/global/GlobalEntity.h" diff --git a/targets/minecraft/world/entity/item/Boat.cpp b/targets/minecraft/world/entity/item/Boat.cpp index afa2118f6..9c438d17d 100644 --- a/targets/minecraft/world/entity/item/Boat.cpp +++ b/targets/minecraft/world/entity/item/Boat.cpp @@ -87,10 +87,9 @@ bool Boat::hurt(DamageSource* source, float hurtDamage) { if (dynamic_cast(source) != nullptr) { std::shared_ptr attacker = source->getDirectEntity(); - if (attacker->instanceof - (eTYPE_PLAYER) && - !std::dynamic_pointer_cast(attacker) - ->isAllowedToHurtEntity(shared_from_this())) { + if (attacker->instanceof(eTYPE_PLAYER) && + !std::dynamic_pointer_cast(attacker)->isAllowedToHurtEntity( + shared_from_this())) { return false; } } @@ -112,9 +111,9 @@ bool Boat::hurt(DamageSource* source, float hurtDamage) { // Minecarts and boat requires more hits than one to be destroyed in // creative mode 4J-PB - Fix for XB1 #175735 - [CRASH] [Multi-Plat]: Code: // Gameplay: Placing a boat on harmful surfaces causes the game to crash - bool creativePlayer = - (source->getEntity() != nullptr) && source->getEntity()->instanceof - (eTYPE_PLAYER) && std::dynamic_pointer_cast(source->getEntity()) + bool creativePlayer = (source->getEntity() != nullptr) && + source->getEntity()->instanceof(eTYPE_PLAYER) && + std::dynamic_pointer_cast(source->getEntity()) ->abilities.instabuild; if (creativePlayer || getDamage() > 20 * 2) { @@ -254,8 +253,8 @@ void Boat::tick() { yd += 0.007f; } - if (rider.lock() != nullptr && rider.lock()->instanceof - (eTYPE_LIVINGENTITY)) { + if (rider.lock() != nullptr && + rider.lock()->instanceof(eTYPE_LIVINGENTITY)) { std::shared_ptr livingRider = std::dynamic_pointer_cast(rider.lock()); double forward = livingRider->yya; @@ -380,8 +379,8 @@ float Boat::getShadowHeightOffs() { return 0; } std::string Boat::getName() { return "Boat"; } bool Boat::interact(std::shared_ptr player) { - if ((rider.lock() != nullptr) && rider.lock()->instanceof - (eTYPE_PLAYER) && (rider.lock() != player)) + if ((rider.lock() != nullptr) && rider.lock()->instanceof(eTYPE_PLAYER) && + (rider.lock() != player)) return true; if (!level->isClientSide) { // 4J HEG - Fixed issue with player not being able to dismount boat diff --git a/targets/minecraft/world/entity/item/ItemEntity.cpp b/targets/minecraft/world/entity/item/ItemEntity.cpp index 3101b474a..911bd226b 100644 --- a/targets/minecraft/world/entity/item/ItemEntity.cpp +++ b/targets/minecraft/world/entity/item/ItemEntity.cpp @@ -7,9 +7,9 @@ #include #include "SharedConstants.h" +#include "app/common/Audio/SoundTypes.h" #include "java/JavaMath.h" #include "java/Random.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/util/Log.h" #include "minecraft/util/Mth.h" diff --git a/targets/minecraft/world/entity/item/Minecart.cpp b/targets/minecraft/world/entity/item/Minecart.cpp index db3694254..6a732674a 100644 --- a/targets/minecraft/world/entity/item/Minecart.cpp +++ b/targets/minecraft/world/entity/item/Minecart.cpp @@ -153,10 +153,9 @@ bool Minecart::hurt(DamageSource* source, float hurtDamage) { if (dynamic_cast(source) != nullptr) { std::shared_ptr attacker = source->getDirectEntity(); - if (attacker->instanceof - (eTYPE_PLAYER) && - !std::dynamic_pointer_cast(attacker) - ->isAllowedToHurtEntity(shared_from_this())) { + if (attacker->instanceof(eTYPE_PLAYER) && + !std::dynamic_pointer_cast(attacker)->isAllowedToHurtEntity( + shared_from_this())) { return false; } } @@ -173,9 +172,9 @@ bool Minecart::hurt(DamageSource* source, float hurtDamage) { if (rider.lock() != nullptr && rider.lock() == source->getEntity()) hurtDamage += 1; - bool creativePlayer = - source->getEntity() != nullptr && source->getEntity()->instanceof - (eTYPE_PLAYER) && std::dynamic_pointer_cast(source->getEntity()) + bool creativePlayer = source->getEntity() != nullptr && + source->getEntity()->instanceof(eTYPE_PLAYER) && + std::dynamic_pointer_cast(source->getEntity()) ->abilities.instabuild; if (creativePlayer || getDamage() > 20 * 2) { @@ -336,8 +335,8 @@ void Minecart::tick() { auto itEnd = entities->end(); for (auto it = entities->begin(); it != itEnd; it++) { std::shared_ptr e = (*it); // entities->at(i); - if (e != rider.lock() && e->isPushable() && e->instanceof - (eTYPE_MINECART)) { + if (e != rider.lock() && e->isPushable() && + e->instanceof(eTYPE_MINECART)) { std::shared_ptr cart = std::dynamic_pointer_cast(e); cart->m_bHasPushedCartThisTick = false; @@ -431,8 +430,8 @@ void Minecart::moveAlongTrack(int xt, int yt, int zt, double maxSpeed, xd = pow * xD / dd; zd = pow * zD / dd; - if (rider.lock() != nullptr && rider.lock()->instanceof - (eTYPE_LIVINGENTITY)) { + if (rider.lock() != nullptr && + rider.lock()->instanceof(eTYPE_LIVINGENTITY)) { std::shared_ptr living = std::dynamic_pointer_cast(rider.lock()); @@ -719,10 +718,9 @@ void Minecart::push(std::shared_ptr e) { if (level->isClientSide) return; if (e == rider.lock()) return; - if (e->instanceof (eTYPE_LIVINGENTITY) && !e->instanceof - (eTYPE_PLAYER) && !e->instanceof - (eTYPE_VILLAGERGOLEM) && (getType() == TYPE_RIDEABLE) && - (xd * xd + zd * zd > 0.01)) { + if (e->instanceof(eTYPE_LIVINGENTITY) && !e->instanceof(eTYPE_PLAYER) && + !e->instanceof(eTYPE_VILLAGERGOLEM) && (getType() == TYPE_RIDEABLE) && + (xd * xd + zd * zd > 0.01)) { if ((rider.lock() == nullptr) && (e->riding == nullptr)) { e->ride(shared_from_this()); } @@ -748,7 +746,7 @@ void Minecart::push(std::shared_ptr e) { xa *= 0.5; za *= 0.5; - if (e->instanceof (eTYPE_MINECART)) { + if (e->instanceof(eTYPE_MINECART)) { double xo = e->x - x; double zo = e->z - z; diff --git a/targets/minecraft/world/entity/item/MinecartRideable.cpp b/targets/minecraft/world/entity/item/MinecartRideable.cpp index 69e58982f..e094947a2 100644 --- a/targets/minecraft/world/entity/item/MinecartRideable.cpp +++ b/targets/minecraft/world/entity/item/MinecartRideable.cpp @@ -21,8 +21,8 @@ MinecartRideable::MinecartRideable(Level* level, double x, double y, double z) } bool MinecartRideable::interact(std::shared_ptr player) { - if (rider.lock() != nullptr && rider.lock()->instanceof - (eTYPE_PLAYER) && rider.lock() != player) + if (rider.lock() != nullptr && rider.lock()->instanceof(eTYPE_PLAYER) && + rider.lock() != player) return true; if (rider.lock() != nullptr && rider.lock() != player) return false; if (!level->isClientSide) { diff --git a/targets/minecraft/world/entity/item/MinecartTNT.cpp b/targets/minecraft/world/entity/item/MinecartTNT.cpp index a2fb4839e..5ce6305d7 100644 --- a/targets/minecraft/world/entity/item/MinecartTNT.cpp +++ b/targets/minecraft/world/entity/item/MinecartTNT.cpp @@ -5,9 +5,9 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/item/Minecart.h" #include "minecraft/world/item/ItemInstance.h" diff --git a/targets/minecraft/world/entity/monster/Blaze.cpp b/targets/minecraft/world/entity/monster/Blaze.cpp index acfcf9adc..76648aee0 100644 --- a/targets/minecraft/world/entity/monster/Blaze.cpp +++ b/targets/minecraft/world/entity/monster/Blaze.cpp @@ -6,10 +6,10 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/SharedConstants.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/Mob.h" diff --git a/targets/minecraft/world/entity/monster/CaveSpider.cpp b/targets/minecraft/world/entity/monster/CaveSpider.cpp index 6e8cf0c2f..7ac2661e6 100644 --- a/targets/minecraft/world/entity/monster/CaveSpider.cpp +++ b/targets/minecraft/world/entity/monster/CaveSpider.cpp @@ -29,7 +29,7 @@ void CaveSpider::registerAttributes() { bool CaveSpider::doHurtTarget(std::shared_ptr target) { if (Spider::doHurtTarget(target)) { - if (target->instanceof (eTYPE_LIVINGENTITY)) { + if (target->instanceof(eTYPE_LIVINGENTITY)) { int poisonTime = 0; if (level->difficulty <= Difficulty::EASY) { // No poison! diff --git a/targets/minecraft/world/entity/monster/Creeper.cpp b/targets/minecraft/world/entity/monster/Creeper.cpp index 51658fbbc..e898c1097 100644 --- a/targets/minecraft/world/entity/monster/Creeper.cpp +++ b/targets/minecraft/world/entity/monster/Creeper.cpp @@ -5,8 +5,8 @@ #include #include -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" @@ -140,8 +140,8 @@ int Creeper::getDeathSound() { return eSoundType_MOB_CREEPER_DEATH; } void Creeper::die(DamageSource* source) { Monster::die(source); - if (source->getEntity() != nullptr && source->getEntity()->instanceof - (eTYPE_SKELETON)) { + if (source->getEntity() != nullptr && + source->getEntity()->instanceof(eTYPE_SKELETON)) { int recordId = Item::record_01_Id + random->nextInt(Item::record_12_Id - Item::record_01_Id + 1); @@ -149,10 +149,9 @@ void Creeper::die(DamageSource* source) { } if (source->getDirectEntity() != nullptr && - source->getDirectEntity()->instanceof - (eTYPE_ARROW) && source->getEntity() != nullptr && - source->getEntity()->instanceof - (eTYPE_PLAYER)) { + source->getDirectEntity()->instanceof(eTYPE_ARROW) && + source->getEntity() != nullptr && + source->getEntity()->instanceof(eTYPE_PLAYER)) { std::shared_ptr player = std::dynamic_pointer_cast(source->getEntity()); player->awardStat(GenericStats::archer(), GenericStats::param_archer()); diff --git a/targets/minecraft/world/entity/monster/EnderMan.cpp b/targets/minecraft/world/entity/monster/EnderMan.cpp index 63ca47f99..8d7f39f77 100644 --- a/targets/minecraft/world/entity/monster/EnderMan.cpp +++ b/targets/minecraft/world/entity/monster/EnderMan.cpp @@ -7,10 +7,10 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/IGameServices.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/damageSource/EntityDamageSource.h" @@ -239,10 +239,9 @@ void EnderMan::aiStep() { if (!level->isClientSide && isAlive()) { if (attackTarget != nullptr) { - if (attackTarget->instanceof - (eTYPE_PLAYER) && - isLookingAtMe( - std::dynamic_pointer_cast(attackTarget))) { + if (attackTarget->instanceof(eTYPE_PLAYER) && + isLookingAtMe( + std::dynamic_pointer_cast(attackTarget))) { if (attackTarget->distanceToSqr(shared_from_this()) < 4 * 4) { teleport(); } @@ -381,8 +380,7 @@ bool EnderMan::hurt(DamageSource* source, float damage) { setCreepy(true); if (dynamic_cast(source) != nullptr && - source->getEntity()->instanceof - (eTYPE_PLAYER)) { + source->getEntity()->instanceof(eTYPE_PLAYER)) { aggroedByPlayer = true; } diff --git a/targets/minecraft/world/entity/monster/Enemy.cpp b/targets/minecraft/world/entity/monster/Enemy.cpp index 919b72fb1..2287f73d3 100644 --- a/targets/minecraft/world/entity/monster/Enemy.cpp +++ b/targets/minecraft/world/entity/monster/Enemy.cpp @@ -10,5 +10,5 @@ class EntitySelector; EntitySelector* Enemy::ENEMY_SELECTOR = new Enemy::EnemyEntitySelector(); bool Enemy::EnemyEntitySelector::matches(std::shared_ptr entity) const { - return (entity != nullptr) && entity->instanceof (eTYPE_ENEMY); + return (entity != nullptr) && entity->instanceof(eTYPE_ENEMY); } \ No newline at end of file diff --git a/targets/minecraft/world/entity/monster/Ghast.cpp b/targets/minecraft/world/entity/monster/Ghast.cpp index bf2ed2292..4e1f85260 100644 --- a/targets/minecraft/world/entity/monster/Ghast.cpp +++ b/targets/minecraft/world/entity/monster/Ghast.cpp @@ -7,9 +7,9 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/network/packet/ChatPacket.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/world/Difficulty.h" #include "minecraft/world/damageSource/DamageSource.h" @@ -61,8 +61,8 @@ bool Ghast::isCharging() { return entityData->getByte(DATA_IS_CHARGING) != 0; } bool Ghast::hurt(DamageSource* source, float dmg) { if (isInvulnerable()) return false; if (source->getMsgId() == ChatPacket::e_ChatDeathFireball) { - if ((source->getEntity() != nullptr) && source->getEntity()->instanceof - (eTYPE_PLAYER)) { + if ((source->getEntity() != nullptr) && + source->getEntity()->instanceof(eTYPE_PLAYER)) { // reflected fireball, kill the ghast FlyingMob::hurt(source, 1000); std::dynamic_pointer_cast(source->getEntity()) diff --git a/targets/minecraft/world/entity/monster/LavaSlime.cpp b/targets/minecraft/world/entity/monster/LavaSlime.cpp index ccd58d6a2..3fa88d67c 100644 --- a/targets/minecraft/world/entity/monster/LavaSlime.cpp +++ b/targets/minecraft/world/entity/monster/LavaSlime.cpp @@ -3,9 +3,9 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/Difficulty.h" #include "minecraft/world/entity/ai/attributes/AttributeInstance.h" #include "minecraft/world/entity/monster/SharedMonsterAttributes.h" diff --git a/targets/minecraft/world/entity/monster/Monster.cpp b/targets/minecraft/world/entity/monster/Monster.cpp index a474b9934..8926ea2f5 100644 --- a/targets/minecraft/world/entity/monster/Monster.cpp +++ b/targets/minecraft/world/entity/monster/Monster.cpp @@ -84,7 +84,7 @@ bool Monster::doHurtTarget(std::shared_ptr target) { (float)getAttribute(SharedMonsterAttributes::ATTACK_DAMAGE)->getValue(); int knockback = 0; - if (target->instanceof (eTYPE_LIVINGENTITY)) { + if (target->instanceof(eTYPE_LIVINGENTITY)) { std::shared_ptr livingTarget = std::dynamic_pointer_cast(target); dmg += EnchantmentHelper::getDamageBonus( @@ -115,7 +115,7 @@ bool Monster::doHurtTarget(std::shared_ptr target) { target->setOnFire(fireAspect * 4); } - if (target->instanceof (eTYPE_LIVINGENTITY)) { + if (target->instanceof(eTYPE_LIVINGENTITY)) { std::shared_ptr livingTarget = std::dynamic_pointer_cast(target); ThornsEnchantment::doThornsAfterAttack(shared_from_this(), diff --git a/targets/minecraft/world/entity/monster/PigZombie.cpp b/targets/minecraft/world/entity/monster/PigZombie.cpp index 0423eb059..070bbde47 100644 --- a/targets/minecraft/world/entity/monster/PigZombie.cpp +++ b/targets/minecraft/world/entity/monster/PigZombie.cpp @@ -3,9 +3,9 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/IGameServices.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/Difficulty.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" @@ -105,14 +105,14 @@ std::shared_ptr PigZombie::findAttackTarget() { bool PigZombie::hurt(DamageSource* source, float dmg) { std::shared_ptr sourceEntity = source->getEntity(); - if (sourceEntity != nullptr && sourceEntity->instanceof (eTYPE_PLAYER)) { + if (sourceEntity != nullptr && sourceEntity->instanceof(eTYPE_PLAYER)) { AABB grown = bb.grow(32, 32, 32); std::vector >* nearby = level->getEntities(shared_from_this(), &grown); auto itEnd = nearby->end(); for (auto it = nearby->begin(); it != itEnd; it++) { std::shared_ptr e = *it; // nearby->at(i); - if (e->instanceof (eTYPE_PIGZOMBIE)) { + if (e->instanceof(eTYPE_PIGZOMBIE)) { std::shared_ptr pigZombie = std::dynamic_pointer_cast(e); pigZombie->alert(sourceEntity); diff --git a/targets/minecraft/world/entity/monster/Silverfish.cpp b/targets/minecraft/world/entity/monster/Silverfish.cpp index 4d4f99306..d7b73dbec 100644 --- a/targets/minecraft/world/entity/monster/Silverfish.cpp +++ b/targets/minecraft/world/entity/monster/Silverfish.cpp @@ -2,10 +2,10 @@ #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/Facing.h" #include "minecraft/IGameServices.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/damageSource/EntityDamageSource.h" diff --git a/targets/minecraft/world/entity/monster/Skeleton.cpp b/targets/minecraft/world/entity/monster/Skeleton.cpp index c9bec989d..34d8a6122 100644 --- a/targets/minecraft/world/entity/monster/Skeleton.cpp +++ b/targets/minecraft/world/entity/monster/Skeleton.cpp @@ -7,9 +7,9 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/SharedConstants.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" @@ -106,8 +106,8 @@ void Skeleton::playStepSound(int xt, int yt, int zt, int t) { bool Skeleton::doHurtTarget(std::shared_ptr target) { if (Monster::doHurtTarget(target)) { - if ((getSkeletonType() == TYPE_WITHER) && target->instanceof - (eTYPE_LIVINGENTITY)) { + if ((getSkeletonType() == TYPE_WITHER) && + target->instanceof(eTYPE_LIVINGENTITY)) { std::dynamic_pointer_cast(target)->addEffect( new MobEffectInstance(MobEffect::wither->id, SharedConstants::TICKS_PER_SECOND * 10)); @@ -158,7 +158,7 @@ void Skeleton::aiStep() { void Skeleton::rideTick() { Monster::rideTick(); - if (riding != nullptr && riding->instanceof (eTYPE_PATHFINDER_MOB)) { + if (riding != nullptr && riding->instanceof(eTYPE_PATHFINDER_MOB)) { yBodyRot = std::dynamic_pointer_cast(riding)->yBodyRot; } } @@ -167,10 +167,9 @@ void Skeleton::die(DamageSource* source) { Monster::die(source); if (source->getDirectEntity() != nullptr && - source->getDirectEntity()->instanceof - (eTYPE_ARROW) && source->getEntity() != nullptr && - source->getEntity()->instanceof - (eTYPE_PLAYER)) { + source->getDirectEntity()->instanceof(eTYPE_ARROW) && + source->getEntity() != nullptr && + source->getEntity()->instanceof(eTYPE_PLAYER)) { std::shared_ptr player = std::dynamic_pointer_cast(source->getEntity()); diff --git a/targets/minecraft/world/entity/monster/Slime.cpp b/targets/minecraft/world/entity/monster/Slime.cpp index 79ddcc2e4..ca7de4e7f 100644 --- a/targets/minecraft/world/entity/monster/Slime.cpp +++ b/targets/minecraft/world/entity/monster/Slime.cpp @@ -6,9 +6,9 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/Difficulty.h" #include "minecraft/world/damageSource/DamageSource.h" diff --git a/targets/minecraft/world/entity/monster/Spider.cpp b/targets/minecraft/world/entity/monster/Spider.cpp index 64a8167c0..c195c6b7f 100644 --- a/targets/minecraft/world/entity/monster/Spider.cpp +++ b/targets/minecraft/world/entity/monster/Spider.cpp @@ -6,9 +6,9 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/IGameServices.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/Difficulty.h" #include "minecraft/world/effect/MobEffect.h" #include "minecraft/world/effect/MobEffectInstance.h" diff --git a/targets/minecraft/world/entity/monster/Witch.cpp b/targets/minecraft/world/entity/monster/Witch.cpp index 1f0cc9798..ac276a336 100644 --- a/targets/minecraft/world/entity/monster/Witch.cpp +++ b/targets/minecraft/world/entity/monster/Witch.cpp @@ -3,10 +3,10 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/SharedConstants.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/effect/MobEffect.h" diff --git a/targets/minecraft/world/entity/monster/Zombie.cpp b/targets/minecraft/world/entity/monster/Zombie.cpp index 1176a2c14..73a7c7ea1 100644 --- a/targets/minecraft/world/entity/monster/Zombie.cpp +++ b/targets/minecraft/world/entity/monster/Zombie.cpp @@ -8,8 +8,8 @@ #include #include "SharedConstants.h" -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/util/Mth.h" #include "minecraft/world/Difficulty.h" @@ -179,12 +179,10 @@ bool Zombie::hurt(DamageSource* source, float dmg) { if (Monster::hurt(source, dmg)) { std::shared_ptr target = getTarget(); if ((target == nullptr) && getAttackTarget() != nullptr && - getAttackTarget()->instanceof - (eTYPE_LIVINGENTITY)) + getAttackTarget()->instanceof(eTYPE_LIVINGENTITY)) target = std::dynamic_pointer_cast(getAttackTarget()); if ((target == nullptr) && source->getEntity() != nullptr && - source->getEntity()->instanceof - (eTYPE_LIVINGENTITY)) + source->getEntity()->instanceof(eTYPE_LIVINGENTITY)) target = std::dynamic_pointer_cast(source->getEntity()); diff --git a/targets/minecraft/world/entity/npc/Villager.cpp b/targets/minecraft/world/entity/npc/Villager.cpp index 515828054..96c02961b 100644 --- a/targets/minecraft/world/entity/npc/Villager.cpp +++ b/targets/minecraft/world/entity/npc/Villager.cpp @@ -6,10 +6,10 @@ #include "Pos.h" #include "SharedConstants.h" +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/IGameServices.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/effect/MobEffect.h" @@ -272,7 +272,7 @@ void Villager::setLastHurtByMob(std::shared_ptr mob) { if (_village != nullptr && mob != nullptr) { _village->addAggressor(mob); - if (mob->instanceof (eTYPE_PLAYER)) { + if (mob->instanceof(eTYPE_PLAYER)) { int amount = -1; if (isBaby()) { amount = -3; @@ -292,11 +292,11 @@ void Villager::die(DamageSource* source) { if (_village != nullptr) { std::shared_ptr sourceEntity = source->getEntity(); if (sourceEntity != nullptr) { - if (sourceEntity->instanceof (eTYPE_PLAYER)) { + if (sourceEntity->instanceof(eTYPE_PLAYER)) { _village->modifyStanding( std::dynamic_pointer_cast(sourceEntity)->getName(), -2); - } else if (sourceEntity->instanceof (eTYPE_ENEMY)) { + } else if (sourceEntity->instanceof(eTYPE_ENEMY)) { _village->resetNoBreedTimer(); } } else if (sourceEntity == nullptr) { diff --git a/targets/minecraft/world/entity/player/Player.cpp b/targets/minecraft/world/entity/player/Player.cpp index 18e353701..fcde9eba2 100644 --- a/targets/minecraft/world/entity/player/Player.cpp +++ b/targets/minecraft/world/entity/player/Player.cpp @@ -21,7 +21,7 @@ #include "Inventory.h" #include "Player.h" -#include "minecraft/client/skins/ISkinAssetData.h" +#include "app/common/Audio/SoundTypes.h" #include "java/JavaMath.h" #include "java/Random.h" #include "minecraft/Direction.h" @@ -31,8 +31,8 @@ #include "minecraft/SharedConstants.h" #include "minecraft/client/model/HumanoidModel.h" #include "minecraft/client/renderer/Textures.h" +#include "minecraft/client/skins/ISkinAssetData.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/util/Mth.h" #include "minecraft/world/Difficulty.h" @@ -1208,7 +1208,7 @@ bool Player::hurt(DamageSource* source, float dmg) { if (dmg == 0) return false; std::shared_ptr attacker = source->getEntity(); - if (attacker != nullptr && attacker->instanceof (eTYPE_ARROW)) { + if (attacker != nullptr && attacker->instanceof(eTYPE_ARROW)) { std::shared_ptr arrow = std::dynamic_pointer_cast(attacker); if (arrow->owner != nullptr) { @@ -1319,7 +1319,7 @@ bool Player::interact(std::shared_ptr entity) { return true; } - if ((item != nullptr) && entity->instanceof (eTYPE_LIVINGENTITY)) { + if ((item != nullptr) && entity->instanceof(eTYPE_LIVINGENTITY)) { // 4J - PC Comments // Hack to prevent item stacks from decrementing if the player has // the ability to instabuild @@ -1363,7 +1363,7 @@ void Player::attack(std::shared_ptr entity) { int knockback = 0; float magicBoost = 0; - if (entity->instanceof (eTYPE_LIVINGENTITY)) { + if (entity->instanceof(eTYPE_LIVINGENTITY)) { std::shared_ptr thisPlayer = std::dynamic_pointer_cast(shared_from_this()); std::shared_ptr mob = @@ -1378,8 +1378,8 @@ void Player::attack(std::shared_ptr entity) { if (dmg > 0 || magicBoost > 0) { bool bCrit = fallDistance > 0 && !onGround && !onLadder() && !isInWater() && !hasEffect(MobEffect::blindness) && - (riding == nullptr) && entity->instanceof - (eTYPE_LIVINGENTITY); + (riding == nullptr) && + entity->instanceof(eTYPE_LIVINGENTITY); if (bCrit && dmg > 0) { dmg *= 1.5f; } @@ -1390,8 +1390,8 @@ void Player::attack(std::shared_ptr entity) { bool setOnFireTemporatily = false; int fireAspect = EnchantmentHelper::getFireAspect( std::dynamic_pointer_cast(shared_from_this())); - if (entity->instanceof - (eTYPE_MOB) && fireAspect > 0 && !entity->isOnFire()) { + if (entity->instanceof(eTYPE_MOB) && fireAspect > 0 && + !entity->isOnFire()) { setOnFireTemporatily = true; entity->setOnFire(1); } @@ -1423,7 +1423,7 @@ void Player::attack(std::shared_ptr entity) { } setLastHurtMob(entity); - if (entity->instanceof (eTYPE_LIVINGENTITY)) { + if (entity->instanceof(eTYPE_LIVINGENTITY)) { std::shared_ptr mob = std::dynamic_pointer_cast(entity); ThornsEnchantment::doThornsAfterAttack(shared_from_this(), mob, @@ -1433,17 +1433,17 @@ void Player::attack(std::shared_ptr entity) { std::shared_ptr item = getSelectedItem(); std::shared_ptr hurtTarget = entity; - if (entity->instanceof (eTYPE_MULTIENTITY_MOB_PART)) { + if (entity->instanceof(eTYPE_MULTIENTITY_MOB_PART)) { std::shared_ptr multiMob = std::dynamic_pointer_cast( (std::dynamic_pointer_cast(entity)) ->parentMob.lock()); - if ((multiMob != nullptr) && multiMob->instanceof - (eTYPE_LIVINGENTITY)) { + if ((multiMob != nullptr) && + multiMob->instanceof(eTYPE_LIVINGENTITY)) { hurtTarget = std::dynamic_pointer_cast(multiMob); } } - if ((item != nullptr) && hurtTarget->instanceof (eTYPE_LIVINGENTITY)) { + if ((item != nullptr) && hurtTarget->instanceof(eTYPE_LIVINGENTITY)) { item->hurtEnemy( std::dynamic_pointer_cast(hurtTarget), std::dynamic_pointer_cast(shared_from_this())); @@ -1451,7 +1451,7 @@ void Player::attack(std::shared_ptr entity) { removeSelectedItem(); } } - if (entity->instanceof (eTYPE_LIVINGENTITY)) { + if (entity->instanceof(eTYPE_LIVINGENTITY)) { // awardStat(Stats.damageDealt, (int) Math.round(dmg * 10)); if (fireAspect > 0 && wasHurt) { @@ -1868,7 +1868,7 @@ void Player::checkRidingStatistiscs(double dx, double dy, double dz) { int distance = (int)Math::round(sqrt(dx * dx + dy * dy + dz * dz) * 100.0f); if (distance > 0) { - if (riding->instanceof (eTYPE_MINECART)) { + if (riding->instanceof(eTYPE_MINECART)) { distanceMinecart += distance; if (distanceMinecart >= 100) { int newDistance = @@ -1897,7 +1897,7 @@ void Player::checkRidingStatistiscs(double dx, double dy, double dz) { } } - } else if (riding->instanceof (eTYPE_BOAT)) { + } else if (riding->instanceof(eTYPE_BOAT)) { distanceBoat += distance; if (distanceBoat >= 100) { int newDistance = distanceBoat - (distanceBoat % 100); @@ -1905,7 +1905,7 @@ void Player::checkRidingStatistiscs(double dx, double dy, double dz) { awardStat(GenericStats::boatOneM(), GenericStats::param_boat(newDistance / 100)); } - } else if (riding->instanceof (eTYPE_PIG)) { + } else if (riding->instanceof(eTYPE_PIG)) { distancePig += distance; if (distancePig >= 100) { int newDistance = distancePig - (distancePig % 100); @@ -1937,10 +1937,9 @@ void Player::killed(std::shared_ptr mob) { // 4J-PB - added the lavaslime enemy - fix for #64007 - TU7: Code: // Achievements: TCR#073: Killing Magma Cubes doesn't unlock "Monster // Hunter" Achievement. - if (mob->instanceof (eTYPE_ENEMY) || mob->GetType() == eTYPE_GHAST || - mob->GetType() == eTYPE_SLIME || - mob->GetType() == eTYPE_LAVASLIME || - mob->GetType() == eTYPE_ENDERDRAGON) { + if (mob->instanceof(eTYPE_ENEMY) || mob->GetType() == eTYPE_GHAST || + mob->GetType() == eTYPE_SLIME || mob->GetType() == eTYPE_LAVASLIME || + mob->GetType() == eTYPE_ENDERDRAGON) { awardStat(GenericStats::killEnemy(), GenericStats::param_noArgs()); switch (mob->GetType()) { @@ -2509,7 +2508,7 @@ bool Player::isAllowedToUse(std::shared_ptr item) { bool Player::isAllowedToInteract(std::shared_ptr target) { bool allowed = true; if (gameServices().getGameHostOption(eGameHostOption_TrustPlayers) == 0) { - if (target->instanceof (eTYPE_MINECART)) { + if (target->instanceof(eTYPE_MINECART)) { if (getPlayerGamePrivilege( Player::ePlayerGamePrivilege_CanUseContainers) == 0) { std::shared_ptr minecart = diff --git a/targets/minecraft/world/entity/projectile/Arrow.cpp b/targets/minecraft/world/entity/projectile/Arrow.cpp index 681d1c345..d5b7719fc 100644 --- a/targets/minecraft/world/entity/projectile/Arrow.cpp +++ b/targets/minecraft/world/entity/projectile/Arrow.cpp @@ -8,12 +8,12 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/network/packet/GameEventPacket.h" #include "minecraft/server/level/ServerPlayer.h" #include "minecraft/server/network/PlayerConnection.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/util/Log.h" #include "minecraft/util/Mth.h" @@ -75,7 +75,7 @@ Arrow::Arrow(Level* level, std::shared_ptr mob, viewScale = 10; owner = mob; - if (mob->instanceof (eTYPE_PLAYER)) pickup = PICKUP_ALLOWED; + if (mob->instanceof(eTYPE_PLAYER)) pickup = PICKUP_ALLOWED; y = mob->y + mob->getHeadHeight() - 0.1f; @@ -113,7 +113,7 @@ Arrow::Arrow(Level* level, std::shared_ptr mob, float power) viewScale = 10; owner = mob; - if (mob->instanceof (eTYPE_PLAYER)) pickup = PICKUP_ALLOWED; + if (mob->instanceof(eTYPE_PLAYER)) pickup = PICKUP_ALLOWED; setSize(0.5f, 0.5f); @@ -275,17 +275,16 @@ void Arrow::tick() { res = new HitResult(hitEntity); } - if ((res != nullptr) && (res->entity != nullptr) && res->entity->instanceof - (eTYPE_PLAYER)) { + if ((res != nullptr) && (res->entity != nullptr) && + res->entity->instanceof(eTYPE_PLAYER)) { std::shared_ptr player = std::dynamic_pointer_cast(res->entity); // 4J: Check for owner being null if (player->abilities.invulnerable || ((owner != nullptr) && - (owner->instanceof - (eTYPE_PLAYER) && - !std::dynamic_pointer_cast(owner)->canHarmPlayer( - player)))) { + (owner->instanceof(eTYPE_PLAYER) && + !std::dynamic_pointer_cast(owner)->canHarmPlayer( + player)))) { res = nullptr; } } @@ -319,7 +318,7 @@ void Arrow::tick() { res->entity->setOnFire(5); } - if (res->entity->instanceof (eTYPE_LIVINGENTITY)) { + if (res->entity->instanceof(eTYPE_LIVINGENTITY)) { std::shared_ptr mob = std::dynamic_pointer_cast(res->entity); @@ -351,11 +350,11 @@ void Arrow::tick() { // 4J : WESTY : For award, need to track if creeper was killed // by arrow from the player. - if (owner != nullptr && owner->instanceof - (eTYPE_PLAYER) // arrow owner is a player - && !res->entity->isAlive() // target is now dead - && (res->entity->GetType() == - eTYPE_CREEPER)) // target is a creeper + if (owner != nullptr && + owner->instanceof(eTYPE_PLAYER) // arrow owner is a player + && !res->entity->isAlive() // target is now dead + && (res->entity->GetType() == + eTYPE_CREEPER)) // target is a creeper { std::dynamic_pointer_cast(owner)->awardStat( diff --git a/targets/minecraft/world/entity/projectile/Fireball.cpp b/targets/minecraft/world/entity/projectile/Fireball.cpp index ed1c7e281..b94a38b61 100644 --- a/targets/minecraft/world/entity/projectile/Fireball.cpp +++ b/targets/minecraft/world/entity/projectile/Fireball.cpp @@ -324,7 +324,7 @@ bool Fireball::hurt(DamageSource* source, float damage) { zPower = zd * 0.1; } - if (source->getEntity()->instanceof (eTYPE_LIVINGENTITY)) { + if (source->getEntity()->instanceof(eTYPE_LIVINGENTITY)) { owner = std::dynamic_pointer_cast(source->getEntity()); } diff --git a/targets/minecraft/world/entity/projectile/FireworksRocketEntity.cpp b/targets/minecraft/world/entity/projectile/FireworksRocketEntity.cpp index e3425b1ad..40f4e332d 100644 --- a/targets/minecraft/world/entity/projectile/FireworksRocketEntity.cpp +++ b/targets/minecraft/world/entity/projectile/FireworksRocketEntity.cpp @@ -5,10 +5,10 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/SharedConstants.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/EntityEvent.h" diff --git a/targets/minecraft/world/entity/projectile/FishingHook.cpp b/targets/minecraft/world/entity/projectile/FishingHook.cpp index 15557631f..f86354118 100644 --- a/targets/minecraft/world/entity/projectile/FishingHook.cpp +++ b/targets/minecraft/world/entity/projectile/FishingHook.cpp @@ -7,9 +7,9 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" diff --git a/targets/minecraft/world/entity/projectile/Snowball.cpp b/targets/minecraft/world/entity/projectile/Snowball.cpp index 8d6489aba..787846ef3 100644 --- a/targets/minecraft/world/entity/projectile/Snowball.cpp +++ b/targets/minecraft/world/entity/projectile/Snowball.cpp @@ -30,7 +30,7 @@ Snowball::Snowball(Level* level, double x, double y, double z) void Snowball::onHit(HitResult* res) { if (res->entity != nullptr) { int damage = 0; - if (res->entity->instanceof (eTYPE_BLAZE)) { + if (res->entity->instanceof(eTYPE_BLAZE)) { damage = 3; } diff --git a/targets/minecraft/world/entity/projectile/Throwable.cpp b/targets/minecraft/world/entity/projectile/Throwable.cpp index 7cb64e44b..728b15944 100644 --- a/targets/minecraft/world/entity/projectile/Throwable.cpp +++ b/targets/minecraft/world/entity/projectile/Throwable.cpp @@ -249,8 +249,8 @@ void Throwable::addAdditonalSaveData(CompoundTag* tag) { tag->putByte("shake", (uint8_t)shakeTime); tag->putByte("inGround", (uint8_t)(inGround ? 1 : 0)); - if (ownerName.empty() && (owner != nullptr) && owner->instanceof - (eTYPE_PLAYER)) { + if (ownerName.empty() && (owner != nullptr) && + owner->instanceof(eTYPE_PLAYER)) { ownerName = owner->getAName(); } diff --git a/targets/minecraft/world/entity/projectile/ThrownEnderpearl.cpp b/targets/minecraft/world/entity/projectile/ThrownEnderpearl.cpp index abf679bd5..0ada74647 100644 --- a/targets/minecraft/world/entity/projectile/ThrownEnderpearl.cpp +++ b/targets/minecraft/world/entity/projectile/ThrownEnderpearl.cpp @@ -52,8 +52,8 @@ void ThrownEnderpearl::onHit(HitResult* res) { // the ground. If the owner has been removed, then ignore // 4J-JEV: Cheap type check first. - if ((getOwner() != nullptr) && getOwner()->instanceof - (eTYPE_SERVERPLAYER)) { + if ((getOwner() != nullptr) && + getOwner()->instanceof(eTYPE_SERVERPLAYER)) { std::shared_ptr serverPlayer = std::dynamic_pointer_cast(getOwner()); if (!serverPlayer->removed) { diff --git a/targets/minecraft/world/entity/projectile/WitherSkull.cpp b/targets/minecraft/world/entity/projectile/WitherSkull.cpp index b9b2b4f47..e1646e35e 100644 --- a/targets/minecraft/world/entity/projectile/WitherSkull.cpp +++ b/targets/minecraft/world/entity/projectile/WitherSkull.cpp @@ -74,7 +74,7 @@ void WitherSkull::onHit(HitResult* res) { } else { res->entity->hurt(DamageSource::magic, 5); } - if (res->entity->instanceof (eTYPE_LIVINGENTITY)) { + if (res->entity->instanceof(eTYPE_LIVINGENTITY)) { int witherSeconds = 0; if (level->difficulty <= Difficulty::EASY) { // Nothing diff --git a/targets/minecraft/world/item/ArmorItem.cpp b/targets/minecraft/world/item/ArmorItem.cpp index ba9a78897..f8e1da6b6 100644 --- a/targets/minecraft/world/item/ArmorItem.cpp +++ b/targets/minecraft/world/item/ArmorItem.cpp @@ -53,12 +53,12 @@ std::shared_ptr ArmorItem::ArmorDispenseItemBehavior::execute( if (entities->size() > 0) { std::shared_ptr target = std::dynamic_pointer_cast(entities->at(0)); - int offset = target->instanceof (eTYPE_PLAYER) ? 1 : 0; + int offset = target->instanceof(eTYPE_PLAYER) ? 1 : 0; int slot = Mob::getEquipmentSlotForItem(dispensed); std::shared_ptr equip = dispensed->copy(); equip->count = 1; target->setEquippedSlot(slot - offset, equip); - if (target->instanceof (eTYPE_MOB)) + if (target->instanceof(eTYPE_MOB)) std::dynamic_pointer_cast(target)->setDropChance(slot, 2); dispensed->count--; diff --git a/targets/minecraft/world/item/BowItem.cpp b/targets/minecraft/world/item/BowItem.cpp index ed816e6f0..014d00f91 100644 --- a/targets/minecraft/world/item/BowItem.cpp +++ b/targets/minecraft/world/item/BowItem.cpp @@ -2,8 +2,8 @@ #include -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Inventory.h" diff --git a/targets/minecraft/world/item/BucketItem.cpp b/targets/minecraft/world/item/BucketItem.cpp index 6b0a50735..fcf8ae7fd 100644 --- a/targets/minecraft/world/item/BucketItem.cpp +++ b/targets/minecraft/world/item/BucketItem.cpp @@ -3,6 +3,7 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Class.h" #include "java/JavaMath.h" #include "java/Random.h" @@ -10,7 +11,6 @@ #include "minecraft/network/packet/ChatPacket.h" #include "minecraft/server/level/ServerPlayer.h" #include "minecraft/server/network/PlayerConnection.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/util/Log.h" #include "minecraft/world/entity/Entity.h" diff --git a/targets/minecraft/world/item/EggItem.cpp b/targets/minecraft/world/item/EggItem.cpp index a2f4709b2..c19365395 100644 --- a/targets/minecraft/world/item/EggItem.cpp +++ b/targets/minecraft/world/item/EggItem.cpp @@ -3,8 +3,8 @@ #include -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/ThrownEgg.h" diff --git a/targets/minecraft/world/item/EnderEyeItem.cpp b/targets/minecraft/world/item/EnderEyeItem.cpp index 2152a8d8a..0306b184c 100644 --- a/targets/minecraft/world/item/EnderEyeItem.cpp +++ b/targets/minecraft/world/item/EnderEyeItem.cpp @@ -2,10 +2,10 @@ #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/Direction.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Log.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" diff --git a/targets/minecraft/world/item/EnderpearlItem.cpp b/targets/minecraft/world/item/EnderpearlItem.cpp index 36a71a464..91c7557ac 100644 --- a/targets/minecraft/world/item/EnderpearlItem.cpp +++ b/targets/minecraft/world/item/EnderpearlItem.cpp @@ -2,8 +2,8 @@ #include -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/ThrownEnderpearl.h" diff --git a/targets/minecraft/world/item/ExperienceItem.cpp b/targets/minecraft/world/item/ExperienceItem.cpp index 012abb104..9b8bc55c2 100644 --- a/targets/minecraft/world/item/ExperienceItem.cpp +++ b/targets/minecraft/world/item/ExperienceItem.cpp @@ -2,8 +2,8 @@ #include -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/ThrownExpBottle.h" diff --git a/targets/minecraft/world/item/FireChargeItem.cpp b/targets/minecraft/world/item/FireChargeItem.cpp index 6c7f92463..a33e5d6a4 100644 --- a/targets/minecraft/world/item/FireChargeItem.cpp +++ b/targets/minecraft/world/item/FireChargeItem.cpp @@ -3,8 +3,8 @@ #include #include -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" diff --git a/targets/minecraft/world/item/FishingRodItem.cpp b/targets/minecraft/world/item/FishingRodItem.cpp index 17198e4ee..21380eae0 100644 --- a/targets/minecraft/world/item/FishingRodItem.cpp +++ b/targets/minecraft/world/item/FishingRodItem.cpp @@ -3,8 +3,8 @@ #include #include -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/FishingHook.h" diff --git a/targets/minecraft/world/item/FlintAndSteelItem.cpp b/targets/minecraft/world/item/FlintAndSteelItem.cpp index 765ab961e..735a58b87 100644 --- a/targets/minecraft/world/item/FlintAndSteelItem.cpp +++ b/targets/minecraft/world/item/FlintAndSteelItem.cpp @@ -2,8 +2,8 @@ #include -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/item/Item.h" diff --git a/targets/minecraft/world/item/FoodItem.cpp b/targets/minecraft/world/item/FoodItem.cpp index 68c9fca60..c5bd47495 100644 --- a/targets/minecraft/world/item/FoodItem.cpp +++ b/targets/minecraft/world/item/FoodItem.cpp @@ -1,8 +1,8 @@ #include "FoodItem.h" +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/SharedConstants.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/effect/MobEffectInstance.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/food/FoodConstants.h" diff --git a/targets/minecraft/world/item/MapItem.cpp b/targets/minecraft/world/item/MapItem.cpp index 7cd5c8cb4..35d541dc7 100644 --- a/targets/minecraft/world/item/MapItem.cpp +++ b/targets/minecraft/world/item/MapItem.cpp @@ -105,8 +105,8 @@ std::shared_ptr MapItem::getSavedData( void MapItem::update(Level* level, std::shared_ptr player, std::shared_ptr data) { - if ((level->dimension->id != data->dimension) || !player->instanceof - (eTYPE_PLAYER)) { + if ((level->dimension->id != data->dimension) || + !player->instanceof(eTYPE_PLAYER)) { // Wrong dimension, abort return; } @@ -267,7 +267,7 @@ void MapItem::inventoryTick(std::shared_ptr itemInstance, if (level->isClientSide) return; std::shared_ptr data = getSavedData(itemInstance, level); - if (owner->instanceof (eTYPE_PLAYER)) { + if (owner->instanceof(eTYPE_PLAYER)) { std::shared_ptr player = std::dynamic_pointer_cast(owner); diff --git a/targets/minecraft/world/item/NameTagItem.cpp b/targets/minecraft/world/item/NameTagItem.cpp index a1c7e6148..07912462c 100644 --- a/targets/minecraft/world/item/NameTagItem.cpp +++ b/targets/minecraft/world/item/NameTagItem.cpp @@ -16,7 +16,7 @@ bool NameTagItem::interactEnemy(std::shared_ptr itemInstance, std::shared_ptr target) { if (!itemInstance->hasCustomHoverName()) return false; - if ((target != nullptr) && target->instanceof (eTYPE_MOB)) { + if ((target != nullptr) && target->instanceof(eTYPE_MOB)) { std::shared_ptr mob = std::dynamic_pointer_cast(target); mob->setCustomName(itemInstance->getHoverName()); mob->setPersistenceRequired(); diff --git a/targets/minecraft/world/item/PotionItem.cpp b/targets/minecraft/world/item/PotionItem.cpp index 887160520..4cc05d4f1 100644 --- a/targets/minecraft/world/item/PotionItem.cpp +++ b/targets/minecraft/world/item/PotionItem.cpp @@ -2,11 +2,11 @@ #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/GameEnums.h" #include "minecraft/IGameServices.h" #include "minecraft/SharedConstants.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/HtmlString.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/effect/MobEffect.h" diff --git a/targets/minecraft/world/item/SaddleItem.cpp b/targets/minecraft/world/item/SaddleItem.cpp index b8bfecf95..3e91f56e2 100644 --- a/targets/minecraft/world/item/SaddleItem.cpp +++ b/targets/minecraft/world/item/SaddleItem.cpp @@ -13,7 +13,7 @@ SaddleItem::SaddleItem(int id) : Item(id) { maxStackSize = 1; } bool SaddleItem::interactEnemy(std::shared_ptr itemInstance, std::shared_ptr player, std::shared_ptr mob) { - if ((mob != nullptr) && mob->instanceof (eTYPE_PIG)) { + if ((mob != nullptr) && mob->instanceof(eTYPE_PIG)) { std::shared_ptr pig = std::dynamic_pointer_cast(mob); if (!pig->hasSaddle() && !pig->isBaby()) { pig->setSaddle(true); diff --git a/targets/minecraft/world/item/SkullItem.cpp b/targets/minecraft/world/item/SkullItem.cpp index f61e3ebad..8a711587e 100644 --- a/targets/minecraft/world/item/SkullItem.cpp +++ b/targets/minecraft/world/item/SkullItem.cpp @@ -125,7 +125,9 @@ unsigned int SkullItem::getDescriptionId( std::string SkullItem::getHoverName( std::shared_ptr itemInstance) { - { return Item::getHoverName(itemInstance); } + { + return Item::getHoverName(itemInstance); + } } void SkullItem::registerIcons(IconRegister* iconRegister) { diff --git a/targets/minecraft/world/item/SnowballItem.cpp b/targets/minecraft/world/item/SnowballItem.cpp index d0a35e990..f6f1ceef9 100644 --- a/targets/minecraft/world/item/SnowballItem.cpp +++ b/targets/minecraft/world/item/SnowballItem.cpp @@ -2,8 +2,8 @@ #include -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/world/entity/player/Abilities.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/entity/projectile/Snowball.h" diff --git a/targets/minecraft/world/item/SpawnEggItem.cpp b/targets/minecraft/world/item/SpawnEggItem.cpp index 629a3d8bd..240b6561b 100644 --- a/targets/minecraft/world/item/SpawnEggItem.cpp +++ b/targets/minecraft/world/item/SpawnEggItem.cpp @@ -140,7 +140,7 @@ std::shared_ptr SpawnEggItem::canSpawn(int iAuxVal, Level* level, } // 4J: Use eTYPE_ENEMY instead of monster (slimes and ghasts // aren't monsters) - else if (newEntity->instanceof (eTYPE_ENEMY)) { + else if (newEntity->instanceof(eTYPE_ENEMY)) { // 4J-PB - check if the player is trying to spawn an enemy // in peaceful mode if (level->difficulty == Difficulty::PEACEFUL) { @@ -218,8 +218,8 @@ bool SpawnEggItem::useOn(std::shared_ptr itemInstance, if (result != nullptr) { // 4J-JEV: SetCustomName is a method for Mob not LivingEntity; so change // instanceof to check for Mobs. - if (result->instanceof - (eTYPE_MOB) && itemInstance->hasCustomHoverName()) { + if (result->instanceof(eTYPE_MOB) && + itemInstance->hasCustomHoverName()) { std::dynamic_pointer_cast(result)->setCustomName( itemInstance->getHoverName()); } @@ -263,8 +263,8 @@ std::shared_ptr SpawnEggItem::use( if (result != nullptr) { // 4J-JEV: SetCustomName is a method for Mob not LivingEntity; // so change instanceof to check for Mobs. - if (result->instanceof - (eTYPE_MOB) && itemInstance->hasCustomHoverName()) { + if (result->instanceof(eTYPE_MOB) && + itemInstance->hasCustomHoverName()) { std::dynamic_pointer_cast(result)->setCustomName( itemInstance->getHoverName()); } @@ -301,7 +301,7 @@ std::shared_ptr SpawnEggItem::spawnMobAt(Level* level, int auxVal, // 4J-JEV: DynCasting to Mob not LivingEntity; so change instanceof to // check for Mobs. - if (newEntity != nullptr && newEntity->instanceof (eTYPE_MOB)) { + if (newEntity != nullptr && newEntity->instanceof(eTYPE_MOB)) { std::shared_ptr mob = std::dynamic_pointer_cast(newEntity); newEntity->moveTo( diff --git a/targets/minecraft/world/item/crafting/Recipes.h b/targets/minecraft/world/item/crafting/Recipes.h index b119769ad..33f9bc0bc 100644 --- a/targets/minecraft/world/item/crafting/Recipes.h +++ b/targets/minecraft/world/item/crafting/Recipes.h @@ -79,7 +79,7 @@ public: iteminstance = i; } - eINSTANCEOF instanceof () { return eType; } + eINSTANCEOF instanceof() { return eType; } eINSTANCEOF GetType() { return eType; }; private: diff --git a/targets/minecraft/world/item/enchantment/ThornsEnchantment.cpp b/targets/minecraft/world/item/enchantment/ThornsEnchantment.cpp index 3a1d78b91..39c08c393 100644 --- a/targets/minecraft/world/item/enchantment/ThornsEnchantment.cpp +++ b/targets/minecraft/world/item/enchantment/ThornsEnchantment.cpp @@ -1,7 +1,7 @@ #include "ThornsEnchantment.h" -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" diff --git a/targets/minecraft/world/level/BaseMobSpawner.cpp b/targets/minecraft/world/level/BaseMobSpawner.cpp index 3356314c8..893085100 100644 --- a/targets/minecraft/world/level/BaseMobSpawner.cpp +++ b/targets/minecraft/world/level/BaseMobSpawner.cpp @@ -114,8 +114,10 @@ void BaseMobSpawner::tick() { double zp = getZ() + (getLevel()->random->nextDouble() - getLevel()->random->nextDouble()) * spawnRange; - std::shared_ptr mob = entity->instanceof - (eTYPE_MOB) ? std::dynamic_pointer_cast(entity) : nullptr; + std::shared_ptr mob = + entity->instanceof(eTYPE_MOB) + ? std::dynamic_pointer_cast(entity) + : nullptr; entity->moveTo(xp, yp, zp, getLevel()->random->nextFloat() * 360, 0); @@ -179,8 +181,8 @@ std::shared_ptr BaseMobSpawner::loadDataAndAddEntity( data = ridingTag; } - } else if (entity->instanceof - (eTYPE_LIVINGENTITY) && entity->level != nullptr) { + } else if (entity->instanceof(eTYPE_LIVINGENTITY) && + entity->level != nullptr) { std::dynamic_pointer_cast(entity)->finalizeMobSpawn(nullptr); getLevel()->addEntity(entity); } diff --git a/targets/minecraft/world/level/Coord.h b/targets/minecraft/world/level/Coord.h index f2f94d092..e1add5020 100644 --- a/targets/minecraft/world/level/Coord.h +++ b/targets/minecraft/world/level/Coord.h @@ -5,5 +5,5 @@ public: const int x, y, z; public: - Coord(int x, int y, int z) : x(x), y(y), z(z){}; + Coord(int x, int y, int z) : x(x), y(y), z(z) {}; }; \ No newline at end of file diff --git a/targets/minecraft/world/level/Explosion.cpp b/targets/minecraft/world/level/Explosion.cpp index e6aeaa8af..172957645 100644 --- a/targets/minecraft/world/level/Explosion.cpp +++ b/targets/minecraft/world/level/Explosion.cpp @@ -6,10 +6,10 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Class.h" #include "java/Random.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Log.h" #include "minecraft/util/Mth.h" #include "minecraft/world/damageSource/DamageSource.h" @@ -170,7 +170,7 @@ void Explosion::explode() { e->yd += ya * kbPower; e->zd += za * kbPower; - if (e->instanceof (eTYPE_PLAYER)) { + if (e->instanceof(eTYPE_PLAYER)) { std::shared_ptr player = std::dynamic_pointer_cast(e); // Log::info("Adding player knockback (%f,%f,%f)\n", xa * @@ -300,9 +300,9 @@ Vec3 Explosion::getHitPlayerKnockback(std::shared_ptr player) { std::shared_ptr Explosion::getSourceMob() { if (source == nullptr) return nullptr; - if (source->instanceof (eTYPE_PRIMEDTNT)) + if (source->instanceof(eTYPE_PRIMEDTNT)) return std::dynamic_pointer_cast(source)->getOwner(); - if (source->instanceof (eTYPE_LIVINGENTITY)) + if (source->instanceof(eTYPE_LIVINGENTITY)) return std::dynamic_pointer_cast(source); return nullptr; } diff --git a/targets/minecraft/world/level/Level.cpp b/targets/minecraft/world/level/Level.cpp index c1a109294..72184ddd9 100644 --- a/targets/minecraft/world/level/Level.cpp +++ b/targets/minecraft/world/level/Level.cpp @@ -14,6 +14,7 @@ #include "Explosion.h" #include "LevelListener.h" +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/Console_Debug_enum.h" #include "minecraft/Direction.h" @@ -27,7 +28,6 @@ #include "minecraft/client/resources/Colours/ColourTable.h" #include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/network/INetworkService.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/util/Log.h" #include "minecraft/util/Mth.h" @@ -1574,12 +1574,12 @@ bool Level::addEntity(std::shared_ptr e) { } bool forced = e->forcedLoading; - if (e->instanceof (eTYPE_PLAYER)) { + if (e->instanceof(eTYPE_PLAYER)) { forced = true; } if (forced || hasChunk(xc, zc)) { - if (e->instanceof (eTYPE_PLAYER)) { + if (e->instanceof(eTYPE_PLAYER)) { std::shared_ptr player = std::dynamic_pointer_cast(e); @@ -1634,7 +1634,7 @@ void Level::removeEntity(std::shared_ptr e) { e->ride(nullptr); } e->remove(); - if (e->instanceof (eTYPE_PLAYER)) { + if (e->instanceof(eTYPE_PLAYER)) { std::vector >::iterator it = players.begin(); std::vector >::iterator itEnd = players.end(); while (it != itEnd && *it != std::dynamic_pointer_cast(e)) it++; @@ -1653,7 +1653,7 @@ void Level::removeEntity(std::shared_ptr e) { void Level::removeEntityImmediately(std::shared_ptr e) { e->remove(); - if (e->instanceof (eTYPE_PLAYER)) { + if (e->instanceof(eTYPE_PLAYER)) { std::vector >::iterator it = players.begin(); std::vector >::iterator itEnd = players.end(); while (it != itEnd && *it != std::dynamic_pointer_cast(e)) it++; @@ -2113,8 +2113,8 @@ void Level::tickEntities() { if (!e->removed) { #if !defined(_FINAL_BUILD) if (!(gameServices().debugSettingsOn() && - gameServices().debugMobsDontTick() && e->instanceof - (eTYPE_MOB) && !e->instanceof (eTYPE_PLAYER))) + gameServices().debugMobsDontTick() && + e->instanceof(eTYPE_MOB) && !e->instanceof(eTYPE_PLAYER))) #endif { tick(e); @@ -3445,7 +3445,7 @@ unsigned int Level::countInstanceOf( count++; } } else { - if (e->instanceof (clas)) count++; + if (e->instanceof(clas)) count++; } } } @@ -3472,7 +3472,7 @@ unsigned int Level::countInstanceOfInRange(eINSTANCEOF clas, bool singleType, count++; } } else { - if (e->instanceof (clas)) count++; + if (e->instanceof(clas)) count++; } } } @@ -4224,7 +4224,7 @@ bool Level::canCreateMore(eINSTANCEOF type, ESPAWN_TYPE spawnType) { } // 4J: Use eTYPE_ENEMY instead of monster (slimes and ghasts // aren't monsters) - else if (Entity:: instanceof (type, eTYPE_ENEMY)) { + else if (Entity::instanceof(type, eTYPE_ENEMY)) { count = countInstanceOf(eTYPE_ENEMY, false); max = MobCategory::MAX_XBOX_MONSTERS_WITH_SPAWN_EGG; } else if ((type & eTYPE_AMBIENT) == eTYPE_AMBIENT) { @@ -4232,10 +4232,10 @@ bool Level::canCreateMore(eINSTANCEOF type, ESPAWN_TYPE spawnType) { max = MobCategory::MAX_AMBIENT_WITH_SPAWN_EGG; } // 4J: Added minecart and boats - else if (Entity:: instanceof (type, eTYPE_MINECART)) { + else if (Entity::instanceof(type, eTYPE_MINECART)) { count = countInstanceOf(eTYPE_MINECART, false); max = Level::MAX_CONSOLE_MINECARTS; - } else if (Entity:: instanceof (type, eTYPE_BOAT)) { + } else if (Entity::instanceof(type, eTYPE_BOAT)) { count = countInstanceOf(eTYPE_BOAT, true); max = Level::MAX_XBOX_BOATS; } diff --git a/targets/minecraft/world/level/Level.h b/targets/minecraft/world/level/Level.h index 741f607b7..3b71af1f6 100644 --- a/targets/minecraft/world/level/Level.h +++ b/targets/minecraft/world/level/Level.h @@ -22,8 +22,8 @@ #include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/saveddata/SavedData.h" #include "minecraft/world/phys/AABB.h" -#include "platform/thread/C4JThread.h" #include "platform/PlatformTypes.h" +#include "platform/thread/C4JThread.h" class CompoundTag; class ItemInstance; diff --git a/targets/minecraft/world/level/biome/IceBiome.cpp b/targets/minecraft/world/level/biome/IceBiome.cpp index 2354d4642..e9e076cb7 100644 --- a/targets/minecraft/world/level/biome/IceBiome.cpp +++ b/targets/minecraft/world/level/biome/IceBiome.cpp @@ -2,4 +2,4 @@ #include "minecraft/world/level/biome/Biome.h" -IceBiome::IceBiome(int id) : Biome(id){}; \ No newline at end of file +IceBiome::IceBiome(int id) : Biome(id) {}; \ No newline at end of file diff --git a/targets/minecraft/world/level/chunk/LevelChunk.cpp b/targets/minecraft/world/level/chunk/LevelChunk.cpp index 40c9779cb..ef39bfa8e 100644 --- a/targets/minecraft/world/level/chunk/LevelChunk.cpp +++ b/targets/minecraft/world/level/chunk/LevelChunk.cpp @@ -1578,21 +1578,21 @@ void LevelChunk::getEntitiesOfClass(const std::type_info& ec, AABB* bb, // that our class may be derived from, otherwise do a direct // comparison of type_info if (ec == typeid(Player)) - isAssignableFrom = e->instanceof (eTYPE_PLAYER); + isAssignableFrom = e->instanceof(eTYPE_PLAYER); else if (ec == typeid(Entity)) - isAssignableFrom = e->instanceof (eTYPE_ENTITY); + isAssignableFrom = e->instanceof(eTYPE_ENTITY); else if (ec == typeid(Mob)) - isAssignableFrom = e->instanceof (eTYPE_MOB); + isAssignableFrom = e->instanceof(eTYPE_MOB); else if (ec == typeid(LivingEntity)) - isAssignableFrom = e->instanceof (eTYPE_LIVINGENTITY); + isAssignableFrom = e->instanceof(eTYPE_LIVINGENTITY); else if (ec == typeid(ItemEntity)) - isAssignableFrom = e->instanceof (eTYPE_ITEMENTITY); + isAssignableFrom = e->instanceof(eTYPE_ITEMENTITY); else if (ec == typeid(Minecart)) - isAssignableFrom = e->instanceof (eTYPE_MINECART); + isAssignableFrom = e->instanceof(eTYPE_MINECART); else if (ec == typeid(Monster)) - isAssignableFrom = e->instanceof (eTYPE_MONSTER); + isAssignableFrom = e->instanceof(eTYPE_MONSTER); else if (ec == typeid(Zombie)) - isAssignableFrom = e->instanceof (eTYPE_ZOMBIE); + isAssignableFrom = e->instanceof(eTYPE_ZOMBIE); else if (Entity* entity = e.get(); entity != nullptr && ec == typeid(*entity)) isAssignableFrom = true; diff --git a/targets/minecraft/world/level/chunk/SparseDataStorage.cpp b/targets/minecraft/world/level/chunk/SparseDataStorage.cpp index ffc746a48..adbce1b5e 100644 --- a/targets/minecraft/world/level/chunk/SparseDataStorage.cpp +++ b/targets/minecraft/world/level/chunk/SparseDataStorage.cpp @@ -90,7 +90,9 @@ SparseDataStorage::~SparseDataStorage() { // Determine correct means to free this data - could have been allocated // either with XPhysicalAlloc or malloc - { free(indicesAndData); } + { + free(indicesAndData); + } // printf("Free (in dtor) 0x%x\n", indicesAndData); } @@ -472,7 +474,9 @@ void SparseDataStorage::tick() { // if( toFree ) printf("Deleting 0x%x\n", toFree); // Determine correct means to free this data - could have been allocated // either with XPhysicalAlloc or malloc - { free(toFree); } + { + free(toFree); + } } while (toFree); deleteQueueIndex = (deleteQueueIndex + 1) % 3; diff --git a/targets/minecraft/world/level/chunk/SparseLightStorage.cpp b/targets/minecraft/world/level/chunk/SparseLightStorage.cpp index 6c521253d..8d32f546a 100644 --- a/targets/minecraft/world/level/chunk/SparseLightStorage.cpp +++ b/targets/minecraft/world/level/chunk/SparseLightStorage.cpp @@ -91,7 +91,9 @@ SparseLightStorage::~SparseLightStorage() { // Determine correct means to free this data - could have been allocated // either with XPhysicalAlloc or malloc - { free(indicesAndData); } + { + free(indicesAndData); + } // printf("Free (in dtor) 0x%x\n", indicesAndData); } @@ -476,7 +478,9 @@ void SparseLightStorage::tick() { // if( toFree ) printf("Deleting 0x%x\n", toFree); // Determine correct means to free this data - could have been allocated // either with XPhysicalAlloc or malloc - { free(toFree); } + { + free(toFree); + } } while (toFree); deleteQueueIndex = (deleteQueueIndex + 1) % 3; diff --git a/targets/minecraft/world/level/chunk/storage/McRegionChunkStorage.cpp b/targets/minecraft/world/level/chunk/storage/McRegionChunkStorage.cpp index 14b988009..2235e889f 100644 --- a/targets/minecraft/world/level/chunk/storage/McRegionChunkStorage.cpp +++ b/targets/minecraft/world/level/chunk/storage/McRegionChunkStorage.cpp @@ -29,8 +29,8 @@ #include "minecraft/world/level/storage/LevelData.h" #include "nbt/CompoundTag.h" #include "nbt/NbtIo.h" -#include "platform/thread/C4JThread.h" #include "platform/input/input.h" +#include "platform/thread/C4JThread.h" class DataInput; diff --git a/targets/minecraft/world/level/chunk/storage/OldChunkStorage.cpp b/targets/minecraft/world/level/chunk/storage/OldChunkStorage.cpp index 4bd51bb3a..560216ac6 100644 --- a/targets/minecraft/world/level/chunk/storage/OldChunkStorage.cpp +++ b/targets/minecraft/world/level/chunk/storage/OldChunkStorage.cpp @@ -97,7 +97,7 @@ void to_base36(int value, char* buf) { File OldChunkStorage::getFile(int x, int z) { constexpr int MAX_PATH_SIZE = 256; - + char name[MAX_PATH_SIZE]; char path1[MAX_PATH_SIZE]; char path2[MAX_PATH_SIZE]; diff --git a/targets/minecraft/world/level/levelgen/ConsoleSchematicFile.cpp b/targets/minecraft/world/level/levelgen/ConsoleSchematicFile.cpp index a70a8e6f2..33920b03c 100644 --- a/targets/minecraft/world/level/levelgen/ConsoleSchematicFile.cpp +++ b/targets/minecraft/world/level/levelgen/ConsoleSchematicFile.cpp @@ -215,8 +215,8 @@ int64_t ConsoleSchematicFile::applyBlocksAndData(LevelChunk* chunk, int zEnd = std::min(destinationBox->z1, (double)(zStart & ~15) + 16); #ifdef _DEBUG - Log::info("Range is (%d,%d,%d) to (%d,%d,%d)\n", xStart, yStart, - zStart, xEnd - 1, yEnd - 1, zEnd - 1); + Log::info("Range is (%d,%d,%d) to (%d,%d,%d)\n", xStart, yStart, zStart, + xEnd - 1, yEnd - 1, zEnd - 1); #endif int rowBlocksIncluded = (yEnd - yStart) * (zEnd - zStart); @@ -290,8 +290,7 @@ int64_t ConsoleSchematicFile::applyBlocksAndData(LevelChunk* chunk, dataP += (rowBlockCount - rowBlocksIncluded) / 2; } } else { - Log::info( - "ERROR: Rotation of block and data not implemented!!\n"); + Log::info("ERROR: Rotation of block and data not implemented!!\n"); } // 4J Stu - Hack for ME pack to replace sand with end stone in schematics @@ -555,8 +554,8 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk* chunk, AABB* chunkBox, e->absMoveTo(targetX, targetY, targetZ, e->yRot, e->xRot); } #ifdef _DEBUG - Log::info("Adding entity type %d at (%f,%f,%f)\n", e->GetType(), - e->x, e->y, e->z); + Log::info("Adding entity type %d at (%f,%f,%f)\n", e->GetType(), e->x, + e->y, e->z); #endif e->setLevel(chunk->level); e->resetSmallId(); @@ -749,9 +748,9 @@ void ConsoleSchematicFile::generateSchematicFile( bool mobCanBeSaved = false; if (bSaveMobs) { - if (e->instanceof (eTYPE_MONSTER) || e->instanceof - (eTYPE_WATERANIMAL) || e->instanceof - (eTYPE_ANIMAL) || (e->GetType() == eTYPE_VILLAGER)) + if (e->instanceof(eTYPE_MONSTER) || + e->instanceof(eTYPE_WATERANIMAL) || + e->instanceof(eTYPE_ANIMAL) || (e->GetType() == eTYPE_VILLAGER)) // 4J-JEV: All these are derived from eTYPE_ANIMAL and true // implicitly. @@ -765,9 +764,8 @@ void ConsoleSchematicFile::generateSchematicFile( // 4J-JEV: Changed to check for instances of minecarts and // hangingEntities instead of just eTYPE_PAINTING, eTYPE_ITEM_FRAME and // eTYPE_MINECART - if (mobCanBeSaved || e->instanceof - (eTYPE_MINECART) || e->GetType() == eTYPE_BOAT || e->instanceof - (eTYPE_HANGING_ENTITY)) { + if (mobCanBeSaved || e->instanceof(eTYPE_MINECART) || + e->GetType() == eTYPE_BOAT || e->instanceof(eTYPE_HANGING_ENTITY)) { CompoundTag* eTag = new CompoundTag(); if (e->save(eTag)) { ListTag* pos = @@ -777,7 +775,7 @@ void ConsoleSchematicFile::generateSchematicFile( pos->get(1)->data -= yStart; pos->get(2)->data -= zStart; - if (e->instanceof (eTYPE_HANGING_ENTITY)) { + if (e->instanceof(eTYPE_HANGING_ENTITY)) { ((IntTag*)eTag->get("TileX"))->data -= xStart; ((IntTag*)eTag->get("TileY"))->data -= yStart; ((IntTag*)eTag->get("TileZ"))->data -= zStart; diff --git a/targets/minecraft/world/level/levelgen/CustomLevelSource.cpp b/targets/minecraft/world/level/levelgen/CustomLevelSource.cpp index dc881bc4c..b0f4e6237 100644 --- a/targets/minecraft/world/level/levelgen/CustomLevelSource.cpp +++ b/targets/minecraft/world/level/levelgen/CustomLevelSource.cpp @@ -4,17 +4,16 @@ #include #include +#include "java/Random.h" #include "minecraft/IGameServices.h" #include "minecraft/util/Log.h" -#include "minecraft/world/level/GameRules/LevelGenerationOptions.h" -#include "minecraft/world/level/biome/Biome.h" -#include "minecraft/world/level/chunk/ChunkSource.h" -#include "platform/fs/fs.h" -#include "java/Random.h" #include "minecraft/world/entity/MobCategory.h" +#include "minecraft/world/level/GameRules/LevelGenerationOptions.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/MobSpawner.h" +#include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/biome/BiomeSource.h" +#include "minecraft/world/level/chunk/ChunkSource.h" #include "minecraft/world/level/chunk/LevelChunk.h" #include "minecraft/world/level/levelgen/CanyonFeature.h" #include "minecraft/world/level/levelgen/LargeCaveFeature.h" @@ -28,6 +27,7 @@ #include "minecraft/world/level/storage/LevelData.h" #include "minecraft/world/level/tile/HeavyTile.h" #include "minecraft/world/level/tile/Tile.h" +#include "platform/fs/fs.h" const double CustomLevelSource::SNOW_SCALE = 0.3; const double CustomLevelSource::SNOW_CUTOFF = 0.5; diff --git a/targets/minecraft/world/level/levelgen/feature/Feature.h b/targets/minecraft/world/level/levelgen/feature/Feature.h index 298b13852..bae9a41ce 100644 --- a/targets/minecraft/world/level/levelgen/feature/Feature.h +++ b/targets/minecraft/world/level/levelgen/feature/Feature.h @@ -10,7 +10,7 @@ private: public: Feature(); Feature(bool doUpdate); - virtual ~Feature(){}; + virtual ~Feature() {}; virtual bool place(Level* level, Random* random, int x, int y, int z) = 0; virtual bool placeWithIndex(Level* level, Random* random, int x, int y, diff --git a/targets/minecraft/world/level/newbiome/layer/BiomeOverrideLayer.cpp b/targets/minecraft/world/level/newbiome/layer/BiomeOverrideLayer.cpp index c1788941f..814cac593 100644 --- a/targets/minecraft/world/level/newbiome/layer/BiomeOverrideLayer.cpp +++ b/targets/minecraft/world/level/newbiome/layer/BiomeOverrideLayer.cpp @@ -4,9 +4,9 @@ #include "minecraft/IGameServices.h" #include "minecraft/util/Log.h" +#include "minecraft/world/level/biome/Biome.h" #include "minecraft/world/level/newbiome/layer/Layer.h" #include "platform/fs/fs.h" -#include "minecraft/world/level/biome/Biome.h" BiomeOverrideLayer::BiomeOverrideLayer(int seedMixup) : Layer(seedMixup) { m_biomeOverride = std::vector(width * height); diff --git a/targets/minecraft/world/level/pathfinder/Path.cpp b/targets/minecraft/world/level/pathfinder/Path.cpp index b8b67529e..f3bfe3e86 100644 --- a/targets/minecraft/world/level/pathfinder/Path.cpp +++ b/targets/minecraft/world/level/pathfinder/Path.cpp @@ -47,8 +47,7 @@ bool Path::sameAs(Path* path) { if (path == nullptr) return false; if (path->nodes.size() != nodes.size()) return false; for (size_t i = 0; i < nodes.size(); ++i) - if (nodes[i].x != path->nodes[i].x || - nodes[i].y != path->nodes[i].y || + if (nodes[i].x != path->nodes[i].x || nodes[i].y != path->nodes[i].y || nodes[i].z != path->nodes[i].z) return false; return true; diff --git a/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFile.h b/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFile.h index 1565a00c4..b58a8dd20 100644 --- a/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFile.h +++ b/targets/minecraft/world/level/storage/ConsoleSaveFileIO/ConsoleSaveFile.h @@ -10,7 +10,7 @@ enum class SaveFileSeekOrigin { Begin, Current, End }; class ConsoleSaveFile { public: - virtual ~ConsoleSaveFile(){}; + virtual ~ConsoleSaveFile() {}; virtual FileEntry* createFile(const ConsoleSavePath& fileName) = 0; virtual void deleteFile(FileEntry* file) = 0; diff --git a/targets/minecraft/world/level/tile/BasePressurePlateTile.cpp b/targets/minecraft/world/level/tile/BasePressurePlateTile.cpp index 05dcb4829..c07809683 100644 --- a/targets/minecraft/world/level/tile/BasePressurePlateTile.cpp +++ b/targets/minecraft/world/level/tile/BasePressurePlateTile.cpp @@ -2,9 +2,9 @@ #include +#include "app/common/Audio/SoundTypes.h" #include "minecraft/Facing.h" #include "minecraft/SharedConstants.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" diff --git a/targets/minecraft/world/level/tile/ButtonTile.cpp b/targets/minecraft/world/level/tile/ButtonTile.cpp index 03ac07cd1..a12482146 100644 --- a/targets/minecraft/world/level/tile/ButtonTile.cpp +++ b/targets/minecraft/world/level/tile/ButtonTile.cpp @@ -4,8 +4,8 @@ #include #include -#include "minecraft/Facing.h" #include "app/common/Audio/SoundTypes.h" +#include "minecraft/Facing.h" #include "minecraft/world/entity/projectile/Arrow.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" diff --git a/targets/minecraft/world/level/tile/CauldronTile.cpp b/targets/minecraft/world/level/tile/CauldronTile.cpp index b0285c05f..923512936 100644 --- a/targets/minecraft/world/level/tile/CauldronTile.cpp +++ b/targets/minecraft/world/level/tile/CauldronTile.cpp @@ -122,7 +122,7 @@ bool CauldronTile::use(Level* level, int x, int y, int z, } // 4J Stu - Brought forward change to update inventory when filling // bottles with water - else if (player->instanceof (eTYPE_SERVERPLAYER)) { + else if (player->instanceof(eTYPE_SERVERPLAYER)) { std::dynamic_pointer_cast(player) ->refreshContainer(player->inventoryMenu); } diff --git a/targets/minecraft/world/level/tile/ComparatorTile.cpp b/targets/minecraft/world/level/tile/ComparatorTile.cpp index db1ca0d29..0d8ae7f3d 100644 --- a/targets/minecraft/world/level/tile/ComparatorTile.cpp +++ b/targets/minecraft/world/level/tile/ComparatorTile.cpp @@ -2,9 +2,9 @@ #include +#include "app/common/Audio/SoundTypes.h" #include "minecraft/Direction.h" #include "minecraft/Facing.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/item/Item.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" diff --git a/targets/minecraft/world/level/tile/FarmTile.cpp b/targets/minecraft/world/level/tile/FarmTile.cpp index 1e8801522..5aefb4056 100644 --- a/targets/minecraft/world/level/tile/FarmTile.cpp +++ b/targets/minecraft/world/level/tile/FarmTile.cpp @@ -69,7 +69,7 @@ void FarmTile::fallOn(Level* level, int x, int y, int z, // the client based on random values! if (!level->isClientSide && level->random->nextFloat() < (fallDistance - .5f)) { - if (entity->instanceof (eTYPE_PLAYER)) { + if (entity->instanceof(eTYPE_PLAYER)) { std::shared_ptr player = std::dynamic_pointer_cast(entity); if (!player->isAllowedToMine()) { diff --git a/targets/minecraft/world/level/tile/FireTile.cpp b/targets/minecraft/world/level/tile/FireTile.cpp index 2f8baddd6..7e5b387d3 100644 --- a/targets/minecraft/world/level/tile/FireTile.cpp +++ b/targets/minecraft/world/level/tile/FireTile.cpp @@ -4,13 +4,13 @@ #include +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/GameEnums.h" #include "minecraft/IGameServices.h" #include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/server/MinecraftServer.h" #include "minecraft/server/PlayerList.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/level/GameRules.h" #include "minecraft/world/level/Level.h" diff --git a/targets/minecraft/world/level/tile/LeverTile.cpp b/targets/minecraft/world/level/tile/LeverTile.cpp index 22c4d5b07..0d5dd81fa 100644 --- a/targets/minecraft/world/level/tile/LeverTile.cpp +++ b/targets/minecraft/world/level/tile/LeverTile.cpp @@ -2,8 +2,8 @@ #include -#include "minecraft/Facing.h" #include "app/common/Audio/SoundTypes.h" +#include "minecraft/Facing.h" #include "minecraft/util/Mth.h" #include "minecraft/world/entity/LivingEntity.h" #include "minecraft/world/level/Level.h" diff --git a/targets/minecraft/world/level/tile/LiquidTile.cpp b/targets/minecraft/world/level/tile/LiquidTile.cpp index 1c5907f6c..b356250df 100644 --- a/targets/minecraft/world/level/tile/LiquidTile.cpp +++ b/targets/minecraft/world/level/tile/LiquidTile.cpp @@ -6,11 +6,11 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/JavaMath.h" #include "java/Random.h" #include "minecraft/Facing.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" diff --git a/targets/minecraft/world/level/tile/NotGateTile.cpp b/targets/minecraft/world/level/tile/NotGateTile.cpp index db819d4d5..e063bed09 100644 --- a/targets/minecraft/world/level/tile/NotGateTile.cpp +++ b/targets/minecraft/world/level/tile/NotGateTile.cpp @@ -1,8 +1,8 @@ #include "NotGateTile.h" +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Log.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" diff --git a/targets/minecraft/world/level/tile/NoteBlockTile.cpp b/targets/minecraft/world/level/tile/NoteBlockTile.cpp index fffbd8816..a3bc08cc3 100644 --- a/targets/minecraft/world/level/tile/NoteBlockTile.cpp +++ b/targets/minecraft/world/level/tile/NoteBlockTile.cpp @@ -3,8 +3,8 @@ #include #include -#include "minecraft/core/particles/ParticleTypes.h" #include "app/common/Audio/SoundTypes.h" +#include "minecraft/core/particles/ParticleTypes.h" #include "minecraft/util/Log.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/material/Material.h" diff --git a/targets/minecraft/world/level/tile/PortalTile.cpp b/targets/minecraft/world/level/tile/PortalTile.cpp index 9e0812784..011bcb432 100644 --- a/targets/minecraft/world/level/tile/PortalTile.cpp +++ b/targets/minecraft/world/level/tile/PortalTile.cpp @@ -3,10 +3,10 @@ #include #include +#include "app/common/Audio/SoundTypes.h" #include "java/Class.h" #include "java/Random.h" #include "minecraft/core/particles/ParticleTypes.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/item/SpawnEggItem.h" #include "minecraft/world/level/Level.h" diff --git a/targets/minecraft/world/level/tile/Tile.cpp b/targets/minecraft/world/level/tile/Tile.cpp index 81f514233..195a3f3cb 100644 --- a/targets/minecraft/world/level/tile/Tile.cpp +++ b/targets/minecraft/world/level/tile/Tile.cpp @@ -5,9 +5,9 @@ #include #include "Facing.h" +#include "app/common/Audio/SoundTypes.h" #include "java/Class.h" #include "java/Random.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/stats/GenericStats.h" #include "minecraft/stats/Stats.h" #include "minecraft/util/Log.h" diff --git a/targets/minecraft/world/level/tile/TntTile.cpp b/targets/minecraft/world/level/tile/TntTile.cpp index 148656845..641839c59 100644 --- a/targets/minecraft/world/level/tile/TntTile.cpp +++ b/targets/minecraft/world/level/tile/TntTile.cpp @@ -2,12 +2,12 @@ #include +#include "app/common/Audio/SoundTypes.h" #include "java/Class.h" #include "java/Random.h" #include "minecraft/Facing.h" #include "minecraft/GameEnums.h" #include "minecraft/IGameServices.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/Entity.h" #include "minecraft/world/entity/LivingEntity.h" @@ -116,8 +116,8 @@ void TntTile::entityInside(Level* level, int x, int y, int z, if (entity->isOnFire()) { std::shared_ptr arrow = std::dynamic_pointer_cast(entity); - destroy(level, x, y, z, EXPLODE_BIT, arrow->owner->instanceof - (eTYPE_LIVINGENTITY) + destroy(level, x, y, z, EXPLODE_BIT, + arrow->owner->instanceof(eTYPE_LIVINGENTITY) ? std::dynamic_pointer_cast(arrow->owner) : nullptr); level->removeTile(x, y, z); diff --git a/targets/minecraft/world/level/tile/TripWireSourceTile.cpp b/targets/minecraft/world/level/tile/TripWireSourceTile.cpp index b7fb1f9f5..2ca2b02a9 100644 --- a/targets/minecraft/world/level/tile/TripWireSourceTile.cpp +++ b/targets/minecraft/world/level/tile/TripWireSourceTile.cpp @@ -1,9 +1,9 @@ #include "TripWireSourceTile.h" +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/Direction.h" #include "minecraft/Facing.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/LevelSource.h" #include "minecraft/world/level/material/Material.h" diff --git a/targets/minecraft/world/level/tile/WaterLilyTile.cpp b/targets/minecraft/world/level/tile/WaterLilyTile.cpp index e096ba19f..94a56f6a2 100644 --- a/targets/minecraft/world/level/tile/WaterLilyTile.cpp +++ b/targets/minecraft/world/level/tile/WaterLilyTile.cpp @@ -30,7 +30,7 @@ int WaterlilyTile::getRenderShape() { return Tile::SHAPE_LILYPAD; } void WaterlilyTile::addAABBs(Level* level, int x, int y, int z, AABB* box, std::vector* boxes, std::shared_ptr source) { - if (source == nullptr || !source->instanceof (eTYPE_BOAT)) { + if (source == nullptr || !source->instanceof(eTYPE_BOAT)) { Bush::addAABBs(level, x, y, z, box, boxes, source); } } diff --git a/targets/minecraft/world/level/tile/entity/ChestTileEntity.cpp b/targets/minecraft/world/level/tile/entity/ChestTileEntity.cpp index 9993aecdd..02b57d53f 100644 --- a/targets/minecraft/world/level/tile/entity/ChestTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/ChestTileEntity.cpp @@ -7,10 +7,10 @@ #include "Direction.h" #include "SharedConstants.h" #include "TileEntity.h" +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/IGameServices.h" #include "minecraft/network/packet/ContainerOpenPacket.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/world/CompoundContainer.h" #include "minecraft/world/Container.h" #include "minecraft/world/entity/player/Player.h" diff --git a/targets/minecraft/world/level/tile/entity/EnderChestTileEntity.cpp b/targets/minecraft/world/level/tile/entity/EnderChestTileEntity.cpp index b8b6a9703..08172d448 100644 --- a/targets/minecraft/world/level/tile/entity/EnderChestTileEntity.cpp +++ b/targets/minecraft/world/level/tile/entity/EnderChestTileEntity.cpp @@ -1,7 +1,7 @@ #include "EnderChestTileEntity.h" -#include "java/Random.h" #include "app/common/Audio/SoundTypes.h" +#include "java/Random.h" #include "minecraft/world/entity/player/Player.h" #include "minecraft/world/level/Level.h" #include "minecraft/world/level/tile/ChestTile.h" diff --git a/targets/minecraft/world/level/tile/entity/TheEndPortalTile.cpp b/targets/minecraft/world/level/tile/entity/TheEndPortalTile.cpp index 5b34815b5..3228d298f 100644 --- a/targets/minecraft/world/level/tile/entity/TheEndPortalTile.cpp +++ b/targets/minecraft/world/level/tile/entity/TheEndPortalTile.cpp @@ -64,7 +64,7 @@ void TheEndPortal::entityInside(Level* level, int x, int y, int z, if (entity->riding == nullptr && entity->rider.lock() == nullptr) { if (!level->isClientSide) { - if (entity->instanceof (eTYPE_PLAYER)) { + if (entity->instanceof(eTYPE_PLAYER)) { // 4J Stu - Update the level data position so that the // stronghold portal can be shown on the maps int x, z; diff --git a/targets/minecraft/world/level/tile/piston/PistonBaseTile.cpp b/targets/minecraft/world/level/tile/piston/PistonBaseTile.cpp index 1280d81bd..4a8212e2d 100644 --- a/targets/minecraft/world/level/tile/piston/PistonBaseTile.cpp +++ b/targets/minecraft/world/level/tile/piston/PistonBaseTile.cpp @@ -3,11 +3,11 @@ #include #include "PistonExtensionTile.h" +#include "app/common/Audio/SoundTypes.h" #include "java/Random.h" #include "minecraft/Facing.h" #include "minecraft/client/Minecraft.h" #include "minecraft/client/multiplayer/MultiPlayerLevel.h" -#include "app/common/Audio/SoundTypes.h" #include "minecraft/util/Mth.h" #include "minecraft/world/IconRegister.h" #include "minecraft/world/entity/LivingEntity.h" diff --git a/targets/platform/network/IPlatformNetwork.h b/targets/platform/network/IPlatformNetwork.h index 345b8b335..9c240d0ad 100644 --- a/targets/platform/network/IPlatformNetwork.h +++ b/targets/platform/network/IPlatformNetwork.h @@ -5,8 +5,8 @@ #include #include -#include "platform/network/NetTypes.h" #include "platform/PlatformTypes.h" +#include "platform/network/NetTypes.h" #ifndef VER_NETWORK #define VER_NETWORK 560 diff --git a/targets/platform/network/network.h b/targets/platform/network/network.h index 9cd2be5a0..e953b9093 100644 --- a/targets/platform/network/network.h +++ b/targets/platform/network/network.h @@ -1,7 +1,7 @@ #pragma once -#include "IPlatformNetwork.h" #include "INetworkPlayer.h" +#include "IPlatformNetwork.h" #include "SessionInfo.h" // Function accessor backed by a function-local static (Meyers singleton). diff --git a/targets/platform/network/stub/StubNetworkPlayer.cpp b/targets/platform/network/stub/StubNetworkPlayer.cpp index e1a54a621..295c32d6f 100644 --- a/targets/platform/network/stub/StubNetworkPlayer.cpp +++ b/targets/platform/network/stub/StubNetworkPlayer.cpp @@ -2,8 +2,8 @@ #include "StubPlatformNetwork.h" #include "java/System.h" -#include "platform/network/NetTypes.h" #include "platform/PlatformTypes.h" +#include "platform/network/NetTypes.h" StubNetworkPlayer::StubNetworkPlayer() { m_pSocket = nullptr; } diff --git a/targets/platform/network/stub/StubNetworkPlayer.h b/targets/platform/network/stub/StubNetworkPlayer.h index 9a26dbf9b..90dced43e 100644 --- a/targets/platform/network/stub/StubNetworkPlayer.h +++ b/targets/platform/network/stub/StubNetworkPlayer.h @@ -4,8 +4,8 @@ #include -#include "platform/network/NetTypes.h" #include "platform/PlatformTypes.h" +#include "platform/network/NetTypes.h" #include "platform/network/network.h" class Socket; diff --git a/targets/platform/network/stub/StubPlatformNetwork.cpp b/targets/platform/network/stub/StubPlatformNetwork.cpp index f7870f4d6..1a0909ef9 100644 --- a/targets/platform/network/stub/StubPlatformNetwork.cpp +++ b/targets/platform/network/stub/StubPlatformNetwork.cpp @@ -8,9 +8,9 @@ #include "StubNetworkPlayer.h" #include "app/common/Network/GameNetworkManager.h" #include "minecraft/network/Socket.h" -#include "platform/thread/C4JThread.h" #include "platform/network/NetTypes.h" #include "platform/network/network.h" +#include "platform/thread/C4JThread.h" namespace platform_internal { IPlatformNetwork& PlatformNetwork_get() { diff --git a/targets/platform/network/stub/StubPlatformNetwork.h b/targets/platform/network/stub/StubPlatformNetwork.h index 142000bf0..9826eda2e 100644 --- a/targets/platform/network/stub/StubPlatformNetwork.h +++ b/targets/platform/network/stub/StubPlatformNetwork.h @@ -6,10 +6,10 @@ #include "StubNetworkPlayer.h" #include "minecraft/client/model/SkinBox.h" -#include "platform/network/NetTypes.h" #include "platform/PlatformTypes.h" #include "platform/XboxStubs.h" #include "platform/network/IPlatformNetwork.h" +#include "platform/network/NetTypes.h" #include "platform/network/network.h" class CGameNetworkManager; diff --git a/targets/platform/thread/C4JThread.cpp b/targets/platform/thread/C4JThread.cpp index 51bf0a84d..b469ee17d 100644 --- a/targets/platform/thread/C4JThread.cpp +++ b/targets/platform/thread/C4JThread.cpp @@ -488,7 +488,8 @@ std::uint32_t C4JThread::EventArray::waitForAny(int timeoutMs) { const std::uint32_t cur = m_signaledMask.load(std::memory_order_acquire); const std::uint32_t readyIndex = firstSetBitIndex(cur & bitMask); if (m_mode == Mode::AutoClear) { - m_signaledMask.fetch_and(~(1U << readyIndex), std::memory_order_release); + m_signaledMask.fetch_and(~(1U << readyIndex), + std::memory_order_release); } return WaitResult::Signaled + readyIndex; } diff --git a/targets/platform/thread/C4JThread.h b/targets/platform/thread/C4JThread.h index ee6d3ded8..52eb157ed 100644 --- a/targets/platform/thread/C4JThread.h +++ b/targets/platform/thread/C4JThread.h @@ -51,7 +51,8 @@ public: bool m_signaled; }; - // Lock-free bitmask of up to 32 events; waiters block via std::atomic::wait. + // Lock-free bitmask of up to 32 events; waiters block via + // std::atomic::wait. class EventArray { public: enum class Mode { AutoClear, ManualClear };